@drodil/backstage-plugin-qeta-react 3.49.0 → 3.49.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/dist/components/Buttons/OpenLinkButton.esm.js +6 -1
- package/dist/components/Buttons/OpenLinkButton.esm.js.map +1 -1
- package/dist/components/CollectionsGrid/CollectionsGridItem.esm.js +8 -10
- package/dist/components/CollectionsGrid/CollectionsGridItem.esm.js.map +1 -1
- package/dist/components/EntitiesGrid/EntitiesGridItem.esm.js +84 -84
- package/dist/components/EntitiesGrid/EntitiesGridItem.esm.js.map +1 -1
- package/dist/components/FollowedLists/FollowedCollectionsList.esm.js +27 -22
- package/dist/components/FollowedLists/FollowedCollectionsList.esm.js.map +1 -1
- package/dist/components/FollowedLists/FollowedEntitiesList.esm.js +6 -3
- package/dist/components/FollowedLists/FollowedEntitiesList.esm.js.map +1 -1
- package/dist/components/FollowedLists/FollowedTagsList.esm.js +27 -22
- package/dist/components/FollowedLists/FollowedTagsList.esm.js.map +1 -1
- package/dist/components/FollowedLists/FollowedUsersList.esm.js +6 -3
- package/dist/components/FollowedLists/FollowedUsersList.esm.js.map +1 -1
- package/dist/components/HomePageCards/ImpactCard.esm.js +2 -3
- package/dist/components/HomePageCards/ImpactCard.esm.js.map +1 -1
- package/dist/components/LeftMenu/LeftMenu.esm.js +1 -1
- package/dist/components/LeftMenu/LeftMenu.esm.js.map +1 -1
- package/dist/components/PostHighlightList/PostHighlightList.esm.js +6 -3
- package/dist/components/PostHighlightList/PostHighlightList.esm.js.map +1 -1
- package/dist/components/PostsContainer/PostListItem.esm.js +8 -13
- package/dist/components/PostsContainer/PostListItem.esm.js.map +1 -1
- package/dist/components/PostsGrid/PostsGridItem.esm.js +6 -2
- package/dist/components/PostsGrid/PostsGridItem.esm.js.map +1 -1
- package/dist/components/TagsAndEntities/EntityChip.esm.js +8 -7
- package/dist/components/TagsAndEntities/EntityChip.esm.js.map +1 -1
- package/dist/components/TagsAndEntities/TagChip.esm.js +8 -7
- package/dist/components/TagsAndEntities/TagChip.esm.js.map +1 -1
- package/dist/components/TagsGrid/TagGridItem.esm.js +157 -154
- package/dist/components/TagsGrid/TagGridItem.esm.js.map +1 -1
- package/dist/components/UsersGrid/UsersGridItem.esm.js +113 -113
- package/dist/components/UsersGrid/UsersGridItem.esm.js.map +1 -1
- package/dist/components/Utility/ClickableLink.esm.js +28 -0
- package/dist/components/Utility/ClickableLink.esm.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -10,11 +10,16 @@ const OpenLinkButton = (props) => {
|
|
|
10
10
|
const { entity, className, style } = props;
|
|
11
11
|
const qetaApi = useApi(qetaApiRef);
|
|
12
12
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
13
|
+
if (!entity.url) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
13
16
|
const handleClick = (event) => {
|
|
14
17
|
event.stopPropagation();
|
|
18
|
+
event.preventDefault();
|
|
15
19
|
qetaApi.clickLink(entity.id);
|
|
20
|
+
window.open(entity.url, "_blank", "noopener,noreferrer");
|
|
16
21
|
};
|
|
17
|
-
return /* @__PURE__ */ jsx(Tooltip, { title: t("link.open")
|
|
22
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: `${t("link.open")}: ${entity.url}`, children: /* @__PURE__ */ jsx(
|
|
18
23
|
IconButton,
|
|
19
24
|
{
|
|
20
25
|
component: "a",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenLinkButton.esm.js","sources":["../../../src/components/Buttons/OpenLinkButton.tsx"],"sourcesContent":["import { PostResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\nimport { IconButton, Tooltip } from '@material-ui/core';\nimport OpenLinkIcon from '@material-ui/icons/OpenInNew';\nimport { qetaApiRef } from '../../api.ts';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const OpenLinkButton = (props: {\n entity: PostResponse;\n className?: string;\n style?: React.CSSProperties;\n}) => {\n const { entity, className, style } = props;\n const qetaApi = useApi(qetaApiRef);\n const { t } = useTranslationRef(qetaTranslationRef);\n\n const handleClick = (\n event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,\n ) => {\n event.stopPropagation();\n qetaApi.clickLink(entity.id);\n };\n\n return (\n <Tooltip title={t('link.open')}>\n <IconButton\n component=\"a\"\n href={entity.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={t('link.open')}\n size=\"small\"\n onClick={handleClick}\n className={className}\n style={style}\n >\n <OpenLinkIcon />\n </IconButton>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAQa,MAAA,cAAA,GAAiB,CAAC,KAIzB,KAAA;AACJ,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAW,EAAA,KAAA,EAAU,GAAA,KAAA;AACrC,EAAM,MAAA,OAAA,GAAU,OAAO,UAAU,CAAA;AACjC,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAM,MAAA,WAAA,GAAc,CAClB,KACG,KAAA;AACH,IAAA,KAAA,CAAM,eAAgB,EAAA;AACtB,IAAQ,OAAA,CAAA,SAAA,CAAU,OAAO,EAAE,CAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"OpenLinkButton.esm.js","sources":["../../../src/components/Buttons/OpenLinkButton.tsx"],"sourcesContent":["import { PostResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\nimport { IconButton, Tooltip } from '@material-ui/core';\nimport OpenLinkIcon from '@material-ui/icons/OpenInNew';\nimport { qetaApiRef } from '../../api.ts';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const OpenLinkButton = (props: {\n entity: PostResponse;\n className?: string;\n style?: React.CSSProperties;\n}) => {\n const { entity, className, style } = props;\n const qetaApi = useApi(qetaApiRef);\n const { t } = useTranslationRef(qetaTranslationRef);\n\n if (!entity.url) {\n return null;\n }\n\n const handleClick = (\n event: React.MouseEvent<HTMLAnchorElement, MouseEvent>,\n ) => {\n event.stopPropagation();\n event.preventDefault();\n qetaApi.clickLink(entity.id);\n window.open(entity.url, '_blank', 'noopener,noreferrer');\n };\n\n return (\n <Tooltip title={`${t('link.open')}: ${entity.url}`}>\n <IconButton\n component=\"a\"\n href={entity.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={t('link.open')}\n size=\"small\"\n onClick={handleClick}\n className={className}\n style={style}\n >\n <OpenLinkIcon />\n </IconButton>\n </Tooltip>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAQa,MAAA,cAAA,GAAiB,CAAC,KAIzB,KAAA;AACJ,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAW,EAAA,KAAA,EAAU,GAAA,KAAA;AACrC,EAAM,MAAA,OAAA,GAAU,OAAO,UAAU,CAAA;AACjC,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,kBAAkB,CAAA;AAElD,EAAI,IAAA,CAAC,OAAO,GAAK,EAAA;AACf,IAAO,OAAA,IAAA;AAAA;AAGT,EAAM,MAAA,WAAA,GAAc,CAClB,KACG,KAAA;AACH,IAAA,KAAA,CAAM,eAAgB,EAAA;AACtB,IAAA,KAAA,CAAM,cAAe,EAAA;AACrB,IAAQ,OAAA,CAAA,SAAA,CAAU,OAAO,EAAE,CAAA;AAC3B,IAAA,MAAA,CAAO,IAAK,CAAA,MAAA,CAAO,GAAK,EAAA,QAAA,EAAU,qBAAqB,CAAA;AAAA,GACzD;AAEA,EACE,uBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,KAAA,EAAO,CAAG,EAAA,CAAA,CAAE,WAAW,CAAC,CAAA,EAAA,EAAK,MAAO,CAAA,GAAG,CAC9C,CAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,SAAU,EAAA,GAAA;AAAA,MACV,MAAM,MAAO,CAAA,GAAA;AAAA,MACb,MAAO,EAAA,QAAA;AAAA,MACP,GAAI,EAAA,qBAAA;AAAA,MACJ,YAAA,EAAY,EAAE,WAAW,CAAA;AAAA,MACzB,IAAK,EAAA,OAAA;AAAA,MACL,OAAS,EAAA,WAAA;AAAA,MACT,SAAA;AAAA,MACA,KAAA;AAAA,MAEA,8BAAC,YAAa,EAAA,EAAA;AAAA;AAAA,GAElB,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { truncate, removeMarkdownFormatting } from '@drodil/backstage-plugin-qeta-common';
|
|
3
3
|
import { useRouteRef } from '@backstage/core-plugin-api';
|
|
4
4
|
import { collectionRouteRef } from '../../routes.esm.js';
|
|
5
5
|
import { makeStyles, Card, CardMedia, Box, CardContent, Typography, Grid } from '@material-ui/core';
|
|
6
6
|
import DOMPurify from 'dompurify';
|
|
7
|
-
import { useNavigate } from 'react-router-dom';
|
|
8
7
|
import { TagsAndEntities } from '../TagsAndEntities/TagsAndEntities.esm.js';
|
|
9
8
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
10
9
|
import { qetaTranslationRef } from '../../translation.esm.js';
|
|
11
10
|
import { CollectionFollowButton } from '../Buttons/CollectionFollowButton.esm.js';
|
|
11
|
+
import { ClickableLink } from '../Utility/ClickableLink.esm.js';
|
|
12
12
|
import PlaylistPlayIcon from '@material-ui/icons/PlaylistPlay';
|
|
13
13
|
import QuestionAnswerIcon from '@material-ui/icons/QuestionAnswer';
|
|
14
14
|
import PeopleIcon from '@material-ui/icons/People';
|
|
@@ -61,9 +61,8 @@ const CollectionsGridItem = (props) => {
|
|
|
61
61
|
const classes = useStyles();
|
|
62
62
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
63
63
|
const collectionRoute = useRouteRef(collectionRouteRef);
|
|
64
|
-
const navigate = useNavigate();
|
|
65
64
|
const href = collectionRoute({ id: collection.id.toString(10) });
|
|
66
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ jsx(Card, { className: classes.card, children: /* @__PURE__ */ jsxs(ClickableLink, { href, ariaLabel: collection.title, children: [
|
|
67
66
|
collection.headerImage ? /* @__PURE__ */ jsx(
|
|
68
67
|
CardMedia,
|
|
69
68
|
{
|
|
@@ -94,13 +93,12 @@ const CollectionsGridItem = (props) => {
|
|
|
94
93
|
children: [
|
|
95
94
|
/* @__PURE__ */ jsx(Typography, { gutterBottom: true, variant: "h6", component: "div", children: collection.title }),
|
|
96
95
|
/* @__PURE__ */ jsx(
|
|
97
|
-
|
|
96
|
+
Box,
|
|
98
97
|
{
|
|
99
|
-
onClick: (e) =>
|
|
100
|
-
|
|
98
|
+
onClick: (e) => {
|
|
99
|
+
e.preventDefault();
|
|
100
|
+
e.stopPropagation();
|
|
101
101
|
},
|
|
102
|
-
role: "button",
|
|
103
|
-
tabIndex: 0,
|
|
104
102
|
children: /* @__PURE__ */ jsx(CollectionFollowButton, { collection })
|
|
105
103
|
}
|
|
106
104
|
)
|
|
@@ -172,7 +170,7 @@ const CollectionsGridItem = (props) => {
|
|
|
172
170
|
]
|
|
173
171
|
}
|
|
174
172
|
)
|
|
175
|
-
] });
|
|
173
|
+
] }) });
|
|
176
174
|
};
|
|
177
175
|
|
|
178
176
|
export { CollectionsGridItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionsGridItem.esm.js","sources":["../../../src/components/CollectionsGrid/CollectionsGridItem.tsx"],"sourcesContent":["import {\n Collection,\n removeMarkdownFormatting,\n truncate,\n} from '@drodil/backstage-plugin-qeta-common';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { collectionRouteRef } from '../../routes';\nimport {\n Card,\n CardContent,\n CardMedia,\n Grid,\n Typography,\n Box,\n makeStyles,\n} from '@material-ui/core';\nimport DOMPurify from 'dompurify';\nimport { useNavigate } from 'react-router-dom';\nimport { TagsAndEntities } from '../TagsAndEntities/TagsAndEntities';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\nimport { CollectionFollowButton } from '../Buttons/CollectionFollowButton';\nimport PlaylistPlayIcon from '@material-ui/icons/PlaylistPlay';\nimport QuestionAnswerIcon from '@material-ui/icons/QuestionAnswer';\nimport PeopleIcon from '@material-ui/icons/People';\nimport LinkIcon from '@material-ui/icons/Link';\nimport DescriptionIcon from '@material-ui/icons/Description';\n\nexport interface PostsGridItemProps {\n collection: Collection;\n}\n\nconst useStyles = makeStyles(theme => ({\n placeholderImage: {\n height: 140,\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n background:\n theme.palette.type === 'dark'\n ? `linear-gradient(135deg, ${theme.palette.grey[800]} 0%, ${theme.palette.grey[900]} 100%)`\n : `linear-gradient(135deg, ${theme.palette.grey[200]} 0%, ${theme.palette.grey[300]} 100%)`,\n color: theme.palette.text.secondary,\n opacity: 0.8,\n },\n card: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n cursor: 'pointer',\n position: 'relative',\n '&:hover::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'currentColor',\n opacity: theme.palette.action.hoverOpacity || 0.04,\n borderRadius: theme.shape.borderRadius,\n pointerEvents: 'none',\n },\n },\n statsGrid: {\n marginTop: 'auto',\n },\n statItem: {\n padding: theme.spacing(1),\n borderRadius: theme.shape.borderRadius,\n width: '100%',\n height: '100%',\n justifyContent: 'center',\n },\n}));\n\nexport const CollectionsGridItem = (props: PostsGridItemProps) => {\n const { collection } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(qetaTranslationRef);\n\n const collectionRoute = useRouteRef(collectionRouteRef);\n const navigate = useNavigate();\n const href = collectionRoute({ id: collection.id.toString(10) });\n\n return (\n <Card className={classes.card} onClick={() => navigate(href)}>\n {collection.headerImage ? (\n <CardMedia\n component=\"img\"\n height=\"140\"\n onError={e => (e.currentTarget.style.display = 'none')}\n image={collection.headerImage}\n alt={collection.title}\n style={{ objectFit: 'cover' }}\n />\n ) : (\n <Box className={classes.placeholderImage}>\n <PlaylistPlayIcon style={{ fontSize: 60 }} />\n </Box>\n )}\n <CardContent\n style={{\n paddingBottom: '0.5rem',\n flexGrow: 1,\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"flex-start\"\n >\n <Typography gutterBottom variant=\"h6\" component=\"div\">\n {collection.title}\n </Typography>\n <div\n onClick={e => e.stopPropagation()}\n onKeyPress={() => {}}\n role=\"button\"\n tabIndex={0}\n >\n <CollectionFollowButton collection={collection} />\n </div>\n </Box>\n {collection.description && (\n <Typography variant=\"body2\" color=\"textSecondary\" gutterBottom>\n {DOMPurify.sanitize(\n truncate(removeMarkdownFormatting(collection.description), 200),\n )}\n </Typography>\n )}\n <Box mt={2}>\n <TagsAndEntities entity={collection} />\n </Box>\n <Grid container spacing={1} className={classes.statsGrid}>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <QuestionAnswerIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.questionsCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.questions')}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <DescriptionIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.articlesCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.articles')}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <LinkIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.linksCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.links')}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <PeopleIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.followers}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.followersPlain')}\n </Typography>\n </Box>\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgCA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,gBAAkB,EAAA;AAAA,IAChB,MAAQ,EAAA,GAAA;AAAA,IACR,KAAO,EAAA,MAAA;AAAA,IACP,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,UACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,CAAA,wBAAA,EAA2B,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,GAAG,CAAC,CAAA,KAAA,EAAQ,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,GAAG,CAAC,CAAA,MAAA,CAAA,GACjF,CAA2B,wBAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAQ,KAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA,MAAA,CAAA;AAAA,IACvF,KAA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AAAA,WACF,EAAA;AAAA;AAAA;AAAA;AACF,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"CollectionsGridItem.esm.js","sources":["../../../src/components/CollectionsGrid/CollectionsGridItem.tsx"],"sourcesContent":["import {\n Collection,\n removeMarkdownFormatting,\n truncate,\n} from '@drodil/backstage-plugin-qeta-common';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { collectionRouteRef } from '../../routes';\nimport {\n Box,\n Card,\n CardContent,\n CardMedia,\n Grid,\n makeStyles,\n Typography,\n} from '@material-ui/core';\nimport DOMPurify from 'dompurify';\nimport { TagsAndEntities } from '../TagsAndEntities/TagsAndEntities';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\nimport { CollectionFollowButton } from '../Buttons/CollectionFollowButton';\nimport { ClickableLink } from '../Utility/ClickableLink';\nimport PlaylistPlayIcon from '@material-ui/icons/PlaylistPlay';\nimport QuestionAnswerIcon from '@material-ui/icons/QuestionAnswer';\nimport PeopleIcon from '@material-ui/icons/People';\nimport LinkIcon from '@material-ui/icons/Link';\nimport DescriptionIcon from '@material-ui/icons/Description';\n\nexport interface PostsGridItemProps {\n collection: Collection;\n}\n\nconst useStyles = makeStyles(theme => ({\n placeholderImage: {\n height: 140,\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n background:\n theme.palette.type === 'dark'\n ? `linear-gradient(135deg, ${theme.palette.grey[800]} 0%, ${theme.palette.grey[900]} 100%)`\n : `linear-gradient(135deg, ${theme.palette.grey[200]} 0%, ${theme.palette.grey[300]} 100%)`,\n color: theme.palette.text.secondary,\n opacity: 0.8,\n },\n card: {\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n cursor: 'pointer',\n position: 'relative',\n '&:hover::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: 'currentColor',\n opacity: theme.palette.action.hoverOpacity || 0.04,\n borderRadius: theme.shape.borderRadius,\n pointerEvents: 'none',\n },\n },\n statsGrid: {\n marginTop: 'auto',\n },\n statItem: {\n padding: theme.spacing(1),\n borderRadius: theme.shape.borderRadius,\n width: '100%',\n height: '100%',\n justifyContent: 'center',\n },\n}));\n\nexport const CollectionsGridItem = (props: PostsGridItemProps) => {\n const { collection } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(qetaTranslationRef);\n\n const collectionRoute = useRouteRef(collectionRouteRef);\n const href = collectionRoute({ id: collection.id.toString(10) });\n\n return (\n <Card className={classes.card}>\n <ClickableLink href={href} ariaLabel={collection.title}>\n {collection.headerImage ? (\n <CardMedia\n component=\"img\"\n height=\"140\"\n onError={e => (e.currentTarget.style.display = 'none')}\n image={collection.headerImage}\n alt={collection.title}\n style={{ objectFit: 'cover' }}\n />\n ) : (\n <Box className={classes.placeholderImage}>\n <PlaylistPlayIcon style={{ fontSize: 60 }} />\n </Box>\n )}\n <CardContent\n style={{\n paddingBottom: '0.5rem',\n flexGrow: 1,\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"flex-start\"\n >\n <Typography gutterBottom variant=\"h6\" component=\"div\">\n {collection.title}\n </Typography>\n <Box\n onClick={e => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <CollectionFollowButton collection={collection} />\n </Box>\n </Box>\n {collection.description && (\n <Typography variant=\"body2\" color=\"textSecondary\" gutterBottom>\n {DOMPurify.sanitize(\n truncate(removeMarkdownFormatting(collection.description), 200),\n )}\n </Typography>\n )}\n <Box mt={2}>\n <TagsAndEntities entity={collection} />\n </Box>\n <Grid container spacing={1} className={classes.statsGrid}>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <QuestionAnswerIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.questionsCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.questions')}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <DescriptionIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.articlesCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.articles')}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <LinkIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.linksCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.links')}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={classes.statItem}\n >\n <PeopleIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {collection.followers}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('common.followersPlain')}\n </Typography>\n </Box>\n </Grid>\n </Grid>\n </CardContent>\n </ClickableLink>\n </Card>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgCA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,gBAAkB,EAAA;AAAA,IAChB,MAAQ,EAAA,GAAA;AAAA,IACR,KAAO,EAAA,MAAA;AAAA,IACP,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;AAAA,IAChB,UACE,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,MACnB,GAAA,CAAA,wBAAA,EAA2B,KAAM,CAAA,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OAAA,EAAQ,OAAQ,EAAA,KAAA,EAAO,EAAE,UAAY,EAAA,GAAA,EAC9C,EAAA,QAAA,EAAA,UAAA,CAAW,SACd,EAAA,CAAA;AAAA,kCACA,GAAA,CAAC,cAAW,OAAQ,EAAA,SAAA,EAAU,OAAM,eACjC,EAAA,QAAA,EAAA,CAAA,CAAE,uBAAuB,CAC5B,EAAA;AAAA;AAAA;AAAA,aAEJ,EAAA;AAAA,WACF,EAAA;AAAA;AAAA;AAAA;AACF,GAAA,EACF,CACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -2,7 +2,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { EntityFollowButton } from '../Buttons/EntityFollowButton.esm.js';
|
|
3
3
|
import { makeStyles, Grid, Card, Box, Avatar, Tooltip, Typography, CardContent } from '@material-ui/core';
|
|
4
4
|
import { useRouteRef } from '@backstage/core-plugin-api';
|
|
5
|
-
import { useNavigate } from 'react-router-dom';
|
|
6
5
|
import { useEntityPresentation } from '@backstage/plugin-catalog-react';
|
|
7
6
|
import { entityRouteRef } from '../../routes.esm.js';
|
|
8
7
|
import { parseEntityRef } from '@backstage/catalog-model';
|
|
@@ -13,6 +12,7 @@ import PeopleIcon from '@material-ui/icons/People';
|
|
|
13
12
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
14
13
|
import { qetaTranslationRef } from '../../translation.esm.js';
|
|
15
14
|
import useGridItemStyles from '../GridItemStyles/useGridItemStyles.esm.js';
|
|
15
|
+
import { ClickableLink } from '../Utility/ClickableLink.esm.js';
|
|
16
16
|
|
|
17
17
|
const useStyles = makeStyles((theme) => ({
|
|
18
18
|
statsGrid: {
|
|
@@ -35,99 +35,99 @@ const EntitiesGridItem = (props) => {
|
|
|
35
35
|
const classes = useGridItemStyles();
|
|
36
36
|
const localClasses = useStyles();
|
|
37
37
|
const entityRoute = useRouteRef(entityRouteRef);
|
|
38
|
-
const navigate = useNavigate();
|
|
39
38
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
40
39
|
const compound = parseEntityRef(entity.entityRef);
|
|
41
40
|
const { primaryTitle, Icon, secondaryTitle } = useEntityPresentation(compound);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
const href = entityRoute({ entityRef: entity.entityRef });
|
|
42
|
+
return /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 6, md: 6, xl: 4, children: /* @__PURE__ */ jsx(Card, { className: classes.card, children: /* @__PURE__ */ jsxs(ClickableLink, { href, ariaLabel: primaryTitle, children: [
|
|
43
|
+
/* @__PURE__ */ jsxs(
|
|
44
|
+
Box,
|
|
45
|
+
{
|
|
46
|
+
className: classes.cardHeader,
|
|
47
|
+
display: "flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
children: [
|
|
50
50
|
Icon && /* @__PURE__ */ jsx(Avatar, { style: { marginRight: 16 }, children: /* @__PURE__ */ jsx(Icon, {}) }),
|
|
51
51
|
/* @__PURE__ */ jsx(Box, { flex: 1, minWidth: 0, children: /* @__PURE__ */ jsx(Tooltip, { title: secondaryTitle ?? "", arrow: true, children: /* @__PURE__ */ jsx(Typography, { variant: "h6", noWrap: true, children: primaryTitle }) }) }),
|
|
52
|
-
/* @__PURE__ */ jsx(
|
|
53
|
-
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
Box,
|
|
54
54
|
{
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
flexShrink: 0,
|
|
56
|
+
onClick: (e) => {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
e.stopPropagation();
|
|
57
59
|
},
|
|
58
|
-
role: "button",
|
|
59
|
-
tabIndex: 0,
|
|
60
60
|
children: /* @__PURE__ */ jsx(EntityFollowButton, { entityRef: entity.entityRef })
|
|
61
61
|
}
|
|
62
|
+
)
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
CardContent,
|
|
68
|
+
{
|
|
69
|
+
className: `${classes.cardContent} ${localClasses.flexColumn}`,
|
|
70
|
+
children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, className: localClasses.statsGrid, children: [
|
|
71
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
72
|
+
Box,
|
|
73
|
+
{
|
|
74
|
+
display: "flex",
|
|
75
|
+
flexDirection: "column",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
className: localClasses.statItem,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(QuestionAnswerIcon, { fontSize: "small", color: "disabled" }),
|
|
80
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.questionsCount }),
|
|
81
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.questions", {}) })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
) }),
|
|
85
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
86
|
+
Box,
|
|
87
|
+
{
|
|
88
|
+
display: "flex",
|
|
89
|
+
flexDirection: "column",
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
className: localClasses.statItem,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsx(DescriptionIcon, { fontSize: "small", color: "disabled" }),
|
|
94
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.articlesCount }),
|
|
95
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.articles", {}) })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
) }),
|
|
99
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
100
|
+
Box,
|
|
101
|
+
{
|
|
102
|
+
display: "flex",
|
|
103
|
+
flexDirection: "column",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
className: localClasses.statItem,
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ jsx(LinkIcon, { fontSize: "small", color: "disabled" }),
|
|
108
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.linksCount }),
|
|
109
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.links", {}) })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
) }),
|
|
113
|
+
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
114
|
+
Box,
|
|
115
|
+
{
|
|
116
|
+
display: "flex",
|
|
117
|
+
flexDirection: "column",
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
className: localClasses.statItem,
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ jsx(PeopleIcon, { fontSize: "small", color: "disabled" }),
|
|
122
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.followerCount }),
|
|
123
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.followers", {}) })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
62
126
|
) })
|
|
63
|
-
] })
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
className: `${classes.cardContent} ${localClasses.flexColumn}`,
|
|
68
|
-
children: /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 1, className: localClasses.statsGrid, children: [
|
|
69
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
70
|
-
Box,
|
|
71
|
-
{
|
|
72
|
-
display: "flex",
|
|
73
|
-
flexDirection: "column",
|
|
74
|
-
alignItems: "center",
|
|
75
|
-
className: localClasses.statItem,
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ jsx(QuestionAnswerIcon, { fontSize: "small", color: "disabled" }),
|
|
78
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.questionsCount }),
|
|
79
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.questions", {}) })
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
) }),
|
|
83
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
84
|
-
Box,
|
|
85
|
-
{
|
|
86
|
-
display: "flex",
|
|
87
|
-
flexDirection: "column",
|
|
88
|
-
alignItems: "center",
|
|
89
|
-
className: localClasses.statItem,
|
|
90
|
-
children: [
|
|
91
|
-
/* @__PURE__ */ jsx(DescriptionIcon, { fontSize: "small", color: "disabled" }),
|
|
92
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.articlesCount }),
|
|
93
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.articles", {}) })
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
) }),
|
|
97
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
98
|
-
Box,
|
|
99
|
-
{
|
|
100
|
-
display: "flex",
|
|
101
|
-
flexDirection: "column",
|
|
102
|
-
alignItems: "center",
|
|
103
|
-
className: localClasses.statItem,
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ jsx(LinkIcon, { fontSize: "small", color: "disabled" }),
|
|
106
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.linksCount }),
|
|
107
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.links", {}) })
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
) }),
|
|
111
|
-
/* @__PURE__ */ jsx(Grid, { item: true, xs: 3, children: /* @__PURE__ */ jsxs(
|
|
112
|
-
Box,
|
|
113
|
-
{
|
|
114
|
-
display: "flex",
|
|
115
|
-
flexDirection: "column",
|
|
116
|
-
alignItems: "center",
|
|
117
|
-
className: localClasses.statItem,
|
|
118
|
-
children: [
|
|
119
|
-
/* @__PURE__ */ jsx(PeopleIcon, { fontSize: "small", color: "disabled" }),
|
|
120
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", style: { fontWeight: 600 }, children: entity.followerCount }),
|
|
121
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "textSecondary", children: t("stats.followers", {}) })
|
|
122
|
-
]
|
|
123
|
-
}
|
|
124
|
-
) })
|
|
125
|
-
] })
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
) });
|
|
127
|
+
] })
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] }) }) });
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
export { EntitiesGridItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntitiesGridItem.esm.js","sources":["../../../src/components/EntitiesGrid/EntitiesGridItem.tsx"],"sourcesContent":["import { EntityResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { EntityFollowButton } from '../Buttons/EntityFollowButton';\nimport {\n Avatar,\n Card,\n CardContent,\n Grid,\n Tooltip,\n Typography,\n Box,\n makeStyles,\n} from '@material-ui/core';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { useNavigate } from 'react-router-dom';\nimport { useEntityPresentation } from '@backstage/plugin-catalog-react';\nimport { entityRouteRef } from '../../routes';\nimport { parseEntityRef } from '@backstage/catalog-model';\n\nimport LinkIcon from '@material-ui/icons/Link';\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport QuestionAnswerIcon from '@material-ui/icons/QuestionAnswer';\nimport PeopleIcon from '@material-ui/icons/People';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\nimport useGridItemStyles from '../GridItemStyles/useGridItemStyles';\n\nconst useStyles = makeStyles(theme => ({\n statsGrid: {\n marginTop: 'auto',\n },\n statItem: {\n padding: theme.spacing(1),\n borderRadius: theme.shape.borderRadius,\n width: '100%',\n height: '100%',\n justifyContent: 'center',\n },\n flexColumn: {\n display: 'flex',\n flexDirection: 'column',\n },\n}));\n\nexport const EntitiesGridItem = (props: { entity: EntityResponse }) => {\n const { entity } = props;\n const classes = useGridItemStyles();\n const localClasses = useStyles();\n const entityRoute = useRouteRef(entityRouteRef);\n const navigate = useNavigate();\n const { t } = useTranslationRef(qetaTranslationRef);\n const compound = parseEntityRef(entity.entityRef);\n const { primaryTitle, Icon, secondaryTitle } =\n useEntityPresentation(compound);\n\n return (\n <Grid item xs={12} sm={6} md={6} xl={4}>\n <Card\n className={classes.card}\n style={{ cursor: 'pointer' }}\n onClick={() => navigate(entityRoute({ entityRef: entity.entityRef }))}\n >\n <Box className={classes.cardHeader} display=\"flex\" alignItems=\"center\">\n {Icon && (\n <Avatar style={{ marginRight: 16 }}>\n <Icon />\n </Avatar>\n )}\n <Box flex={1} minWidth={0}>\n <Tooltip title={secondaryTitle ?? ''} arrow>\n <Typography variant=\"h6\" noWrap>\n {primaryTitle}\n </Typography>\n </Tooltip>\n </Box>\n <Box flexShrink={0}>\n <div\n onClick={e => e.stopPropagation()}\n onKeyPress={() => {}}\n role=\"button\"\n tabIndex={0}\n >\n <EntityFollowButton entityRef={entity.entityRef} />\n </div>\n </Box>\n </Box>\n <CardContent\n className={`${classes.cardContent} ${localClasses.flexColumn}`}\n >\n <Grid container spacing={1} className={localClasses.statsGrid}>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <QuestionAnswerIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.questionsCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.questions', {})}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <DescriptionIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.articlesCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.articles', {})}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <LinkIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.linksCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.links', {})}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <PeopleIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.followerCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.followers', {})}\n </Typography>\n </Box>\n </Grid>\n </Grid>\n </CardContent>\n </Card>\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,SAAW,EAAA;AAAA,IACT,SAAW,EAAA;AAAA,GACb;AAAA,EACA,QAAU,EAAA;AAAA,IACR,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,YAAA,EAAc,MAAM,KAAM,CAAA,YAAA;AAAA,IAC1B,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,IACR,cAAgB,EAAA;AAAA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,UAAY,EAAA,GAAA,EAC9C,EAAA,QAAA,EAAA,MAAA,CAAO,aACV,EAAA,CAAA;AAAA,oCACA,GAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,SAAU,EAAA,KAAA,EAAM,iBACjC,QAAE,EAAA,CAAA,CAAA,iBAAA,EAAmB,EAAE,CAC1B,EAAA;AAAA;AAAA;AAAA,eAEJ,EAAA;AAAA,aACF,EAAA;AAAA;AAAA;AACF;AAAA;AAAA,GAEJ,EAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"EntitiesGridItem.esm.js","sources":["../../../src/components/EntitiesGrid/EntitiesGridItem.tsx"],"sourcesContent":["import { EntityResponse } from '@drodil/backstage-plugin-qeta-common';\nimport { EntityFollowButton } from '../Buttons/EntityFollowButton';\nimport {\n Avatar,\n Box,\n Card,\n CardContent,\n Grid,\n makeStyles,\n Tooltip,\n Typography,\n} from '@material-ui/core';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { useEntityPresentation } from '@backstage/plugin-catalog-react';\nimport { entityRouteRef } from '../../routes';\nimport { parseEntityRef } from '@backstage/catalog-model';\n\nimport LinkIcon from '@material-ui/icons/Link';\nimport DescriptionIcon from '@material-ui/icons/Description';\nimport QuestionAnswerIcon from '@material-ui/icons/QuestionAnswer';\nimport PeopleIcon from '@material-ui/icons/People';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation.ts';\nimport useGridItemStyles from '../GridItemStyles/useGridItemStyles';\nimport { ClickableLink } from '../Utility/ClickableLink';\n\nconst useStyles = makeStyles(theme => ({\n statsGrid: {\n marginTop: 'auto',\n },\n statItem: {\n padding: theme.spacing(1),\n borderRadius: theme.shape.borderRadius,\n width: '100%',\n height: '100%',\n justifyContent: 'center',\n },\n flexColumn: {\n display: 'flex',\n flexDirection: 'column',\n },\n}));\n\nexport const EntitiesGridItem = (props: { entity: EntityResponse }) => {\n const { entity } = props;\n const classes = useGridItemStyles();\n const localClasses = useStyles();\n const entityRoute = useRouteRef(entityRouteRef);\n const { t } = useTranslationRef(qetaTranslationRef);\n const compound = parseEntityRef(entity.entityRef);\n const { primaryTitle, Icon, secondaryTitle } =\n useEntityPresentation(compound);\n\n const href = entityRoute({ entityRef: entity.entityRef });\n\n return (\n <Grid item xs={12} sm={6} md={6} xl={4}>\n <Card className={classes.card}>\n <ClickableLink href={href} ariaLabel={primaryTitle}>\n <Box\n className={classes.cardHeader}\n display=\"flex\"\n alignItems=\"center\"\n >\n {Icon && (\n <Avatar style={{ marginRight: 16 }}>\n <Icon />\n </Avatar>\n )}\n <Box flex={1} minWidth={0}>\n <Tooltip title={secondaryTitle ?? ''} arrow>\n <Typography variant=\"h6\" noWrap>\n {primaryTitle}\n </Typography>\n </Tooltip>\n </Box>\n <Box\n flexShrink={0}\n onClick={e => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <EntityFollowButton entityRef={entity.entityRef} />\n </Box>\n </Box>\n <CardContent\n className={`${classes.cardContent} ${localClasses.flexColumn}`}\n >\n <Grid container spacing={1} className={localClasses.statsGrid}>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <QuestionAnswerIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.questionsCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.questions', {})}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <DescriptionIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.articlesCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.articles', {})}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <LinkIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.linksCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.links', {})}\n </Typography>\n </Box>\n </Grid>\n <Grid item xs={3}>\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n className={localClasses.statItem}\n >\n <PeopleIcon fontSize=\"small\" color=\"disabled\" />\n <Typography variant=\"body2\" style={{ fontWeight: 600 }}>\n {entity.followerCount}\n </Typography>\n <Typography variant=\"caption\" color=\"textSecondary\">\n {t('stats.followers', {})}\n </Typography>\n </Box>\n </Grid>\n </Grid>\n </CardContent>\n </ClickableLink>\n </Card>\n </Grid>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA0BA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,SAAW,EAAA;AAAA,IACT,SAAW,EAAA;AAAA,GACb;AAAA,EACA,QAAU,EAAA;AAAA,IACR,OAAA,EAAS,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IACxB,YAAA,EAAc,MAAM,KAAM,CAAA,YAAA;AAAA,IAC1B,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,IACR,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA;AAAA;AAEnB,CAAE,CAAA,CAAA;AAEW,MAAA,gBAAA,GAAmB,CAAC,KAAsC,KAAA;AACrE,EAAM,MAAA,EAAE,QAAW,GAAA,KAAA;AACnB,EAAA,MAAM,UAAU,iBAAkB,EAAA;AAClC,EAAA,MAAM,eAAe,SAAU,EAAA;AAC/B,EAAM,MAAA,WAAA,GAAc,YAAY,cAAc,CAAA;AAC9C,EAAA,MAAM,EAAE,CAA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EAC9C,EAAA,QAAA,EAAA,MAAA,CAAO,UACV,EAAA,CAAA;AAAA,gCACA,GAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,SAAU,EAAA,KAAA,EAAM,iBACjC,QAAE,EAAA,CAAA,CAAA,aAAA,EAAe,EAAE,CACtB,EAAA;AAAA;AAAA;AAAA,WAEJ,EAAA,CAAA;AAAA,0BACC,GAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,IAAI,CACb,EAAA,QAAA,kBAAA,IAAA;AAAA,YAAC,GAAA;AAAA,YAAA;AAAA,cACC,OAAQ,EAAA,MAAA;AAAA,cACR,aAAc,EAAA,QAAA;AAAA,cACd,UAAW,EAAA,QAAA;AAAA,cACX,WAAW,YAAa,CAAA,QAAA;AAAA,cAExB,QAAA,EAAA;AAAA,gCAAA,GAAA,CAAC,UAAW,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,KAAA,EAAM,UAAW,EAAA,CAAA;AAAA,gCAC9C,GAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,OAAQ,EAAA,KAAA,EAAO,EAAE,UAAY,EAAA,GAAA,EAC9C,EAAA,QAAA,EAAA,MAAA,CAAO,aACV,EAAA,CAAA;AAAA,gCACA,GAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,SAAU,EAAA,KAAA,EAAM,iBACjC,QAAE,EAAA,CAAA,CAAA,iBAAA,EAAmB,EAAE,CAC1B,EAAA;AAAA;AAAA;AAAA,WAEJ,EAAA;AAAA,SACF,EAAA;AAAA;AAAA;AACF,GAAA,EACF,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -5,7 +5,7 @@ import { useCollectionsFollow } from '../../hooks/useCollectionsFollow.esm.js';
|
|
|
5
5
|
import { RightListContainer, RightList } from '../Utility/RightList.esm.js';
|
|
6
6
|
import { makeStyles, ListItem, Box, Tooltip, ListItemText } from '@material-ui/core';
|
|
7
7
|
import PlaylistPlayOutlined from '@material-ui/icons/PlaylistPlayOutlined';
|
|
8
|
-
import {
|
|
8
|
+
import { Link } from 'react-router-dom';
|
|
9
9
|
import { collectionRouteRef } from '../../routes.esm.js';
|
|
10
10
|
import { useRouteRef } from '@backstage/core-plugin-api';
|
|
11
11
|
|
|
@@ -17,6 +17,8 @@ const useStyles = makeStyles((theme) => ({
|
|
|
17
17
|
minHeight: 28,
|
|
18
18
|
cursor: "pointer",
|
|
19
19
|
transition: "background 0.2s",
|
|
20
|
+
textDecoration: "none",
|
|
21
|
+
color: "inherit",
|
|
20
22
|
"&:hover": {
|
|
21
23
|
background: theme.palette.action.hover
|
|
22
24
|
}
|
|
@@ -45,31 +47,34 @@ const FollowedCollectionsList = () => {
|
|
|
45
47
|
const collections = useCollectionsFollow();
|
|
46
48
|
const { t } = useTranslationRef(qetaTranslationRef);
|
|
47
49
|
const classes = useStyles();
|
|
48
|
-
const navigate = useNavigate();
|
|
49
50
|
const collectionRoute = useRouteRef(collectionRouteRef);
|
|
50
51
|
if (collections.collections.length === 0 || collections.loading) {
|
|
51
52
|
return null;
|
|
52
53
|
}
|
|
53
|
-
return /* @__PURE__ */ jsx(RightListContainer, { children: /* @__PURE__ */ jsx(RightList, { title: t("rightMenu.followedCollections"), children: collections.collections.map((collection) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
return /* @__PURE__ */ jsx(RightListContainer, { children: /* @__PURE__ */ jsx(RightList, { title: t("rightMenu.followedCollections"), children: collections.collections.map((collection) => {
|
|
55
|
+
const href = collectionRoute({ id: collection.id.toString(10) });
|
|
56
|
+
return /* @__PURE__ */ jsxs(
|
|
57
|
+
ListItem,
|
|
58
|
+
{
|
|
59
|
+
dense: true,
|
|
60
|
+
button: true,
|
|
61
|
+
className: classes.listItem,
|
|
62
|
+
component: Link,
|
|
63
|
+
to: href,
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Box, { className: classes.iconBox, children: /* @__PURE__ */ jsx(PlaylistPlayOutlined, { fontSize: "small" }) }),
|
|
66
|
+
/* @__PURE__ */ jsx(Tooltip, { title: collection.title, arrow: true, children: /* @__PURE__ */ jsx(
|
|
67
|
+
ListItemText,
|
|
68
|
+
{
|
|
69
|
+
primary: collection.title,
|
|
70
|
+
classes: { primary: classes.listItemText }
|
|
71
|
+
}
|
|
72
|
+
) })
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
collection.id
|
|
76
|
+
);
|
|
77
|
+
}) }) });
|
|
73
78
|
};
|
|
74
79
|
|
|
75
80
|
export { FollowedCollectionsList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowedCollectionsList.esm.js","sources":["../../../src/components/FollowedLists/FollowedCollectionsList.tsx"],"sourcesContent":["import { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation';\nimport { useCollectionsFollow } from '../../hooks/useCollectionsFollow';\nimport { RightList, RightListContainer } from '../Utility/RightList';\nimport {\n Box,\n ListItem,\n ListItemText,\n makeStyles,\n Tooltip,\n} from '@material-ui/core';\nimport PlaylistPlayOutlined from '@material-ui/icons/PlaylistPlayOutlined';\nimport {
|
|
1
|
+
{"version":3,"file":"FollowedCollectionsList.esm.js","sources":["../../../src/components/FollowedLists/FollowedCollectionsList.tsx"],"sourcesContent":["import { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation';\nimport { useCollectionsFollow } from '../../hooks/useCollectionsFollow';\nimport { RightList, RightListContainer } from '../Utility/RightList';\nimport {\n Box,\n ListItem,\n ListItemText,\n makeStyles,\n Tooltip,\n} from '@material-ui/core';\nimport PlaylistPlayOutlined from '@material-ui/icons/PlaylistPlayOutlined';\nimport { Link } from 'react-router-dom';\nimport { collectionRouteRef } from '../../routes';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles(theme => ({\n listItem: {\n display: 'flex',\n alignItems: 'center',\n padding: '0 4px',\n minHeight: 28,\n cursor: 'pointer',\n transition: 'background 0.2s',\n textDecoration: 'none',\n color: 'inherit',\n '&:hover': {\n background: theme.palette.action.hover,\n },\n },\n listItemText: {\n color: theme.palette.text.primary,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n flex: 1,\n },\n iconBox: {\n minWidth: 28,\n maxWidth: 28,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 4,\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(0.5),\n color: theme.palette.text.secondary,\n },\n}));\n\nexport const FollowedCollectionsList = () => {\n const collections = useCollectionsFollow();\n const { t } = useTranslationRef(qetaTranslationRef);\n const classes = useStyles();\n const collectionRoute = useRouteRef(collectionRouteRef);\n\n if (collections.collections.length === 0 || collections.loading) {\n return null;\n }\n\n return (\n <RightListContainer>\n <RightList title={t('rightMenu.followedCollections')}>\n {collections.collections.map(collection => {\n const href = collectionRoute({ id: collection.id.toString(10) });\n return (\n <ListItem\n key={collection.id}\n dense\n button\n className={classes.listItem}\n component={Link}\n to={href}\n >\n <Box className={classes.iconBox}>\n <PlaylistPlayOutlined fontSize=\"small\" />\n </Box>\n <Tooltip title={collection.title} arrow>\n <ListItemText\n primary={collection.title}\n classes={{ primary: classes.listItemText }}\n />\n </Tooltip>\n </ListItem>\n );\n })}\n </RightList>\n </RightListContainer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAgBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,QAAU,EAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,OAA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AAA;AAC/D,IAAO,OAAA,IAAA;AAAA;AAGT,EACE,uBAAA,GAAA,CAAC,kBACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,SAAU,EAAA,EAAA,KAAA,EAAO,CAAE,CAAA,+BAA+B,CAChD,EAAA,QAAA,EAAA,WAAA,CAAY,WAAY,CAAA,GAAA,CAAI,CAAc,UAAA,KAAA;AACzC,IAAM,MAAA,IAAA,GAAO,gBAAgB,EAAE,EAAA,EAAI,WAAW,EAAG,CAAA,QAAA,CAAS,EAAE,CAAA,EAAG,CAAA;AAC/D,IACE,uBAAA,IAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QAEC,KAAK,EAAA,IAAA;AAAA,QACL,MAAM,EAAA,IAAA;AAAA,QACN,WAAW,OAAQ,CAAA,QAAA;AAAA,QACnB,SAAW,EAAA,IAAA;AAAA,QACX,EAAI,EAAA,IAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAC,GAAA,CAAA,GAAA,EAAA,EAAI,WAAW,OAAQ,CAAA,OAAA,EACtB,8BAAC,oBAAqB,EAAA,EAAA,QAAA,EAAS,SAAQ,CACzC,EAAA,CAAA;AAAA,8BACC,OAAQ,EAAA,EAAA,KAAA,EAAO,UAAW,CAAA,KAAA,EAAO,OAAK,IACrC,EAAA,QAAA,kBAAA,GAAA;AAAA,YAAC,YAAA;AAAA,YAAA;AAAA,cACC,SAAS,UAAW,CAAA,KAAA;AAAA,cACpB,OAAS,EAAA,EAAE,OAAS,EAAA,OAAA,CAAQ,YAAa;AAAA;AAAA,WAE7C,EAAA;AAAA;AAAA,OAAA;AAAA,MAfK,UAAW,CAAA;AAAA,KAgBlB;AAAA,GAEH,GACH,CACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -15,7 +15,7 @@ import '@drodil/backstage-plugin-qeta-common';
|
|
|
15
15
|
import '@backstage/plugin-permission-common';
|
|
16
16
|
import { RightListContainer, RightList } from '../Utility/RightList.esm.js';
|
|
17
17
|
import { makeStyles, ListItem, Box, Tooltip, ListItemText } from '@material-ui/core';
|
|
18
|
-
import {
|
|
18
|
+
import { Link } from 'react-router-dom';
|
|
19
19
|
import { entityRouteRef } from '../../routes.esm.js';
|
|
20
20
|
|
|
21
21
|
const useStyles = makeStyles((theme) => ({
|
|
@@ -26,6 +26,8 @@ const useStyles = makeStyles((theme) => ({
|
|
|
26
26
|
minHeight: 28,
|
|
27
27
|
cursor: "pointer",
|
|
28
28
|
transition: "background 0.2s",
|
|
29
|
+
textDecoration: "none",
|
|
30
|
+
color: "inherit",
|
|
29
31
|
"&:hover": {
|
|
30
32
|
background: theme.palette.action.hover
|
|
31
33
|
}
|
|
@@ -52,16 +54,17 @@ const useStyles = makeStyles((theme) => ({
|
|
|
52
54
|
}));
|
|
53
55
|
const FollowedEntityItem = ({ entityRef }) => {
|
|
54
56
|
const classes = useStyles();
|
|
55
|
-
const navigate = useNavigate();
|
|
56
57
|
const entityRoute = useRouteRef(entityRouteRef);
|
|
57
58
|
const { primaryTitle, Icon } = useEntityPresentation(entityRef);
|
|
59
|
+
const href = entityRoute({ entityRef });
|
|
58
60
|
return /* @__PURE__ */ jsxs(
|
|
59
61
|
ListItem,
|
|
60
62
|
{
|
|
61
63
|
dense: true,
|
|
62
64
|
button: true,
|
|
63
65
|
className: classes.listItem,
|
|
64
|
-
|
|
66
|
+
component: Link,
|
|
67
|
+
to: href,
|
|
65
68
|
children: [
|
|
66
69
|
/* @__PURE__ */ jsx(Box, { className: classes.iconBox, children: Icon ? /* @__PURE__ */ jsx(Icon, { fontSize: "small" }) : null }),
|
|
67
70
|
/* @__PURE__ */ jsx(Tooltip, { title: primaryTitle ?? entityRef, arrow: true, children: /* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowedEntitiesList.esm.js","sources":["../../../src/components/FollowedLists/FollowedEntitiesList.tsx"],"sourcesContent":["import { useEntityFollow } from '../../hooks';\nimport { RightList, RightListContainer } from '../Utility/RightList';\nimport {\n Box,\n ListItem,\n ListItemText,\n makeStyles,\n Tooltip,\n} from '@material-ui/core';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation';\nimport {
|
|
1
|
+
{"version":3,"file":"FollowedEntitiesList.esm.js","sources":["../../../src/components/FollowedLists/FollowedEntitiesList.tsx"],"sourcesContent":["import { useEntityFollow } from '../../hooks';\nimport { RightList, RightListContainer } from '../Utility/RightList';\nimport {\n Box,\n ListItem,\n ListItemText,\n makeStyles,\n Tooltip,\n} from '@material-ui/core';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { qetaTranslationRef } from '../../translation';\nimport { Link } from 'react-router-dom';\nimport { entityRouteRef } from '../../routes';\nimport { useRouteRef } from '@backstage/core-plugin-api';\nimport { useEntityPresentation } from '@backstage/plugin-catalog-react';\n\nconst useStyles = makeStyles(theme => ({\n listItem: {\n display: 'flex',\n alignItems: 'center',\n padding: '0 4px',\n minHeight: 28,\n cursor: 'pointer',\n transition: 'background 0.2s',\n textDecoration: 'none',\n color: 'inherit',\n '&:hover': {\n background: theme.palette.action.hover,\n },\n },\n listItemText: {\n color: theme.palette.text.primary,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n flex: 1,\n },\n iconBox: {\n minWidth: 28,\n maxWidth: 28,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: 4,\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(0.5),\n color: theme.palette.text.secondary,\n },\n}));\n\nconst FollowedEntityItem = ({ entityRef }: { entityRef: string }) => {\n const classes = useStyles();\n const entityRoute = useRouteRef(entityRouteRef);\n const { primaryTitle, Icon } = useEntityPresentation(entityRef);\n const href = entityRoute({ entityRef: entityRef });\n\n return (\n <ListItem\n dense\n button\n className={classes.listItem}\n component={Link}\n to={href}\n >\n <Box className={classes.iconBox}>\n {Icon ? <Icon fontSize=\"small\" /> : null}\n </Box>\n <Tooltip title={primaryTitle ?? entityRef} arrow>\n <ListItemText\n primary={primaryTitle ?? entityRef}\n classes={{ primary: classes.listItemText }}\n />\n </Tooltip>\n </ListItem>\n );\n};\n\nexport const FollowedEntitiesList = () => {\n const entities = useEntityFollow();\n const { t } = useTranslationRef(qetaTranslationRef);\n\n if (entities.entities.length === 0 || entities.loading) {\n return null;\n }\n\n return (\n <RightListContainer>\n <RightList title={t('rightMenu.followedEntities')}>\n {entities.entities.map(entity => (\n <FollowedEntityItem key={entity} entityRef={entity} />\n ))}\n </RightList>\n </RightListContainer>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,QAAU,EAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,OAAS,EAAA,OAAA;AAAA,IACT,SAAW,EAAA,EAAA;AAAA,IACX,MAAQ,EAAA,SAAA;AAAA,IACR,UAAY,EAAA,iBAAA;AAAA,IACZ,cAAgB,EAAA,MAAA;AAAA,IAChB,KAAO,EAAA,SAAA;AAAA,IACP,SAAW,EAAA;AAAA,MACT,UAAA,EAAY,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA;AAAA;AACnC,GACF;AAAA,EACA,YAAc,EAAA;AAAA,IACZ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,IAC1B,UAAY,EAAA,QAAA;AAAA,IACZ,QAAU,EAAA,QAAA;AAAA,IACV,YAAc,EAAA,UAAA;AAAA,IACd,IAAM,EAAA;AAAA,GACR;AAAA,EACA,OAAS,EAAA;AAAA,IACP,QAAU,EAAA,EAAA;AAAA,IACV,QAAU,EAAA,EAAA;AAAA,IACV,MAAQ,EAAA,EAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,UAAY,EAAA,QAAA;AAAA,IACZ,cAAgB,EAAA,QAAA;A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