@lendi/navbar 7.44.2 → 7.44.4

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,6 +1,7 @@
1
1
  import { CTAProps } from '../../../shared/components/CTA';
2
2
  export interface UnReadProp {
3
3
  hasUnreadMessages?: boolean;
4
+ hasPartnerLogo?: boolean;
4
5
  }
5
6
  declare const CTAButtons: (props: CTAProps & UnReadProp) => JSX.Element;
6
7
  export default CTAButtons;
@@ -1,4 +1,4 @@
1
1
  import { CTAProps } from '../../../shared/components/CTA';
2
2
  import { UnReadProp } from '../CTA';
3
- declare const RenderMobileAction: ({ isAuthenticated, continueURL, customerOwner, openCommPanel, showContinueAction, showTalkToExpertCta, hasUnreadMessages, }: CTAProps & UnReadProp) => JSX.Element;
3
+ declare const RenderMobileAction: ({ isAuthenticated, continueURL, customerOwner, openCommPanel, showContinueAction, showTalkToExpertCta, hasUnreadMessages, hasPartnerLogo, }: CTAProps & UnReadProp) => JSX.Element;
4
4
  export default RenderMobileAction;
@@ -0,0 +1,5 @@
1
+ interface PartnerDropdownComponentProps {
2
+ onTalkToBroker: () => void;
3
+ }
4
+ export declare const PartnerDropdownComponent: ({ onTalkToBroker }: PartnerDropdownComponentProps) => JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ interface PartnerDropdownMenuProps {
2
+ onTalkToBroker: () => void;
3
+ }
4
+ export declare const PartnerDropdownMenu: ({ onTalkToBroker }: PartnerDropdownMenuProps) => JSX.Element;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const PartnerDropdownWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const TalkToBrokerButton: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, any, any>;
@@ -2,6 +2,7 @@ export interface LogoProps {
2
2
  params?: string;
3
3
  homeURL?: string;
4
4
  hasHamburgerMenu?: boolean;
5
+ hasPartnerLogo?: boolean;
5
6
  }
6
- declare const LogoComponent: ({ homeURL, params, hasHamburgerMenu }: LogoProps) => JSX.Element;
7
+ declare const LogoComponent: ({ homeURL, params, hasHamburgerMenu, hasPartnerLogo }: LogoProps) => JSX.Element;
7
8
  export default LogoComponent;
@@ -1,5 +1,6 @@
1
1
  interface HeaderLogo {
2
2
  isHref: boolean;
3
+ hasPartnerLogo: boolean;
3
4
  }
4
5
  export declare const StyledHeaderLogo: import("styled-components").StyledComponent<({ variant, width, height, className, isExpanded, isTeamView, brand, ...otherProps }: import("@lendi-ui/logo/src/Logo").LogoProps) => JSX.Element, import("styled-components").DefaultTheme, HeaderLogo, never>;
5
6
  export declare const LogoLink: import("styled-components").StyledComponent<"a", import("styled-components").DefaultTheme, {}, never>;
@@ -22,4 +22,5 @@ export declare const MenuLogoWrapper: import("styled-components").StyledComponen
22
22
  export declare const NavbarLeftWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
23
23
  export declare const NavbarRightWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
24
24
  export declare const AlertBanner: import("styled-components").StyledComponent<({ variant, heading, children, ...otherProps }: import("@lendi-ui/alert").AlertProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
25
+ export declare const PartnerLogo: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
25
26
  export {};
@@ -163,27 +163,32 @@ function _taggedTemplateLiteral(strings, raw) {
163
163
  }));
164
164
  }
165
165
 
166
- var _templateObject$g, _templateObject2$6, _templateObject3$2, _templateObject4$1, _templateObject5$1;
166
+ var _templateObject$g, _templateObject2$7, _templateObject3$3, _templateObject4$1, _templateObject5$1;
167
167
  var StyledHeaderLogo = styled__default["default"](Logo__default["default"]).withConfig({
168
168
  displayName: "style__StyledHeaderLogo",
169
169
  componentId: "lui__sc-17ip4hk-0"
170
- })(["", ";width:auto;height:28px;color:", ";", ";"], _ref => {
170
+ })(["", ";width:auto;height:", ";color:", ";", ";"], _ref => {
171
171
  var {
172
172
  isHref
173
173
  } = _ref;
174
174
  return isHref ? styled.css(["cursor:pointer;"]) : styled.css(["cursor:auto;"]);
175
175
  }, _ref2 => {
176
176
  var {
177
- variant
177
+ hasPartnerLogo
178
178
  } = _ref2;
179
- return variant === 'dark' ? 'secondary.900' : 'shade.0';
179
+ return hasPartnerLogo ? '20px' : '28px';
180
180
  }, _ref3 => {
181
181
  var {
182
- theme
182
+ variant
183
183
  } = _ref3;
184
+ return variant === 'dark' ? 'secondary.900' : 'shade.0';
185
+ }, _ref4 => {
186
+ var {
187
+ theme
188
+ } = _ref4;
184
189
  return Theme.select('logo.logoName')({
185
190
  theme
186
- }) === 'LendiLogo' ? styled.css(["", ";", ";"], breakpoint.gte('tablet')(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), breakpoint.gte('desktop')(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "])))) : styled.css(["", ";", ";"], breakpoint.gte('tablet')(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), breakpoint.gte('desktop')(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "]))));
191
+ }) === 'LendiLogo' ? styled.css(["", ";", ";"], breakpoint.gte('tablet')(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), breakpoint.gte('desktop')(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "])))) : styled.css(["", ";", ";"], breakpoint.gte('tablet')(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), breakpoint.gte('desktop')(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "]))));
187
192
  });
188
193
  var LogoLink$1 = styled__default["default"].a.withConfig({
189
194
  displayName: "style__LogoLink",
@@ -192,10 +197,10 @@ var LogoLink$1 = styled__default["default"].a.withConfig({
192
197
  var LogoWrapper = styled__default["default"].div.withConfig({
193
198
  displayName: "style__LogoWrapper",
194
199
  componentId: "lui__sc-17ip4hk-2"
195
- })(["", ";", ";", ";"], spacing.mb('xxxs'), _ref4 => {
200
+ })(["", ";", ";", ";"], spacing.mb('xxxs'), _ref5 => {
196
201
  var {
197
202
  hasHamburgerMenu
198
- } = _ref4;
203
+ } = _ref5;
199
204
  return hasHamburgerMenu ? styled.css(["", ""], spacing.ml('xs')) : styled.css(["", ""], spacing.ml('nil'));
200
205
  }, breakpoint.gte('desktop')(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n ", "\n margin-bottom: 5px;\n "])), spacing.ml('nil')));
201
206
 
@@ -203,7 +208,8 @@ var LogoComponent = _ref => {
203
208
  var {
204
209
  homeURL,
205
210
  params,
206
- hasHamburgerMenu = true
211
+ hasHamburgerMenu = true,
212
+ hasPartnerLogo = false
207
213
  } = _ref;
208
214
  var {
209
215
  isTransparent
@@ -231,14 +237,15 @@ var LogoComponent = _ref => {
231
237
  children: /*#__PURE__*/jsxRuntime.jsx(StyledHeaderLogo, {
232
238
  variant: variant,
233
239
  "aria-label": "Logo",
234
- isHref: false
240
+ isHref: false,
241
+ hasPartnerLogo: hasPartnerLogo
235
242
  })
236
243
  })
237
244
  });
238
245
  };
239
246
  var LogoComponent$1 = LogoComponent;
240
247
 
241
- var _templateObject$f;
248
+ var _templateObject$f, _templateObject2$6, _templateObject3$2;
242
249
  var navTokens = {
243
250
  size: {
244
251
  height: {
@@ -281,7 +288,7 @@ var MenuLogoWrapper = styled__default["default"].div.withConfig({
281
288
  var NavbarLeftWrapper = styled__default["default"].div.withConfig({
282
289
  displayName: "styles__NavbarLeftWrapper",
283
290
  componentId: "lui__sc-ej7i4l-3"
284
- })(["flex:1 0 auto;display:flex;align-items:center;gap:1rem;"]);
291
+ })(["flex:1 0 auto;display:flex;align-items:center;gap:0.5rem;", ";"], breakpoint.gte('desktop')(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n gap: 1rem;\n "]))));
285
292
  var NavbarRightWrapper = styled__default["default"].div.withConfig({
286
293
  displayName: "styles__NavbarRightWrapper",
287
294
  componentId: "lui__sc-ej7i4l-4"
@@ -294,6 +301,10 @@ var AlertBanner = styled__default["default"](Alert__default["default"]).withConf
294
301
  tablet: 'xs',
295
302
  desktop: 'sm'
296
303
  }));
304
+ var PartnerLogo = styled__default["default"].img.withConfig({
305
+ displayName: "styles__PartnerLogo",
306
+ componentId: "lui__sc-ej7i4l-6"
307
+ })(["height:30px;", ";"], breakpoint.gte('desktop')(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n height: 60px;\n "]))));
297
308
 
298
309
  var _templateObject$e, _templateObject2$5;
299
310
  var TalkExpertAction$1 = styled__default["default"](button.Button).withConfig({
@@ -765,6 +776,83 @@ var RenderDesktopAction = _ref2 => {
765
776
  };
766
777
  var RenderDesktopAction$1 = RenderDesktopAction;
767
778
 
779
+ var PartnerDropdownWrapper = styled__default["default"].div.withConfig({
780
+ displayName: "style__PartnerDropdownWrapper",
781
+ componentId: "lui__sc-1sietqn-0"
782
+ })(["position:absolute;right:5px;top:56px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:", ";border-radius:5px;", ""], _ref => {
783
+ var {
784
+ theme
785
+ } = _ref;
786
+ return theme.color.text.inverse;
787
+ }, depth.depth(2));
788
+ var TalkToBrokerButton = styled__default["default"](button.Button).withConfig({
789
+ displayName: "style__TalkToBrokerButton",
790
+ componentId: "lui__sc-1sietqn-1"
791
+ })(["", " ", ""], spacing.mx('sm'), spacing.my('sm'));
792
+
793
+ var PartnerDropdownMenu = _ref => {
794
+ var {
795
+ onTalkToBroker
796
+ } = _ref;
797
+ return /*#__PURE__*/jsxRuntime.jsx(PartnerDropdownWrapper, {
798
+ children: /*#__PURE__*/jsxRuntime.jsx(TalkToBrokerButton, {
799
+ variant: "primary",
800
+ size: "sm",
801
+ onClick: () => {
802
+ onTalkToBroker();
803
+ var event = {
804
+ event_name: 'Menu Element Clicked',
805
+ category: analytics$1.EventCategory.NAVBAR,
806
+ menuName: 'Partner Menu',
807
+ text: LABEL_TALK_TO_A_BROKER
808
+ };
809
+ analytics(event);
810
+ },
811
+ "aria-label": LABEL_TALK_TO_A_BROKER,
812
+ children: LABEL_TALK_TO_A_BROKER
813
+ })
814
+ });
815
+ };
816
+
817
+ var PartnerDropdownComponent = _ref => {
818
+ var {
819
+ onTalkToBroker
820
+ } = _ref;
821
+ var [isDropdownDisplay, setIsDropdownDisplay] = React__default["default"].useState(false);
822
+ var dropdownPanel = React__default["default"].useRef();
823
+ var hasWindow = typeof window !== 'undefined';
824
+ var theme = Theme.useTheme();
825
+ var closeDropdownPanel = e => {
826
+ if (dropdownPanel && dropdownPanel.current && !dropdownPanel.current.contains(e.target)) {
827
+ setIsDropdownDisplay(false);
828
+ }
829
+ };
830
+ React__default["default"].useEffect(() => {
831
+ if (hasWindow) {
832
+ window.addEventListener('mousedown', closeDropdownPanel);
833
+ }
834
+ return () => {
835
+ if (hasWindow) {
836
+ window.removeEventListener('mousedown', closeDropdownPanel);
837
+ }
838
+ };
839
+ });
840
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
841
+ ref: dropdownPanel,
842
+ children: [/*#__PURE__*/jsxRuntime.jsx(KebabMenu, {
843
+ size: "sm",
844
+ color: theme.color.interaction.main,
845
+ onClick: () => {
846
+ setIsDropdownDisplay(!isDropdownDisplay);
847
+ },
848
+ "aria-label": LABEL_TALK_TO_EXPERT,
849
+ icon: MoreVert__default["default"]
850
+ }), isDropdownDisplay && /*#__PURE__*/jsxRuntime.jsx(PartnerDropdownMenu, {
851
+ onTalkToBroker: onTalkToBroker
852
+ })]
853
+ });
854
+ };
855
+
768
856
  var _templateObject$a;
769
857
  var MobileActionsWrapper = styled__default["default"].div.withConfig({
770
858
  displayName: "style__MobileActionsWrapper",
@@ -780,7 +868,8 @@ var RenderMobileAction = _ref => {
780
868
  openCommPanel = () => {},
781
869
  showContinueAction = false,
782
870
  showTalkToExpertCta = true,
783
- hasUnreadMessages
871
+ hasUnreadMessages,
872
+ hasPartnerLogo
784
873
  } = _ref;
785
874
  var {
786
875
  isTransparent
@@ -792,32 +881,45 @@ var RenderMobileAction = _ref => {
792
881
  var signInURL = getSignInURL(brand, env, (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.location) === null || _window2 === void 0 ? void 0 : _window2.href);
793
882
  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;
794
883
  return /*#__PURE__*/jsxRuntime.jsxs(MobileActionsWrapper, {
795
- children: [showTalkToExpertCta && /*#__PURE__*/jsxRuntime.jsx(TalkExpertAction, {
796
- size: "sm",
797
- isInverse: isTransparent,
798
- className: "noHover",
799
- variant: "secondary",
800
- onClick: () => {
801
- openCommPanel();
802
- var event = {
803
- event_name: 'Button Clicked',
804
- category: analytics$1.EventCategory.NAVBAR,
805
- buttonType: analytics$1.ButtonType.SECONDARY,
806
- text: hasUnreadMessages ? 'You have an unread message' : brand === 'aussie' ? 'Talk to a broker' : 'Talk to an expert'
807
- };
808
- analytics(event);
809
- },
810
- children: hasUnreadMessages ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
811
- children: [/*#__PURE__*/jsxRuntime.jsx(UnreadMessageWrapper, {
812
- "data-testid": "customer-view-unread-icon",
813
- color: getColour.getColour('interaction', 'main'),
814
- height: "2em",
815
- width: "2em"
816
- }), UNREAD_MESSAGE_MOBILE]
817
- }) : /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
818
- children: primaryLabel
884
+ children: [showTalkToExpertCta && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
885
+ children: hasPartnerLogo ? /*#__PURE__*/jsxRuntime.jsx(PartnerDropdownComponent, {
886
+ onTalkToBroker: () => {
887
+ openCommPanel();
888
+ var event = {
889
+ event_name: 'Button Clicked',
890
+ category: analytics$1.EventCategory.NAVBAR,
891
+ buttonType: analytics$1.ButtonType.SECONDARY,
892
+ text: hasUnreadMessages ? 'You have an unread message' : brand === 'aussie' ? 'Talk to a broker' : 'Talk to an expert'
893
+ };
894
+ analytics(event);
895
+ }
896
+ }) : /*#__PURE__*/jsxRuntime.jsx(TalkExpertAction, {
897
+ size: "sm",
898
+ isInverse: isTransparent,
899
+ className: "noHover",
900
+ variant: "secondary",
901
+ onClick: () => {
902
+ openCommPanel();
903
+ var event = {
904
+ event_name: 'Button Clicked',
905
+ category: analytics$1.EventCategory.NAVBAR,
906
+ buttonType: analytics$1.ButtonType.SECONDARY,
907
+ text: hasUnreadMessages ? 'You have an unread message' : brand === 'aussie' ? 'Talk to a broker' : 'Talk to an expert'
908
+ };
909
+ analytics(event);
910
+ },
911
+ children: hasUnreadMessages ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
912
+ children: [/*#__PURE__*/jsxRuntime.jsx(UnreadMessageWrapper, {
913
+ "data-testid": "customer-view-unread-icon",
914
+ color: getColour.getColour('interaction', 'main'),
915
+ height: "2em",
916
+ width: "2em"
917
+ }), UNREAD_MESSAGE_MOBILE]
918
+ }) : /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
919
+ children: primaryLabel
920
+ })
819
921
  })
820
- }), needToSignIn() && /*#__PURE__*/jsxRuntime.jsx(SecondaryActionMobile, {
922
+ }), needToSignIn() && !hasPartnerLogo && /*#__PURE__*/jsxRuntime.jsx(SecondaryActionMobile, {
821
923
  size: "sm",
822
924
  variant: isAuthenticated ? 'emphasis' : 'primary',
823
925
  href: signInURL,
@@ -847,7 +949,7 @@ var RenderMobileAction = _ref => {
847
949
  analytics(event);
848
950
  },
849
951
  children: LABEL_CONTINUE
850
- }), isAuthenticated && /*#__PURE__*/jsxRuntime.jsx(LogoutComponent, {})]
952
+ }), isAuthenticated && !hasPartnerLogo && /*#__PURE__*/jsxRuntime.jsx(LogoutComponent, {})]
851
953
  });
852
954
  };
853
955
  var RenderMobileAction$1 = RenderMobileAction;
@@ -1838,9 +1940,9 @@ var usePartnerBrand = () => {
1838
1940
  setPartnerId(partnerIdQuery);
1839
1941
  }
1840
1942
  }
1841
- // If not, check if we already have a partner ID in session storage
1943
+ // If not, check if we already have a partner ID in session storage, ensure it is not a single quote
1842
1944
  var existingPartnerId = sessionStorage.getItem('GP_PARTNER_ID');
1843
- if (existingPartnerId) {
1945
+ if (existingPartnerId && existingPartnerId.replace(/^'|'$/g, '') !== '') {
1844
1946
  setPartnerId(existingPartnerId);
1845
1947
  return;
1846
1948
  }
@@ -1878,7 +1980,7 @@ var SimpleNavbarComponent = _ref => {
1878
1980
  // Set to aussie domain for either brands
1879
1981
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.hostname);
1880
1982
  var BASE_URL = env === lalaUtils.Environment.Production ? 'https://www.aussie.com.au' : env === lalaUtils.Environment.Staging ? 'https://aussie-stg.com.au' : "https://aussie-dev.com.au";
1881
- var PARTNER_LOGO_BASE_PATH = '/growth-product-assets/partner-logos/';
1983
+ var PARTNER_LOGO_BASE_PATH = '/aussie-cms-assets/partner-logos/';
1882
1984
  // to set AHL value in session storage for funnel1 journey
1883
1985
  useAHLParam();
1884
1986
  var partnerId = usePartnerBrand();
@@ -1891,12 +1993,13 @@ var SimpleNavbarComponent = _ref => {
1891
1993
  homeURL: homeURL,
1892
1994
  params: params,
1893
1995
  "aria-label": "Logo",
1894
- hasHamburgerMenu: false
1996
+ hasHamburgerMenu: false,
1997
+ hasPartnerLogo: partnerId !== null
1895
1998
  }), partnerId && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1896
1999
  children: [/*#__PURE__*/jsxRuntime.jsx(icon.Close, {
1897
2000
  width: "24px",
1898
2001
  height: "24px"
1899
- }), /*#__PURE__*/jsxRuntime.jsx("img", {
2002
+ }), /*#__PURE__*/jsxRuntime.jsx(PartnerLogo, {
1900
2003
  src: "".concat(BASE_URL).concat(PARTNER_LOGO_BASE_PATH).concat(partnerId, ".png"),
1901
2004
  alt: "Partner Logo"
1902
2005
  })]
@@ -1914,7 +2017,8 @@ var SimpleNavbarComponent = _ref => {
1914
2017
  showContinueAction: showContinueAction,
1915
2018
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
1916
2019
  customerOwner: customerOwner,
1917
- hasUnreadMessages: hasUnread
2020
+ hasUnreadMessages: hasUnread,
2021
+ hasPartnerLogo: partnerId !== null
1918
2022
  })
1919
2023
  })
1920
2024
  })]
@@ -62,7 +62,7 @@ function _objectSpread2(e) {
62
62
  return e;
63
63
  }
64
64
 
65
- var _templateObject$g, _templateObject2$6, _templateObject3$2, _templateObject4$1, _templateObject5$1, analytics = navbarAnalyticsEvent => {
65
+ var _templateObject$g, _templateObject2$7, _templateObject3$3, _templateObject4$1, _templateObject5$1, analytics = navbarAnalyticsEvent => {
66
66
  window ? analytics$1.trackEvent(_objectSpread2({}, navbarAnalyticsEvent)) : console.error("Segment is not loaded");
67
67
  };
68
68
 
@@ -74,31 +74,34 @@ function _taggedTemplateLiteral(strings, raw) {
74
74
  }));
75
75
  }
76
76
 
77
- var _templateObject$f, _templateObject$e, _templateObject2$5, StyledHeaderLogo = styled__default.default(Logo__default.default).withConfig({
77
+ var _templateObject$f, _templateObject2$6, _templateObject3$2, _templateObject$e, _templateObject2$5, StyledHeaderLogo = styled__default.default(Logo__default.default).withConfig({
78
78
  displayName: "style__StyledHeaderLogo",
79
79
  componentId: "lui__sc-17ip4hk-0"
80
- })([ "", ";width:auto;height:28px;color:", ";", ";" ], (_ref => {
80
+ })([ "", ";width:auto;height:", ";color:", ";", ";" ], (_ref => {
81
81
  var {isHref: isHref} = _ref;
82
82
  return isHref ? styled.css([ "cursor:pointer;" ]) : styled.css([ "cursor:auto;" ]);
83
83
  }), (_ref2 => {
84
- var {variant: variant} = _ref2;
85
- return "dark" === variant ? "secondary.900" : "shade.0";
84
+ var {hasPartnerLogo: hasPartnerLogo} = _ref2;
85
+ return hasPartnerLogo ? "20px" : "28px";
86
86
  }), (_ref3 => {
87
- var {theme: theme} = _ref3;
87
+ var {variant: variant} = _ref3;
88
+ return "dark" === variant ? "secondary.900" : "shade.0";
89
+ }), (_ref4 => {
90
+ var {theme: theme} = _ref4;
88
91
  return "LendiLogo" === Theme.select("logo.logoName")({
89
92
  theme: theme
90
- }) ? styled.css([ "", ";", ";" ], breakpoint.gte("tablet")(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral([ "\n width: auto;\n height: 28px;\n " ]))), breakpoint.gte("desktop")(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral([ "\n width: auto;\n height: 36px;\n " ])))) : styled.css([ "", ";", ";" ], breakpoint.gte("tablet")(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral([ "\n width: auto;\n height: 28px;\n " ]))), breakpoint.gte("desktop")(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral([ "\n width: auto;\n height: 36px;\n " ]))));
93
+ }) ? styled.css([ "", ";", ";" ], breakpoint.gte("tablet")(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral([ "\n width: auto;\n height: 28px;\n " ]))), breakpoint.gte("desktop")(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral([ "\n width: auto;\n height: 36px;\n " ])))) : styled.css([ "", ";", ";" ], breakpoint.gte("tablet")(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral([ "\n width: auto;\n height: 28px;\n " ]))), breakpoint.gte("desktop")(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral([ "\n width: auto;\n height: 36px;\n " ]))));
91
94
  })), LogoLink$1 = styled__default.default.a.withConfig({
92
95
  displayName: "style__LogoLink",
93
96
  componentId: "lui__sc-17ip4hk-1"
94
97
  })([ "" ]), LogoWrapper = styled__default.default.div.withConfig({
95
98
  displayName: "style__LogoWrapper",
96
99
  componentId: "lui__sc-17ip4hk-2"
97
- })([ "", ";", ";", ";" ], spacing.mb("xxxs"), (_ref4 => {
98
- var {hasHamburgerMenu: hasHamburgerMenu} = _ref4;
100
+ })([ "", ";", ";", ";" ], spacing.mb("xxxs"), (_ref5 => {
101
+ var {hasHamburgerMenu: hasHamburgerMenu} = _ref5;
99
102
  return hasHamburgerMenu ? styled.css([ "", "" ], spacing.ml("xs")) : styled.css([ "", "" ], spacing.ml("nil"));
100
103
  }), breakpoint.gte("desktop")(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral([ "\n ", "\n margin-bottom: 5px;\n " ])), spacing.ml("nil"))), LogoComponent = _ref => {
101
- var {homeURL: homeURL, params: params, hasHamburgerMenu: hasHamburgerMenu = !0} = _ref, {isTransparent: isTransparent} = NavbarBase.useNavbarBaseContext(), variant = isTransparent ? "light" : "dark";
104
+ var {homeURL: homeURL, params: params, hasHamburgerMenu: hasHamburgerMenu = !0, hasPartnerLogo: hasPartnerLogo = !1} = _ref, {isTransparent: isTransparent} = NavbarBase.useNavbarBaseContext(), variant = isTransparent ? "light" : "dark";
102
105
  return jsxRuntime.jsx(LogoWrapper, {
103
106
  hasHamburgerMenu: hasHamburgerMenu,
104
107
  children: homeURL ? jsxRuntime.jsx(LogoLink$1, {
@@ -121,7 +124,8 @@ var _templateObject$f, _templateObject$e, _templateObject2$5, StyledHeaderLogo =
121
124
  children: jsxRuntime.jsx(StyledHeaderLogo, {
122
125
  variant: variant,
123
126
  "aria-label": "Logo",
124
- isHref: !1
127
+ isHref: !1,
128
+ hasPartnerLogo: hasPartnerLogo
125
129
  })
126
130
  })
127
131
  });
@@ -161,7 +165,7 @@ var _templateObject$f, _templateObject$e, _templateObject2$5, StyledHeaderLogo =
161
165
  })([ "display:flex;align-items:center;" ]), NavbarLeftWrapper = styled__default.default.div.withConfig({
162
166
  displayName: "styles__NavbarLeftWrapper",
163
167
  componentId: "lui__sc-ej7i4l-3"
164
- })([ "flex:1 0 auto;display:flex;align-items:center;gap:1rem;" ]), NavbarRightWrapper = styled__default.default.div.withConfig({
168
+ })([ "flex:1 0 auto;display:flex;align-items:center;gap:0.5rem;", ";" ], breakpoint.gte("desktop")(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral([ "\n gap: 1rem;\n " ])))), NavbarRightWrapper = styled__default.default.div.withConfig({
165
169
  displayName: "styles__NavbarRightWrapper",
166
170
  componentId: "lui__sc-ej7i4l-4"
167
171
  })([ "" ]), AlertBanner = styled__default.default(Alert__default.default).withConfig({
@@ -171,7 +175,10 @@ var _templateObject$f, _templateObject$e, _templateObject2$5, StyledHeaderLogo =
171
175
  mobile: "xs",
172
176
  tablet: "xs",
173
177
  desktop: "sm"
174
- })), TalkExpertAction$1 = styled__default.default(button.Button).withConfig({
178
+ })), PartnerLogo = styled__default.default.img.withConfig({
179
+ displayName: "styles__PartnerLogo",
180
+ componentId: "lui__sc-ej7i4l-6"
181
+ })([ "height:30px;", ";" ], breakpoint.gte("desktop")(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral([ "\n height: 60px;\n " ])))), TalkExpertAction$1 = styled__default.default(button.Button).withConfig({
175
182
  displayName: "style__TalkExpertAction",
176
183
  componentId: "lui__sc-9anjvz-0"
177
184
  })([ "width:100%;", " ", ";min-width:180px;", "" ], spacing.mr("sm"), breakpoint.between("mobile", "desktop")(_templateObject$e || (_templateObject$e = _taggedTemplateLiteral([ "\n border: none;\n " ]))), (_ref => {
@@ -460,38 +467,101 @@ var _templateObject$d, _templateObject$c, _templateObject$b, _templateObject$a,
460
467
  }) ]
461
468
  }))(isAuthenticated, showBookanAppointmentCta, showContinueAction), isAuthenticated && jsxRuntime.jsx(LogoutComponent, {}) ]
462
469
  });
463
- }, RenderDesktopAction$1 = RenderDesktopAction, MobileActionsWrapper = styled__default.default.div.withConfig({
464
- displayName: "style__MobileActionsWrapper",
465
- componentId: "lui__sc-jzhj4e-0"
466
- })([ "display:flex;", ";.noHover{", ";:hover{box-shadow:none;}}" ], breakpoint.gte("desktop")(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral([ "\n display: none;\n " ]))), spacing.mr("nil")), RenderMobileAction = _ref => {
467
- var _window, _window2, {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 = _window.location) || void 0 === _window ? void 0 : _window.hostname), signInURL = getSignInURL(brand, env, null === (_window2 = window) || void 0 === _window2 || null === (_window2 = _window2.location) || void 0 === _window2 ? void 0 : _window2.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;
468
- return jsxRuntime.jsxs(MobileActionsWrapper, {
469
- children: [ showTalkToExpertCta && jsxRuntime.jsx(TalkExpertAction, {
470
+ }, RenderDesktopAction$1 = RenderDesktopAction, PartnerDropdownWrapper = styled__default.default.div.withConfig({
471
+ displayName: "style__PartnerDropdownWrapper",
472
+ componentId: "lui__sc-1sietqn-0"
473
+ })([ "position:absolute;right:5px;top:56px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:", ";border-radius:5px;", "" ], (_ref => {
474
+ var {theme: theme} = _ref;
475
+ return theme.color.text.inverse;
476
+ }), depth.depth(2)), TalkToBrokerButton = styled__default.default(button.Button).withConfig({
477
+ displayName: "style__TalkToBrokerButton",
478
+ componentId: "lui__sc-1sietqn-1"
479
+ })([ "", " ", "" ], spacing.mx("sm"), spacing.my("sm")), PartnerDropdownMenu = _ref => {
480
+ var {onTalkToBroker: onTalkToBroker} = _ref;
481
+ return jsxRuntime.jsx(PartnerDropdownWrapper, {
482
+ children: jsxRuntime.jsx(TalkToBrokerButton, {
483
+ variant: "primary",
470
484
  size: "sm",
471
- isInverse: isTransparent,
472
- className: "noHover",
473
- variant: "secondary",
474
485
  onClick: () => {
475
- openCommPanel();
486
+ onTalkToBroker();
476
487
  var event = {
477
- event_name: "Button Clicked",
488
+ event_name: "Menu Element Clicked",
478
489
  category: analytics$1.EventCategory.NAVBAR,
479
- buttonType: analytics$1.ButtonType.SECONDARY,
480
- text: hasUnreadMessages ? "You have an unread message" : "aussie" === brand ? "Talk to a broker" : "Talk to an expert"
490
+ menuName: "Partner Menu",
491
+ text: LABEL_TALK_TO_A_BROKER
481
492
  };
482
493
  analytics(event);
483
494
  },
484
- children: hasUnreadMessages ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
485
- children: [ jsxRuntime.jsx(UnreadMessageWrapper, {
486
- "data-testid": "customer-view-unread-icon",
487
- color: getColour.getColour("interaction", "main"),
488
- height: "2em",
489
- width: "2em"
490
- }), UNREAD_MESSAGE_MOBILE ]
491
- }) : jsxRuntime.jsx(jsxRuntime.Fragment, {
492
- children: primaryLabel
495
+ "aria-label": LABEL_TALK_TO_A_BROKER,
496
+ children: LABEL_TALK_TO_A_BROKER
497
+ })
498
+ });
499
+ }, PartnerDropdownComponent = _ref => {
500
+ var {onTalkToBroker: onTalkToBroker} = _ref, [isDropdownDisplay, setIsDropdownDisplay] = React__default.default.useState(!1), dropdownPanel = React__default.default.useRef(), hasWindow = "undefined" != typeof window, theme = Theme.useTheme(), closeDropdownPanel = e => {
501
+ dropdownPanel && dropdownPanel.current && !dropdownPanel.current.contains(e.target) && setIsDropdownDisplay(!1);
502
+ };
503
+ return React__default.default.useEffect((() => (hasWindow && window.addEventListener("mousedown", closeDropdownPanel),
504
+ () => {
505
+ hasWindow && window.removeEventListener("mousedown", closeDropdownPanel);
506
+ }))), jsxRuntime.jsxs("div", {
507
+ ref: dropdownPanel,
508
+ children: [ jsxRuntime.jsx(KebabMenu, {
509
+ size: "sm",
510
+ color: theme.color.interaction.main,
511
+ onClick: () => {
512
+ setIsDropdownDisplay(!isDropdownDisplay);
513
+ },
514
+ "aria-label": LABEL_TALK_TO_EXPERT,
515
+ icon: MoreVert__default.default
516
+ }), isDropdownDisplay && jsxRuntime.jsx(PartnerDropdownMenu, {
517
+ onTalkToBroker: onTalkToBroker
518
+ }) ]
519
+ });
520
+ }, MobileActionsWrapper = styled__default.default.div.withConfig({
521
+ displayName: "style__MobileActionsWrapper",
522
+ componentId: "lui__sc-jzhj4e-0"
523
+ })([ "display:flex;", ";.noHover{", ";:hover{box-shadow:none;}}" ], breakpoint.gte("desktop")(_templateObject$a || (_templateObject$a = _taggedTemplateLiteral([ "\n display: none;\n " ]))), spacing.mr("nil")), RenderMobileAction = _ref => {
524
+ var _window, _window2, {isAuthenticated: isAuthenticated, continueURL: continueURL, customerOwner: customerOwner, openCommPanel: openCommPanel = (() => {}), showContinueAction: showContinueAction = !1, showTalkToExpertCta: showTalkToExpertCta = !0, hasUnreadMessages: hasUnreadMessages, hasPartnerLogo: hasPartnerLogo} = _ref, {isTransparent: isTransparent} = NavbarBase.useNavbarBaseContext(), needToContinue = () => isAuthenticated && showContinueAction, brand = lalaUtils.getBrandFromHostname(), env = getEnvFromHostname(null === (_window = window) || void 0 === _window || null === (_window = _window.location) || void 0 === _window ? void 0 : _window.hostname), signInURL = getSignInURL(brand, env, null === (_window2 = window) || void 0 === _window2 || null === (_window2 = _window2.location) || void 0 === _window2 ? void 0 : _window2.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;
525
+ return jsxRuntime.jsxs(MobileActionsWrapper, {
526
+ children: [ showTalkToExpertCta && jsxRuntime.jsx(jsxRuntime.Fragment, {
527
+ children: hasPartnerLogo ? jsxRuntime.jsx(PartnerDropdownComponent, {
528
+ onTalkToBroker: () => {
529
+ openCommPanel();
530
+ var event = {
531
+ event_name: "Button Clicked",
532
+ category: analytics$1.EventCategory.NAVBAR,
533
+ buttonType: analytics$1.ButtonType.SECONDARY,
534
+ text: hasUnreadMessages ? "You have an unread message" : "aussie" === brand ? "Talk to a broker" : "Talk to an expert"
535
+ };
536
+ analytics(event);
537
+ }
538
+ }) : jsxRuntime.jsx(TalkExpertAction, {
539
+ size: "sm",
540
+ isInverse: isTransparent,
541
+ className: "noHover",
542
+ variant: "secondary",
543
+ onClick: () => {
544
+ openCommPanel();
545
+ var event = {
546
+ event_name: "Button Clicked",
547
+ category: analytics$1.EventCategory.NAVBAR,
548
+ buttonType: analytics$1.ButtonType.SECONDARY,
549
+ text: hasUnreadMessages ? "You have an unread message" : "aussie" === brand ? "Talk to a broker" : "Talk to an expert"
550
+ };
551
+ analytics(event);
552
+ },
553
+ children: hasUnreadMessages ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
554
+ children: [ jsxRuntime.jsx(UnreadMessageWrapper, {
555
+ "data-testid": "customer-view-unread-icon",
556
+ color: getColour.getColour("interaction", "main"),
557
+ height: "2em",
558
+ width: "2em"
559
+ }), UNREAD_MESSAGE_MOBILE ]
560
+ }) : jsxRuntime.jsx(jsxRuntime.Fragment, {
561
+ children: primaryLabel
562
+ })
493
563
  })
494
- }), !isAuthenticated && showContinueAction && jsxRuntime.jsx(SecondaryActionMobile, {
564
+ }), !isAuthenticated && showContinueAction && !hasPartnerLogo && jsxRuntime.jsx(SecondaryActionMobile, {
495
565
  size: "sm",
496
566
  variant: isAuthenticated ? "emphasis" : "primary",
497
567
  href: signInURL,
@@ -521,7 +591,7 @@ var _templateObject$d, _templateObject$c, _templateObject$b, _templateObject$a,
521
591
  analytics(event);
522
592
  },
523
593
  children: LABEL_CONTINUE
524
- }), isAuthenticated && jsxRuntime.jsx(LogoutComponent, {}) ]
594
+ }), isAuthenticated && !hasPartnerLogo && jsxRuntime.jsx(LogoutComponent, {}) ]
525
595
  });
526
596
  }, RenderMobileAction$1 = RenderMobileAction, CTAButtons$2 = props => jsxRuntime.jsxs(jsxRuntime.Fragment, {
527
597
  children: [ jsxRuntime.jsx(RenderDesktopAction$1, _objectSpread2({
@@ -1138,7 +1208,7 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1138
1208
  partnerIdQuery && (sessionStorage.setItem("GP_PARTNER_ID", partnerIdQuery), setPartnerId(partnerIdQuery));
1139
1209
  }
1140
1210
  var existingPartnerId = sessionStorage.getItem("GP_PARTNER_ID");
1141
- existingPartnerId && setPartnerId(existingPartnerId);
1211
+ existingPartnerId && "" !== existingPartnerId.replace(/^'|'$/g, "") && setPartnerId(existingPartnerId);
1142
1212
  }), []), partnerId;
1143
1213
  }, SimpleNavbarComponent = _ref => {
1144
1214
  var _window, {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, {primaryBrandCustomerAlert: primaryBrandCustomerAlert} = launchdarkly.useFlags(), session = lalaReact.useSession(), isAuthenticated = session.status === lalaReact.Status.Authenticated, env = getEnvFromHostname(null === (_window = window) || void 0 === _window || null === (_window = _window.location) || void 0 === _window ? void 0 : _window.hostname), BASE_URL = env === lalaUtils.Environment.Production ? "https://www.aussie.com.au" : env === lalaUtils.Environment.Staging ? "https://aussie-stg.com.au" : "https://aussie-dev.com.au";
@@ -1153,13 +1223,14 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1153
1223
  homeURL: homeURL,
1154
1224
  params: params,
1155
1225
  "aria-label": "Logo",
1156
- hasHamburgerMenu: !1
1226
+ hasHamburgerMenu: !1,
1227
+ hasPartnerLogo: null !== partnerId
1157
1228
  }), partnerId && jsxRuntime.jsxs(jsxRuntime.Fragment, {
1158
1229
  children: [ jsxRuntime.jsx(icon.Close, {
1159
1230
  width: "24px",
1160
1231
  height: "24px"
1161
- }), jsxRuntime.jsx("img", {
1162
- src: "".concat(BASE_URL).concat("/growth-product-assets/partner-logos/").concat(partnerId, ".png"),
1232
+ }), jsxRuntime.jsx(PartnerLogo, {
1233
+ src: "".concat(BASE_URL).concat("/aussie-cms-assets/partner-logos/").concat(partnerId, ".png"),
1163
1234
  alt: "Partner Logo"
1164
1235
  }) ]
1165
1236
  }) ]
@@ -1176,7 +1247,8 @@ var _templateObject$9, _templateObject2$4, _templateObject$8, _templateObject2$3
1176
1247
  showContinueAction: showContinueAction,
1177
1248
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
1178
1249
  customerOwner: customerOwner,
1179
- hasUnreadMessages: hasUnread
1250
+ hasUnreadMessages: hasUnread,
1251
+ hasPartnerLogo: null !== partnerId
1180
1252
  })
1181
1253
  })
1182
1254
  }) ]
@@ -129,27 +129,32 @@ function _taggedTemplateLiteral(strings, raw) {
129
129
  }));
130
130
  }
131
131
 
132
- var _templateObject$g, _templateObject2$6, _templateObject3$2, _templateObject4$1, _templateObject5$1;
132
+ var _templateObject$g, _templateObject2$7, _templateObject3$3, _templateObject4$1, _templateObject5$1;
133
133
  var StyledHeaderLogo = styled(Logo).withConfig({
134
134
  displayName: "style__StyledHeaderLogo",
135
135
  componentId: "lui__sc-17ip4hk-0"
136
- })(["", ";width:auto;height:28px;color:", ";", ";"], _ref => {
136
+ })(["", ";width:auto;height:", ";color:", ";", ";"], _ref => {
137
137
  var {
138
138
  isHref
139
139
  } = _ref;
140
140
  return isHref ? css(["cursor:pointer;"]) : css(["cursor:auto;"]);
141
141
  }, _ref2 => {
142
142
  var {
143
- variant
143
+ hasPartnerLogo
144
144
  } = _ref2;
145
- return variant === 'dark' ? 'secondary.900' : 'shade.0';
145
+ return hasPartnerLogo ? '20px' : '28px';
146
146
  }, _ref3 => {
147
147
  var {
148
- theme
148
+ variant
149
149
  } = _ref3;
150
+ return variant === 'dark' ? 'secondary.900' : 'shade.0';
151
+ }, _ref4 => {
152
+ var {
153
+ theme
154
+ } = _ref4;
150
155
  return select('logo.logoName')({
151
156
  theme
152
- }) === 'LendiLogo' ? css(["", ";", ";"], gte('tablet')(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), gte('desktop')(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "])))) : css(["", ";", ";"], gte('tablet')(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), gte('desktop')(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "]))));
157
+ }) === 'LendiLogo' ? css(["", ";", ";"], gte('tablet')(_templateObject$g || (_templateObject$g = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), gte('desktop')(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "])))) : css(["", ";", ";"], gte('tablet')(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteral(["\n width: auto;\n height: 28px;\n "]))), gte('desktop')(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteral(["\n width: auto;\n height: 36px;\n "]))));
153
158
  });
154
159
  var LogoLink$1 = styled.a.withConfig({
155
160
  displayName: "style__LogoLink",
@@ -158,10 +163,10 @@ var LogoLink$1 = styled.a.withConfig({
158
163
  var LogoWrapper = styled.div.withConfig({
159
164
  displayName: "style__LogoWrapper",
160
165
  componentId: "lui__sc-17ip4hk-2"
161
- })(["", ";", ";", ";"], mb('xxxs'), _ref4 => {
166
+ })(["", ";", ";", ";"], mb('xxxs'), _ref5 => {
162
167
  var {
163
168
  hasHamburgerMenu
164
- } = _ref4;
169
+ } = _ref5;
165
170
  return hasHamburgerMenu ? css(["", ""], ml('xs')) : css(["", ""], ml('nil'));
166
171
  }, gte('desktop')(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteral(["\n ", "\n margin-bottom: 5px;\n "])), ml('nil')));
167
172
 
@@ -169,7 +174,8 @@ var LogoComponent = _ref => {
169
174
  var {
170
175
  homeURL,
171
176
  params,
172
- hasHamburgerMenu = true
177
+ hasHamburgerMenu = true,
178
+ hasPartnerLogo = false
173
179
  } = _ref;
174
180
  var {
175
181
  isTransparent
@@ -197,14 +203,15 @@ var LogoComponent = _ref => {
197
203
  children: /*#__PURE__*/jsx(StyledHeaderLogo, {
198
204
  variant: variant,
199
205
  "aria-label": "Logo",
200
- isHref: false
206
+ isHref: false,
207
+ hasPartnerLogo: hasPartnerLogo
201
208
  })
202
209
  })
203
210
  });
204
211
  };
205
212
  var LogoComponent$1 = LogoComponent;
206
213
 
207
- var _templateObject$f;
214
+ var _templateObject$f, _templateObject2$6, _templateObject3$2;
208
215
  var navTokens = {
209
216
  size: {
210
217
  height: {
@@ -247,7 +254,7 @@ var MenuLogoWrapper = styled.div.withConfig({
247
254
  var NavbarLeftWrapper = styled.div.withConfig({
248
255
  displayName: "styles__NavbarLeftWrapper",
249
256
  componentId: "lui__sc-ej7i4l-3"
250
- })(["flex:1 0 auto;display:flex;align-items:center;gap:1rem;"]);
257
+ })(["flex:1 0 auto;display:flex;align-items:center;gap:0.5rem;", ";"], gte('desktop')(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n gap: 1rem;\n "]))));
251
258
  var NavbarRightWrapper = styled.div.withConfig({
252
259
  displayName: "styles__NavbarRightWrapper",
253
260
  componentId: "lui__sc-ej7i4l-4"
@@ -260,6 +267,10 @@ var AlertBanner = styled(Alert).withConfig({
260
267
  tablet: 'xs',
261
268
  desktop: 'sm'
262
269
  }));
270
+ var PartnerLogo = styled.img.withConfig({
271
+ displayName: "styles__PartnerLogo",
272
+ componentId: "lui__sc-ej7i4l-6"
273
+ })(["height:30px;", ";"], gte('desktop')(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteral(["\n height: 60px;\n "]))));
263
274
 
264
275
  var _templateObject$e, _templateObject2$5;
265
276
  var TalkExpertAction$1 = styled(Button).withConfig({
@@ -731,6 +742,83 @@ var RenderDesktopAction = _ref2 => {
731
742
  };
732
743
  var RenderDesktopAction$1 = RenderDesktopAction;
733
744
 
745
+ var PartnerDropdownWrapper = styled.div.withConfig({
746
+ displayName: "style__PartnerDropdownWrapper",
747
+ componentId: "lui__sc-1sietqn-0"
748
+ })(["position:absolute;right:5px;top:56px;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:", ";border-radius:5px;", ""], _ref => {
749
+ var {
750
+ theme
751
+ } = _ref;
752
+ return theme.color.text.inverse;
753
+ }, depth(2));
754
+ var TalkToBrokerButton = styled(Button).withConfig({
755
+ displayName: "style__TalkToBrokerButton",
756
+ componentId: "lui__sc-1sietqn-1"
757
+ })(["", " ", ""], mx('sm'), my('sm'));
758
+
759
+ var PartnerDropdownMenu = _ref => {
760
+ var {
761
+ onTalkToBroker
762
+ } = _ref;
763
+ return /*#__PURE__*/jsx(PartnerDropdownWrapper, {
764
+ children: /*#__PURE__*/jsx(TalkToBrokerButton, {
765
+ variant: "primary",
766
+ size: "sm",
767
+ onClick: () => {
768
+ onTalkToBroker();
769
+ var event = {
770
+ event_name: 'Menu Element Clicked',
771
+ category: EventCategory.NAVBAR,
772
+ menuName: 'Partner Menu',
773
+ text: LABEL_TALK_TO_A_BROKER
774
+ };
775
+ analytics(event);
776
+ },
777
+ "aria-label": LABEL_TALK_TO_A_BROKER,
778
+ children: LABEL_TALK_TO_A_BROKER
779
+ })
780
+ });
781
+ };
782
+
783
+ var PartnerDropdownComponent = _ref => {
784
+ var {
785
+ onTalkToBroker
786
+ } = _ref;
787
+ var [isDropdownDisplay, setIsDropdownDisplay] = React.useState(false);
788
+ var dropdownPanel = React.useRef();
789
+ var hasWindow = typeof window !== 'undefined';
790
+ var theme = useTheme();
791
+ var closeDropdownPanel = e => {
792
+ if (dropdownPanel && dropdownPanel.current && !dropdownPanel.current.contains(e.target)) {
793
+ setIsDropdownDisplay(false);
794
+ }
795
+ };
796
+ React.useEffect(() => {
797
+ if (hasWindow) {
798
+ window.addEventListener('mousedown', closeDropdownPanel);
799
+ }
800
+ return () => {
801
+ if (hasWindow) {
802
+ window.removeEventListener('mousedown', closeDropdownPanel);
803
+ }
804
+ };
805
+ });
806
+ return /*#__PURE__*/jsxs("div", {
807
+ ref: dropdownPanel,
808
+ children: [/*#__PURE__*/jsx(KebabMenu, {
809
+ size: "sm",
810
+ color: theme.color.interaction.main,
811
+ onClick: () => {
812
+ setIsDropdownDisplay(!isDropdownDisplay);
813
+ },
814
+ "aria-label": LABEL_TALK_TO_EXPERT,
815
+ icon: MoreVert
816
+ }), isDropdownDisplay && /*#__PURE__*/jsx(PartnerDropdownMenu, {
817
+ onTalkToBroker: onTalkToBroker
818
+ })]
819
+ });
820
+ };
821
+
734
822
  var _templateObject$a;
735
823
  var MobileActionsWrapper = styled.div.withConfig({
736
824
  displayName: "style__MobileActionsWrapper",
@@ -746,7 +834,8 @@ var RenderMobileAction = _ref => {
746
834
  openCommPanel = () => {},
747
835
  showContinueAction = false,
748
836
  showTalkToExpertCta = true,
749
- hasUnreadMessages
837
+ hasUnreadMessages,
838
+ hasPartnerLogo
750
839
  } = _ref;
751
840
  var {
752
841
  isTransparent
@@ -758,32 +847,45 @@ var RenderMobileAction = _ref => {
758
847
  var signInURL = getSignInURL(brand, env, (_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.location) === null || _window2 === void 0 ? void 0 : _window2.href);
759
848
  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;
760
849
  return /*#__PURE__*/jsxs(MobileActionsWrapper, {
761
- children: [showTalkToExpertCta && /*#__PURE__*/jsx(TalkExpertAction, {
762
- size: "sm",
763
- isInverse: isTransparent,
764
- className: "noHover",
765
- variant: "secondary",
766
- onClick: () => {
767
- openCommPanel();
768
- var event = {
769
- event_name: 'Button Clicked',
770
- category: EventCategory.NAVBAR,
771
- buttonType: ButtonType.SECONDARY,
772
- text: hasUnreadMessages ? 'You have an unread message' : brand === 'aussie' ? 'Talk to a broker' : 'Talk to an expert'
773
- };
774
- analytics(event);
775
- },
776
- children: hasUnreadMessages ? /*#__PURE__*/jsxs(Fragment, {
777
- children: [/*#__PURE__*/jsx(UnreadMessageWrapper, {
778
- "data-testid": "customer-view-unread-icon",
779
- color: getColour$1('interaction', 'main'),
780
- height: "2em",
781
- width: "2em"
782
- }), UNREAD_MESSAGE_MOBILE]
783
- }) : /*#__PURE__*/jsx(Fragment, {
784
- children: primaryLabel
850
+ children: [showTalkToExpertCta && /*#__PURE__*/jsx(Fragment, {
851
+ children: hasPartnerLogo ? /*#__PURE__*/jsx(PartnerDropdownComponent, {
852
+ onTalkToBroker: () => {
853
+ openCommPanel();
854
+ var event = {
855
+ event_name: 'Button Clicked',
856
+ category: EventCategory.NAVBAR,
857
+ buttonType: ButtonType.SECONDARY,
858
+ text: hasUnreadMessages ? 'You have an unread message' : brand === 'aussie' ? 'Talk to a broker' : 'Talk to an expert'
859
+ };
860
+ analytics(event);
861
+ }
862
+ }) : /*#__PURE__*/jsx(TalkExpertAction, {
863
+ size: "sm",
864
+ isInverse: isTransparent,
865
+ className: "noHover",
866
+ variant: "secondary",
867
+ onClick: () => {
868
+ openCommPanel();
869
+ var event = {
870
+ event_name: 'Button Clicked',
871
+ category: EventCategory.NAVBAR,
872
+ buttonType: ButtonType.SECONDARY,
873
+ text: hasUnreadMessages ? 'You have an unread message' : brand === 'aussie' ? 'Talk to a broker' : 'Talk to an expert'
874
+ };
875
+ analytics(event);
876
+ },
877
+ children: hasUnreadMessages ? /*#__PURE__*/jsxs(Fragment, {
878
+ children: [/*#__PURE__*/jsx(UnreadMessageWrapper, {
879
+ "data-testid": "customer-view-unread-icon",
880
+ color: getColour$1('interaction', 'main'),
881
+ height: "2em",
882
+ width: "2em"
883
+ }), UNREAD_MESSAGE_MOBILE]
884
+ }) : /*#__PURE__*/jsx(Fragment, {
885
+ children: primaryLabel
886
+ })
785
887
  })
786
- }), needToSignIn() && /*#__PURE__*/jsx(SecondaryActionMobile, {
888
+ }), needToSignIn() && !hasPartnerLogo && /*#__PURE__*/jsx(SecondaryActionMobile, {
787
889
  size: "sm",
788
890
  variant: isAuthenticated ? 'emphasis' : 'primary',
789
891
  href: signInURL,
@@ -813,7 +915,7 @@ var RenderMobileAction = _ref => {
813
915
  analytics(event);
814
916
  },
815
917
  children: LABEL_CONTINUE
816
- }), isAuthenticated && /*#__PURE__*/jsx(LogoutComponent, {})]
918
+ }), isAuthenticated && !hasPartnerLogo && /*#__PURE__*/jsx(LogoutComponent, {})]
817
919
  });
818
920
  };
819
921
  var RenderMobileAction$1 = RenderMobileAction;
@@ -1804,9 +1906,9 @@ var usePartnerBrand = () => {
1804
1906
  setPartnerId(partnerIdQuery);
1805
1907
  }
1806
1908
  }
1807
- // If not, check if we already have a partner ID in session storage
1909
+ // If not, check if we already have a partner ID in session storage, ensure it is not a single quote
1808
1910
  var existingPartnerId = sessionStorage.getItem('GP_PARTNER_ID');
1809
- if (existingPartnerId) {
1911
+ if (existingPartnerId && existingPartnerId.replace(/^'|'$/g, '') !== '') {
1810
1912
  setPartnerId(existingPartnerId);
1811
1913
  return;
1812
1914
  }
@@ -1844,7 +1946,7 @@ var SimpleNavbarComponent = _ref => {
1844
1946
  // Set to aussie domain for either brands
1845
1947
  var env = getEnvFromHostname((_window = window) === null || _window === void 0 || (_window = _window.location) === null || _window === void 0 ? void 0 : _window.hostname);
1846
1948
  var BASE_URL = env === Environment$1.Production ? 'https://www.aussie.com.au' : env === Environment$1.Staging ? 'https://aussie-stg.com.au' : "https://aussie-dev.com.au";
1847
- var PARTNER_LOGO_BASE_PATH = '/growth-product-assets/partner-logos/';
1949
+ var PARTNER_LOGO_BASE_PATH = '/aussie-cms-assets/partner-logos/';
1848
1950
  // to set AHL value in session storage for funnel1 journey
1849
1951
  useAHLParam();
1850
1952
  var partnerId = usePartnerBrand();
@@ -1857,12 +1959,13 @@ var SimpleNavbarComponent = _ref => {
1857
1959
  homeURL: homeURL,
1858
1960
  params: params,
1859
1961
  "aria-label": "Logo",
1860
- hasHamburgerMenu: false
1962
+ hasHamburgerMenu: false,
1963
+ hasPartnerLogo: partnerId !== null
1861
1964
  }), partnerId && /*#__PURE__*/jsxs(Fragment, {
1862
1965
  children: [/*#__PURE__*/jsx(Close$1, {
1863
1966
  width: "24px",
1864
1967
  height: "24px"
1865
- }), /*#__PURE__*/jsx("img", {
1968
+ }), /*#__PURE__*/jsx(PartnerLogo, {
1866
1969
  src: "".concat(BASE_URL).concat(PARTNER_LOGO_BASE_PATH).concat(partnerId, ".png"),
1867
1970
  alt: "Partner Logo"
1868
1971
  })]
@@ -1880,7 +1983,8 @@ var SimpleNavbarComponent = _ref => {
1880
1983
  showContinueAction: showContinueAction,
1881
1984
  openCommPanel: () => isCommPanelOpen ? closeCommPanel() : _openCommPanel(),
1882
1985
  customerOwner: customerOwner,
1883
- hasUnreadMessages: hasUnread
1986
+ hasUnreadMessages: hasUnread,
1987
+ hasPartnerLogo: partnerId !== null
1884
1988
  })
1885
1989
  })
1886
1990
  })]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lendi/navbar",
3
3
  "access": "restricted",
4
- "version": "7.44.2",
4
+ "version": "7.44.4",
5
5
  "license": "ISC",
6
6
  "source": "src/index.tsx",
7
7
  "main": "dist/navbar.cjs.js",