@lendi/navbar 7.16.2-beta.2 → 7.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/declarations/src/CustomerCommPanel/SidePanel/FullViewChatHeader/ChatHeaderTeamMemberAvatar/index.d.ts +6 -0
- package/dist/declarations/src/CustomerCommPanel/SidePanel/FullViewChatHeader/ChatHeaderTeamMemberAvatar/style.d.ts +10 -0
- package/dist/declarations/src/CustomerCommPanel/SidePanel/FullViewChatHeader/index.d.ts +7 -0
- package/dist/declarations/src/CustomerCommPanel/SidePanel/FullViewChatHeader/style.d.ts +4 -0
- package/dist/navbar.cjs.dev.js +124 -29
- package/dist/navbar.cjs.prod.js +91 -19
- package/dist/navbar.esm.js +125 -31
- package/package.json +3 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TeamMember } from '../../../../types';
|
|
2
|
+
export interface ChatHeaderTeamMemberAvatarProps {
|
|
3
|
+
teamMember?: TeamMember;
|
|
4
|
+
isBrokerOnline: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const ChatHeaderTeamMemberAvatar: ({ teamMember, isBrokerOnline }: ChatHeaderTeamMemberAvatarProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import Face from '@lendi-ui/icon/Face';
|
|
2
|
+
export declare const MobileBrokerInfoWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const FaceWrapper: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const BrokerFace: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
interface StausIconProps {
|
|
6
|
+
isOnline: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const StatusIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, StausIconProps, never>;
|
|
9
|
+
export declare const StyledFace: import("styled-components").StyledComponent<typeof Face, import("styled-components").DefaultTheme, {}, never>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TeamMember } from '../../../types';
|
|
2
|
+
export interface FullViewChatHeaderProps {
|
|
3
|
+
teamMember?: TeamMember;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
isOtherUserOnline: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const FullViewChatHeader: ({ onClick, teamMember, isOtherUserOnline }: FullViewChatHeaderProps) => JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import KeyboardArrowLeft from '@lendi-ui/icon/KeyboardArrowLeft';
|
|
2
|
+
export declare const StickyHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const TeamMemberBodyWrapper: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, import("@lendi-ui/typography").BodyOptions, never>;
|
|
4
|
+
export declare const ChevronLeftIcon: import("styled-components").StyledComponent<typeof KeyboardArrowLeft, import("styled-components").DefaultTheme, {}, never>;
|
package/dist/navbar.cjs.dev.js
CHANGED
|
@@ -35,6 +35,7 @@ var lendigroupLeadsLibrary = require('@lendi/lendigroup-leads-library');
|
|
|
35
35
|
var Chat = require('@lendi-ui/icon/Chat');
|
|
36
36
|
var KeyboardArrowDown = require('@lendi-ui/icon/KeyboardArrowDown');
|
|
37
37
|
var KeyboardArrowRight = require('@lendi-ui/icon/KeyboardArrowRight');
|
|
38
|
+
var KeyboardArrowLeft = require('@lendi-ui/icon/KeyboardArrowLeft');
|
|
38
39
|
var FocusLock = require('react-focus-lock');
|
|
39
40
|
var Menu = require('@lendi-ui/icon/Menu');
|
|
40
41
|
var Sidebar = require('@lendi-ui/sidebar');
|
|
@@ -68,6 +69,7 @@ var Calendar__default = /*#__PURE__*/_interopDefault(Calendar);
|
|
|
68
69
|
var Chat__default = /*#__PURE__*/_interopDefault(Chat);
|
|
69
70
|
var KeyboardArrowDown__default = /*#__PURE__*/_interopDefault(KeyboardArrowDown);
|
|
70
71
|
var KeyboardArrowRight__default = /*#__PURE__*/_interopDefault(KeyboardArrowRight);
|
|
72
|
+
var KeyboardArrowLeft__default = /*#__PURE__*/_interopDefault(KeyboardArrowLeft);
|
|
71
73
|
var FocusLock__default = /*#__PURE__*/_interopDefault(FocusLock);
|
|
72
74
|
var Menu__default = /*#__PURE__*/_interopDefault(Menu);
|
|
73
75
|
var Sidebar__default = /*#__PURE__*/_interopDefault(Sidebar);
|
|
@@ -963,6 +965,25 @@ var CommPanelWrapper$1 = styled__default["default"].div.withConfig({
|
|
|
963
965
|
componentId: "lui__sc-no953w-0"
|
|
964
966
|
})(["", ";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;display:flex;flex-direction:column;height:100%;"], utils.normalise);
|
|
965
967
|
|
|
968
|
+
var useDisableChat = () => {
|
|
969
|
+
var [isChatDisabled, setIsChatDisabled] = React.useState(true);
|
|
970
|
+
var {
|
|
971
|
+
disableChat,
|
|
972
|
+
enableAussieChat
|
|
973
|
+
} = launchdarkly.useFlags();
|
|
974
|
+
var {
|
|
975
|
+
brand
|
|
976
|
+
} = lalaReact.useSession();
|
|
977
|
+
React.useEffect(() => {
|
|
978
|
+
if (brand === lalaUtils.Brand.Aussie) {
|
|
979
|
+
if (enableAussieChat !== undefined) setIsChatDisabled(!enableAussieChat);
|
|
980
|
+
} else {
|
|
981
|
+
if (disableChat !== undefined) setIsChatDisabled(disableChat);
|
|
982
|
+
}
|
|
983
|
+
}, [disableChat, enableAussieChat, brand]);
|
|
984
|
+
return isChatDisabled;
|
|
985
|
+
};
|
|
986
|
+
|
|
966
987
|
var HeadWrapper = styled__default["default"].div.withConfig({
|
|
967
988
|
displayName: "style__HeadWrapper",
|
|
968
989
|
componentId: "lui__sc-zy0mzz-0"
|
|
@@ -975,7 +996,7 @@ var BrokerImgWrapper = styled__default["default"].div.withConfig({
|
|
|
975
996
|
displayName: "style__BrokerImgWrapper",
|
|
976
997
|
componentId: "lui__sc-zy0mzz-2"
|
|
977
998
|
})(["", ";position:relative;"], spacing.mr('xs'));
|
|
978
|
-
var BrokerFace = styled__default["default"].img.withConfig({
|
|
999
|
+
var BrokerFace$1 = styled__default["default"].img.withConfig({
|
|
979
1000
|
displayName: "style__BrokerFace",
|
|
980
1001
|
componentId: "lui__sc-zy0mzz-3"
|
|
981
1002
|
})(["width:65px;height:65px;border-radius:50%;border:1px solid ", ";margin:auto;"], color.color('shade.100'));
|
|
@@ -987,11 +1008,11 @@ var BrokerName = styled__default["default"](typography.Heading).withConfig({
|
|
|
987
1008
|
displayName: "style__BrokerName",
|
|
988
1009
|
componentId: "lui__sc-zy0mzz-5"
|
|
989
1010
|
})(["font-weight:bold;"]);
|
|
990
|
-
var StyledFace = styled__default["default"](Face__default["default"]).withConfig({
|
|
1011
|
+
var StyledFace$1 = styled__default["default"](Face__default["default"]).withConfig({
|
|
991
1012
|
displayName: "style__StyledFace",
|
|
992
1013
|
componentId: "lui__sc-zy0mzz-6"
|
|
993
1014
|
})(["width:4.5em;height:4.5em;"]);
|
|
994
|
-
var StatusIcon = styled__default["default"].div.withConfig({
|
|
1015
|
+
var StatusIcon$1 = styled__default["default"].div.withConfig({
|
|
995
1016
|
displayName: "style__StatusIcon",
|
|
996
1017
|
componentId: "lui__sc-zy0mzz-7"
|
|
997
1018
|
})(["width:17px;height:17px;border-radius:50%;position:absolute;right:1px;bottom:8px;", ";"], props => props.isOnline ? color.bg('success.600') : color.bg('shade.400'));
|
|
@@ -1038,9 +1059,9 @@ var TeamMemberInfo = /*#__PURE__*/React__default["default"].memo(_ref => {
|
|
|
1038
1059
|
children: [/*#__PURE__*/jsxRuntime.jsx(BrokerWrapper, {
|
|
1039
1060
|
children: teamMember ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1040
1061
|
children: [/*#__PURE__*/jsxRuntime.jsxs(BrokerImgWrapper, {
|
|
1041
|
-
children: [teamMember.profilePictureURL ? /*#__PURE__*/jsxRuntime.jsx(BrokerFace, {
|
|
1062
|
+
children: [teamMember.profilePictureURL ? /*#__PURE__*/jsxRuntime.jsx(BrokerFace$1, {
|
|
1042
1063
|
src: teamMember.profilePictureURL
|
|
1043
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(StyledFace, {}), /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
1064
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(StyledFace$1, {}), /*#__PURE__*/jsxRuntime.jsx(StatusIcon$1, {
|
|
1044
1065
|
isOnline: isOtherUserOnline,
|
|
1045
1066
|
"aria-label": isOtherUserOnline ? 'Online' : 'Offline'
|
|
1046
1067
|
})]
|
|
@@ -1328,30 +1349,98 @@ var SidePanel = _ref => {
|
|
|
1328
1349
|
});
|
|
1329
1350
|
};
|
|
1330
1351
|
|
|
1331
|
-
|
|
1332
|
-
displayName: "
|
|
1333
|
-
componentId: "lui__sc-
|
|
1334
|
-
})(["
|
|
1352
|
+
styled__default["default"].div.withConfig({
|
|
1353
|
+
displayName: "style__MobileBrokerInfoWrapper",
|
|
1354
|
+
componentId: "lui__sc-18wuygo-0"
|
|
1355
|
+
})(["display:flex;align-items:center;"]);
|
|
1356
|
+
var FaceWrapper = styled__default["default"].span.withConfig({
|
|
1357
|
+
displayName: "style__FaceWrapper",
|
|
1358
|
+
componentId: "lui__sc-18wuygo-1"
|
|
1359
|
+
})(["position:relative;"]);
|
|
1360
|
+
var BrokerFace = styled__default["default"].img.withConfig({
|
|
1361
|
+
displayName: "style__BrokerFace",
|
|
1362
|
+
componentId: "lui__sc-18wuygo-2"
|
|
1363
|
+
})(["width:20px;height:20px;border-radius:50%;border:1px solid ", ";"], color.color('shade.100'));
|
|
1364
|
+
var StatusIcon = styled__default["default"].span.withConfig({
|
|
1365
|
+
displayName: "style__StatusIcon",
|
|
1366
|
+
componentId: "lui__sc-18wuygo-3"
|
|
1367
|
+
})(["width:8px;height:8px;border-radius:50%;position:absolute;right:-1px;bottom:4px;", ";"], props => props.isOnline ? color.bg('success.600') : color.bg('shade.400'));
|
|
1368
|
+
var StyledFace = styled__default["default"](Face__default["default"]).withConfig({
|
|
1369
|
+
displayName: "style__StyledFace",
|
|
1370
|
+
componentId: "lui__sc-18wuygo-4"
|
|
1371
|
+
})(["height:26px;width:22px;"]);
|
|
1335
1372
|
|
|
1336
|
-
var
|
|
1337
|
-
var [isChatDisabled, setIsChatDisabled] = React.useState(true);
|
|
1373
|
+
var ChatHeaderTeamMemberAvatar = _ref => {
|
|
1338
1374
|
var {
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
} =
|
|
1375
|
+
teamMember,
|
|
1376
|
+
isBrokerOnline
|
|
1377
|
+
} = _ref;
|
|
1378
|
+
return /*#__PURE__*/jsxRuntime.jsxs(FaceWrapper, {
|
|
1379
|
+
children: [teamMember !== null && teamMember !== void 0 && teamMember.profilePictureURL ? /*#__PURE__*/jsxRuntime.jsx(BrokerFace, {
|
|
1380
|
+
src: teamMember.profilePictureURL
|
|
1381
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(StyledFace, {}), /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
1382
|
+
isOnline: isBrokerOnline,
|
|
1383
|
+
"aria-label": isBrokerOnline ? 'Online' : 'Offline'
|
|
1384
|
+
})]
|
|
1385
|
+
});
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
var StickyHeader = styled__default["default"].div.withConfig({
|
|
1389
|
+
displayName: "style__StickyHeader",
|
|
1390
|
+
componentId: "lui__sc-1pqeqpe-0"
|
|
1391
|
+
})(["top:0;position:relative;display:flex;flex-direction:row;z-index:3;width:100%;background-color:", ";align-items:center;padding-left:10px;", " ", " border-bottom:1px solid ", ";cursor:pointer;"], getColour__default["default"]('interaction', 'subtle'), spacing.pt('xs'), spacing.pb('xxs'), getColour__default["default"]('background', 'surface'));
|
|
1392
|
+
var TeamMemberBodyWrapper = styled__default["default"](typography.Body).withConfig({
|
|
1393
|
+
displayName: "style__TeamMemberBodyWrapper",
|
|
1394
|
+
componentId: "lui__sc-1pqeqpe-1"
|
|
1395
|
+
})(["", ";font-size:16px;font-weight:bold;"], spacing.pl('xxs'));
|
|
1396
|
+
var ChevronLeftIcon = styled__default["default"](KeyboardArrowLeft__default["default"]).withConfig({
|
|
1397
|
+
displayName: "style__ChevronLeftIcon",
|
|
1398
|
+
componentId: "lui__sc-1pqeqpe-2"
|
|
1399
|
+
})([""]);
|
|
1400
|
+
|
|
1401
|
+
var FullViewChatHeader = _ref => {
|
|
1342
1402
|
var {
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1403
|
+
onClick,
|
|
1404
|
+
teamMember,
|
|
1405
|
+
isOtherUserOnline
|
|
1406
|
+
} = _ref;
|
|
1407
|
+
return /*#__PURE__*/jsxRuntime.jsx(StickyHeader, {
|
|
1408
|
+
onClick: onClick,
|
|
1409
|
+
children: /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1410
|
+
children: teamMember ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1411
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ChevronLeftIcon, {
|
|
1412
|
+
color: getColour.getColour('interaction', 'secondary'),
|
|
1413
|
+
height: "24px",
|
|
1414
|
+
width: "24px"
|
|
1415
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ChatHeaderTeamMemberAvatar, {
|
|
1416
|
+
teamMember: teamMember,
|
|
1417
|
+
isBrokerOnline: isOtherUserOnline
|
|
1418
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ChatBodyWrapper, {
|
|
1419
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TeamMemberBodyWrapper, {
|
|
1420
|
+
size: "md",
|
|
1421
|
+
color: "secondary.500",
|
|
1422
|
+
children: teamMember ? "".concat(teamMember.firstName, " ").concat(teamMember.lastName) : 'Home Loan Specialist'
|
|
1423
|
+
})
|
|
1424
|
+
})]
|
|
1425
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1426
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(KeyboardArrowLeft__default["default"], {
|
|
1427
|
+
color: getColour.getColour('interaction', 'secondary'),
|
|
1428
|
+
height: "24px",
|
|
1429
|
+
width: "24px"
|
|
1430
|
+
}), /*#__PURE__*/jsxRuntime.jsx(BodyWrapper, {
|
|
1431
|
+
size: "md",
|
|
1432
|
+
children: "Chat online"
|
|
1433
|
+
})]
|
|
1434
|
+
})
|
|
1435
|
+
})
|
|
1436
|
+
});
|
|
1353
1437
|
};
|
|
1354
1438
|
|
|
1439
|
+
var StyledClose = styled__default["default"](button.IconButton).withConfig({
|
|
1440
|
+
displayName: "style__StyledClose",
|
|
1441
|
+
componentId: "lui__sc-qeih4b-0"
|
|
1442
|
+
})(["position:absolute;"]);
|
|
1443
|
+
|
|
1355
1444
|
var WithChatView = _ref => {
|
|
1356
1445
|
var {
|
|
1357
1446
|
legacySupport,
|
|
@@ -1362,6 +1451,7 @@ var WithChatView = _ref => {
|
|
|
1362
1451
|
} = _ref;
|
|
1363
1452
|
var {
|
|
1364
1453
|
closeCommPanel,
|
|
1454
|
+
isCommPanelOpen,
|
|
1365
1455
|
isChatOpen,
|
|
1366
1456
|
openChat,
|
|
1367
1457
|
teamMember,
|
|
@@ -1370,19 +1460,24 @@ var WithChatView = _ref => {
|
|
|
1370
1460
|
channelId,
|
|
1371
1461
|
migratedToConversation,
|
|
1372
1462
|
setSelectedThread,
|
|
1373
|
-
applicationId
|
|
1463
|
+
applicationId,
|
|
1464
|
+
closeChat
|
|
1374
1465
|
} = chat.useBootstrappedChatState();
|
|
1375
|
-
var [breakpoint$1, setBreakpoint] = React__default["default"].useState();
|
|
1376
|
-
breakpoint.useBreakpoint(setBreakpoint);
|
|
1377
|
-
var isMobile = breakpoint$1 === 'mobile';
|
|
1378
1466
|
var hasChat = !useDisableChat();
|
|
1467
|
+
var {
|
|
1468
|
+
enableHistoricalThreads
|
|
1469
|
+
} = launchdarkly.useFlags();
|
|
1379
1470
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1380
|
-
children: [!
|
|
1471
|
+
children: [(isCommPanelOpen && !isChatOpen || !enableHistoricalThreads) && /*#__PURE__*/jsxRuntime.jsx(StyledClose, {
|
|
1381
1472
|
color: "shade.300",
|
|
1382
1473
|
onClick: closeCommPanel,
|
|
1383
1474
|
size: "md",
|
|
1384
1475
|
"aria-label": "Close comm panel",
|
|
1385
1476
|
icon: Close__default["default"]
|
|
1477
|
+
}), isChatOpen && !enableHistoricalThreads && /*#__PURE__*/jsxRuntime.jsx(FullViewChatHeader, {
|
|
1478
|
+
teamMember: teamMember,
|
|
1479
|
+
isOtherUserOnline: isOtherUserOnline,
|
|
1480
|
+
onClick: closeChat
|
|
1386
1481
|
}), !isChatOpen && /*#__PURE__*/jsxRuntime.jsx(SidePanel, {
|
|
1387
1482
|
teamMember: teamMember,
|
|
1388
1483
|
store: store,
|
package/dist/navbar.cjs.prod.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var React = require("react"), NavbarBase = require("@lendi-ui/navbar-base"), analytics$1 = require("@lendi/analytics"), breakpoint = require("@lendi-ui/breakpoint"), Logo = require("@lendi-ui/logo"), spacing = require("@lendi-ui/spacing"), Theme = require("@lendi/ui/Theme"), styled = require("styled-components"), jsxRuntime = require("react/jsx-runtime"), button = require("@lendi-ui/button"), UnreadMessage = require("@lendi-ui/icon/UnreadMessage"), utils = require("@lendi-ui/utils"), MoreVert = require("@lendi-ui/icon/MoreVert"), borders = require("@lendi-ui/commons/borders"), getColour = require("@lendi-ui/commons/colours"), depth = require("@lendi-ui/depth"), Launch = require("@lendi-ui/icon/Launch"), typography = require("@lendi-ui/typography"), lalaUtils = require("@lendi/lala-utils"), launchdarkly = require("@lendi/launchdarkly"), lalaReact = require("@lendi/lala-react"), chat = require("@lendi/chat"), Close = require("@lendi-ui/icon/Close"), color = require("@lendi-ui/color"), Face = require("@lendi-ui/icon/Face"), getTypography = require("@lendi-ui/commons/typography"), utils$1 = require("@lendi-ui/commons/utils"), Phone = require("@lendi-ui/icon/Phone"), Calendar = require("@lendi-ui/icon/Calendar"), lendigroupLeadsLibrary = require("@lendi/lendigroup-leads-library"), Chat = require("@lendi-ui/icon/Chat"), KeyboardArrowDown = require("@lendi-ui/icon/KeyboardArrowDown"), KeyboardArrowRight = require("@lendi-ui/icon/KeyboardArrowRight"), FocusLock = require("react-focus-lock"), Menu = require("@lendi-ui/icon/Menu"), Sidebar = require("@lendi-ui/sidebar"), ArrowDropDown = require("@lendi-ui/icon/ArrowDropDown"), ExitToApp = require("@lendi-ui/icon/ExitToApp"), ExpandMore = require("@lendi-ui/icon/ExpandMore"), grid = require("@lendi-ui/grid"), ChevronDown = require("@lendi-ui/icon/ChevronDown"), ChevronUp = require("@lendi-ui/icon/ChevronUp"), Layout = require("@lendi/ui/Layout"), ArrowForward = require("@lendi-ui/icon/ArrowForward"), Typography = require("@lendi/ui/Typography"), Button = require("@lendi/ui/Button"), axios = require("axios");
|
|
7
|
+
var React = require("react"), NavbarBase = require("@lendi-ui/navbar-base"), analytics$1 = require("@lendi/analytics"), breakpoint = require("@lendi-ui/breakpoint"), Logo = require("@lendi-ui/logo"), spacing = require("@lendi-ui/spacing"), Theme = require("@lendi/ui/Theme"), styled = require("styled-components"), jsxRuntime = require("react/jsx-runtime"), button = require("@lendi-ui/button"), UnreadMessage = require("@lendi-ui/icon/UnreadMessage"), utils = require("@lendi-ui/utils"), MoreVert = require("@lendi-ui/icon/MoreVert"), borders = require("@lendi-ui/commons/borders"), getColour = require("@lendi-ui/commons/colours"), depth = require("@lendi-ui/depth"), Launch = require("@lendi-ui/icon/Launch"), typography = require("@lendi-ui/typography"), lalaUtils = require("@lendi/lala-utils"), launchdarkly = require("@lendi/launchdarkly"), lalaReact = require("@lendi/lala-react"), chat = require("@lendi/chat"), Close = require("@lendi-ui/icon/Close"), color = require("@lendi-ui/color"), Face = require("@lendi-ui/icon/Face"), getTypography = require("@lendi-ui/commons/typography"), utils$1 = require("@lendi-ui/commons/utils"), Phone = require("@lendi-ui/icon/Phone"), Calendar = require("@lendi-ui/icon/Calendar"), lendigroupLeadsLibrary = require("@lendi/lendigroup-leads-library"), Chat = require("@lendi-ui/icon/Chat"), KeyboardArrowDown = require("@lendi-ui/icon/KeyboardArrowDown"), KeyboardArrowRight = require("@lendi-ui/icon/KeyboardArrowRight"), KeyboardArrowLeft = require("@lendi-ui/icon/KeyboardArrowLeft"), FocusLock = require("react-focus-lock"), Menu = require("@lendi-ui/icon/Menu"), Sidebar = require("@lendi-ui/sidebar"), ArrowDropDown = require("@lendi-ui/icon/ArrowDropDown"), ExitToApp = require("@lendi-ui/icon/ExitToApp"), ExpandMore = require("@lendi-ui/icon/ExpandMore"), grid = require("@lendi-ui/grid"), ChevronDown = require("@lendi-ui/icon/ChevronDown"), ChevronUp = require("@lendi-ui/icon/ChevronUp"), Layout = require("@lendi/ui/Layout"), ArrowForward = require("@lendi-ui/icon/ArrowForward"), Typography = require("@lendi/ui/Typography"), Button = require("@lendi/ui/Button"), axios = require("axios");
|
|
8
8
|
|
|
9
9
|
function _interopDefault(e) {
|
|
10
10
|
return e && e.__esModule ? e : {
|
|
@@ -12,7 +12,7 @@ function _interopDefault(e) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
var React__default = _interopDefault(React), NavbarBase__default = _interopDefault(NavbarBase), Logo__default = _interopDefault(Logo), styled__default = _interopDefault(styled), UnreadMessage__default = _interopDefault(UnreadMessage), MoreVert__default = _interopDefault(MoreVert), getColour__default = _interopDefault(getColour), Launch__default = _interopDefault(Launch), Close__default = _interopDefault(Close), Face__default = _interopDefault(Face), getTypography__default = _interopDefault(getTypography), Phone__default = _interopDefault(Phone), Calendar__default = _interopDefault(Calendar), Chat__default = _interopDefault(Chat), KeyboardArrowDown__default = _interopDefault(KeyboardArrowDown), KeyboardArrowRight__default = _interopDefault(KeyboardArrowRight), FocusLock__default = _interopDefault(FocusLock), Menu__default = _interopDefault(Menu), Sidebar__default = _interopDefault(Sidebar), ArrowDropDown__default = _interopDefault(ArrowDropDown), ExitToApp__default = _interopDefault(ExitToApp), ExpandMore__default = _interopDefault(ExpandMore), ChevronDown__default = _interopDefault(ChevronDown), ChevronUp__default = _interopDefault(ChevronUp), ArrowForward__default = _interopDefault(ArrowForward), axios__default = _interopDefault(axios);
|
|
15
|
+
var React__default = _interopDefault(React), NavbarBase__default = _interopDefault(NavbarBase), Logo__default = _interopDefault(Logo), styled__default = _interopDefault(styled), UnreadMessage__default = _interopDefault(UnreadMessage), MoreVert__default = _interopDefault(MoreVert), getColour__default = _interopDefault(getColour), Launch__default = _interopDefault(Launch), Close__default = _interopDefault(Close), Face__default = _interopDefault(Face), getTypography__default = _interopDefault(getTypography), Phone__default = _interopDefault(Phone), Calendar__default = _interopDefault(Calendar), Chat__default = _interopDefault(Chat), KeyboardArrowDown__default = _interopDefault(KeyboardArrowDown), KeyboardArrowRight__default = _interopDefault(KeyboardArrowRight), KeyboardArrowLeft__default = _interopDefault(KeyboardArrowLeft), FocusLock__default = _interopDefault(FocusLock), Menu__default = _interopDefault(Menu), Sidebar__default = _interopDefault(Sidebar), ArrowDropDown__default = _interopDefault(ArrowDropDown), ExitToApp__default = _interopDefault(ExitToApp), ExpandMore__default = _interopDefault(ExpandMore), ChevronDown__default = _interopDefault(ChevronDown), ChevronUp__default = _interopDefault(ChevronUp), ArrowForward__default = _interopDefault(ArrowForward), axios__default = _interopDefault(axios);
|
|
16
16
|
|
|
17
17
|
function _toPrimitive(input, hint) {
|
|
18
18
|
if ("object" != typeof input || null === input) return input;
|
|
@@ -591,7 +591,12 @@ var _excluded$a = [ "showTalkToExpertCta" ], withDomainChat = Component => _ref
|
|
|
591
591
|
}), CommPanelWrapper$1 = styled__default.default.div.withConfig({
|
|
592
592
|
displayName: "style__CommPanelWrapper",
|
|
593
593
|
componentId: "lui__sc-no953w-0"
|
|
594
|
-
})([ "", ";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;display:flex;flex-direction:column;height:100%;" ], utils.normalise),
|
|
594
|
+
})([ "", ";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;display:flex;flex-direction:column;height:100%;" ], utils.normalise), useDisableChat = () => {
|
|
595
|
+
var [isChatDisabled, setIsChatDisabled] = React.useState(!0), {disableChat: disableChat, enableAussieChat: enableAussieChat} = launchdarkly.useFlags(), {brand: brand} = lalaReact.useSession();
|
|
596
|
+
return React.useEffect((() => {
|
|
597
|
+
brand === lalaUtils.Brand.Aussie ? void 0 !== enableAussieChat && setIsChatDisabled(!enableAussieChat) : void 0 !== disableChat && setIsChatDisabled(disableChat);
|
|
598
|
+
}), [ disableChat, enableAussieChat, brand ]), isChatDisabled;
|
|
599
|
+
}, HeadWrapper = styled__default.default.div.withConfig({
|
|
595
600
|
displayName: "style__HeadWrapper",
|
|
596
601
|
componentId: "lui__sc-zy0mzz-0"
|
|
597
602
|
})([ "border-bottom:1px solid ", ";", ";" ], color.color("shade.100"), spacing.mt("xxl")), BrokerWrapper = styled__default.default.div.withConfig({
|
|
@@ -600,7 +605,7 @@ var _excluded$a = [ "showTalkToExpertCta" ], withDomainChat = Component => _ref
|
|
|
600
605
|
})([ "display:flex;align-items:center;", ";" ], spacing.ml("xl")), BrokerImgWrapper = styled__default.default.div.withConfig({
|
|
601
606
|
displayName: "style__BrokerImgWrapper",
|
|
602
607
|
componentId: "lui__sc-zy0mzz-2"
|
|
603
|
-
})([ "", ";position:relative;" ], spacing.mr("xs")), BrokerFace = styled__default.default.img.withConfig({
|
|
608
|
+
})([ "", ";position:relative;" ], spacing.mr("xs")), BrokerFace$1 = styled__default.default.img.withConfig({
|
|
604
609
|
displayName: "style__BrokerFace",
|
|
605
610
|
componentId: "lui__sc-zy0mzz-3"
|
|
606
611
|
})([ "width:65px;height:65px;border-radius:50%;border:1px solid ", ";margin:auto;" ], color.color("shade.100")), BrokerDetail = styled__default.default.div.withConfig({
|
|
@@ -609,10 +614,10 @@ var _excluded$a = [ "showTalkToExpertCta" ], withDomainChat = Component => _ref
|
|
|
609
614
|
})([ "display:flex;flex-direction:column;justify-content:space-between;", ";" ], spacing.ml("xxs")), BrokerName = styled__default.default(typography.Heading).withConfig({
|
|
610
615
|
displayName: "style__BrokerName",
|
|
611
616
|
componentId: "lui__sc-zy0mzz-5"
|
|
612
|
-
})([ "font-weight:bold;" ]), StyledFace = styled__default.default(Face__default.default).withConfig({
|
|
617
|
+
})([ "font-weight:bold;" ]), StyledFace$1 = styled__default.default(Face__default.default).withConfig({
|
|
613
618
|
displayName: "style__StyledFace",
|
|
614
619
|
componentId: "lui__sc-zy0mzz-6"
|
|
615
|
-
})([ "width:4.5em;height:4.5em;" ]), StatusIcon = styled__default.default.div.withConfig({
|
|
620
|
+
})([ "width:4.5em;height:4.5em;" ]), StatusIcon$1 = styled__default.default.div.withConfig({
|
|
616
621
|
displayName: "style__StatusIcon",
|
|
617
622
|
componentId: "lui__sc-zy0mzz-7"
|
|
618
623
|
})([ "width:17px;height:17px;border-radius:50%;position:absolute;right:1px;bottom:8px;", ";" ], (props => props.isOnline ? color.bg("success.600") : color.bg("shade.400"))), StyledBrokerFaces = styled__default.default.img.withConfig({
|
|
@@ -647,9 +652,9 @@ var _excluded$a = [ "showTalkToExpertCta" ], withDomainChat = Component => _ref
|
|
|
647
652
|
children: [ jsxRuntime.jsx(BrokerWrapper, {
|
|
648
653
|
children: teamMember ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
649
654
|
children: [ jsxRuntime.jsxs(BrokerImgWrapper, {
|
|
650
|
-
children: [ teamMember.profilePictureURL ? jsxRuntime.jsx(BrokerFace, {
|
|
655
|
+
children: [ teamMember.profilePictureURL ? jsxRuntime.jsx(BrokerFace$1, {
|
|
651
656
|
src: teamMember.profilePictureURL
|
|
652
|
-
}) : jsxRuntime.jsx(StyledFace, {}), jsxRuntime.jsx(StatusIcon, {
|
|
657
|
+
}) : jsxRuntime.jsx(StyledFace$1, {}), jsxRuntime.jsx(StatusIcon$1, {
|
|
653
658
|
isOnline: isOtherUserOnline,
|
|
654
659
|
"aria-label": isOtherUserOnline ? "Online" : "Offline"
|
|
655
660
|
}) ]
|
|
@@ -814,7 +819,7 @@ styled__default.default(KeyboardArrowDown__default.default).withConfig({
|
|
|
814
819
|
return styled.css([ "transition:transform 0.25s;transform:rotate(", ");" ], isChatOpen ? "180deg" : "0deg");
|
|
815
820
|
}));
|
|
816
821
|
|
|
817
|
-
var
|
|
822
|
+
var ChevronRightIcon = styled__default.default(KeyboardArrowRight__default.default).withConfig({
|
|
818
823
|
displayName: "style__ChevronRightIcon",
|
|
819
824
|
componentId: "lui__sc-1pa95jd-2"
|
|
820
825
|
})([ "" ]), StyledChevronRightIcon = styled__default.default(ChevronRightIcon).withConfig({
|
|
@@ -866,25 +871,92 @@ var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6,
|
|
|
866
871
|
}) ]
|
|
867
872
|
}) ]
|
|
868
873
|
});
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
styled__default.default.div.withConfig({
|
|
877
|
+
displayName: "style__MobileBrokerInfoWrapper",
|
|
878
|
+
componentId: "lui__sc-18wuygo-0"
|
|
879
|
+
})([ "display:flex;align-items:center;" ]);
|
|
880
|
+
|
|
881
|
+
var _templateObject$8, _templateObject2$3, _templateObject$7, _templateObject$6, _templateObject$5, _templateObject$4, _templateObject2$2, _templateObject3$1, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, FaceWrapper = styled__default.default.span.withConfig({
|
|
882
|
+
displayName: "style__FaceWrapper",
|
|
883
|
+
componentId: "lui__sc-18wuygo-1"
|
|
884
|
+
})([ "position:relative;" ]), BrokerFace = styled__default.default.img.withConfig({
|
|
885
|
+
displayName: "style__BrokerFace",
|
|
886
|
+
componentId: "lui__sc-18wuygo-2"
|
|
887
|
+
})([ "width:20px;height:20px;border-radius:50%;border:1px solid ", ";" ], color.color("shade.100")), StatusIcon = styled__default.default.span.withConfig({
|
|
888
|
+
displayName: "style__StatusIcon",
|
|
889
|
+
componentId: "lui__sc-18wuygo-3"
|
|
890
|
+
})([ "width:8px;height:8px;border-radius:50%;position:absolute;right:-1px;bottom:4px;", ";" ], (props => props.isOnline ? color.bg("success.600") : color.bg("shade.400"))), StyledFace = styled__default.default(Face__default.default).withConfig({
|
|
891
|
+
displayName: "style__StyledFace",
|
|
892
|
+
componentId: "lui__sc-18wuygo-4"
|
|
893
|
+
})([ "height:26px;width:22px;" ]), ChatHeaderTeamMemberAvatar = _ref => {
|
|
894
|
+
var {teamMember: teamMember, isBrokerOnline: isBrokerOnline} = _ref;
|
|
895
|
+
return jsxRuntime.jsxs(FaceWrapper, {
|
|
896
|
+
children: [ null != teamMember && teamMember.profilePictureURL ? jsxRuntime.jsx(BrokerFace, {
|
|
897
|
+
src: teamMember.profilePictureURL
|
|
898
|
+
}) : jsxRuntime.jsx(StyledFace, {}), jsxRuntime.jsx(StatusIcon, {
|
|
899
|
+
isOnline: isBrokerOnline,
|
|
900
|
+
"aria-label": isBrokerOnline ? "Online" : "Offline"
|
|
901
|
+
}) ]
|
|
902
|
+
});
|
|
903
|
+
}, StickyHeader = styled__default.default.div.withConfig({
|
|
904
|
+
displayName: "style__StickyHeader",
|
|
905
|
+
componentId: "lui__sc-1pqeqpe-0"
|
|
906
|
+
})([ "top:0;position:relative;display:flex;flex-direction:row;z-index:3;width:100%;background-color:", ";align-items:center;padding-left:10px;", " ", " border-bottom:1px solid ", ";cursor:pointer;" ], getColour__default.default("interaction", "subtle"), spacing.pt("xs"), spacing.pb("xxs"), getColour__default.default("background", "surface")), TeamMemberBodyWrapper = styled__default.default(typography.Body).withConfig({
|
|
907
|
+
displayName: "style__TeamMemberBodyWrapper",
|
|
908
|
+
componentId: "lui__sc-1pqeqpe-1"
|
|
909
|
+
})([ "", ";font-size:16px;font-weight:bold;" ], spacing.pl("xxs")), ChevronLeftIcon = styled__default.default(KeyboardArrowLeft__default.default).withConfig({
|
|
910
|
+
displayName: "style__ChevronLeftIcon",
|
|
911
|
+
componentId: "lui__sc-1pqeqpe-2"
|
|
912
|
+
})([ "" ]), FullViewChatHeader = _ref => {
|
|
913
|
+
var {onClick: onClick, teamMember: teamMember, isOtherUserOnline: isOtherUserOnline} = _ref;
|
|
914
|
+
return jsxRuntime.jsx(StickyHeader, {
|
|
915
|
+
onClick: onClick,
|
|
916
|
+
children: jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
917
|
+
children: teamMember ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
918
|
+
children: [ jsxRuntime.jsx(ChevronLeftIcon, {
|
|
919
|
+
color: getColour.getColour("interaction", "secondary"),
|
|
920
|
+
height: "24px",
|
|
921
|
+
width: "24px"
|
|
922
|
+
}), jsxRuntime.jsx(ChatHeaderTeamMemberAvatar, {
|
|
923
|
+
teamMember: teamMember,
|
|
924
|
+
isBrokerOnline: isOtherUserOnline
|
|
925
|
+
}), jsxRuntime.jsx(ChatBodyWrapper, {
|
|
926
|
+
children: jsxRuntime.jsx(TeamMemberBodyWrapper, {
|
|
927
|
+
size: "md",
|
|
928
|
+
color: "secondary.500",
|
|
929
|
+
children: teamMember ? "".concat(teamMember.firstName, " ").concat(teamMember.lastName) : "Home Loan Specialist"
|
|
930
|
+
})
|
|
931
|
+
}) ]
|
|
932
|
+
}) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
933
|
+
children: [ jsxRuntime.jsx(KeyboardArrowLeft__default.default, {
|
|
934
|
+
color: getColour.getColour("interaction", "secondary"),
|
|
935
|
+
height: "24px",
|
|
936
|
+
width: "24px"
|
|
937
|
+
}), jsxRuntime.jsx(BodyWrapper, {
|
|
938
|
+
size: "md",
|
|
939
|
+
children: "Chat online"
|
|
940
|
+
}) ]
|
|
941
|
+
})
|
|
942
|
+
})
|
|
943
|
+
});
|
|
869
944
|
}, StyledClose = styled__default.default(button.IconButton).withConfig({
|
|
870
945
|
displayName: "style__StyledClose",
|
|
871
946
|
componentId: "lui__sc-qeih4b-0"
|
|
872
|
-
})([ "position:absolute;" ]),
|
|
873
|
-
var
|
|
874
|
-
return React.useEffect((() => {
|
|
875
|
-
brand === lalaUtils.Brand.Aussie ? void 0 !== enableAussieChat && setIsChatDisabled(!enableAussieChat) : void 0 !== disableChat && setIsChatDisabled(disableChat);
|
|
876
|
-
}), [ disableChat, enableAussieChat, brand ]), isChatDisabled;
|
|
877
|
-
}, WithChatView = _ref => {
|
|
878
|
-
var {legacySupport: legacySupport, userType: userType, isOtherUserOnline: isOtherUserOnline, hasNew: hasNew, onException: onException} = _ref, {closeCommPanel: closeCommPanel, isChatOpen: isChatOpen, openChat: openChat, teamMember: teamMember, broker: broker, store: store, channelId: channelId, migratedToConversation: migratedToConversation, setSelectedThread: setSelectedThread, applicationId: applicationId} = chat.useBootstrappedChatState(), [breakpoint$1, setBreakpoint] = React__default.default.useState();
|
|
879
|
-
breakpoint.useBreakpoint(setBreakpoint);
|
|
880
|
-
var isMobile = "mobile" === breakpoint$1, hasChat = !useDisableChat();
|
|
947
|
+
})([ "position:absolute;" ]), WithChatView = _ref => {
|
|
948
|
+
var {legacySupport: legacySupport, userType: userType, isOtherUserOnline: isOtherUserOnline, hasNew: hasNew, onException: onException} = _ref, {closeCommPanel: closeCommPanel, isCommPanelOpen: isCommPanelOpen, isChatOpen: isChatOpen, openChat: openChat, teamMember: teamMember, broker: broker, store: store, channelId: channelId, migratedToConversation: migratedToConversation, setSelectedThread: setSelectedThread, applicationId: applicationId, closeChat: closeChat} = chat.useBootstrappedChatState(), hasChat = !useDisableChat(), {enableHistoricalThreads: enableHistoricalThreads} = launchdarkly.useFlags();
|
|
881
949
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
882
|
-
children: [ !
|
|
950
|
+
children: [ (isCommPanelOpen && !isChatOpen || !enableHistoricalThreads) && jsxRuntime.jsx(StyledClose, {
|
|
883
951
|
color: "shade.300",
|
|
884
952
|
onClick: closeCommPanel,
|
|
885
953
|
size: "md",
|
|
886
954
|
"aria-label": "Close comm panel",
|
|
887
955
|
icon: Close__default.default
|
|
956
|
+
}), isChatOpen && !enableHistoricalThreads && jsxRuntime.jsx(FullViewChatHeader, {
|
|
957
|
+
teamMember: teamMember,
|
|
958
|
+
isOtherUserOnline: isOtherUserOnline,
|
|
959
|
+
onClick: closeChat
|
|
888
960
|
}), !isChatOpen && jsxRuntime.jsx(SidePanel, {
|
|
889
961
|
teamMember: teamMember,
|
|
890
962
|
store: store,
|
package/dist/navbar.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, forwardRef } from 'react';
|
|
2
2
|
import NavbarBase, { useNavbarBaseContext } from '@lendi-ui/navbar-base';
|
|
3
3
|
import { trackEvent, EventCategory, ButtonType, CustomerType } from '@lendi/analytics';
|
|
4
|
-
import { gte, between,
|
|
4
|
+
import { gte, between, map, useBreakpoint } from '@lendi-ui/breakpoint';
|
|
5
5
|
import Logo from '@lendi-ui/logo';
|
|
6
|
-
import { mb, ml, pl, pr, mr, p, px, py, mx, mt, m, pb, my } from '@lendi-ui/spacing';
|
|
6
|
+
import { mb, ml, pl, pr, mr, p, px, py, mx, mt, m, pb, pt, my } from '@lendi-ui/spacing';
|
|
7
7
|
import { select, useTheme } from '@lendi/ui/Theme';
|
|
8
8
|
import styled, { css, keyframes, createGlobalStyle } from 'styled-components';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -32,6 +32,7 @@ import { LendiGroupLeads } from '@lendi/lendigroup-leads-library';
|
|
|
32
32
|
import Chat from '@lendi-ui/icon/Chat';
|
|
33
33
|
import KeyboardArrowDown from '@lendi-ui/icon/KeyboardArrowDown';
|
|
34
34
|
import KeyboardArrowRight from '@lendi-ui/icon/KeyboardArrowRight';
|
|
35
|
+
import KeyboardArrowLeft from '@lendi-ui/icon/KeyboardArrowLeft';
|
|
35
36
|
import FocusLock from 'react-focus-lock';
|
|
36
37
|
import Menu from '@lendi-ui/icon/Menu';
|
|
37
38
|
import Sidebar from '@lendi-ui/sidebar';
|
|
@@ -931,6 +932,25 @@ var CommPanelWrapper$1 = styled.div.withConfig({
|
|
|
931
932
|
componentId: "lui__sc-no953w-0"
|
|
932
933
|
})(["", ";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;display:flex;flex-direction:column;height:100%;"], normalise);
|
|
933
934
|
|
|
935
|
+
var useDisableChat = () => {
|
|
936
|
+
var [isChatDisabled, setIsChatDisabled] = useState(true);
|
|
937
|
+
var {
|
|
938
|
+
disableChat,
|
|
939
|
+
enableAussieChat
|
|
940
|
+
} = useFlags();
|
|
941
|
+
var {
|
|
942
|
+
brand
|
|
943
|
+
} = useSession();
|
|
944
|
+
useEffect(() => {
|
|
945
|
+
if (brand === Brand$1.Aussie) {
|
|
946
|
+
if (enableAussieChat !== undefined) setIsChatDisabled(!enableAussieChat);
|
|
947
|
+
} else {
|
|
948
|
+
if (disableChat !== undefined) setIsChatDisabled(disableChat);
|
|
949
|
+
}
|
|
950
|
+
}, [disableChat, enableAussieChat, brand]);
|
|
951
|
+
return isChatDisabled;
|
|
952
|
+
};
|
|
953
|
+
|
|
934
954
|
var HeadWrapper = styled.div.withConfig({
|
|
935
955
|
displayName: "style__HeadWrapper",
|
|
936
956
|
componentId: "lui__sc-zy0mzz-0"
|
|
@@ -943,7 +963,7 @@ var BrokerImgWrapper = styled.div.withConfig({
|
|
|
943
963
|
displayName: "style__BrokerImgWrapper",
|
|
944
964
|
componentId: "lui__sc-zy0mzz-2"
|
|
945
965
|
})(["", ";position:relative;"], mr('xs'));
|
|
946
|
-
var BrokerFace = styled.img.withConfig({
|
|
966
|
+
var BrokerFace$1 = styled.img.withConfig({
|
|
947
967
|
displayName: "style__BrokerFace",
|
|
948
968
|
componentId: "lui__sc-zy0mzz-3"
|
|
949
969
|
})(["width:65px;height:65px;border-radius:50%;border:1px solid ", ";margin:auto;"], color('shade.100'));
|
|
@@ -955,11 +975,11 @@ var BrokerName = styled(Heading).withConfig({
|
|
|
955
975
|
displayName: "style__BrokerName",
|
|
956
976
|
componentId: "lui__sc-zy0mzz-5"
|
|
957
977
|
})(["font-weight:bold;"]);
|
|
958
|
-
var StyledFace = styled(Face).withConfig({
|
|
978
|
+
var StyledFace$1 = styled(Face).withConfig({
|
|
959
979
|
displayName: "style__StyledFace",
|
|
960
980
|
componentId: "lui__sc-zy0mzz-6"
|
|
961
981
|
})(["width:4.5em;height:4.5em;"]);
|
|
962
|
-
var StatusIcon = styled.div.withConfig({
|
|
982
|
+
var StatusIcon$1 = styled.div.withConfig({
|
|
963
983
|
displayName: "style__StatusIcon",
|
|
964
984
|
componentId: "lui__sc-zy0mzz-7"
|
|
965
985
|
})(["width:17px;height:17px;border-radius:50%;position:absolute;right:1px;bottom:8px;", ";"], props => props.isOnline ? bg('success.600') : bg('shade.400'));
|
|
@@ -1006,9 +1026,9 @@ var TeamMemberInfo = /*#__PURE__*/React.memo(_ref => {
|
|
|
1006
1026
|
children: [/*#__PURE__*/jsx(BrokerWrapper, {
|
|
1007
1027
|
children: teamMember ? /*#__PURE__*/jsxs(Fragment, {
|
|
1008
1028
|
children: [/*#__PURE__*/jsxs(BrokerImgWrapper, {
|
|
1009
|
-
children: [teamMember.profilePictureURL ? /*#__PURE__*/jsx(BrokerFace, {
|
|
1029
|
+
children: [teamMember.profilePictureURL ? /*#__PURE__*/jsx(BrokerFace$1, {
|
|
1010
1030
|
src: teamMember.profilePictureURL
|
|
1011
|
-
}) : /*#__PURE__*/jsx(StyledFace, {}), /*#__PURE__*/jsx(StatusIcon, {
|
|
1031
|
+
}) : /*#__PURE__*/jsx(StyledFace$1, {}), /*#__PURE__*/jsx(StatusIcon$1, {
|
|
1012
1032
|
isOnline: isOtherUserOnline,
|
|
1013
1033
|
"aria-label": isOtherUserOnline ? 'Online' : 'Offline'
|
|
1014
1034
|
})]
|
|
@@ -1296,30 +1316,98 @@ var SidePanel = _ref => {
|
|
|
1296
1316
|
});
|
|
1297
1317
|
};
|
|
1298
1318
|
|
|
1299
|
-
|
|
1300
|
-
displayName: "
|
|
1301
|
-
componentId: "lui__sc-
|
|
1302
|
-
})(["
|
|
1319
|
+
styled.div.withConfig({
|
|
1320
|
+
displayName: "style__MobileBrokerInfoWrapper",
|
|
1321
|
+
componentId: "lui__sc-18wuygo-0"
|
|
1322
|
+
})(["display:flex;align-items:center;"]);
|
|
1323
|
+
var FaceWrapper = styled.span.withConfig({
|
|
1324
|
+
displayName: "style__FaceWrapper",
|
|
1325
|
+
componentId: "lui__sc-18wuygo-1"
|
|
1326
|
+
})(["position:relative;"]);
|
|
1327
|
+
var BrokerFace = styled.img.withConfig({
|
|
1328
|
+
displayName: "style__BrokerFace",
|
|
1329
|
+
componentId: "lui__sc-18wuygo-2"
|
|
1330
|
+
})(["width:20px;height:20px;border-radius:50%;border:1px solid ", ";"], color('shade.100'));
|
|
1331
|
+
var StatusIcon = styled.span.withConfig({
|
|
1332
|
+
displayName: "style__StatusIcon",
|
|
1333
|
+
componentId: "lui__sc-18wuygo-3"
|
|
1334
|
+
})(["width:8px;height:8px;border-radius:50%;position:absolute;right:-1px;bottom:4px;", ";"], props => props.isOnline ? bg('success.600') : bg('shade.400'));
|
|
1335
|
+
var StyledFace = styled(Face).withConfig({
|
|
1336
|
+
displayName: "style__StyledFace",
|
|
1337
|
+
componentId: "lui__sc-18wuygo-4"
|
|
1338
|
+
})(["height:26px;width:22px;"]);
|
|
1303
1339
|
|
|
1304
|
-
var
|
|
1305
|
-
var [isChatDisabled, setIsChatDisabled] = useState(true);
|
|
1340
|
+
var ChatHeaderTeamMemberAvatar = _ref => {
|
|
1306
1341
|
var {
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
} =
|
|
1342
|
+
teamMember,
|
|
1343
|
+
isBrokerOnline
|
|
1344
|
+
} = _ref;
|
|
1345
|
+
return /*#__PURE__*/jsxs(FaceWrapper, {
|
|
1346
|
+
children: [teamMember !== null && teamMember !== void 0 && teamMember.profilePictureURL ? /*#__PURE__*/jsx(BrokerFace, {
|
|
1347
|
+
src: teamMember.profilePictureURL
|
|
1348
|
+
}) : /*#__PURE__*/jsx(StyledFace, {}), /*#__PURE__*/jsx(StatusIcon, {
|
|
1349
|
+
isOnline: isBrokerOnline,
|
|
1350
|
+
"aria-label": isBrokerOnline ? 'Online' : 'Offline'
|
|
1351
|
+
})]
|
|
1352
|
+
});
|
|
1353
|
+
};
|
|
1354
|
+
|
|
1355
|
+
var StickyHeader = styled.div.withConfig({
|
|
1356
|
+
displayName: "style__StickyHeader",
|
|
1357
|
+
componentId: "lui__sc-1pqeqpe-0"
|
|
1358
|
+
})(["top:0;position:relative;display:flex;flex-direction:row;z-index:3;width:100%;background-color:", ";align-items:center;padding-left:10px;", " ", " border-bottom:1px solid ", ";cursor:pointer;"], getColour('interaction', 'subtle'), pt('xs'), pb('xxs'), getColour('background', 'surface'));
|
|
1359
|
+
var TeamMemberBodyWrapper = styled(Body).withConfig({
|
|
1360
|
+
displayName: "style__TeamMemberBodyWrapper",
|
|
1361
|
+
componentId: "lui__sc-1pqeqpe-1"
|
|
1362
|
+
})(["", ";font-size:16px;font-weight:bold;"], pl('xxs'));
|
|
1363
|
+
var ChevronLeftIcon = styled(KeyboardArrowLeft).withConfig({
|
|
1364
|
+
displayName: "style__ChevronLeftIcon",
|
|
1365
|
+
componentId: "lui__sc-1pqeqpe-2"
|
|
1366
|
+
})([""]);
|
|
1367
|
+
|
|
1368
|
+
var FullViewChatHeader = _ref => {
|
|
1310
1369
|
var {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1370
|
+
onClick,
|
|
1371
|
+
teamMember,
|
|
1372
|
+
isOtherUserOnline
|
|
1373
|
+
} = _ref;
|
|
1374
|
+
return /*#__PURE__*/jsx(StickyHeader, {
|
|
1375
|
+
onClick: onClick,
|
|
1376
|
+
children: /*#__PURE__*/jsx(Fragment, {
|
|
1377
|
+
children: teamMember ? /*#__PURE__*/jsxs(Fragment, {
|
|
1378
|
+
children: [/*#__PURE__*/jsx(ChevronLeftIcon, {
|
|
1379
|
+
color: getColour$1('interaction', 'secondary'),
|
|
1380
|
+
height: "24px",
|
|
1381
|
+
width: "24px"
|
|
1382
|
+
}), /*#__PURE__*/jsx(ChatHeaderTeamMemberAvatar, {
|
|
1383
|
+
teamMember: teamMember,
|
|
1384
|
+
isBrokerOnline: isOtherUserOnline
|
|
1385
|
+
}), /*#__PURE__*/jsx(ChatBodyWrapper, {
|
|
1386
|
+
children: /*#__PURE__*/jsx(TeamMemberBodyWrapper, {
|
|
1387
|
+
size: "md",
|
|
1388
|
+
color: "secondary.500",
|
|
1389
|
+
children: teamMember ? "".concat(teamMember.firstName, " ").concat(teamMember.lastName) : 'Home Loan Specialist'
|
|
1390
|
+
})
|
|
1391
|
+
})]
|
|
1392
|
+
}) : /*#__PURE__*/jsxs(Fragment, {
|
|
1393
|
+
children: [/*#__PURE__*/jsx(KeyboardArrowLeft, {
|
|
1394
|
+
color: getColour$1('interaction', 'secondary'),
|
|
1395
|
+
height: "24px",
|
|
1396
|
+
width: "24px"
|
|
1397
|
+
}), /*#__PURE__*/jsx(BodyWrapper, {
|
|
1398
|
+
size: "md",
|
|
1399
|
+
children: "Chat online"
|
|
1400
|
+
})]
|
|
1401
|
+
})
|
|
1402
|
+
})
|
|
1403
|
+
});
|
|
1321
1404
|
};
|
|
1322
1405
|
|
|
1406
|
+
var StyledClose = styled(IconButton).withConfig({
|
|
1407
|
+
displayName: "style__StyledClose",
|
|
1408
|
+
componentId: "lui__sc-qeih4b-0"
|
|
1409
|
+
})(["position:absolute;"]);
|
|
1410
|
+
|
|
1323
1411
|
var WithChatView = _ref => {
|
|
1324
1412
|
var {
|
|
1325
1413
|
legacySupport,
|
|
@@ -1330,6 +1418,7 @@ var WithChatView = _ref => {
|
|
|
1330
1418
|
} = _ref;
|
|
1331
1419
|
var {
|
|
1332
1420
|
closeCommPanel,
|
|
1421
|
+
isCommPanelOpen,
|
|
1333
1422
|
isChatOpen,
|
|
1334
1423
|
openChat,
|
|
1335
1424
|
teamMember,
|
|
@@ -1338,19 +1427,24 @@ var WithChatView = _ref => {
|
|
|
1338
1427
|
channelId,
|
|
1339
1428
|
migratedToConversation,
|
|
1340
1429
|
setSelectedThread,
|
|
1341
|
-
applicationId
|
|
1430
|
+
applicationId,
|
|
1431
|
+
closeChat
|
|
1342
1432
|
} = useBootstrappedChatState();
|
|
1343
|
-
var [breakpoint, setBreakpoint] = React.useState();
|
|
1344
|
-
useBreakpoint(setBreakpoint);
|
|
1345
|
-
var isMobile = breakpoint === 'mobile';
|
|
1346
1433
|
var hasChat = !useDisableChat();
|
|
1434
|
+
var {
|
|
1435
|
+
enableHistoricalThreads
|
|
1436
|
+
} = useFlags();
|
|
1347
1437
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
1348
|
-
children: [!
|
|
1438
|
+
children: [(isCommPanelOpen && !isChatOpen || !enableHistoricalThreads) && /*#__PURE__*/jsx(StyledClose, {
|
|
1349
1439
|
color: "shade.300",
|
|
1350
1440
|
onClick: closeCommPanel,
|
|
1351
1441
|
size: "md",
|
|
1352
1442
|
"aria-label": "Close comm panel",
|
|
1353
1443
|
icon: Close
|
|
1444
|
+
}), isChatOpen && !enableHistoricalThreads && /*#__PURE__*/jsx(FullViewChatHeader, {
|
|
1445
|
+
teamMember: teamMember,
|
|
1446
|
+
isOtherUserOnline: isOtherUserOnline,
|
|
1447
|
+
onClick: closeChat
|
|
1354
1448
|
}), !isChatOpen && /*#__PURE__*/jsx(SidePanel, {
|
|
1355
1449
|
teamMember: teamMember,
|
|
1356
1450
|
store: store,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lendi/navbar",
|
|
3
3
|
"access": "restricted",
|
|
4
|
-
"version": "7.16.2
|
|
4
|
+
"version": "7.16.2",
|
|
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.0.0",
|
|
43
|
-
"@lendi/chat": "1.1.3
|
|
43
|
+
"@lendi/chat": "^1.1.3",
|
|
44
44
|
"@lendi/lala-utils": "^9.15.1",
|
|
45
45
|
"@lendi/launchdarkly": "0.1.4",
|
|
46
46
|
"@lendi/lendigroup-leads-library": "^2.12.0",
|
|
@@ -56,4 +56,4 @@
|
|
|
56
56
|
"react": "^17.0.2",
|
|
57
57
|
"styled-components": "^4"
|
|
58
58
|
}
|
|
59
|
-
}
|
|
59
|
+
}
|