@learningpool/ui 1.17.3 → 1.18.1
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/WelcomeBanner.d.ts +8 -0
- package/components/datadisplay/WelcomeBanner/WelcomeBanner.js +9 -0
- package/components/datadisplay/WelcomeBanner/WelcomeBannerStyles.d.ts +53 -0
- package/components/datadisplay/WelcomeBanner/WelcomeBannerStyles.js +25 -0
- package/components/stream/AppHub/AppHub.js +41 -18
- package/components/stream/AppHub/AppHubBannerAdvert.js +5 -4
- package/components/stream/AppHub/AppHubCustom.d.ts +11 -6
- package/components/stream/AppHub/AppHubCustom.js +45 -6
- package/components/stream/AppHub/AppHubCustomStyles.js +12 -6
- package/components/stream/AppHub/AppHubProduct.d.ts +6 -0
- package/components/stream/AppHub/AppHubProduct.js +45 -28
- package/components/stream/AppHub/AppHubProductStyles.d.ts +11 -0
- package/components/stream/AppHub/AppHubProductStyles.js +32 -9
- package/components/stream/AppHub/AppHubStyles.d.ts +17 -26
- package/components/stream/AppHub/AppHubStyles.js +20 -2
- package/components/stream/AppHub/constants.d.ts +34 -30
- package/components/stream/AppHub/constants.js +112 -28
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/lang/en-us.d.ts +1 -0
- package/lang/en-us.js +1 -0
- package/package.json +1 -1
- package/types/components/stream/AppHub.d.ts +10 -1
- package/utils/Enums/HubEventTypes.enum.d.ts +12 -0
- package/utils/Enums/HubEventTypes.enum.js +15 -0
- package/utils/helpers.d.ts +17 -0
- package/utils/helpers.js +29 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from '../../../';
|
|
3
|
+
import { StyledBannerWrapper, StyledWavingHandIcon, StyledWelcomeMessage, StyledOrganizationChip } from './WelcomeBannerStyles';
|
|
4
|
+
import { useMediaQuery } from '@mui/material';
|
|
5
|
+
export default function WelcomeBanner({ welcomeMessage, userName, userOrganization }) {
|
|
6
|
+
const isMobileView = useMediaQuery('(max-width:768px)');
|
|
7
|
+
return (_jsxs(StyledBannerWrapper, { component: 'div', children: [_jsx(StyledWavingHandIcon, {}), _jsx(StyledWelcomeMessage, { children: `${welcomeMessage} - ${userName}` }), userOrganization &&
|
|
8
|
+
_jsx(Tooltip, { title: userOrganization, disableFocusListener: true, disableHoverListener: !isMobileView, children: _jsx(StyledOrganizationChip, { label: userOrganization, sx: { maxWidth: isMobileView ? '150px' : null } }) })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledBannerWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
+
children?: import("react").ReactNode;
|
|
4
|
+
component?: import("react").ElementType<any> | undefined;
|
|
5
|
+
ref?: import("react").Ref<unknown> | undefined;
|
|
6
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
7
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
+
}, 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>, {}, {}>;
|
|
10
|
+
export declare const StyledWavingHandIcon: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
13
|
+
color?: "inherit" | "action" | "disabled" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
|
|
14
|
+
fontSize?: "small" | "inherit" | "large" | "medium" | undefined;
|
|
15
|
+
htmlColor?: string | undefined;
|
|
16
|
+
inheritViewBox?: boolean | undefined;
|
|
17
|
+
shapeRendering?: string | undefined;
|
|
18
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
19
|
+
titleAccess?: string | undefined;
|
|
20
|
+
viewBox?: string | undefined;
|
|
21
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").SVGProps<SVGSVGElement>, "ref"> & {
|
|
22
|
+
ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
|
|
23
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "children" | "sx" | "fontSize" | "shapeRendering" | "viewBox" | "htmlColor" | "inheritViewBox" | "titleAccess"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
24
|
+
export declare const StyledWelcomeMessage: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
25
|
+
align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
|
|
26
|
+
children?: import("react").ReactNode;
|
|
27
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
28
|
+
gutterBottom?: boolean | undefined;
|
|
29
|
+
noWrap?: boolean | undefined;
|
|
30
|
+
paragraph?: boolean | undefined;
|
|
31
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
32
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
33
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
34
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
35
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
36
|
+
}, 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>, {}, {}>;
|
|
37
|
+
export declare const StyledOrganizationChip: import("@emotion/styled").StyledComponent<{
|
|
38
|
+
avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
39
|
+
children?: null | undefined;
|
|
40
|
+
classes?: Partial<import("@mui/material/Chip").ChipClasses> | undefined;
|
|
41
|
+
clickable?: boolean | undefined;
|
|
42
|
+
color?: "default" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
|
|
43
|
+
deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
44
|
+
disabled?: boolean | undefined;
|
|
45
|
+
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
46
|
+
label?: import("react").ReactNode;
|
|
47
|
+
onDelete?: ((event: any) => void) | undefined;
|
|
48
|
+
size?: "small" | "medium" | undefined;
|
|
49
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
50
|
+
variant?: "outlined" | "filled" | undefined;
|
|
51
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
52
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
53
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "label" | "color" | "children" | "sx" | "variant" | "disabled" | "size" | "icon" | "avatar" | "clickable" | "deleteIcon" | "onDelete"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import MUIChip from '@mui/material/Chip';
|
|
2
|
+
import WavingHandIcon from '@mui/icons-material/WavingHand';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Box, Typography } from '../../../';
|
|
5
|
+
export const StyledBannerWrapper = styled(Box) `
|
|
6
|
+
align-items: center;
|
|
7
|
+
column-gap: 16px;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-flow: row wrap;
|
|
10
|
+
position: relative;
|
|
11
|
+
`;
|
|
12
|
+
export const StyledWavingHandIcon = styled(WavingHandIcon) `
|
|
13
|
+
color: orange;
|
|
14
|
+
margin-right: 0.5rem;
|
|
15
|
+
`;
|
|
16
|
+
export const StyledWelcomeMessage = styled(Typography) `
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
line-height: 1.2;
|
|
19
|
+
`;
|
|
20
|
+
export const StyledOrganizationChip = styled(MUIChip) `
|
|
21
|
+
margin-left: 1rem;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
`;
|
|
@@ -2,32 +2,58 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
|
2
2
|
import { defaultMessages } from '../../../lang/en-us';
|
|
3
3
|
import AppHubItem from './AppHubProduct';
|
|
4
4
|
import AppHubCustom from './AppHubCustom';
|
|
5
|
-
import { AppHubPanel, AppHubTitle, AppHubHeader, AppHubRow } from './AppHubStyles';
|
|
5
|
+
import { AppHubPanel, AppHubTitle, AppHubHeader, AppHubRow, ManageLinksHeader, StyledSettingsIcon } from './AppHubStyles';
|
|
6
6
|
import Grid from '@mui/material/Unstable_Grid2';
|
|
7
|
+
import Link from '@mui/material/Link';
|
|
7
8
|
import { Constants } from './constants';
|
|
8
9
|
import { renderBannerAdvertRow } from './AppHubBannerAdvert';
|
|
10
|
+
import WelcomeBanner from '../../datadisplay/WelcomeBanner/WelcomeBanner';
|
|
11
|
+
import { handleHubTracking } from '../../../utils/helpers';
|
|
12
|
+
import { HubEventTypeID } from '../../../utils/Enums/HubEventTypes.enum';
|
|
9
13
|
const AppHub = (props) => {
|
|
10
|
-
const { isPageLayout, localization, customLinkBgColor,
|
|
14
|
+
const { data, isPageLayout, localization, customLinkBgColor, isAppSwitcher, userName, userOrganization, hasPromotionalCampaigns, hubApiKey, hubToken } = props;
|
|
11
15
|
const messages = { ...defaultMessages, ...localization };
|
|
16
|
+
const manageLinkButton = {
|
|
17
|
+
url: `${window.location.origin}/links`,
|
|
18
|
+
title: messages['manage-links'],
|
|
19
|
+
hubReferenceId: 'manage',
|
|
20
|
+
hubEventTypeId: HubEventTypeID.ACCESSED
|
|
21
|
+
};
|
|
22
|
+
const gridSpacing = isAppSwitcher
|
|
23
|
+
? { columns: { xs: 8 } }
|
|
24
|
+
: { columns: { xs: 12 } };
|
|
12
25
|
const renderRow = (rowData, rowIndex) => {
|
|
13
|
-
const { type, items, title,
|
|
26
|
+
const { type, items, title, allowEditLinks } = rowData;
|
|
14
27
|
switch (type) {
|
|
15
28
|
case Constants.DataRowType.BannerAdvert: {
|
|
29
|
+
// Potentially remove this
|
|
30
|
+
if (isAppSwitcher) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
rowData.welcomeMessage = messages['stream-hub-welcome'];
|
|
34
|
+
rowData.userName = userName;
|
|
35
|
+
rowData.userOrganization = userOrganization;
|
|
16
36
|
return (renderBannerAdvertRow(rowData, rowIndex));
|
|
17
37
|
}
|
|
18
38
|
case Constants.DataRowType.Product: {
|
|
19
|
-
return (_jsxs(AppHubRow, { children: [title && _jsx(AppHubHeader
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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) => {
|
|
40
|
+
if (!url && !children) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
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}`));
|
|
44
|
+
}) })] }, `row_${rowIndex}`));
|
|
24
45
|
}
|
|
25
46
|
case Constants.DataRowType.CustomLink: {
|
|
26
|
-
return (_jsxs(AppHubRow, { children: [title &&
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
47
|
+
return (_jsxs(AppHubRow, { children: [title &&
|
|
48
|
+
_jsxs(Grid, { container: true, spacing: 2, children: [_jsx(Grid, { xs: 10, children: _jsx(AppHubHeader, { component: isPageLayout ? 'h2' : 'div', children: title }) }), (allowEditLinks && !isAppSwitcher) &&
|
|
49
|
+
_jsx(Grid, { xs: 2, children: _jsx(Link, { href: manageLinkButton.url, "data-testid": manageLinkButton.hubReferenceId, onClick: () => handleHubTracking({
|
|
50
|
+
apiKey: hubApiKey,
|
|
51
|
+
token: hubToken,
|
|
52
|
+
isAppSwitcher,
|
|
53
|
+
eventTypeId: manageLinkButton.hubEventTypeId,
|
|
54
|
+
referenceId: manageLinkButton.hubReferenceId,
|
|
55
|
+
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}`));
|
|
31
57
|
}
|
|
32
58
|
default: {
|
|
33
59
|
console.log('no items');
|
|
@@ -39,10 +65,7 @@ const AppHub = (props) => {
|
|
|
39
65
|
console.log('No data available');
|
|
40
66
|
return null;
|
|
41
67
|
}
|
|
42
|
-
return (_jsxs(AppHubPanel, { role: isPageLayout ? 'main' : '', children: [
|
|
43
|
-
|
|
44
|
-
, {
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
component: isPageLayout ? 'h1' : 'div', children: messages['stream-hub-welcome'] }), data && data.map((row, rowIndex) => renderRow(row, rowIndex))] }));
|
|
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))] }));
|
|
47
70
|
};
|
|
48
71
|
export default AppHub;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { AppHubRow } from './AppHubStyles';
|
|
3
|
+
import { AppHubRow, AppHubTitle } from './AppHubStyles';
|
|
4
4
|
import Grid from '@mui/material/Unstable_Grid2';
|
|
5
5
|
import { StyledAdvertPaper, StyledAdvertLink, StyledAdvertImage } from './AppHubAdvertStyles';
|
|
6
6
|
import { defaultMessages } from '../../../lang/en-us';
|
|
7
|
+
import WelcomeBanner from '../../datadisplay/WelcomeBanner/WelcomeBanner';
|
|
7
8
|
const addUtmParams = (baseUrl, source, medium, campaign) => {
|
|
8
9
|
try {
|
|
9
10
|
const url = new URL(baseUrl);
|
|
@@ -18,7 +19,7 @@ const addUtmParams = (baseUrl, source, medium, campaign) => {
|
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
export const renderBannerAdvertRow = (rowData, rowIndex) => {
|
|
21
|
-
const { items } = rowData;
|
|
22
|
+
const { items, welcomeMessage, userName, userOrganization } = rowData;
|
|
22
23
|
const [hasValidImage, setHasValidImage] = useState(true);
|
|
23
24
|
const handleImageError = () => {
|
|
24
25
|
setHasValidImage(false);
|
|
@@ -26,5 +27,5 @@ export const renderBannerAdvertRow = (rowData, rowIndex) => {
|
|
|
26
27
|
const validItems = items.filter((item) => item.hubImageUrl && item.basePromoUrl);
|
|
27
28
|
if (!hasValidImage || validItems.length === 0)
|
|
28
29
|
return null;
|
|
29
|
-
return (_jsx(AppHubRow, { children:
|
|
30
|
+
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", 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}`));
|
|
30
31
|
};
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
export declare const LogoVariants: {
|
|
3
|
-
Default: string;
|
|
4
|
-
Solid: string;
|
|
5
|
-
Outlined: string;
|
|
6
|
-
White: string;
|
|
7
|
-
};
|
|
8
2
|
interface IAppHubCustomProps {
|
|
9
3
|
name: string;
|
|
10
4
|
url: string;
|
|
11
5
|
isAddButton?: boolean;
|
|
12
6
|
customLinkBgColor?: string;
|
|
13
7
|
icon?: any;
|
|
8
|
+
hubEventTypeId: string;
|
|
9
|
+
hubReferenceId: string;
|
|
10
|
+
isAppSwitcher: boolean;
|
|
11
|
+
hubApiKey: string;
|
|
12
|
+
hubToken: string;
|
|
14
13
|
}
|
|
14
|
+
export declare const LogoVariants: {
|
|
15
|
+
Default: string;
|
|
16
|
+
Solid: string;
|
|
17
|
+
Outlined: string;
|
|
18
|
+
White: string;
|
|
19
|
+
};
|
|
15
20
|
declare const AppHubCustom: (props: IAppHubCustomProps) => ReactElement;
|
|
16
21
|
export default AppHubCustom;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { StyledPaper
|
|
3
|
-
import {
|
|
2
|
+
import { StyledPaper } from './AppHubProductStyles';
|
|
3
|
+
import { StyledBoxWrap, StyledTypography, StyledLink } from './AppHubCustomStyles';
|
|
4
|
+
import { handleHubTracking } from '../../../utils/helpers';
|
|
5
|
+
// Link Icons
|
|
6
|
+
import LinkIcon from '@mui/icons-material/Link';
|
|
7
|
+
import SchoolIcon from '@mui/icons-material/School';
|
|
8
|
+
import LocalPhoneIcon from '@mui/icons-material/LocalPhone';
|
|
9
|
+
import TrendingUpIcon from '@mui/icons-material/TrendingUp';
|
|
10
|
+
import AutoStoriesIcon from '@mui/icons-material/AutoStories';
|
|
11
|
+
import CoPresentIcon from '@mui/icons-material/CoPresent';
|
|
12
|
+
import PreviewIcon from '@mui/icons-material/Preview';
|
|
4
13
|
// Bug in the naming of the icons on the CDN
|
|
5
14
|
export const LogoVariants = {
|
|
6
15
|
Default: 'icon',
|
|
@@ -8,13 +17,43 @@ export const LogoVariants = {
|
|
|
8
17
|
Outlined: 'icon-outlined',
|
|
9
18
|
White: 'icon-white'
|
|
10
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Renders icon according to given name.
|
|
22
|
+
* @param {string} name - Link name.
|
|
23
|
+
* @returns {ReactElement | null } MUI Icon.
|
|
24
|
+
*/
|
|
25
|
+
const getLinkIcon = (name) => {
|
|
26
|
+
const style = { margin: '0.2rem 1rem 0 1rem' };
|
|
27
|
+
switch (name) {
|
|
28
|
+
case 'Academy':
|
|
29
|
+
return _jsx(SchoolIcon, { style: style });
|
|
30
|
+
case 'Contact Us':
|
|
31
|
+
return _jsx(LocalPhoneIcon, { style: style });
|
|
32
|
+
case 'Customer Portal':
|
|
33
|
+
return _jsx(CoPresentIcon, { style: style });
|
|
34
|
+
case 'Product Roadmaps':
|
|
35
|
+
return _jsx(TrendingUpIcon, { style: style });
|
|
36
|
+
case 'Release Notes':
|
|
37
|
+
return _jsx(AutoStoriesIcon, { style: style });
|
|
38
|
+
case 'Showcase':
|
|
39
|
+
return _jsx(PreviewIcon, { style: style });
|
|
40
|
+
default: return _jsx(LinkIcon, { style: style });
|
|
41
|
+
}
|
|
42
|
+
};
|
|
11
43
|
const AppHubCustom = (props) => {
|
|
12
|
-
const { name, url,
|
|
13
|
-
const
|
|
14
|
-
return (_jsx(StyledPaper, { elevation: 0, children: _jsx(StyledLink, { href: url, target:
|
|
44
|
+
const { name, url, customLinkBgColor, icon, isAppSwitcher, hubApiKey, hubToken, hubEventTypeId, hubReferenceId, ...rest } = props;
|
|
45
|
+
const linkIcon = getLinkIcon(name);
|
|
46
|
+
return (_jsx(StyledPaper, { elevation: 0, ...rest, children: _jsx(StyledLink, { href: url, target: '_blank', underline: 'none', onClick: () => handleHubTracking({
|
|
47
|
+
apiKey: hubApiKey,
|
|
48
|
+
token: hubToken,
|
|
49
|
+
eventTypeId: hubEventTypeId,
|
|
50
|
+
referenceId: hubReferenceId,
|
|
51
|
+
url,
|
|
52
|
+
isAppSwitcher
|
|
53
|
+
}), ...rest, children: _jsxs(StyledBoxWrap, { children: [linkIcon, _jsx(StyledTypography
|
|
15
54
|
// @ts-ignore
|
|
16
55
|
, {
|
|
17
56
|
// @ts-ignore
|
|
18
|
-
component: 'div', children: name })] }) }) }));
|
|
57
|
+
component: 'div', ...rest, children: name })] }) }) }));
|
|
19
58
|
};
|
|
20
59
|
export default AppHubCustom;
|
|
@@ -32,11 +32,10 @@ export const StyledPaper = styled(Paper) `
|
|
|
32
32
|
`;
|
|
33
33
|
export const StyledBoxWrap = styled(Box) `
|
|
34
34
|
display: flex;
|
|
35
|
-
flex-direction:
|
|
35
|
+
flex-direction: row;
|
|
36
36
|
align-items: center;
|
|
37
|
-
justify-content:
|
|
37
|
+
justify-content: start;
|
|
38
38
|
padding: .5rem;
|
|
39
|
-
text-align: center;
|
|
40
39
|
`;
|
|
41
40
|
export const StyledLink = styled(Link) `
|
|
42
41
|
height: 100%;
|
|
@@ -76,15 +75,22 @@ export const StyledAddCircleOutlineIcon = styled(AddCircleOutlineIcon) `
|
|
|
76
75
|
`;
|
|
77
76
|
export const StyledTypography = styled(Typography) `
|
|
78
77
|
color: ${props => props.theme.palette.text.primary};
|
|
78
|
+
display: flex;
|
|
79
79
|
font-size: 1rem;
|
|
80
80
|
font-weight: 500;
|
|
81
81
|
line-height: 1.3;
|
|
82
|
-
margin-top: .
|
|
82
|
+
margin-top: .2rem;
|
|
83
83
|
|
|
84
|
-
/* Truncate text to
|
|
84
|
+
/* Truncate text to 1 line */
|
|
85
85
|
overflow: hidden;
|
|
86
86
|
text-overflow: ellipsis;
|
|
87
87
|
display: -webkit-box;
|
|
88
|
-
-webkit-line-clamp:
|
|
88
|
+
-webkit-line-clamp: 1;
|
|
89
89
|
-webkit-box-orient: vertical;
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
display: -webkit-box;
|
|
93
|
+
-webkit-line-clamp: 3;
|
|
94
|
+
-webkit-box-orient: vertical;
|
|
95
|
+
}
|
|
90
96
|
`;
|
|
@@ -4,6 +4,7 @@ export declare const LogoVariants: {
|
|
|
4
4
|
Solid: string;
|
|
5
5
|
Outlined: string;
|
|
6
6
|
White: string;
|
|
7
|
+
NoneOutlined: string;
|
|
7
8
|
};
|
|
8
9
|
interface IAppHubItemProps {
|
|
9
10
|
internalName: string;
|
|
@@ -13,6 +14,11 @@ interface IAppHubItemProps {
|
|
|
13
14
|
options?: any;
|
|
14
15
|
url?: string;
|
|
15
16
|
localization?: any;
|
|
17
|
+
hubEventTypeId: string | number;
|
|
18
|
+
hubReferenceId: string;
|
|
19
|
+
isAppSwitcher: boolean;
|
|
20
|
+
hubApiKey: string;
|
|
21
|
+
hubToken: string;
|
|
16
22
|
}
|
|
17
23
|
declare const AppHubItem: (props: IAppHubItemProps) => ReactElement;
|
|
18
24
|
export default AppHubItem;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { ListItemButton,
|
|
2
|
+
import { ListItemButton, TextField, Tooltip } from '../../../index';
|
|
3
3
|
import LaunchIcon from '@mui/icons-material/Launch';
|
|
4
4
|
import { visuallyHidden } from '@mui/utils';
|
|
5
5
|
import { Constants } from './constants';
|
|
6
6
|
import { defaultMessages } from '../../../lang/en-us';
|
|
7
|
-
import { StyledPaper, StyledBoxWrap, StyledBoxText, StyledAutocomplete, StyledTypography, StyledTypographySubtitle,
|
|
7
|
+
import { StyledPaper, StyledBoxWrap, StyledBoxText, StyledAutocomplete, StyledTypography, StyledTypographySubtitle, StyledLink } from './AppHubProductStyles';
|
|
8
|
+
import { handleHubTracking } from '../../../utils/helpers';
|
|
8
9
|
import { useTheme } from '@mui/material';
|
|
9
10
|
// Bug in the naming of the icons on the CDN
|
|
10
11
|
export const LogoVariants = {
|
|
11
12
|
Default: 'icon',
|
|
12
13
|
Solid: 'icon-solid',
|
|
13
14
|
Outlined: 'icon-outlined',
|
|
14
|
-
White: 'icon-white'
|
|
15
|
+
White: 'icon-white',
|
|
16
|
+
NoneOutlined: 'icon-none-outlined'
|
|
15
17
|
};
|
|
16
18
|
/**
|
|
17
19
|
* Renders an application logo.
|
|
@@ -23,37 +25,52 @@ const renderApplicationLogo = (internalName, logoVariant) => {
|
|
|
23
25
|
return _jsx(_Fragment, {});
|
|
24
26
|
}
|
|
25
27
|
const urlToIcon = `${Constants.AssetsUrl}${internalName}/logo/latest/${logoVariant ?? LogoVariants.Default}.svg`;
|
|
26
|
-
return (_jsx("img", { src: urlToIcon, width: "
|
|
28
|
+
return (_jsx("img", { src: urlToIcon, width: "30", height: "30", alt: internalName ?? '' }));
|
|
27
29
|
};
|
|
28
30
|
const AppHubItem = (props) => {
|
|
29
|
-
const { internalName, shortName, customName, url, subtitle, localization, options,
|
|
31
|
+
const { internalName, shortName, customName, url, subtitle, localization, options, isAppSwitcher, hubEventTypeId, hubReferenceId, hubApiKey, hubToken } = props;
|
|
30
32
|
const initialOptions = { ...options };
|
|
31
|
-
const solidLogo = renderApplicationLogo(internalName, LogoVariants.
|
|
33
|
+
const solidLogo = renderApplicationLogo(internalName, LogoVariants.NoneOutlined);
|
|
32
34
|
const messages = { ...defaultMessages, ...localization };
|
|
33
|
-
return (_jsx(StyledPaper, { elevation: 0, children:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
return (_jsx(StyledPaper, { elevation: 0, children: _jsx(StyledLink, { href: url, target: '_blank', underline: 'none', onClick: () => !options
|
|
36
|
+
? handleHubTracking({
|
|
37
|
+
apiKey: hubApiKey,
|
|
38
|
+
token: hubToken,
|
|
39
|
+
eventTypeId: hubEventTypeId,
|
|
40
|
+
referenceId: hubReferenceId,
|
|
41
|
+
url: url,
|
|
42
|
+
isAppSwitcher
|
|
43
|
+
})
|
|
44
|
+
: null, children: _jsxs(StyledBoxWrap, { children: [_jsxs("div", { style: { display: 'flex' }, children: [solidLogo, options && options.length > 0 && (_jsx(StyledAutocomplete, { disablePortal: true, size: 'small', options: options.map((option) => option.applicationName),
|
|
45
|
+
// TODO: Add link, icon and screen reader text here:
|
|
46
|
+
renderOption: (option) => {
|
|
47
|
+
// Autocomplete only uses applicationName and we need more properties
|
|
48
|
+
// Careful of this if we do any sorting or grouping in future
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
const index = option['data-option-index'];
|
|
51
|
+
const optionItem = initialOptions[index];
|
|
52
|
+
const handleClick = (event) => {
|
|
53
|
+
optionItem.onClick && optionItem.onClick(event);
|
|
54
|
+
handleHubTracking({
|
|
55
|
+
apiKey: hubApiKey,
|
|
56
|
+
token: hubToken,
|
|
57
|
+
eventTypeId: hubEventTypeId,
|
|
58
|
+
referenceId: hubReferenceId,
|
|
59
|
+
url: url,
|
|
60
|
+
isAppSwitcher
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
return (_jsxs(ListItemButton, { onClick: event => {
|
|
64
|
+
handleClick(event);
|
|
65
|
+
}, 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
|
|
40
67
|
// @ts-ignore
|
|
41
|
-
|
|
68
|
+
, {
|
|
69
|
+
// @ts-ignore
|
|
70
|
+
component: 'div', className: 'appHubCardTitle', children: customName ?? shortName }) }), subtitle && (_jsx(StyledTypographySubtitle
|
|
42
71
|
// @ts-ignore
|
|
43
|
-
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
target: '_blank', variant: 'outlined', ...rest, children: [messages.open, _jsxs("span", { style: visuallyHidden, children: [", ", messages['open-in-new-window']] })] })), options && options.length > 0 && (_jsx(StyledAutocomplete, { disablePortal: true, size: 'small', options: options.map((option) => option.applicationName),
|
|
46
|
-
// TODO: Add link, icon and screen reader text here:
|
|
47
|
-
renderOption: (option) => {
|
|
48
|
-
// Autocomplete only uses applicationName and we need more properties
|
|
49
|
-
// Careful of this if we do any sorting or grouping in future
|
|
72
|
+
, {
|
|
50
73
|
// @ts-ignore
|
|
51
|
-
|
|
52
|
-
const optionItem = initialOptions[index];
|
|
53
|
-
const handleClick = (event) => {
|
|
54
|
-
optionItem.onClick && optionItem.onClick(event);
|
|
55
|
-
};
|
|
56
|
-
return (_jsxs(ListItemButton, { onClick: event => handleClick(event), 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}`));
|
|
57
|
-
}, renderInput: (params) => _jsx(TextField, { ...params, placeholder: messages['select-org'] }) }))] })] }) }));
|
|
74
|
+
component: 'div', children: subtitle }))] })] }) }) }));
|
|
58
75
|
};
|
|
59
76
|
export default AppHubItem;
|
|
@@ -85,3 +85,14 @@ export declare const StyledButton: import("@emotion/styled").StyledComponent<Omi
|
|
|
85
85
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
86
86
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "sx" | "variant" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon">, "ref"> & import("react").RefAttributes<HTMLButtonElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
87
87
|
export declare const StyledAutocomplete: import("@emotion/styled").StyledComponent<import("@mui/material").AutocompleteProps<unknown, boolean | undefined, boolean | undefined, boolean | undefined, "div"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
88
|
+
export declare const StyledLink: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").LinkBaseProps, "classes"> & {
|
|
89
|
+
children?: import("react").ReactNode;
|
|
90
|
+
classes?: Partial<import("@mui/material").LinkClasses> | undefined;
|
|
91
|
+
color?: import("@mui/system/styleFunctionSx").ResponsiveStyleValue<readonly string[] | import("csstype").Property.Color | undefined> | ((theme: import("@mui/material/styles").Theme) => import("@mui/system/styleFunctionSx").ResponsiveStyleValue<readonly string[] | import("csstype").Property.Color | undefined>);
|
|
92
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
93
|
+
TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material/styles").ClassNameMap<never>>) | undefined;
|
|
94
|
+
underline?: "none" | "always" | "hover" | undefined;
|
|
95
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
96
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
97
|
+
ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
98
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "p" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "variant" | "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" | "href" | "type" | "download" | "hrefLang" | "media" | "ping" | "target" | "referrerPolicy" | "align" | "underline" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
|
-
import { Paper, Box, Typography, Autocomplete, Button } from '../../../index';
|
|
2
|
+
import { Paper, Box, Typography, Autocomplete, Button, Link } from '../../../index';
|
|
3
3
|
export const StyledPaper = styled(Paper) `
|
|
4
4
|
width: 100%;
|
|
5
5
|
height: 100%;
|
|
6
|
+
max-height: 250px;
|
|
6
7
|
background: transparent;
|
|
7
|
-
box-shadow: 0 0 0
|
|
8
|
+
box-shadow: 0 0 0 2px ${props => props.theme.palette.mode === 'dark'
|
|
8
9
|
? 'rgba(255,255,255,.1)'
|
|
9
10
|
: '#ddd'};
|
|
10
|
-
border-radius:
|
|
11
|
+
border-radius: 5px;
|
|
11
12
|
border: none;
|
|
12
13
|
transition: all 180ms ease;
|
|
13
14
|
|
|
@@ -22,23 +23,22 @@ export const StyledPaper = styled(Paper) `
|
|
|
22
23
|
}
|
|
23
24
|
`;
|
|
24
25
|
export const StyledBoxWrap = styled(Box) `
|
|
25
|
-
display: flex;
|
|
26
26
|
flex-direction: row;
|
|
27
|
-
padding:
|
|
27
|
+
padding: 1rem;
|
|
28
28
|
`;
|
|
29
29
|
export const StyledBoxText = styled(Box) `
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
align-items: flex-start;
|
|
33
33
|
justify-content: space-between;
|
|
34
|
-
margin-
|
|
34
|
+
margin-top: 1rem;
|
|
35
35
|
width: 100%;
|
|
36
36
|
`;
|
|
37
37
|
export const StyledTypography = styled(Typography) `
|
|
38
38
|
color: ${props => props.theme.palette.text.primary};
|
|
39
39
|
font-size: 1rem;
|
|
40
40
|
font-weight: 500;
|
|
41
|
-
line-height: 1.
|
|
41
|
+
line-height: 1.5;
|
|
42
42
|
|
|
43
43
|
/* Truncate text to 2 lines */
|
|
44
44
|
overflow: hidden;
|
|
@@ -51,7 +51,16 @@ export const StyledTypographySubtitle = styled(Typography) `
|
|
|
51
51
|
color: ${props => props.theme.palette.text.secondary};
|
|
52
52
|
font-size: .85rem;
|
|
53
53
|
font-weight: 400;
|
|
54
|
-
line-height: 1.
|
|
54
|
+
line-height: 1.5;
|
|
55
|
+
margin-top: 0.5rem;
|
|
56
|
+
margin-bottom: 0.5rem;
|
|
57
|
+
|
|
58
|
+
/* Truncate text to 4 lines */
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
display: -webkit-box;
|
|
62
|
+
-webkit-line-clamp: 4;
|
|
63
|
+
-webkit-box-orient: vertical;
|
|
55
64
|
`;
|
|
56
65
|
export const StyledButton = styled(Button) `
|
|
57
66
|
background: ${props => props.theme.palette.mode === 'dark'
|
|
@@ -72,7 +81,8 @@ export const StyledButton = styled(Button) `
|
|
|
72
81
|
}
|
|
73
82
|
`;
|
|
74
83
|
export const StyledAutocomplete = styled(Autocomplete) `
|
|
75
|
-
|
|
84
|
+
margin-left: 1rem;
|
|
85
|
+
width: 75%;
|
|
76
86
|
|
|
77
87
|
.MuiInputBase-root {
|
|
78
88
|
background: ${props => props.theme.palette.mode === 'dark'
|
|
@@ -111,3 +121,16 @@ export const StyledAutocomplete = styled(Autocomplete) `
|
|
|
111
121
|
: props.theme.palette.primary.main};
|
|
112
122
|
}
|
|
113
123
|
`;
|
|
124
|
+
export const StyledLink = styled(Link) `
|
|
125
|
+
height: 100%;
|
|
126
|
+
display: block;
|
|
127
|
+
border-radius: 10px;
|
|
128
|
+
box-shadow: 0 0 0 0 transparent;
|
|
129
|
+
transition: all 180ms ease;
|
|
130
|
+
|
|
131
|
+
&:focus-visible {
|
|
132
|
+
box-shadow: 0 0 0 4px ${props => props.theme.palette.mode === 'dark'
|
|
133
|
+
? 'rgba(255,255,255,.5)'
|
|
134
|
+
: props.theme.palette.primary.main};
|
|
135
|
+
}
|
|
136
|
+
`;
|
|
@@ -8,32 +8,9 @@ export declare const AppHubRow: import("@emotion/styled").StyledComponent<import
|
|
|
8
8
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
9
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
10
|
}, 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>, {}, {}>;
|
|
11
|
-
export declare const AppHubTitle: import("@
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
15
|
-
gutterBottom?: boolean | undefined;
|
|
16
|
-
noWrap?: boolean | undefined;
|
|
17
|
-
paragraph?: boolean | undefined;
|
|
18
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
19
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
20
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
21
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
22
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
23
|
-
}, 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>, {}, {}>;
|
|
24
|
-
export declare const AppHubHeader: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
25
|
-
align?: "left" | "right" | "inherit" | "center" | "justify" | undefined;
|
|
26
|
-
children?: import("react").ReactNode;
|
|
27
|
-
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
28
|
-
gutterBottom?: boolean | undefined;
|
|
29
|
-
noWrap?: boolean | undefined;
|
|
30
|
-
paragraph?: boolean | undefined;
|
|
31
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
32
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | undefined;
|
|
33
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2", string>> | undefined;
|
|
34
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
35
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
36
|
-
}, 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>, {}, {}>;
|
|
11
|
+
export declare const AppHubTitle: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>;
|
|
12
|
+
export declare const AppHubHeader: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>;
|
|
13
|
+
export declare const ManageLinksHeader: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>;
|
|
37
14
|
export declare const StyledPaper: import("@emotion/styled").StyledComponent<{
|
|
38
15
|
children?: import("react").ReactNode;
|
|
39
16
|
classes?: Partial<import("@mui/material").PaperClasses> | undefined;
|
|
@@ -52,3 +29,17 @@ export declare const StyledBox: import("@emotion/styled").StyledComponent<import
|
|
|
52
29
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
53
30
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
54
31
|
}, 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>, {}, {}>;
|
|
32
|
+
export declare const StyledSettingsIcon: import("@emotion/styled").StyledComponent<{
|
|
33
|
+
children?: import("react").ReactNode;
|
|
34
|
+
classes?: Partial<import("@mui/material").SvgIconClasses> | undefined;
|
|
35
|
+
color?: "inherit" | "action" | "disabled" | "primary" | "secondary" | "success" | "error" | "info" | "warning" | undefined;
|
|
36
|
+
fontSize?: "small" | "inherit" | "large" | "medium" | undefined;
|
|
37
|
+
htmlColor?: string | undefined;
|
|
38
|
+
inheritViewBox?: boolean | undefined;
|
|
39
|
+
shapeRendering?: string | undefined;
|
|
40
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
41
|
+
titleAccess?: string | undefined;
|
|
42
|
+
viewBox?: string | undefined;
|
|
43
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").SVGProps<SVGSVGElement>, "ref"> & {
|
|
44
|
+
ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
|
|
45
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "children" | "sx" | "fontSize" | "shapeRendering" | "viewBox" | "htmlColor" | "inheritViewBox" | "titleAccess"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { styled } from '@mui/material/styles';
|
|
2
2
|
import { Paper, Box, Typography } from '../../../index';
|
|
3
|
+
import { Settings as SettingsIcon } from '@mui/icons-material';
|
|
3
4
|
export const AppHubPanel = styled('div') `
|
|
4
5
|
padding: 1rem;
|
|
5
6
|
max-width: 1000px;
|
|
6
7
|
`;
|
|
7
8
|
export const AppHubRow = styled(Box) `
|
|
8
|
-
margin: 2rem 0 0;
|
|
9
|
+
margin: 2rem 0 0 2rem;
|
|
9
10
|
`;
|
|
10
11
|
export const AppHubTitle = styled(Typography) `
|
|
11
12
|
font-size: 2rem;
|
|
12
|
-
font-weight:
|
|
13
|
+
font-weight: 500;
|
|
13
14
|
line-height: 1.3;
|
|
14
15
|
color: ${props => props.theme.palette.text.primary};
|
|
15
16
|
margin-bottom: 0.5rem;
|
|
@@ -20,6 +21,18 @@ export const AppHubHeader = styled(Typography) `
|
|
|
20
21
|
color: ${props => props.theme.palette.text.secondary};
|
|
21
22
|
margin: 0 0 1rem;
|
|
22
23
|
`;
|
|
24
|
+
export const ManageLinksHeader = styled(Typography) `
|
|
25
|
+
display: flex;
|
|
26
|
+
font-size: 1rem;
|
|
27
|
+
font-weight: 500;
|
|
28
|
+
color: #013366;
|
|
29
|
+
margin: 0 0 1rem;
|
|
30
|
+
|
|
31
|
+
svg {
|
|
32
|
+
color: #013366;
|
|
33
|
+
margin-right: 5px;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
23
36
|
export const StyledPaper = styled(Paper) `
|
|
24
37
|
display: flex;
|
|
25
38
|
flex-direction: row;
|
|
@@ -31,3 +44,8 @@ export const StyledBox = styled(Box) `
|
|
|
31
44
|
display: flex;
|
|
32
45
|
flex-direction: column;
|
|
33
46
|
`;
|
|
47
|
+
export const StyledSettingsIcon = styled(SettingsIcon) `
|
|
48
|
+
width: 20px;
|
|
49
|
+
height: auto;
|
|
50
|
+
color: #013366;
|
|
51
|
+
`;
|
|
@@ -16,24 +16,23 @@ export declare const hubApplications: ({
|
|
|
16
16
|
shortName: string;
|
|
17
17
|
internalName: string;
|
|
18
18
|
url: string;
|
|
19
|
+
productDescription: string;
|
|
19
20
|
children?: undefined;
|
|
20
21
|
customName?: undefined;
|
|
21
|
-
subtitle?: undefined;
|
|
22
22
|
} | {
|
|
23
23
|
applicationId: number;
|
|
24
24
|
applicationName: string;
|
|
25
25
|
shortName: string;
|
|
26
26
|
internalName: string;
|
|
27
|
+
productDescription: string;
|
|
27
28
|
children: {
|
|
28
|
-
applicationId: number;
|
|
29
29
|
applicationName: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
onClick: () =>
|
|
30
|
+
name: string;
|
|
31
|
+
url: string;
|
|
32
|
+
onClick: () => void;
|
|
33
33
|
}[];
|
|
34
34
|
url?: undefined;
|
|
35
35
|
customName?: undefined;
|
|
36
|
-
subtitle?: undefined;
|
|
37
36
|
} | {
|
|
38
37
|
applicationId: number;
|
|
39
38
|
applicationName: string;
|
|
@@ -41,50 +40,55 @@ export declare const hubApplications: ({
|
|
|
41
40
|
internalName: string;
|
|
42
41
|
customName: string;
|
|
43
42
|
url: string;
|
|
43
|
+
productDescription: string;
|
|
44
44
|
children?: undefined;
|
|
45
|
-
subtitle?: undefined;
|
|
46
45
|
} | {
|
|
47
46
|
applicationId: number;
|
|
48
47
|
applicationName: string;
|
|
49
48
|
shortName: string;
|
|
50
49
|
internalName: string;
|
|
51
50
|
customName: string;
|
|
51
|
+
productDescription: string;
|
|
52
52
|
children: {
|
|
53
|
-
applicationId: number;
|
|
54
53
|
applicationName: string;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onClick: () => Window | null;
|
|
54
|
+
name: string;
|
|
55
|
+
url: string;
|
|
56
|
+
onClick: () => void;
|
|
59
57
|
}[];
|
|
60
58
|
url?: undefined;
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
})[];
|
|
60
|
+
export declare const otherProducts: {
|
|
63
61
|
applicationId: number;
|
|
64
|
-
|
|
62
|
+
name: string;
|
|
65
63
|
shortName: string;
|
|
66
64
|
internalName: string;
|
|
67
|
-
customName: string;
|
|
68
|
-
subtitle: string;
|
|
69
65
|
url: string;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
url: string;
|
|
75
|
-
customLinkBgColor?: undefined;
|
|
76
|
-
} | {
|
|
66
|
+
customName: null;
|
|
67
|
+
subtitle: string;
|
|
68
|
+
}[];
|
|
69
|
+
export declare const hubCustomLinks: {
|
|
77
70
|
name: string;
|
|
78
71
|
url: string;
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
export declare const
|
|
72
|
+
type: string;
|
|
73
|
+
}[];
|
|
74
|
+
export declare const hubUsefulLinks: {
|
|
75
|
+
id: string;
|
|
82
76
|
name: string;
|
|
83
77
|
url: string;
|
|
84
|
-
|
|
78
|
+
imageUrl: string;
|
|
79
|
+
type: string;
|
|
80
|
+
sortOrder: number;
|
|
85
81
|
}[];
|
|
86
|
-
export declare const hubBannerAdverts: {
|
|
82
|
+
export declare const hubBannerAdverts: ({
|
|
83
|
+
name: string;
|
|
84
|
+
hubImageUrl: string;
|
|
85
|
+
basePromoUrl: string;
|
|
86
|
+
imageUrl?: undefined;
|
|
87
|
+
url?: undefined;
|
|
88
|
+
} | {
|
|
87
89
|
name: string;
|
|
88
90
|
imageUrl: string;
|
|
89
91
|
url: string;
|
|
90
|
-
|
|
92
|
+
hubImageUrl?: undefined;
|
|
93
|
+
basePromoUrl?: undefined;
|
|
94
|
+
})[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import HomeIcon from '@mui/icons-material/Home';
|
|
1
|
+
const url = 'http://learningpool.com';
|
|
3
2
|
export const Constants = Object.freeze({
|
|
4
3
|
DataRowType: {
|
|
5
4
|
Product: 'product',
|
|
@@ -13,51 +12,136 @@ export const Constants = Object.freeze({
|
|
|
13
12
|
}
|
|
14
13
|
});
|
|
15
14
|
export const hubApplications = [
|
|
16
|
-
{
|
|
15
|
+
{
|
|
16
|
+
applicationId: 1,
|
|
17
|
+
applicationName: 'Stream LXP',
|
|
18
|
+
shortName: 'LXP',
|
|
19
|
+
internalName: 'stream',
|
|
20
|
+
url,
|
|
21
|
+
productDescription: 'This is an example description of this product'
|
|
22
|
+
},
|
|
17
23
|
{
|
|
18
24
|
applicationId: 2,
|
|
19
25
|
applicationName: 'Stream Analytics',
|
|
20
26
|
shortName: 'Long Wrapping Text Name Truncation Test Stream Analytics',
|
|
21
27
|
internalName: 'analytics',
|
|
28
|
+
productDescription: 'This is an example description of this product',
|
|
22
29
|
children: [
|
|
23
|
-
{
|
|
24
|
-
{
|
|
25
|
-
{
|
|
26
|
-
{
|
|
27
|
-
{
|
|
30
|
+
{ applicationName: 'Stream Analytics', name: 'Long Wrapping Test Stream Analytics', url, onClick: () => { } },
|
|
31
|
+
{ applicationName: 'Stream Analytics', name: 'Long Wrapping Test Stream Analytics', url, onClick: () => { } },
|
|
32
|
+
{ applicationName: 'Stream Analytics', name: 'Long Wrapping Test Stream Analytics', url, onClick: () => { } },
|
|
33
|
+
{ applicationName: 'Stream Analytics', name: 'Long Wrapping Test Stream Analytics', url, onClick: () => { } },
|
|
34
|
+
{ applicationName: 'Stream Analytics', name: 'Long Wrapping Test Stream Analytics', url, onClick: () => { } }
|
|
28
35
|
]
|
|
29
36
|
},
|
|
30
|
-
{
|
|
37
|
+
{
|
|
38
|
+
applicationId: 3,
|
|
39
|
+
applicationName: 'Stream Automation',
|
|
40
|
+
shortName: 'Event Management',
|
|
41
|
+
internalName: 'automation',
|
|
42
|
+
customName: 'Waves 1',
|
|
43
|
+
url,
|
|
44
|
+
productDescription: 'This is an example description of this product'
|
|
45
|
+
},
|
|
31
46
|
{
|
|
32
47
|
applicationId: 7,
|
|
33
48
|
applicationName: 'Stream LMS',
|
|
34
49
|
shortName: 'LMS',
|
|
35
50
|
internalName: 'lms',
|
|
36
|
-
customName: 'Custom
|
|
51
|
+
customName: 'Custom LMS instance 1',
|
|
52
|
+
productDescription: 'This is an example description of this product',
|
|
37
53
|
children: [
|
|
38
|
-
{
|
|
39
|
-
{
|
|
40
|
-
{
|
|
54
|
+
{ applicationName: 'Stream LMS', name: 'LMS', url, onClick: () => { } },
|
|
55
|
+
{ applicationName: 'Stream LMS', name: 'LMS', url, onClick: () => { } },
|
|
56
|
+
{ applicationName: 'Stream LMS', name: 'LMS', url, onClick: () => { } }
|
|
41
57
|
]
|
|
42
58
|
},
|
|
43
|
-
{
|
|
59
|
+
{
|
|
60
|
+
applicationId: 4,
|
|
61
|
+
applicationName: 'Stream Authoring',
|
|
62
|
+
shortName: 'Authoring',
|
|
63
|
+
internalName: 'authoring',
|
|
64
|
+
customName: 'Authoring',
|
|
65
|
+
productDescription: 'This is an example description of this product',
|
|
66
|
+
url
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
export const otherProducts = [
|
|
70
|
+
{
|
|
71
|
+
applicationId: 6,
|
|
72
|
+
name: 'Event Management',
|
|
73
|
+
shortName: 'Events',
|
|
74
|
+
internalName: 'eventmanagement',
|
|
75
|
+
url,
|
|
76
|
+
customName: null,
|
|
77
|
+
subtitle: 'Event Management allows you to effectively manage both in-person and virtual based training for your organisation.'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
applicationId: 8,
|
|
81
|
+
name: 'IQ',
|
|
82
|
+
shortName: 'IQ',
|
|
83
|
+
internalName: 'iq',
|
|
84
|
+
url,
|
|
85
|
+
customName: null,
|
|
86
|
+
subtitle: 'The IQ Analytics portal is designed to clearly highlight behavioral insights gathered from your Adaptive Content courses.'
|
|
87
|
+
}
|
|
44
88
|
];
|
|
45
89
|
export const hubCustomLinks = [
|
|
46
|
-
{ name: 'Learning Pool', url: '
|
|
47
|
-
{ name: 'Custom Link', url: '
|
|
48
|
-
{ name: 'Another Custom Link', url
|
|
49
|
-
{ name: 'Wrapping Text Name Truncation Test Link', url: '
|
|
50
|
-
{ name: 'Link', url: '
|
|
51
|
-
{ name: 'Another Custom Link', url: '
|
|
52
|
-
{ name: 'Another Custom Link', url: '
|
|
53
|
-
{ name: 'Another Custom Link', url: '
|
|
54
|
-
{ name: 'Another Custom Link', url: '
|
|
90
|
+
{ name: 'Learning Pool', url, type: 'custom' },
|
|
91
|
+
{ name: 'Custom Link', url, type: 'custom' },
|
|
92
|
+
{ name: 'Another Custom Link', url, type: 'custom' },
|
|
93
|
+
{ name: 'Wrapping Text Name Truncation Test Link', url, type: 'custom' },
|
|
94
|
+
{ name: 'Link', url, type: 'custom' },
|
|
95
|
+
{ name: 'Another Custom Link', url, type: 'custom' },
|
|
96
|
+
{ name: 'Another Custom Link', url, type: 'custom' },
|
|
97
|
+
{ name: 'Another Custom Link', url, type: 'custom' },
|
|
98
|
+
{ name: 'Another Custom Link', url, type: 'custom' }
|
|
55
99
|
];
|
|
56
|
-
export const
|
|
57
|
-
{
|
|
100
|
+
export const hubUsefulLinks = [
|
|
101
|
+
{
|
|
102
|
+
id: '45eda0c0-e2c1-11ed-a91b-8fa52457e26b',
|
|
103
|
+
name: 'Academy',
|
|
104
|
+
url: 'https://academy.thelpacademy.com/',
|
|
105
|
+
imageUrl: 'images/icon_academy.svg',
|
|
106
|
+
type: 'useful',
|
|
107
|
+
sortOrder: 1
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: '45fa23e0-e2c1-11ed-a91b-8fa52457e26b',
|
|
111
|
+
name: 'Contact Us',
|
|
112
|
+
url: 'https://learningpool.com/support/',
|
|
113
|
+
imageUrl: 'images/icon_phone.svg',
|
|
114
|
+
type: 'useful',
|
|
115
|
+
sortOrder: 2
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: '46056e80-e2c1-11ed-a91b-8fa52457e26b',
|
|
119
|
+
name: 'Customer Portal',
|
|
120
|
+
url: 'https://learningpool.force.com/customerportal',
|
|
121
|
+
imageUrl: 'images/icon_learningpool.svg',
|
|
122
|
+
type: 'useful',
|
|
123
|
+
sortOrder: 3
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: '46159b20-e2c1-11ed-a91b-8fa52457e26b',
|
|
127
|
+
name: 'Product Roadmaps',
|
|
128
|
+
url: 'https://learningpool.com/roadmaps',
|
|
129
|
+
imageUrl: 'images/icon_map.svg',
|
|
130
|
+
type: 'useful',
|
|
131
|
+
sortOrder: 4
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: '462db700-e2c1-11ed-a91b-8fa52457e26b',
|
|
135
|
+
name: 'Showcase',
|
|
136
|
+
url: 'https://lpshowcase.learningpool.com/',
|
|
137
|
+
imageUrl: 'images/icon_frame.svg',
|
|
138
|
+
type: 'useful',
|
|
139
|
+
sortOrder: 6
|
|
140
|
+
}
|
|
58
141
|
];
|
|
59
142
|
export const hubBannerAdverts = [
|
|
60
|
-
{ name: 'Banner Advert',
|
|
61
|
-
|
|
62
|
-
{ name: 'Another Banner Advert',
|
|
143
|
+
{ name: 'Banner Advert', hubImageUrl: 'https://uuicdn.learningpool.com/promotionalcampaigns/banner/latest/1000x138.png', basePromoUrl: url },
|
|
144
|
+
// Uncomment this to allow more ads
|
|
145
|
+
// { name: 'Another Banner Advert', hubImageUrl: 'https://uuicdn.learningpool.com/promotionalcampaigns/banner/latest/1000x138.png', basePromoUrl: url },
|
|
146
|
+
{ name: 'Another Banner Advert no image', imageUrl: '3', url }
|
|
63
147
|
];
|
package/index.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ export { default as Drawer } from './components/navigation/Drawer/Drawer';
|
|
|
129
129
|
export { default as List } from './components/datadisplay/List/List';
|
|
130
130
|
export { default as SideInSide } from './components/pages/SideInSide/SideInSide';
|
|
131
131
|
export { default as ErrorPage } from './components/pages/ErrorPage/ErrorPage';
|
|
132
|
+
export { default as WelcomeBanner } from './components/datadisplay/WelcomeBanner/WelcomeBanner';
|
|
132
133
|
export { default as AppHub } from './components/stream/AppHub/AppHub';
|
|
133
134
|
export { default as AppSwitcher } from './components/stream/AppSwitcher/AppSwitcher';
|
|
134
135
|
export { default as Header } from './components/landmarks/Header/Header';
|
package/index.js
CHANGED
|
@@ -139,6 +139,7 @@ export { default as Drawer } from './components/navigation/Drawer/Drawer';
|
|
|
139
139
|
export { default as List } from './components/datadisplay/List/List';
|
|
140
140
|
export { default as SideInSide } from './components/pages/SideInSide/SideInSide';
|
|
141
141
|
export { default as ErrorPage } from './components/pages/ErrorPage/ErrorPage';
|
|
142
|
+
export { default as WelcomeBanner } from './components/datadisplay/WelcomeBanner/WelcomeBanner';
|
|
142
143
|
// Stream Suite components
|
|
143
144
|
export { default as AppHub } from './components/stream/AppHub/AppHub';
|
|
144
145
|
export { default as AppSwitcher } from './components/stream/AppSwitcher/AppSwitcher';
|
package/lang/en-us.d.ts
CHANGED
package/lang/en-us.js
CHANGED
|
@@ -14,6 +14,7 @@ export const defaultMessages = {
|
|
|
14
14
|
'open-in-new-window': 'opens in a new window',
|
|
15
15
|
'stream-hub-welcome': 'Welcome to Stream Home',
|
|
16
16
|
'banner-image-alt-text': 'Banner Image advert',
|
|
17
|
+
'manage-links': 'Manage Links',
|
|
17
18
|
// Navigation
|
|
18
19
|
'site-navigation': 'Site navigation',
|
|
19
20
|
'open-navigation': 'Open navigation',
|
package/package.json
CHANGED
|
@@ -3,11 +3,20 @@ export interface IApplicationHubProps {
|
|
|
3
3
|
localization?: any;
|
|
4
4
|
isPageLayout?: boolean;
|
|
5
5
|
customLinkBgColor?: string;
|
|
6
|
+
userName?: string;
|
|
7
|
+
userOrganization?: string;
|
|
8
|
+
hasPromotionalCampaigns?: boolean;
|
|
9
|
+
isAppSwitcher: boolean;
|
|
10
|
+
hubApiKey: string;
|
|
11
|
+
hubToken: string;
|
|
6
12
|
}
|
|
7
13
|
export interface IApplicationHubRowProps {
|
|
8
14
|
items: any;
|
|
9
15
|
title: string;
|
|
10
16
|
type?: any;
|
|
11
|
-
|
|
17
|
+
allowEditLinks?: boolean;
|
|
12
18
|
customName?: string;
|
|
19
|
+
welcomeMessage?: string;
|
|
20
|
+
userName?: string;
|
|
21
|
+
userOrganization?: string;
|
|
13
22
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum HubEventTypeID {
|
|
2
|
+
REQUEST_DEMO = "request_demo",
|
|
3
|
+
OTHER_PRODUCT = "other_product",
|
|
4
|
+
ACCESSED = "accessed",
|
|
5
|
+
APP_OPENED = "app_opened",
|
|
6
|
+
LINK_OPENED = "link_opened",
|
|
7
|
+
CREATE = "create",
|
|
8
|
+
EDIT = "edit",
|
|
9
|
+
UPDATE = "update",
|
|
10
|
+
DELETE = "delete",
|
|
11
|
+
RESET_PASSWORD = "reset_password"
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
// TODO: Remove rule for enums
|
|
3
|
+
export var HubEventTypeID;
|
|
4
|
+
(function (HubEventTypeID) {
|
|
5
|
+
HubEventTypeID["REQUEST_DEMO"] = "request_demo";
|
|
6
|
+
HubEventTypeID["OTHER_PRODUCT"] = "other_product";
|
|
7
|
+
HubEventTypeID["ACCESSED"] = "accessed";
|
|
8
|
+
HubEventTypeID["APP_OPENED"] = "app_opened";
|
|
9
|
+
HubEventTypeID["LINK_OPENED"] = "link_opened";
|
|
10
|
+
HubEventTypeID["CREATE"] = "create";
|
|
11
|
+
HubEventTypeID["EDIT"] = "edit";
|
|
12
|
+
HubEventTypeID["UPDATE"] = "update";
|
|
13
|
+
HubEventTypeID["DELETE"] = "delete";
|
|
14
|
+
HubEventTypeID["RESET_PASSWORD"] = "reset_password";
|
|
15
|
+
})(HubEventTypeID || (HubEventTypeID = {}));
|
package/utils/helpers.d.ts
CHANGED
|
@@ -34,3 +34,20 @@ export declare const useFadeIn: (delayOrder: number, reverse?: boolean) => Objec
|
|
|
34
34
|
* @returns Object
|
|
35
35
|
*/
|
|
36
36
|
export declare const useFadeAndMoveIn: (delayOrder: number, reverse?: boolean) => Object;
|
|
37
|
+
interface IHubTrackingProps {
|
|
38
|
+
apiKey: string;
|
|
39
|
+
token: string;
|
|
40
|
+
isAppSwitcher: boolean;
|
|
41
|
+
eventTypeId: string;
|
|
42
|
+
referenceId: string;
|
|
43
|
+
url: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Add tracking log to the Hub.
|
|
47
|
+
* @param {Bolean} param.isAppSwitcher - Is the interaction from App switcher.
|
|
48
|
+
* @param {String} param.eventTypeId - Type of click event.
|
|
49
|
+
* @param {String} param.referenceId - Clicked Id of the object.
|
|
50
|
+
* @param {String} param.url - Url of the object on click.
|
|
51
|
+
*/
|
|
52
|
+
export declare const handleHubTracking: ({ apiKey, token, isAppSwitcher, eventTypeId, referenceId, url }: IHubTrackingProps) => Promise<void>;
|
|
53
|
+
export {};
|
package/utils/helpers.js
CHANGED
|
@@ -108,3 +108,32 @@ export const useFadeAndMoveIn = (delayOrder, reverse = false) => {
|
|
|
108
108
|
};
|
|
109
109
|
return useStaggerIn(animationConfig, delayOrder, reverse);
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Add tracking log to the Hub.
|
|
113
|
+
* @param {Bolean} param.isAppSwitcher - Is the interaction from App switcher.
|
|
114
|
+
* @param {String} param.eventTypeId - Type of click event.
|
|
115
|
+
* @param {String} param.referenceId - Clicked Id of the object.
|
|
116
|
+
* @param {String} param.url - Url of the object on click.
|
|
117
|
+
*/
|
|
118
|
+
export const handleHubTracking = async ({ apiKey, token, isAppSwitcher, eventTypeId, referenceId, url }) => {
|
|
119
|
+
const { host, hostname } = window.location;
|
|
120
|
+
if (hostname === 'localhost') {
|
|
121
|
+
console.log('Send tracking to Hub', { isAppSwitcher, eventTypeId, referenceId, url });
|
|
122
|
+
}
|
|
123
|
+
if (!eventTypeId || !referenceId) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
fetch(`https://api.${host}/interaction`, {
|
|
127
|
+
method: 'POST',
|
|
128
|
+
headers: new Headers({
|
|
129
|
+
Authorization: `Bearer ${token}`,
|
|
130
|
+
'x-api-key': apiKey
|
|
131
|
+
}),
|
|
132
|
+
body: JSON.stringify({
|
|
133
|
+
referenceId,
|
|
134
|
+
eventTypeId,
|
|
135
|
+
url,
|
|
136
|
+
isHub: isAppSwitcher
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
};
|