@learningpool/ui 1.18.0 → 1.19.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.
- package/components/datadisplay/WelcomeBanner/WelcomeBannerStyles.js +4 -1
- package/components/navigation/VerticalNavigation/VerticalNavigation.js +5 -5
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +0 -4
- package/components/stream/AppHub/AppHub.js +14 -11
- package/components/stream/AppHub/AppHubBannerAdvert.js +13 -2
- package/components/stream/AppHub/AppHubCustom.d.ts +1 -0
- package/components/stream/AppHub/AppHubCustom.js +20 -12
- package/components/stream/AppHub/AppHubCustomStyles.d.ts +1 -13
- package/components/stream/AppHub/AppHubProduct.d.ts +1 -0
- package/components/stream/AppHub/AppHubProduct.js +7 -13
- package/components/stream/AppHub/AppHubProductStyles.d.ts +2 -26
- package/components/stream/AppHub/AppHubProductStyles.js +1 -0
- package/components/stream/AppHub/AppHubStyles.js +2 -1
- package/components/stream/AppSwitcher/AppSwitcher.d.ts +2 -32
- package/components/stream/AppSwitcher/AppSwitcher.js +117 -261
- package/components/stream/AppSwitcher/AppSwitcherStyles.d.ts +46 -74
- package/components/stream/AppSwitcher/AppSwitcherStyles.js +46 -322
- package/components/stream/AppSwitcher/constants.d.ts +5 -0
- package/components/stream/AppSwitcher/constants.js +8 -3
- package/lang/en-us.d.ts +1 -0
- package/lang/en-us.js +2 -1
- package/package.json +1 -1
- package/types/components/navigation/VerticalNavigation.d.ts +0 -5
- package/types/components/stream/AppHub.d.ts +8 -0
- package/types/components/stream/AppSwitcher.d.ts +58 -8
- package/utils/helpers.d.ts +2 -1
- package/utils/helpers.js +11 -5
- package/components/stream/AppSwitcher/AppSwitcherItem.d.ts +0 -17
- package/components/stream/AppSwitcher/AppSwitcherItem.js +0 -40
- package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.d.ts +0 -16
- package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.js +0 -256
- package/components/stream/AppSwitcher/PromotionalCampaignItem.d.ts +0 -9
- package/components/stream/AppSwitcher/PromotionalCampaignItem.js +0 -29
|
@@ -4,7 +4,7 @@ import { styled } from '@mui/material/styles';
|
|
|
4
4
|
import { Box, Typography } from '../../../';
|
|
5
5
|
export const StyledBannerWrapper = styled(Box) `
|
|
6
6
|
align-items: center;
|
|
7
|
-
column-gap:
|
|
7
|
+
column-gap: 0;
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-flow: row wrap;
|
|
10
10
|
position: relative;
|
|
@@ -12,13 +12,16 @@ export const StyledBannerWrapper = styled(Box) `
|
|
|
12
12
|
export const StyledWavingHandIcon = styled(WavingHandIcon) `
|
|
13
13
|
color: orange;
|
|
14
14
|
margin-right: 0.5rem;
|
|
15
|
+
margin-left: ${props => props.theme.direction === 'rtl' ? '0.5rem' : '0'}
|
|
15
16
|
`;
|
|
16
17
|
export const StyledWelcomeMessage = styled(Typography) `
|
|
17
18
|
font-weight: 500;
|
|
18
19
|
line-height: 1.2;
|
|
20
|
+
margin-left: ${props => props.theme.direction === 'rtl' ? '0.5rem' : '0'}
|
|
19
21
|
`;
|
|
20
22
|
export const StyledOrganizationChip = styled(MUIChip) `
|
|
21
23
|
margin-left: 1rem;
|
|
24
|
+
margin-right: ${props => props.theme.direction === 'rtl' ? '0.5rem' : '0'}
|
|
22
25
|
overflow: hidden;
|
|
23
26
|
text-overflow: ellipsis;
|
|
24
27
|
white-space: nowrap;
|
|
@@ -25,7 +25,7 @@ import { getDefaultSupportLinks, getNavigationBackground, getNavigationContrastT
|
|
|
25
25
|
import { Constants } from '../../stream/AppSwitcher/constants';
|
|
26
26
|
const VerticalNavigation = (props) => {
|
|
27
27
|
const theme = useTheme();
|
|
28
|
-
const { items, secondaryItems, logo, logoText, logoOnClick, appRootID, hasStreamHome,
|
|
28
|
+
const { items, secondaryItems, logo, logoText, logoOnClick, appRootID, hasStreamHome, StreamHomeUrl, streamHomeApiKey, streamHomeBaseUrl, localization, streamHomeAccessToken, avatarName, dataAttributes, showSupportLinks, avatarPanelShowHelpLinks, ...rest } = props;
|
|
29
29
|
const messages = { ...defaultMessages, ...localization };
|
|
30
30
|
const dataIds = { ...defaultAttributes, ...dataAttributes };
|
|
31
31
|
const propIsDrawerOpen = typeof props?.isDrawerOpen === 'boolean' ? props.isDrawerOpen : undefined;
|
|
@@ -77,8 +77,8 @@ const VerticalNavigation = (props) => {
|
|
|
77
77
|
}, [isDrawerOpen]);
|
|
78
78
|
const handleIsPersistent = () => {
|
|
79
79
|
if (props?.setIsPersistent) {
|
|
80
|
-
props.setIsPersistent(!propIsPersistent
|
|
81
|
-
setIsPersistent(!propIsPersistent
|
|
80
|
+
props.setIsPersistent(!propIsPersistent || false);
|
|
81
|
+
setIsPersistent(!propIsPersistent || false);
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
setIsPersistent(propIsPersistent ?? false);
|
|
@@ -202,7 +202,7 @@ const VerticalNavigation = (props) => {
|
|
|
202
202
|
width: DRAWER_WIDTH.Expanded,
|
|
203
203
|
marginTop: `-${theme.spacing(0.5)} !important`
|
|
204
204
|
}, children: items && items.length > 0 && items.map((item, index) => (_createElement(VerticalNavigationItem, { ...item, "data-id": dataIds.VerticalNavigationPrimaryListItem, key: `${item.label} - ${index}`, index: index, isDrawerOpen: isDrawerOpen || isPersistent, style: animationRefs.current[index] }))) }) }) }), _jsx("div", { className: 'wrapper', "data-id": dataIds.VerticalNavigationSecondary, style: { backgroundColor: getNavigationBackground(theme) }, children: _jsxs(StyledNavSecondary, { "aria-label": 'Secondary', children: [_jsx(StyledDivider, { isDrawerOpen: isDrawerOpen || isPersistent }), _jsxs(List, { "data-id": dataIds.VerticalNavigationSecondaryList, style: { width: DRAWER_WIDTH.Expanded }, children: [(showSupportLinks || avatarPanelShowHelpLinks) && defaultSupportLinks && defaultSupportLinks.length > 0 && defaultSupportLinks.map((item, index) => (_createElement(VerticalNavigationItem, { ...item, "data-id": dataIds.VerticalNavigationSecondaryListItem, key: `${item.label} - ${index}`, index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, style: animationRefs.current[(items?.length ?? 0) + index + 1] }))), hasStreamHome
|
|
205
|
-
? (_jsx(VerticalNavigationItem, { id: dataIds.VerticalNavigationAppSwitcherToggle, "data-id": dataIds.VerticalNavigationAppSwitcherToggle, label: messages['app-switcher'], icon: _jsx(AppsIcon, {}), onClick: handleToggleAppSwitcher, content: (_jsx(AppSwitcher, { isAppSwitcherOpen: isAppSwitcherOpen, handleToggleAppSwitcher: handleToggleAppSwitcher,
|
|
205
|
+
? (_jsx(VerticalNavigationItem, { id: dataIds.VerticalNavigationAppSwitcherToggle, "data-id": dataIds.VerticalNavigationAppSwitcherToggle, label: messages['app-switcher'], icon: _jsx(AppsIcon, {}), onClick: handleToggleAppSwitcher, content: (_jsx(AppSwitcher, { isStandalone: false, isAppSwitcherOpen: isAppSwitcherOpen, handleToggleAppSwitcher: handleToggleAppSwitcher, apiKey: streamHomeApiKey ?? '', baseUrl: streamHomeBaseUrl ?? '', token: streamHomeAccessToken ?? '', isDrawerOpen: isDrawerOpen, StreamHomeUrl: StreamHomeUrl ?? Constants.DefaultStreamHomeUrl, avatarName: avatarName })), isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, hasCustomContent: true, style: animationRefs.current[(items?.length ?? 0) + (defaultSupportLinks?.length ?? 0) + 1], isContentOpen: isAppSwitcherOpen }))
|
|
206
206
|
: null, secondaryItems && secondaryItems.length > 0 && secondaryItems.map((item, index) => (_createElement(VerticalNavigationItem, { ...item, "data-id": dataIds.VerticalNavigationSecondaryListItem, key: `${item.label} - ${index}`, index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, style: animationRefs.current[(items?.length ?? 0) + (defaultSupportLinks?.length ?? 0) + index + 1] }))), hasAvatar && avatarName && (_jsx(VerticalNavigationItem, { label: avatarName, id: dataIds.VerticalNavigationAvatarToggle, "data-id": dataIds.VerticalNavigationAvatarToggle, "aria-controls": 'avatar-panel', icon: _jsx(Avatar, { style: {
|
|
207
207
|
fontSize: '0.75rem',
|
|
208
208
|
height: 32,
|
|
@@ -216,7 +216,7 @@ const VerticalNavigation = (props) => {
|
|
|
216
216
|
...animationRefs.current[(items?.length ?? 0) + (defaultSupportLinks?.length ?? 0) + (secondaryItems?.length ?? 0) + 2]
|
|
217
217
|
}, onClick: handleToggleAvatarPanel, hasFlyout: true, fullHeightFlyout: true, content: _jsx(AvatarPanel, { avatarName: avatarName, isAvatarOpen: isAvatarOpen, localization: localization, handleToggleAvatarPanel: handleToggleAvatarPanel, ...rest }), isDrawerOpen: isDrawerOpen, isContentOpen: isAvatarOpen }))] })] }) })] }));
|
|
218
218
|
return (_jsxs(StyledAside, { "aria-label": messages['site-navigation'], "data-id": dataIds.VerticalNavigationContainer, children: [_jsx(DrawerShadow, { className: 'drawerShadow', "aria-hidden": 'true', isDrawerOpen: isDrawerOpen || isPersistent, style: {
|
|
219
|
-
display: isPersistent ? 'none' : 'block'
|
|
219
|
+
display: isPersistent || isAppSwitcherOpen ? 'none' : 'block'
|
|
220
220
|
} }), _jsx(Modal, { "aria-hidden": false, keepMounted: true, disablePortal: true, open: isDrawerOpen, onClose: toggleDrawer(false), children: _jsx(StyledDrawer, { id: 'vertical-navigation', anchor: 'left', open: isDrawerOpen || isPersistent, onClose: toggleDrawer(false), variant: 'permanent', children: listContent() }) })] }));
|
|
221
221
|
};
|
|
222
222
|
export default VerticalNavigation;
|
|
@@ -244,8 +244,4 @@ export const StyledDrawer = styled(Drawer, {
|
|
|
244
244
|
visibility: visible !important;
|
|
245
245
|
width: ${(props) => !props.open ? `calc(${props.theme.spacing(7)} + 1px)` : `${DRAWER_WIDTH.Expanded}px`};
|
|
246
246
|
}
|
|
247
|
-
|
|
248
|
-
.MuiTypography-root {
|
|
249
|
-
color: inherit;
|
|
250
|
-
}
|
|
251
247
|
`;
|
|
@@ -11,7 +11,7 @@ import WelcomeBanner from '../../datadisplay/WelcomeBanner/WelcomeBanner';
|
|
|
11
11
|
import { handleHubTracking } from '../../../utils/helpers';
|
|
12
12
|
import { HubEventTypeID } from '../../../utils/Enums/HubEventTypes.enum';
|
|
13
13
|
const AppHub = (props) => {
|
|
14
|
-
const { data, isPageLayout, localization, customLinkBgColor, isAppSwitcher, userName, userOrganization, hasPromotionalCampaigns, hubApiKey, hubToken } = props;
|
|
14
|
+
const { data, isPageLayout, localization, customLinkBgColor, isAppSwitcher, userName, userOrganization, hasPromotionalCampaigns, hubApiKey, hubToken, hubApiUrl } = props;
|
|
15
15
|
const messages = { ...defaultMessages, ...localization };
|
|
16
16
|
const manageLinkButton = {
|
|
17
17
|
url: `${window.location.origin}/links`,
|
|
@@ -23,37 +23,40 @@ const AppHub = (props) => {
|
|
|
23
23
|
? { columns: { xs: 8 } }
|
|
24
24
|
: { columns: { xs: 12 } };
|
|
25
25
|
const renderRow = (rowData, rowIndex) => {
|
|
26
|
-
const { type, items, title, allowEditLinks } = rowData;
|
|
26
|
+
const { type, items, title, allowEditLinks, allowTitle } = rowData;
|
|
27
27
|
switch (type) {
|
|
28
28
|
case Constants.DataRowType.BannerAdvert: {
|
|
29
|
-
// Potentially remove this
|
|
30
|
-
if (isAppSwitcher) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
29
|
rowData.welcomeMessage = messages['stream-hub-welcome'];
|
|
34
30
|
rowData.userName = userName;
|
|
35
31
|
rowData.userOrganization = userOrganization;
|
|
32
|
+
rowData.hubTrackingProps = {
|
|
33
|
+
hubApiUrl,
|
|
34
|
+
apiKey: hubApiKey,
|
|
35
|
+
token: hubToken,
|
|
36
|
+
isAppSwitcher
|
|
37
|
+
};
|
|
36
38
|
return (renderBannerAdvertRow(rowData, rowIndex));
|
|
37
39
|
}
|
|
38
40
|
case Constants.DataRowType.Product: {
|
|
39
|
-
return (_jsxs(AppHubRow, { children: [(title && !isAppSwitcher) && _jsx(AppHubHeader, { component: isPageLayout ? 'h2' : 'div', children: title }), _jsx(Grid, { container: true, spacing: { xs: 2, md: 3 }, rowSpacing: { xs: 3, md: 4 }, columns: gridSpacing.columns, children: items.map(({ subtitle, shortName, internalName, url, children, hubEventTypeId, hubReferenceId, ...rest }, index) => {
|
|
41
|
+
return (_jsxs(AppHubRow, { children: [(title && (!isAppSwitcher || allowTitle)) && _jsx(AppHubHeader, { component: isPageLayout ? 'h2' : 'div', children: title }), _jsx(Grid, { container: true, spacing: { xs: 2, md: 3 }, rowSpacing: { xs: 3, md: 4 }, columns: gridSpacing.columns, children: items.map(({ subtitle, shortName, internalName, url, children, hubEventTypeId, hubReferenceId, ...rest }, index) => {
|
|
40
42
|
if (!url && !children) {
|
|
41
43
|
return null;
|
|
42
44
|
}
|
|
43
|
-
return (_jsxs(Grid, { xs: 12, sm: 6, md: 4, children: [url && (_jsx(AppHubItem, { internalName: internalName, shortName: shortName, subtitle: subtitle, url: url, isAppSwitcher: isAppSwitcher, hubEventTypeId: hubEventTypeId, hubReferenceId: hubReferenceId, hubApiKey: hubApiKey, hubToken: hubToken, ...rest })), children && (_jsx(AppHubItem, { internalName: internalName, shortName: shortName, subtitle: subtitle, options: children, isAppSwitcher: isAppSwitcher, hubEventTypeId: hubEventTypeId, hubReferenceId: hubReferenceId, hubApiKey: hubApiKey, hubToken: hubToken, ...rest }))] }, `${shortName}_${rowIndex}_${index}`));
|
|
45
|
+
return (_jsxs(Grid, { xs: 12, sm: 6, md: 4, children: [url && (_jsx(AppHubItem, { internalName: internalName, shortName: shortName, subtitle: subtitle, url: url, isAppSwitcher: isAppSwitcher, hubEventTypeId: hubEventTypeId, hubReferenceId: hubReferenceId, hubApiUrl: hubApiUrl, hubApiKey: hubApiKey, hubToken: hubToken, ...rest })), children && (_jsx(AppHubItem, { internalName: internalName, shortName: shortName, subtitle: subtitle, options: children, isAppSwitcher: isAppSwitcher, hubEventTypeId: hubEventTypeId, hubReferenceId: hubReferenceId, hubApiUrl: hubApiUrl, hubApiKey: hubApiKey, hubToken: hubToken, ...rest }))] }, `${shortName}_${rowIndex}_${index}`));
|
|
44
46
|
}) })] }, `row_${rowIndex}`));
|
|
45
47
|
}
|
|
46
48
|
case Constants.DataRowType.CustomLink: {
|
|
47
49
|
return (_jsxs(AppHubRow, { children: [title &&
|
|
48
50
|
_jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { xs: 10, children: _jsx(AppHubHeader, { component: isPageLayout ? 'h2' : 'div', children: title }) }), (allowEditLinks && !isAppSwitcher) &&
|
|
49
51
|
_jsx(Grid, { xs: 2, children: _jsx(Link, { href: manageLinkButton.url, "data-testid": manageLinkButton.hubReferenceId, onClick: () => handleHubTracking({
|
|
52
|
+
hubApiUrl,
|
|
50
53
|
apiKey: hubApiKey,
|
|
51
54
|
token: hubToken,
|
|
52
55
|
isAppSwitcher,
|
|
53
56
|
eventTypeId: manageLinkButton.hubEventTypeId,
|
|
54
57
|
referenceId: manageLinkButton.hubReferenceId,
|
|
55
58
|
url: manageLinkButton.url
|
|
56
|
-
}), children: _jsxs(ManageLinksHeader, { component: isPageLayout ? 'h2' : 'div', children: [_jsx(StyledSettingsIcon, {}), manageLinkButton.title] }) }) })] }), _jsx(Grid, { container: true, spacing: { xs: 2, md: 3 }, columns: gridSpacing.columns, children: items.map(({ name, url, icon, hubEventTypeId, hubReferenceId, ...rest }, index) => (_jsx(Grid, { xs: 12, sm: 6, md: 4, ...rest, children: url && (_jsx(AppHubCustom, { name: name, customLinkBgColor: customLinkBgColor, url: url, icon: icon, isAppSwitcher: isAppSwitcher, hubEventTypeId: hubEventTypeId, hubReferenceId: hubReferenceId, hubApiKey: hubApiKey, hubToken: hubToken, ...rest })) }, `${name}_${rowIndex}_${index}`))) })] }, `row_${rowIndex}`));
|
|
59
|
+
}), children: _jsxs(ManageLinksHeader, { component: isPageLayout ? 'h2' : 'div', children: [_jsx(StyledSettingsIcon, {}), manageLinkButton.title] }) }) })] }), _jsx(Grid, { container: true, spacing: { xs: 2, md: 3 }, columns: gridSpacing.columns, children: items.map(({ name, url, icon, hubEventTypeId, hubReferenceId, ...rest }, index) => (_jsx(Grid, { xs: 12, sm: 6, md: 4, ...rest, children: url && (_jsx(AppHubCustom, { name: name, customLinkBgColor: customLinkBgColor, url: url, icon: icon, isAppSwitcher: isAppSwitcher, hubEventTypeId: hubEventTypeId, hubReferenceId: hubReferenceId, hubApiUrl: hubApiUrl, hubApiKey: hubApiKey, hubToken: hubToken, ...rest })) }, `${name}_${rowIndex}_${index}`))) })] }, `row_${rowIndex}`));
|
|
57
60
|
}
|
|
58
61
|
default: {
|
|
59
62
|
console.log('no items');
|
|
@@ -65,7 +68,7 @@ const AppHub = (props) => {
|
|
|
65
68
|
console.log('No data available');
|
|
66
69
|
return null;
|
|
67
70
|
}
|
|
68
|
-
return (_jsxs(AppHubPanel, { role: isPageLayout ? 'main' : '', children: [!hasPromotionalCampaigns &&
|
|
69
|
-
_jsx(AppHubTitle, { component: isPageLayout ? 'h1' : 'div', children: _jsx(WelcomeBanner, { welcomeMessage: messages['stream-hub-welcome'], userName: userName, userOrganization: userOrganization }) }), data && data.map((row, rowIndex) => renderRow(row, rowIndex))] }));
|
|
71
|
+
return (_jsxs(AppHubPanel, { role: isPageLayout ? 'main' : '', style: { marginRight: isAppSwitcher ? '2rem' : 0 }, children: [!hasPromotionalCampaigns &&
|
|
72
|
+
_jsx(AppHubTitle, { component: isPageLayout ? 'h1' : 'div', style: { marginLeft: '1.5rem' }, children: _jsx(WelcomeBanner, { welcomeMessage: messages['stream-hub-welcome'], userName: userName, userOrganization: userOrganization }) }), data && data.map((row, rowIndex) => renderRow(row, rowIndex))] }));
|
|
70
73
|
};
|
|
71
74
|
export default AppHub;
|
|
@@ -5,6 +5,8 @@ import Grid from '@mui/material/Unstable_Grid2';
|
|
|
5
5
|
import { StyledAdvertPaper, StyledAdvertLink, StyledAdvertImage } from './AppHubAdvertStyles';
|
|
6
6
|
import { defaultMessages } from '../../../lang/en-us';
|
|
7
7
|
import WelcomeBanner from '../../datadisplay/WelcomeBanner/WelcomeBanner';
|
|
8
|
+
import { handleHubTracking } from '../../../utils/helpers';
|
|
9
|
+
import { HubEventTypeID } from '../../../utils/Enums/HubEventTypes.enum';
|
|
8
10
|
const addUtmParams = (baseUrl, source, medium, campaign) => {
|
|
9
11
|
try {
|
|
10
12
|
const url = new URL(baseUrl);
|
|
@@ -19,7 +21,7 @@ const addUtmParams = (baseUrl, source, medium, campaign) => {
|
|
|
19
21
|
}
|
|
20
22
|
};
|
|
21
23
|
export const renderBannerAdvertRow = (rowData, rowIndex) => {
|
|
22
|
-
const { items, welcomeMessage, userName, userOrganization } = rowData;
|
|
24
|
+
const { items, welcomeMessage, userName, userOrganization, hubTrackingProps } = rowData;
|
|
23
25
|
const [hasValidImage, setHasValidImage] = useState(true);
|
|
24
26
|
const handleImageError = () => {
|
|
25
27
|
setHasValidImage(false);
|
|
@@ -27,5 +29,14 @@ export const renderBannerAdvertRow = (rowData, rowIndex) => {
|
|
|
27
29
|
const validItems = items.filter((item) => item.hubImageUrl && item.basePromoUrl);
|
|
28
30
|
if (!hasValidImage || validItems.length === 0)
|
|
29
31
|
return null;
|
|
30
|
-
|
|
32
|
+
const { hubApiUrl, apiKey, token, isAppSwitcher } = hubTrackingProps;
|
|
33
|
+
return (_jsx(AppHubRow, { children: _jsxs(Grid, { container: true, spacing: 2, children: [validItems.map((item, index) => (_jsx(Grid, { xs: 12, children: _jsx(StyledAdvertPaper, { elevation: 0, children: _jsx(StyledAdvertLink, { href: addUtmParams(item.basePromoUrl, 'hub', 'hub_dashboard_banner_advert', item.name), target: "_blank", onClick: () => handleHubTracking({
|
|
34
|
+
hubApiUrl,
|
|
35
|
+
apiKey,
|
|
36
|
+
token,
|
|
37
|
+
isAppSwitcher,
|
|
38
|
+
eventTypeId: HubEventTypeID.REQUEST_DEMO,
|
|
39
|
+
referenceId: item.name,
|
|
40
|
+
url: addUtmParams(item.basePromoUrl, 'hub', 'hub_dashboard_banner_advert', item.name)
|
|
41
|
+
}), children: _jsx(StyledAdvertImage, { src: item.hubImageUrl, alt: item.altText || defaultMessages['banner-image-alt-text'], onError: handleImageError }) }) }) }, index))), _jsx(AppHubTitle, { component: 'h1', style: { marginTop: '2rem' }, children: _jsx(WelcomeBanner, { welcomeMessage: welcomeMessage, userName: userName, userOrganization: userOrganization }) })] }) }, `row_${rowIndex}`));
|
|
31
42
|
};
|
|
@@ -10,6 +10,17 @@ import TrendingUpIcon from '@mui/icons-material/TrendingUp';
|
|
|
10
10
|
import AutoStoriesIcon from '@mui/icons-material/AutoStories';
|
|
11
11
|
import CoPresentIcon from '@mui/icons-material/CoPresent';
|
|
12
12
|
import PreviewIcon from '@mui/icons-material/Preview';
|
|
13
|
+
/* eslint-disable no-unused-vars */
|
|
14
|
+
// TODO: Remove rule for enums
|
|
15
|
+
var LinkTitles;
|
|
16
|
+
(function (LinkTitles) {
|
|
17
|
+
LinkTitles["ACADEMY"] = "Academy";
|
|
18
|
+
LinkTitles["CONTACTS"] = "Contact Us";
|
|
19
|
+
LinkTitles["CUSTOMER_PORTAL"] = "Customer Portal";
|
|
20
|
+
LinkTitles["ROADMAPS"] = "Product Roadmaps";
|
|
21
|
+
LinkTitles["RELEASE_NOTES"] = "Release Notes";
|
|
22
|
+
LinkTitles["SHOWCASE"] = "Showcase";
|
|
23
|
+
})(LinkTitles || (LinkTitles = {}));
|
|
13
24
|
// Bug in the naming of the icons on the CDN
|
|
14
25
|
export const LogoVariants = {
|
|
15
26
|
Default: 'icon',
|
|
@@ -25,35 +36,32 @@ export const LogoVariants = {
|
|
|
25
36
|
const getLinkIcon = (name) => {
|
|
26
37
|
const style = { margin: '0.2rem 1rem 0 1rem' };
|
|
27
38
|
switch (name) {
|
|
28
|
-
case
|
|
39
|
+
case LinkTitles.ACADEMY:
|
|
29
40
|
return _jsx(SchoolIcon, { style: style });
|
|
30
|
-
case
|
|
41
|
+
case LinkTitles.CONTACTS:
|
|
31
42
|
return _jsx(LocalPhoneIcon, { style: style });
|
|
32
|
-
case
|
|
43
|
+
case LinkTitles.CUSTOMER_PORTAL:
|
|
33
44
|
return _jsx(CoPresentIcon, { style: style });
|
|
34
|
-
case
|
|
45
|
+
case LinkTitles.ROADMAPS:
|
|
35
46
|
return _jsx(TrendingUpIcon, { style: style });
|
|
36
|
-
case
|
|
47
|
+
case LinkTitles.RELEASE_NOTES:
|
|
37
48
|
return _jsx(AutoStoriesIcon, { style: style });
|
|
38
|
-
case
|
|
49
|
+
case LinkTitles.SHOWCASE:
|
|
39
50
|
return _jsx(PreviewIcon, { style: style });
|
|
40
51
|
default: return _jsx(LinkIcon, { style: style });
|
|
41
52
|
}
|
|
42
53
|
};
|
|
43
54
|
const AppHubCustom = (props) => {
|
|
44
|
-
const { name, url, customLinkBgColor, icon, isAppSwitcher, hubApiKey, hubToken, hubEventTypeId, hubReferenceId, ...rest } = props;
|
|
55
|
+
const { name, url, customLinkBgColor, icon, isAppSwitcher, hubApiUrl, hubApiKey, hubToken, hubEventTypeId, hubReferenceId, ...rest } = props;
|
|
45
56
|
const linkIcon = getLinkIcon(name);
|
|
46
57
|
return (_jsx(StyledPaper, { elevation: 0, ...rest, children: _jsx(StyledLink, { href: url, target: '_blank', underline: 'none', onClick: () => handleHubTracking({
|
|
58
|
+
hubApiUrl,
|
|
47
59
|
apiKey: hubApiKey,
|
|
48
60
|
token: hubToken,
|
|
49
61
|
eventTypeId: hubEventTypeId,
|
|
50
62
|
referenceId: hubReferenceId,
|
|
51
63
|
url,
|
|
52
64
|
isAppSwitcher
|
|
53
|
-
}), ...rest, children: _jsxs(StyledBoxWrap, { children: [linkIcon, _jsx(StyledTypography
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
, {
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
component: 'div', ...rest, children: name })] }) }) }));
|
|
65
|
+
}), ...rest, children: _jsxs(StyledBoxWrap, { children: [linkIcon, _jsx(StyledTypography, { component: 'div', ...rest, children: name })] }) }) }));
|
|
58
66
|
};
|
|
59
67
|
export default AppHubCustom;
|
|
@@ -59,16 +59,4 @@ export declare const StyledAddCircleOutlineIcon: import("@emotion/styled").Style
|
|
|
59
59
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").SVGProps<SVGSVGElement>, "ref"> & {
|
|
60
60
|
ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
|
|
61
61
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "children" | "sx" | "fontSize" | "shapeRendering" | "viewBox" | "htmlColor" | "inheritViewBox" | "titleAccess"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
62
|
-
export declare const StyledTypography: import("@
|
|
63
|
-
align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
|
|
64
|
-
children?: import("react").ReactNode;
|
|
65
|
-
classes?: Partial<import("@mui/material/Typography").TypographyClasses> | undefined;
|
|
66
|
-
gutterBottom?: boolean | undefined;
|
|
67
|
-
noWrap?: boolean | undefined;
|
|
68
|
-
paragraph?: boolean | undefined;
|
|
69
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
70
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
71
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
72
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
73
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
74
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "align" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
62
|
+
export declare const StyledTypography: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material/Typography").TypographyTypeMap<{}, "span">>;
|
|
@@ -6,7 +6,7 @@ import { Constants } from './constants';
|
|
|
6
6
|
import { defaultMessages } from '../../../lang/en-us';
|
|
7
7
|
import { StyledPaper, StyledBoxWrap, StyledBoxText, StyledAutocomplete, StyledTypography, StyledTypographySubtitle, StyledLink } from './AppHubProductStyles';
|
|
8
8
|
import { handleHubTracking } from '../../../utils/helpers';
|
|
9
|
-
import { useTheme } from '@mui/material';
|
|
9
|
+
import { Box, useTheme } from '@mui/material';
|
|
10
10
|
// Bug in the naming of the icons on the CDN
|
|
11
11
|
export const LogoVariants = {
|
|
12
12
|
Default: 'icon',
|
|
@@ -28,12 +28,13 @@ const renderApplicationLogo = (internalName, logoVariant) => {
|
|
|
28
28
|
return (_jsx("img", { src: urlToIcon, width: "30", height: "30", alt: internalName ?? '' }));
|
|
29
29
|
};
|
|
30
30
|
const AppHubItem = (props) => {
|
|
31
|
-
const { internalName, shortName, customName, url, subtitle, localization, options, isAppSwitcher, hubEventTypeId, hubReferenceId, hubApiKey, hubToken } = props;
|
|
31
|
+
const { internalName, shortName, customName, url, subtitle, localization, options, isAppSwitcher, hubEventTypeId, hubReferenceId, hubApiUrl, hubApiKey, hubToken } = props;
|
|
32
32
|
const initialOptions = { ...options };
|
|
33
33
|
const solidLogo = renderApplicationLogo(internalName, LogoVariants.NoneOutlined);
|
|
34
34
|
const messages = { ...defaultMessages, ...localization };
|
|
35
35
|
return (_jsx(StyledPaper, { elevation: 0, children: _jsx(StyledLink, { href: url, target: '_blank', underline: 'none', onClick: () => !options
|
|
36
36
|
? handleHubTracking({
|
|
37
|
+
hubApiUrl,
|
|
37
38
|
apiKey: hubApiKey,
|
|
38
39
|
token: hubToken,
|
|
39
40
|
eventTypeId: hubEventTypeId,
|
|
@@ -41,7 +42,7 @@ const AppHubItem = (props) => {
|
|
|
41
42
|
url: url,
|
|
42
43
|
isAppSwitcher
|
|
43
44
|
})
|
|
44
|
-
: null, children: _jsxs(StyledBoxWrap, { children: [_jsxs(
|
|
45
|
+
: null, children: _jsxs(StyledBoxWrap, { children: [_jsxs(Box, { display: 'flex', flexDirection: 'row', children: [solidLogo, options && options.length > 0 && (_jsx(StyledAutocomplete, { disablePortal: true, size: 'small', options: options.map((option) => option.applicationName),
|
|
45
46
|
// TODO: Add link, icon and screen reader text here:
|
|
46
47
|
renderOption: (option) => {
|
|
47
48
|
// Autocomplete only uses applicationName and we need more properties
|
|
@@ -52,25 +53,18 @@ const AppHubItem = (props) => {
|
|
|
52
53
|
const handleClick = (event) => {
|
|
53
54
|
optionItem.onClick && optionItem.onClick(event);
|
|
54
55
|
handleHubTracking({
|
|
56
|
+
hubApiUrl,
|
|
55
57
|
apiKey: hubApiKey,
|
|
56
58
|
token: hubToken,
|
|
57
59
|
eventTypeId: hubEventTypeId,
|
|
58
60
|
referenceId: hubReferenceId,
|
|
59
|
-
url: url,
|
|
61
|
+
url: optionItem.url,
|
|
60
62
|
isAppSwitcher
|
|
61
63
|
});
|
|
62
64
|
};
|
|
63
65
|
return (_jsxs(ListItemButton, { onClick: event => {
|
|
64
66
|
handleClick(event);
|
|
65
67
|
}, children: [option.key, _jsx(LaunchIcon, { sx: { marginInlineStart: '1rem', transform: useTheme().direction === 'rtl' ? 'scaleX(-1)' : 'none' } }), _jsxs("span", { style: visuallyHidden, children: [", ", messages['open-in-new-window']] })] }, `${option.key}_${option.id}`));
|
|
66
|
-
}, renderInput: (params) => _jsx(TextField, { ...params, placeholder: messages['select-org'] }) }))] }), _jsxs(StyledBoxText, { children: [_jsx(Tooltip, { placement: 'top', title: customName ?? shortName, children: _jsx(StyledTypography
|
|
67
|
-
// @ts-ignore
|
|
68
|
-
, {
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
component: 'div', className: 'appHubCardTitle', children: customName ?? shortName }) }), subtitle && (_jsx(StyledTypographySubtitle
|
|
71
|
-
// @ts-ignore
|
|
72
|
-
, {
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
component: 'div', children: subtitle }))] })] }) }) }));
|
|
68
|
+
}, renderInput: (params) => _jsx(TextField, { ...params, placeholder: messages['select-org'] }) }))] }), _jsxs(StyledBoxText, { children: [_jsx(Tooltip, { placement: 'top', title: customName ?? shortName, children: _jsx(StyledTypography, { component: 'div', className: 'appHubCardTitle', children: customName ?? shortName }) }), subtitle && (_jsx(StyledTypographySubtitle, { component: 'div', children: subtitle }))] })] }) }) }));
|
|
75
69
|
};
|
|
76
70
|
export default AppHubItem;
|
|
@@ -25,32 +25,8 @@ export declare const StyledBoxText: import("@emotion/styled").StyledComponent<im
|
|
|
25
25
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
26
26
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
27
27
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
28
|
-
export declare const StyledTypography: import("@
|
|
29
|
-
|
|
30
|
-
children?: import("react").ReactNode;
|
|
31
|
-
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
32
|
-
gutterBottom?: boolean | undefined;
|
|
33
|
-
noWrap?: boolean | undefined;
|
|
34
|
-
paragraph?: boolean | undefined;
|
|
35
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
36
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
37
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
38
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
39
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
40
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "align" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
41
|
-
export declare const StyledTypographySubtitle: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
42
|
-
align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
|
|
43
|
-
children?: import("react").ReactNode;
|
|
44
|
-
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
45
|
-
gutterBottom?: boolean | undefined;
|
|
46
|
-
noWrap?: boolean | undefined;
|
|
47
|
-
paragraph?: boolean | undefined;
|
|
48
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
49
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
50
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
51
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
52
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
53
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "align" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
28
|
+
export declare const StyledTypography: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>;
|
|
29
|
+
export declare const StyledTypographySubtitle: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>;
|
|
54
30
|
export declare const StyledButton: import("@emotion/styled").StyledComponent<Omit<{
|
|
55
31
|
children?: import("react").ReactNode;
|
|
56
32
|
classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
|
|
@@ -13,12 +13,13 @@ export const AppHubTitle = styled(Typography) `
|
|
|
13
13
|
font-weight: 500;
|
|
14
14
|
line-height: 1.3;
|
|
15
15
|
color: ${props => props.theme.palette.text.primary};
|
|
16
|
-
margin
|
|
16
|
+
margin: 0 0 0.5rem 0.5rem;
|
|
17
17
|
`;
|
|
18
18
|
export const AppHubHeader = styled(Typography) `
|
|
19
19
|
font-size: 1rem;
|
|
20
20
|
font-weight: 500;
|
|
21
21
|
color: ${props => props.theme.palette.text.secondary};
|
|
22
|
+
justify-self: start;
|
|
22
23
|
margin: 0 0 1rem;
|
|
23
24
|
`;
|
|
24
25
|
export const ManageLinksHeader = styled(Typography) `
|
|
@@ -1,35 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
4
|
-
interface IApplication {
|
|
5
|
-
applicationId: number;
|
|
6
|
-
applicationName: string;
|
|
7
|
-
shortName: string;
|
|
8
|
-
internalName: string;
|
|
9
|
-
customName?: string;
|
|
10
|
-
url: string;
|
|
11
|
-
children?: object[];
|
|
12
|
-
}
|
|
13
|
-
interface IProps {
|
|
14
|
-
userId?: string;
|
|
15
|
-
layout?: string;
|
|
16
|
-
token?: string;
|
|
17
|
-
apiKey?: string;
|
|
18
|
-
baseUrl?: string;
|
|
19
|
-
applications?: IApplication[] | null;
|
|
20
|
-
currentApplicationId?: number;
|
|
21
|
-
localization?: any;
|
|
22
|
-
isAppSwitcherOpen?: boolean;
|
|
23
|
-
handleToggleAppSwitcher?: any;
|
|
24
|
-
isDrawerOpen?: boolean;
|
|
25
|
-
dataAttributes?: any;
|
|
26
|
-
StreamHomeUrl?: string;
|
|
27
|
-
hideStreamHomeButton?: boolean;
|
|
28
|
-
hidePromotionalCampaign?: boolean;
|
|
29
|
-
promotionalCampaigns?: IPromotionalCampaign[] | null;
|
|
30
|
-
}
|
|
3
|
+
import { IAppSwitcherProps } from '../../../types/components/stream/AppSwitcher';
|
|
31
4
|
declare const AppSwitcher: {
|
|
32
|
-
(props:
|
|
5
|
+
(props: IAppSwitcherProps): ReactElement | null;
|
|
33
6
|
propTypes: {
|
|
34
7
|
token: PropTypes.Requireable<string>;
|
|
35
8
|
apiKey: PropTypes.Requireable<string>;
|
|
@@ -37,9 +10,6 @@ declare const AppSwitcher: {
|
|
|
37
10
|
userId: PropTypes.Requireable<string>;
|
|
38
11
|
baseUrl: PropTypes.Requireable<string>;
|
|
39
12
|
localization: PropTypes.Requireable<object>;
|
|
40
|
-
currentApplicationId: PropTypes.Requireable<number>;
|
|
41
|
-
applications: PropTypes.Requireable<any[]>;
|
|
42
|
-
hidePromotionalCampaign: PropTypes.Requireable<boolean>;
|
|
43
13
|
};
|
|
44
14
|
defaultProps: {
|
|
45
15
|
layout: string;
|