@lendi/navbar 7.22.0 → 7.22.2-beta.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.
|
@@ -25,6 +25,7 @@ export interface CommonNavbarProps extends LUIGlobalProps, NavbarButtonProp {
|
|
|
25
25
|
/** flag to show Book an appoointment cta btn */
|
|
26
26
|
showBookanAppointmentCta?: boolean;
|
|
27
27
|
onException: (err: Error) => void;
|
|
28
|
+
enableChatBubble?: boolean;
|
|
28
29
|
}
|
|
29
30
|
export interface MultiNavbarProps extends CommonNavbarProps {
|
|
30
31
|
}
|
package/dist/navbar.cjs.dev.js
CHANGED
|
@@ -710,7 +710,7 @@ var RenderMobileAction = _ref => {
|
|
|
710
710
|
isTransparent
|
|
711
711
|
} = NavbarBase.useNavbarBaseContext();
|
|
712
712
|
var needToContinue = () => isAuthenticated && showContinueAction;
|
|
713
|
-
var needToSignIn = () => !isAuthenticated;
|
|
713
|
+
var needToSignIn = () => !isAuthenticated && showContinueAction;
|
|
714
714
|
var brand = lalaUtils.getBrandFromHostname();
|
|
715
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);
|
|
716
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);
|
|
@@ -1652,13 +1652,13 @@ props => {
|
|
|
1652
1652
|
var shouldFullScreen = theme === 'aussie' || breakpoint$1 === 'mobile';
|
|
1653
1653
|
React.useEffect(() => {
|
|
1654
1654
|
var timeout;
|
|
1655
|
-
if (chatBubble) {
|
|
1655
|
+
if (props.enableChatBubble && chatBubble) {
|
|
1656
1656
|
timeout = setTimeout(() => {
|
|
1657
1657
|
setRenderChatBubble(true);
|
|
1658
1658
|
}, 1000);
|
|
1659
1659
|
}
|
|
1660
1660
|
return () => clearTimeout(timeout);
|
|
1661
|
-
}, [chatBubble]);
|
|
1661
|
+
}, [props, chatBubble]);
|
|
1662
1662
|
return /*#__PURE__*/jsxRuntime.jsxs(chat.ChatDataExposureContext.Provider, {
|
|
1663
1663
|
value: {
|
|
1664
1664
|
setHasUnReadMessage: hasUnreadMessages => setHasUnread(hasUnreadMessages),
|
|
@@ -1682,7 +1682,7 @@ props => {
|
|
|
1682
1682
|
isOtherUserOnline: isOtherUserOnline,
|
|
1683
1683
|
onException: onException
|
|
1684
1684
|
})
|
|
1685
|
-
})), renderChatBubble && /*#__PURE__*/jsxRuntime.jsx(ChatBubble$1, {
|
|
1685
|
+
})), props.enableChatBubble && renderChatBubble && /*#__PURE__*/jsxRuntime.jsx(ChatBubble$1, {
|
|
1686
1686
|
onClick: openChat
|
|
1687
1687
|
})]
|
|
1688
1688
|
});
|
package/dist/navbar.cjs.prod.js
CHANGED
|
@@ -451,7 +451,7 @@ var _templateObject$c, _templateObject$b, _templateObject$a, _templateObject$9,
|
|
|
451
451
|
}) : jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
452
452
|
children: primaryLabel
|
|
453
453
|
})
|
|
454
|
-
}), !isAuthenticated && jsxRuntime.jsx(SecondaryActionMobile, {
|
|
454
|
+
}), !isAuthenticated && showContinueAction && jsxRuntime.jsx(SecondaryActionMobile, {
|
|
455
455
|
size: "sm",
|
|
456
456
|
variant: isAuthenticated ? "emphasis" : "primary",
|
|
457
457
|
href: signInURL,
|
|
@@ -1041,10 +1041,10 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
|
|
|
1041
1041
|
var shouldFullScreen = "aussie" === utils$1.getThemeName() || "mobile" === breakpoint$1;
|
|
1042
1042
|
return React.useEffect((() => {
|
|
1043
1043
|
var timeout;
|
|
1044
|
-
return chatBubble && (timeout = setTimeout((() => {
|
|
1044
|
+
return props.enableChatBubble && chatBubble && (timeout = setTimeout((() => {
|
|
1045
1045
|
setRenderChatBubble(!0);
|
|
1046
1046
|
}), 1e3)), () => clearTimeout(timeout);
|
|
1047
|
-
}), [ chatBubble ]), jsxRuntime.jsxs(chat.ChatDataExposureContext.Provider, {
|
|
1047
|
+
}), [ props, chatBubble ]), jsxRuntime.jsxs(chat.ChatDataExposureContext.Provider, {
|
|
1048
1048
|
value: {
|
|
1049
1049
|
setHasUnReadMessage: hasUnreadMessages => setHasUnread(hasUnreadMessages),
|
|
1050
1050
|
setStatus: status => setIsOtherUserOnline(status)
|
|
@@ -1067,7 +1067,7 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
|
|
|
1067
1067
|
isOtherUserOnline: isOtherUserOnline,
|
|
1068
1068
|
onException: onException
|
|
1069
1069
|
})
|
|
1070
|
-
})), renderChatBubble && jsxRuntime.jsx(ChatBubble$1, {
|
|
1070
|
+
})), props.enableChatBubble && renderChatBubble && jsxRuntime.jsx(ChatBubble$1, {
|
|
1071
1071
|
onClick: openChat
|
|
1072
1072
|
}) ]
|
|
1073
1073
|
});
|
package/dist/navbar.esm.js
CHANGED
|
@@ -677,7 +677,7 @@ var RenderMobileAction = _ref => {
|
|
|
677
677
|
isTransparent
|
|
678
678
|
} = useNavbarBaseContext();
|
|
679
679
|
var needToContinue = () => isAuthenticated && showContinueAction;
|
|
680
|
-
var needToSignIn = () => !isAuthenticated;
|
|
680
|
+
var needToSignIn = () => !isAuthenticated && showContinueAction;
|
|
681
681
|
var brand = getBrandFromHostname();
|
|
682
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);
|
|
683
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);
|
|
@@ -1619,13 +1619,13 @@ props => {
|
|
|
1619
1619
|
var shouldFullScreen = theme === 'aussie' || breakpoint === 'mobile';
|
|
1620
1620
|
useEffect(() => {
|
|
1621
1621
|
var timeout;
|
|
1622
|
-
if (chatBubble) {
|
|
1622
|
+
if (props.enableChatBubble && chatBubble) {
|
|
1623
1623
|
timeout = setTimeout(() => {
|
|
1624
1624
|
setRenderChatBubble(true);
|
|
1625
1625
|
}, 1000);
|
|
1626
1626
|
}
|
|
1627
1627
|
return () => clearTimeout(timeout);
|
|
1628
|
-
}, [chatBubble]);
|
|
1628
|
+
}, [props, chatBubble]);
|
|
1629
1629
|
return /*#__PURE__*/jsxs(ChatDataExposureContext.Provider, {
|
|
1630
1630
|
value: {
|
|
1631
1631
|
setHasUnReadMessage: hasUnreadMessages => setHasUnread(hasUnreadMessages),
|
|
@@ -1649,7 +1649,7 @@ props => {
|
|
|
1649
1649
|
isOtherUserOnline: isOtherUserOnline,
|
|
1650
1650
|
onException: onException
|
|
1651
1651
|
})
|
|
1652
|
-
})), renderChatBubble && /*#__PURE__*/jsx(ChatBubble$1, {
|
|
1652
|
+
})), props.enableChatBubble && renderChatBubble && /*#__PURE__*/jsx(ChatBubble$1, {
|
|
1653
1653
|
onClick: openChat
|
|
1654
1654
|
})]
|
|
1655
1655
|
});
|