@backstage-community/plugin-explore 0.4.21 → 0.4.22
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/CHANGELOG.md +6 -0
- package/alpha/package.json +1 -1
- package/dist/esm/{GroupsExplorerContent-D_QfaGTY.esm.js → GroupsExplorerContent-Bu5wonf0.esm.js} +14 -6
- package/dist/esm/GroupsExplorerContent-Bu5wonf0.esm.js.map +1 -0
- package/dist/esm/{ToolExplorerContent-DzMkzhod.esm.js → ToolExplorerContent-CCRyp1D9.esm.js} +2 -2
- package/dist/esm/{ToolExplorerContent-DzMkzhod.esm.js.map → ToolExplorerContent-CCRyp1D9.esm.js.map} +1 -1
- package/dist/esm/{index-B_Dn9qT_.esm.js → index-CUGqDIUp.esm.js} +2 -2
- package/dist/esm/index-CUGqDIUp.esm.js.map +1 -0
- package/dist/esm/{index-DBoY59Wh.esm.js → index-ClTQZXUz.esm.js} +2 -2
- package/dist/esm/{index-DBoY59Wh.esm.js.map → index-ClTQZXUz.esm.js.map} +1 -1
- package/dist/esm/{index-DVlrZV4C.esm.js → index-DTJNDJLS.esm.js} +3 -3
- package/dist/esm/index-DTJNDJLS.esm.js.map +1 -0
- package/dist/esm/{index-CeOO34TY.esm.js → index-Dd6ngd_t.esm.js} +4 -4
- package/dist/esm/{index-CeOO34TY.esm.js.map → index-Dd6ngd_t.esm.js.map} +1 -1
- package/dist/esm/{index-DrIeHaZd.esm.js → index-WGpyPF9K.esm.js} +5 -5
- package/dist/esm/{index-DrIeHaZd.esm.js.map → index-WGpyPF9K.esm.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm/GroupsExplorerContent-D_QfaGTY.esm.js.map +0 -1
- package/dist/esm/index-B_Dn9qT_.esm.js.map +0 -1
- package/dist/esm/index-DVlrZV4C.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
package/alpha/package.json
CHANGED
package/dist/esm/{GroupsExplorerContent-D_QfaGTY.esm.js → GroupsExplorerContent-Bu5wonf0.esm.js}
RENAMED
|
@@ -143,15 +143,17 @@ function GroupsDiagram(props) {
|
|
|
143
143
|
});
|
|
144
144
|
for (const catalogItem of (catalogResponse == null ? void 0 : catalogResponse.items) || []) {
|
|
145
145
|
const currentItemId = stringifyEntityRef(catalogItem);
|
|
146
|
+
const catalogItemRelations_childOf = getEntityRelations(
|
|
147
|
+
catalogItem,
|
|
148
|
+
RELATION_CHILD_OF
|
|
149
|
+
);
|
|
150
|
+
if (props.hideChildren && catalogItemRelations_childOf.length)
|
|
151
|
+
continue;
|
|
146
152
|
nodes.push({
|
|
147
153
|
id: stringifyEntityRef(catalogItem),
|
|
148
154
|
kind: catalogItem.kind,
|
|
149
155
|
name: ""
|
|
150
156
|
});
|
|
151
|
-
const catalogItemRelations_childOf = getEntityRelations(
|
|
152
|
-
catalogItem,
|
|
153
|
-
RELATION_CHILD_OF
|
|
154
|
-
);
|
|
155
157
|
if (catalogItemRelations_childOf.length === 0) {
|
|
156
158
|
edges.push({
|
|
157
159
|
from: currentItemId,
|
|
@@ -204,8 +206,14 @@ const useStyles = makeStyles(
|
|
|
204
206
|
const GroupsExplorerContent = (props) => {
|
|
205
207
|
var _a;
|
|
206
208
|
const classes = useStyles();
|
|
207
|
-
return /* @__PURE__ */ React.createElement(Content, { noPadding: true, stretch: true, className: classes.root }, /* @__PURE__ */ React.createElement(ContentHeader, { title: (_a = props.title) != null ? _a : "Groups" }, /* @__PURE__ */ React.createElement(SupportButton, null, "Explore your groups.")), /* @__PURE__ */ React.createElement(
|
|
209
|
+
return /* @__PURE__ */ React.createElement(Content, { noPadding: true, stretch: true, className: classes.root }, /* @__PURE__ */ React.createElement(ContentHeader, { title: (_a = props.title) != null ? _a : "Groups" }, /* @__PURE__ */ React.createElement(SupportButton, null, "Explore your groups.")), /* @__PURE__ */ React.createElement(
|
|
210
|
+
GroupsDiagram,
|
|
211
|
+
{
|
|
212
|
+
direction: props.direction,
|
|
213
|
+
hideChildren: props.hideChildren
|
|
214
|
+
}
|
|
215
|
+
));
|
|
208
216
|
};
|
|
209
217
|
|
|
210
218
|
export { GroupsExplorerContent as G };
|
|
211
|
-
//# sourceMappingURL=GroupsExplorerContent-
|
|
219
|
+
//# sourceMappingURL=GroupsExplorerContent-Bu5wonf0.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupsExplorerContent-Bu5wonf0.esm.js","sources":["../../src/components/GroupsExplorerContent/GroupsDiagram.tsx","../../src/components/GroupsExplorerContent/GroupsExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n parseEntityRef,\n RELATION_CHILD_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n DependencyGraph,\n DependencyGraphTypes,\n Link,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n entityRouteRef,\n getEntityRelations,\n EntityDisplayName,\n} from '@backstage/plugin-catalog-react';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport ZoomOutMap from '@material-ui/icons/ZoomOutMap';\nimport classNames from 'classnames';\nimport React from 'react';\nimport useAsync from 'react-use/esm/useAsync';\n\nconst useStyles = makeStyles(\n theme => ({\n graph: {\n minHeight: '100%',\n flex: 1,\n },\n graphWrapper: {\n display: 'flex',\n height: '100%',\n },\n organizationNode: {\n fill: theme.palette.secondary.light,\n stroke: theme.palette.secondary.light,\n },\n groupNode: {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n centeredContent: {\n padding: theme.spacing(1),\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: theme.palette.common.black,\n },\n legend: {\n position: 'absolute',\n bottom: 0,\n right: 0,\n padding: theme.spacing(1),\n '& .icon': {\n verticalAlign: 'bottom',\n },\n },\n textOrganization: {\n color: theme.palette.secondary.contrastText,\n },\n textGroup: {\n color: theme.palette.primary.contrastText,\n },\n textWrapper: {\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textAlign: 'center',\n fontWeight: 'bold',\n fontSize: '20px',\n },\n }),\n {\n name: 'ExploreGroupsDiagram',\n },\n);\n\nfunction RenderNode(props: DependencyGraphTypes.RenderNodeProps<any>) {\n const nodeWidth = 180;\n const nodeHeight = 60;\n const theme = useTheme();\n const classes = useStyles();\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n\n if (props.node.id === 'root') {\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.organizationNode}\n />\n <title>{props.node.name}</title>\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div\n className={classNames(\n classes.textWrapper,\n classes.textOrganization,\n )}\n >\n {props.node.name}\n </div>\n </div>\n </foreignObject>\n </g>\n );\n }\n\n const ref = parseEntityRef(props.node.id);\n\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.groupNode}\n />\n <title>\n <EntityDisplayName entityRef={props.node.id} hideIcon disableTooltip />\n </title>\n\n <Link\n to={catalogEntityRoute({\n kind: ref.kind,\n namespace: ref.namespace,\n name: ref.name,\n })}\n >\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div className={classNames(classes.textWrapper, classes.textGroup)}>\n <EntityDisplayName entityRef={props.node.id} hideIcon />\n </div>\n </div>\n </foreignObject>\n </Link>\n </g>\n );\n}\n\n/**\n * Dynamically generates a diagram of groups registered in the catalog.\n */\nexport function GroupsDiagram(props: {\n direction?: DependencyGraphTypes.Direction;\n hideChildren?: boolean;\n}) {\n const nodes = new Array<{\n id: string;\n kind: string;\n name: string;\n }>();\n const edges = new Array<{ from: string; to: string; label: string }>();\n\n const classes = useStyles();\n const configApi = useApi(configApiRef);\n const catalogApi = useApi(catalogApiRef);\n const organizationName =\n configApi.getOptionalString('organization.name') ?? 'Backstage';\n const {\n loading,\n error,\n value: catalogResponse,\n } = useAsync(() => {\n return catalogApi.getEntities({\n filter: {\n kind: ['Group'],\n },\n });\n }, [catalogApi]);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n // the root of this diagram is the organization\n nodes.push({\n id: 'root',\n kind: 'Organization',\n name: organizationName,\n });\n\n for (const catalogItem of catalogResponse?.items || []) {\n const currentItemId = stringifyEntityRef(catalogItem);\n\n // Edge to parent\n const catalogItemRelations_childOf = getEntityRelations(\n catalogItem,\n RELATION_CHILD_OF,\n );\n\n if (props.hideChildren && catalogItemRelations_childOf.length) continue;\n\n nodes.push({\n id: stringifyEntityRef(catalogItem),\n kind: catalogItem.kind,\n name: '',\n });\n\n // if no parent is found, link the node to the root\n if (catalogItemRelations_childOf.length === 0) {\n edges.push({\n from: currentItemId,\n to: 'root',\n label: '',\n });\n }\n\n catalogItemRelations_childOf.forEach(relation => {\n edges.push({\n from: currentItemId,\n to: stringifyEntityRef(relation),\n label: '',\n });\n });\n }\n\n return (\n <div className={classes.graphWrapper}>\n <DependencyGraph\n nodes={nodes}\n edges={edges}\n nodeMargin={10}\n direction={props.direction || DependencyGraphTypes.Direction.RIGHT_LEFT}\n renderNode={RenderNode}\n className={classes.graph}\n fit=\"contain\"\n />\n\n <Typography\n variant=\"caption\"\n color=\"textSecondary\"\n display=\"block\"\n className={classes.legend}\n >\n <ZoomOutMap className=\"icon\" /> Use pinch & zoom to move around the\n diagram.\n </Typography>\n </div>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { GroupsDiagram } from './GroupsDiagram';\nimport {\n Content,\n ContentHeader,\n DependencyGraphTypes,\n SupportButton,\n} from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n {\n root: {\n height: '100%',\n maxHeight: '100%',\n minHeight: 0,\n },\n },\n { name: 'ExploreGroupsContent' },\n);\n\nexport const GroupsExplorerContent = (props: {\n title?: string;\n direction?: DependencyGraphTypes.Direction;\n hideChildren?: boolean;\n}) => {\n const classes = useStyles();\n\n return (\n <Content noPadding stretch className={classes.root}>\n <ContentHeader title={props.title ?? 'Groups'}>\n <SupportButton>Explore your groups.</SupportButton>\n </ContentHeader>\n <GroupsDiagram\n direction={props.direction}\n hideChildren={props.hideChildren}\n />\n </Content>\n );\n};\n"],"names":["useStyles"],"mappings":";;;;;;;;;;;AA0CA,MAAMA,WAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA,MACL,SAAW,EAAA,MAAA;AAAA,MACX,IAAM,EAAA,CAAA;AAAA,KACR;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,OAAS,EAAA,MAAA;AAAA,MACT,MAAQ,EAAA,MAAA;AAAA,KACV;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,IAAA,EAAM,KAAM,CAA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-DzMkzhod.esm.js → ToolExplorerContent-CCRyp1D9.esm.js}
RENAMED
|
@@ -12,7 +12,7 @@ import { LinkButton, Content, ContentHeader, SupportButton, Progress, WarningPan
|
|
|
12
12
|
import classNames from 'classnames';
|
|
13
13
|
import { useApi } from '@backstage/core-plugin-api';
|
|
14
14
|
import '@backstage/errors';
|
|
15
|
-
import { e as exploreApiRef } from './index-
|
|
15
|
+
import { e as exploreApiRef } from './index-WGpyPF9K.esm.js';
|
|
16
16
|
|
|
17
17
|
const useStyles = makeStyles(
|
|
18
18
|
(theme) => ({
|
|
@@ -99,4 +99,4 @@ const ToolExplorerContent = (props) => {
|
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
export { ToolExplorerContent as T };
|
|
102
|
-
//# sourceMappingURL=ToolExplorerContent-
|
|
102
|
+
//# sourceMappingURL=ToolExplorerContent-CCRyp1D9.esm.js.map
|
package/dist/esm/{ToolExplorerContent-DzMkzhod.esm.js.map → ToolExplorerContent-CCRyp1D9.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolExplorerContent-
|
|
1
|
+
{"version":3,"file":"ToolExplorerContent-CCRyp1D9.esm.js","sources":["../../src/components/ToolCard/ToolCard.tsx","../../src/components/ToolExplorerContent/ToolExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExploreTool } from '@backstage-community/plugin-explore-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport { LinkButton } from '@backstage/core-components';\nimport classNames from 'classnames';\nimport React from 'react';\n\n// TODO: Align styling between Domain and ToolCard\n\nconst useStyles = makeStyles<Theme>(\n theme => ({\n media: {\n height: 128,\n },\n mediaContain: {\n backgroundSize: 'contain',\n },\n lifecycle: {\n lineHeight: '0.8em',\n color: theme.palette.common.white,\n },\n ga: {\n backgroundColor: theme.palette.status.ok,\n },\n alpha: {\n backgroundColor: theme.palette.status.error,\n },\n beta: {\n backgroundColor: theme.palette.status.warning,\n },\n }),\n {\n name: 'ExploreToolCard',\n },\n);\n\ntype Props = {\n card: ExploreTool;\n objectFit?: 'cover' | 'contain';\n};\n\nexport const ToolCard = ({ card, objectFit }: Props) => {\n const classes = useStyles();\n\n const { title, description, url, image, lifecycle, tags } = card;\n\n return (\n <Card key={title}>\n <CardMedia\n image={image}\n title={title}\n className={classNames(classes.media, {\n [classes.mediaContain]: objectFit === 'contain',\n })}\n />\n <CardContent>\n <Typography variant=\"h5\">\n {title}{' '}\n {lifecycle && lifecycle.toLocaleLowerCase('en-US') !== 'ga' && (\n <Chip\n size=\"small\"\n label={lifecycle}\n className={classNames(\n classes.lifecycle,\n classes[lifecycle.toLocaleLowerCase('en-US')],\n )}\n />\n )}\n </Typography>\n <Typography>{description || 'Description missing'}</Typography>\n {tags && (\n <Box marginTop={2}>\n {tags.map((item, idx) => (\n <Chip size=\"small\" key={idx} label={item} />\n ))}\n </Box>\n )}\n </CardContent>\n <CardActions>\n <LinkButton color=\"primary\" to={url} disabled={!url}>\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { ToolCard } from '../ToolCard';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { exploreApiRef } from '../../api';\n\nconst Body = () => {\n const exploreApi = useApi(exploreApiRef);\n\n const {\n value: tools,\n loading,\n error,\n } = useAsync(async () => {\n return (await exploreApi.getTools())?.tools;\n }, [exploreApi]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return <WarningPanel title=\"Failed to load tools\" />;\n }\n\n if (!tools?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title=\"No tools to display\"\n description=\"You haven't added any tools yet.\"\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {tools.map((tool, index) => (\n <ToolCard key={index} card={tool} />\n ))}\n </ItemCardGrid>\n );\n};\n\nexport const ToolExplorerContent = (props: { title?: string }) => (\n <Content noPadding>\n <ContentHeader title={props.title ?? 'Tools'}>\n <SupportButton>Discover the tools in your ecosystem.</SupportButton>\n </ContentHeader>\n <Body />\n </Content>\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA+BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,KAAO,EAAA;AAAA,MACL,MAAQ,EAAA,GAAA;AAAA,KACV;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,cAAgB,EAAA,SAAA;AAAA,KAClB;AAAA,IACA,SAAW,EAAA;AAAA,MACT,UAAY,EAAA,OAAA;AAAA,MACZ,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA,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,CAAA,aAAA,CAAC,YAAa,EAAA,EAAA,KAAA,EAAM,sBAAuB,EAAA,CAAA,CAAA;AAAA,GACpD;AAEA,EAAI,IAAA,EAAC,+BAAO,MAAQ,CAAA,EAAA;AAClB,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAQ,EAAA,MAAA;AAAA,QACR,KAAM,EAAA,qBAAA;AAAA,QACN,WAAY,EAAA,kCAAA;AAAA,OAAA;AAAA,KACd,CAAA;AAAA,GAEJ;AAEA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,YAAA,EAAA,IAAA,EACE,KAAM,CAAA,GAAA,CAAI,CAAC,IAAM,EAAA,KAAA,qBACf,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,GAAK,EAAA,KAAA,EAAO,IAAM,EAAA,IAAA,EAAM,CACnC,CACH,CAAA,CAAA;AAEJ,CAAA,CAAA;AAEa,MAAA,mBAAA,GAAsB,CAAC,KAA2B,KAAA;AArE/D,EAAA,IAAA,EAAA,CAAA;AAsEE,EAAA,uBAAA,KAAA,CAAA,aAAA,CAAC,WAAQ,SAAS,EAAA,IAAA,EAAA,kBACf,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,EAAc,QAAO,EAAM,GAAA,KAAA,CAAA,KAAA,KAAN,IAAe,GAAA,EAAA,GAAA,OAAA,EAAA,sCAClC,aAAc,EAAA,IAAA,EAAA,uCAAqC,CACtD,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAK,CACR,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { G as GroupsExplorerContent } from './GroupsExplorerContent-
|
|
1
|
+
export { G as GroupsExplorerContent } from './GroupsExplorerContent-Bu5wonf0.esm.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@backstage/catalog-model';
|
|
4
4
|
import '@backstage/core-components';
|
|
@@ -9,4 +9,4 @@ import '@material-ui/core/styles';
|
|
|
9
9
|
import '@material-ui/icons/ZoomOutMap';
|
|
10
10
|
import 'classnames';
|
|
11
11
|
import 'react-use/esm/useAsync';
|
|
12
|
-
//# sourceMappingURL=index-
|
|
12
|
+
//# sourceMappingURL=index-CUGqDIUp.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CUGqDIUp.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import useAsync from 'react-use/esm/useAsync';
|
|
5
5
|
import { Content, ContentHeader, SupportButton, Progress, WarningPanel, EmptyState, ItemCardGrid } from '@backstage/core-components';
|
|
6
6
|
import { useApi } from '@backstage/core-plugin-api';
|
|
7
|
-
import { E as EntityCard } from './index-
|
|
7
|
+
import { E as EntityCard } from './index-WGpyPF9K.esm.js';
|
|
8
8
|
import '@backstage/errors';
|
|
9
9
|
import '@backstage/catalog-model';
|
|
10
10
|
import '@material-ui/core/Box';
|
|
@@ -62,4 +62,4 @@ const DomainExplorerContent = (props) => {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export { DomainExplorerContent };
|
|
65
|
-
//# sourceMappingURL=index-
|
|
65
|
+
//# sourceMappingURL=index-ClTQZXUz.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-ClTQZXUz.esm.js","sources":["../../src/components/DomainExplorerContent/DomainExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DomainEntity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport React from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { EntityCard } from '../EntityCard';\n\nconst Body = () => {\n const catalogApi = useApi(catalogApiRef);\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: { kind: 'domain' },\n });\n return response.items as DomainEntity[];\n }, [catalogApi]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <WarningPanel severity=\"error\" title=\"Could not load domains.\">\n {error.message}\n </WarningPanel>\n );\n }\n\n if (!entities?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title=\"No domains to display\"\n description=\"You haven't added any domains yet.\"\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain\"\n >\n Read more\n </Button>\n }\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {entities.map((entity, index) => (\n <EntityCard key={index} entity={entity} />\n ))}\n </ItemCardGrid>\n );\n};\n\n/** @public */\nexport const DomainExplorerContent = (props: { title?: string }) => {\n return (\n <Content noPadding>\n <ContentHeader title={props.title ?? 'Domains'}>\n <SupportButton>Discover the domains in your ecosystem.</SupportButton>\n </ContentHeader>\n <Body />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAiCA,MAAM,OAAO,MAAM;AACjB,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AACvC,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,QAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,GACF,GAAI,SAAS,YAAY;AACvB,IA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,CAAA;AAwFE,EAAA,2CACG,OAAQ,EAAA,EAAA,SAAA,EAAS,wBACf,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,EAAc,QAAO,EAAM,GAAA,KAAA,CAAA,KAAA,KAAN,IAAe,GAAA,EAAA,GAAA,SAAA,EAAA,sCAClC,aAAc,EAAA,IAAA,EAAA,yCAAuC,CACxD,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAK,CACR,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as ToolExplorerContent } from './ToolExplorerContent-
|
|
1
|
+
export { T as ToolExplorerContent } from './ToolExplorerContent-CCRyp1D9.esm.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-use/esm/useAsync';
|
|
4
4
|
import '@material-ui/core/Box';
|
|
@@ -13,11 +13,11 @@ import '@backstage/core-components';
|
|
|
13
13
|
import 'classnames';
|
|
14
14
|
import '@backstage/core-plugin-api';
|
|
15
15
|
import '@backstage/errors';
|
|
16
|
-
import './index-
|
|
16
|
+
import './index-WGpyPF9K.esm.js';
|
|
17
17
|
import '@backstage/plugin-catalog-react';
|
|
18
18
|
import '@material-ui/core/Button';
|
|
19
19
|
import '@backstage/catalog-model';
|
|
20
20
|
import 'pluralize';
|
|
21
21
|
import '@backstage-community/plugin-explore-react';
|
|
22
22
|
import '@backstage/plugin-search-react';
|
|
23
|
-
//# sourceMappingURL=index-
|
|
23
|
+
//# sourceMappingURL=index-DTJNDJLS.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DTJNDJLS.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useOutlet } from 'react-router-dom';
|
|
3
|
-
import { a as ExploreLayout, C as CatalogKindExploreContent } from './index-
|
|
4
|
-
import { G as GroupsExplorerContent } from './GroupsExplorerContent-
|
|
5
|
-
import { T as ToolExplorerContent } from './ToolExplorerContent-
|
|
3
|
+
import { a as ExploreLayout, C as CatalogKindExploreContent } from './index-WGpyPF9K.esm.js';
|
|
4
|
+
import { G as GroupsExplorerContent } from './GroupsExplorerContent-Bu5wonf0.esm.js';
|
|
5
|
+
import { T as ToolExplorerContent } from './ToolExplorerContent-CCRyp1D9.esm.js';
|
|
6
6
|
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
7
7
|
import '@backstage/errors';
|
|
8
8
|
import '@backstage/plugin-catalog-react';
|
|
@@ -46,4 +46,4 @@ const ExplorePage = () => {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export { ExplorePage };
|
|
49
|
-
//# sourceMappingURL=index-
|
|
49
|
+
//# sourceMappingURL=index-Dd6ngd_t.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-Dd6ngd_t.esm.js","sources":["../../src/components/DefaultExplorePage/DefaultExplorePage.tsx","../../src/components/ExplorePage/ExplorePage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { ExploreLayout } from '../ExploreLayout';\nimport { GroupsExplorerContent } from '../GroupsExplorerContent';\nimport { ToolExplorerContent } from '../ToolExplorerContent';\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\nimport { CatalogKindExploreContent } from '../CatalogKindExploreContent';\n\nexport const DefaultExplorePage = () => {\n const configApi = useApi(configApiRef);\n const organizationName =\n configApi.getOptionalString('organization.name') ?? 'Backstage';\n\n return (\n <ExploreLayout\n title={`Explore the ${organizationName} ecosystem`}\n subtitle=\"Discover solutions available in your ecosystem\"\n >\n <ExploreLayout.Route path=\"domains\" title=\"Domains\">\n <CatalogKindExploreContent kind=\"domain\" />\n </ExploreLayout.Route>\n <ExploreLayout.Route path=\"groups\" title=\"Groups\">\n <GroupsExplorerContent />\n </ExploreLayout.Route>\n <ExploreLayout.Route path=\"tools\" title=\"Tools\">\n <ToolExplorerContent />\n </ExploreLayout.Route>\n </ExploreLayout>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport { DefaultExplorePage } from '../DefaultExplorePage';\n\nexport const ExplorePage = () => {\n const outlet = useOutlet();\n\n return <>{outlet || <DefaultExplorePage />}</>;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuBO,MAAM,qBAAqB,MAAM;AAvBxC,EAAA,IAAA,EAAA,CAAA;AAwBE,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA,CAAA;AACrC,EAAA,MAAM,gBACJ,GAAA,CAAA,EAAA,GAAA,SAAA,CAAU,iBAAkB,CAAA,mBAAmB,MAA/C,IAAoD,GAAA,EAAA,GAAA,WAAA,CAAA;AAEtD,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,eAAe,gBAAgB,CAAA,UAAA,CAAA;AAAA,MACtC,QAAS,EAAA,gDAAA;AAAA,KAAA;AAAA,oBAER,KAAA,CAAA,aAAA,CAAA,aAAA,CAAc,KAAd,EAAA,EAAoB,IAAK,EAAA,SAAA,EAAU,KAAM,EAAA,SAAA,EAAA,kBACvC,KAAA,CAAA,aAAA,CAAA,yBAAA,EAAA,EAA0B,IAAK,EAAA,QAAA,EAAS,CAC3C,CAAA;AAAA,oBACA,KAAA,CAAA,aAAA,CAAC,aAAc,CAAA,KAAA,EAAd,EAAoB,IAAA,EAAK,UAAS,KAAM,EAAA,QAAA,EAAA,kBACtC,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,CACzB,CAAA;AAAA,oBACA,KAAA,CAAA,aAAA,CAAC,aAAc,CAAA,KAAA,EAAd,EAAoB,IAAA,EAAK,SAAQ,KAAM,EAAA,OAAA,EAAA,kBACrC,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA,IAAoB,CACvB,CAAA;AAAA,GACF,CAAA;AAEJ,CAAA;;ACxBO,MAAM,cAAc,MAAM;AAC/B,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,uBAAU,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,EAAA,MAAA,oBAAW,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA,IAAmB,CAAG,CAAA,CAAA;AAC7C;;;;"}
|
|
@@ -241,7 +241,7 @@ const ToolSearchResultListItem = explorePlugin.provide(
|
|
|
241
241
|
const ExplorePage = explorePlugin.provide(
|
|
242
242
|
createRoutableExtension({
|
|
243
243
|
name: "ExplorePage",
|
|
244
|
-
component: () => import('./index-
|
|
244
|
+
component: () => import('./index-Dd6ngd_t.esm.js').then((m) => m.ExplorePage),
|
|
245
245
|
mountPoint: exploreRouteRef
|
|
246
246
|
})
|
|
247
247
|
);
|
|
@@ -249,7 +249,7 @@ const DomainExplorerContent = explorePlugin.provide(
|
|
|
249
249
|
createComponentExtension({
|
|
250
250
|
name: "DomainExplorerContent",
|
|
251
251
|
component: {
|
|
252
|
-
lazy: () => import('./index-
|
|
252
|
+
lazy: () => import('./index-ClTQZXUz.esm.js').then(
|
|
253
253
|
(m) => m.DomainExplorerContent
|
|
254
254
|
)
|
|
255
255
|
}
|
|
@@ -259,7 +259,7 @@ const GroupsExplorerContent = explorePlugin.provide(
|
|
|
259
259
|
createComponentExtension({
|
|
260
260
|
name: "GroupsExplorerContent",
|
|
261
261
|
component: {
|
|
262
|
-
lazy: () => import('./index-
|
|
262
|
+
lazy: () => import('./index-CUGqDIUp.esm.js').then(
|
|
263
263
|
(m) => m.GroupsExplorerContent
|
|
264
264
|
)
|
|
265
265
|
}
|
|
@@ -269,7 +269,7 @@ const ToolExplorerContent = explorePlugin.provide(
|
|
|
269
269
|
createComponentExtension({
|
|
270
270
|
name: "ToolExplorerContent",
|
|
271
271
|
component: {
|
|
272
|
-
lazy: () => import('./index-
|
|
272
|
+
lazy: () => import('./index-DTJNDJLS.esm.js').then(
|
|
273
273
|
(m) => m.ToolExplorerContent
|
|
274
274
|
)
|
|
275
275
|
}
|
|
@@ -277,4 +277,4 @@ const ToolExplorerContent = explorePlugin.provide(
|
|
|
277
277
|
);
|
|
278
278
|
|
|
279
279
|
export { CatalogKindExploreContent as C, DomainCard as D, EntityCard as E, GroupsExplorerContent as G, ToolSearchResultListItem as T, ExploreLayout as a, explorePlugin as b, ExploreClient as c, ExplorePage as d, exploreApiRef as e, DomainExplorerContent as f, ToolExplorerContent as g, exploreRouteRef as h, catalogEntityRouteRef as i };
|
|
280
|
-
//# sourceMappingURL=index-
|
|
280
|
+
//# sourceMappingURL=index-WGpyPF9K.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-DrIeHaZd.esm.js","sources":["../../src/api/ExploreClient.ts","../../src/api/ExploreApi.ts","../../src/components/EntityCard/EntityCard.tsx","../../src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx","../../src/components/ExploreLayout/ExploreLayout.tsx","../../src/components/DomainCard/DomainCard.tsx","../../src/routes.ts","../../src/plugin.ts","../../src/extensions.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\nimport { ExploreToolsConfig } from '@backstage-community/plugin-explore-react';\nimport { ExploreApi } from './ExploreApi';\n\n/**\n * Default implementation of the {@link ExploreApi}.\n *\n * @public\n */\nexport class ExploreClient implements ExploreApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n private readonly exploreToolsConfig: ExploreToolsConfig | undefined;\n\n /**\n * @remarks\n *\n * The `exploreToolsConfig` is for backwards compatibility with the `exploreToolsConfigRef`•\n * and will be removed in the future.\n */\n constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n exploreToolsConfig?: ExploreToolsConfig;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n this.exploreToolsConfig = options.exploreToolsConfig;\n }\n\n async getTools(\n request: GetExploreToolsRequest = {},\n ): Promise<GetExploreToolsResponse> {\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n if (this.exploreToolsConfig) {\n const tools = await this.exploreToolsConfig.getTools();\n if (tools) {\n return { tools };\n }\n }\n\n const { fetch } = this.fetchApi;\n\n const filter = request.filter ?? {};\n const baseUrl = await this.discoveryApi.getBaseUrl('explore');\n\n const tags = filter?.tags?.map(t => `tag=${encodeURIComponent(t)}`) ?? [];\n const lifecycles =\n filter?.lifecycle?.map(l => `lifecycle=${encodeURIComponent(l)}`) ?? [];\n const query = [...tags, ...lifecycles].join('&');\n\n const response = await fetch(`${baseUrl}/tools${query ? `?${query}` : ''}`);\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<GetExploreToolsResponse>;\n }\n}\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\n\n/**\n * Interface for the explore plugin.\n *\n * @public\n */\nexport interface ExploreApi {\n /**\n * Returns a list of explore tools.\n *\n * @param request - The request query options\n */\n getTools(request?: GetExploreToolsRequest): Promise<GetExploreToolsResponse>;\n}\n\n/**\n * @public\n */\nexport const exploreApiRef = createApiRef<ExploreApi>({\n id: 'plugin.explore.service',\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\nimport React from 'react';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const EntityCard = (props: { entity: Entity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description}\n </CardContent>\n <CardActions>\n <LinkButton to={url} color=\"primary\">\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport React from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { EntityCard } from '../EntityCard';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport pluralize from 'pluralize';\n\nconst Body = (props: { kind: string }) => {\n const { kind } = props;\n const kindPlural = pluralize(kind);\n const catalogApi = useApi(catalogApiRef);\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: { kind },\n });\n return response.items as Entity[];\n }, [kind]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <WarningPanel severity=\"error\" title={`Could not load ${kindPlural}.`}>\n {error.message}\n </WarningPanel>\n );\n }\n\n if (!entities?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title={`No ${kindPlural} to display`}\n description={`You haven't added any ${kindPlural} yet.`}\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href={`https://backstage.io/docs/features/software-catalog/descriptor-format#kind-${kind}`}\n >\n Read more\n </Button>\n }\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {entities.map((entity, index) => (\n <EntityCard key={index} entity={entity} />\n ))}\n </ItemCardGrid>\n );\n};\n\n/** @public */\nexport const CatalogKindExploreContent = (props: {\n title?: string;\n kind: string;\n}) => {\n const { kind, title } = props;\n const kindLowercase = kind.toLocaleLowerCase();\n const kindCapitalized = `${kind[0].toLocaleUpperCase()}${kind.substring(1)}`;\n return (\n <Content noPadding>\n <ContentHeader title={title || `${pluralize(kindCapitalized)}`}>\n <SupportButton>\n <>Discover the {pluralize(kindLowercase)} in your ecosystem.</>\n </SupportButton>\n </ContentHeader>\n <Body kind={kindLowercase} />\n </Content>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Header, Page, RoutedTabs } from '@backstage/core-components';\nimport {\n attachComponentData,\n useElementFilter,\n} from '@backstage/core-plugin-api';\nimport { TabProps } from '@material-ui/core/Tab';\nimport { default as React } from 'react';\n\n// TODO: This layout could be a shared based component if it was possible to create custom TabbedLayouts\n// A generalized version of createSubRoutesFromChildren, etc. would be required\n/** @public */\nexport type SubRoute = {\n path: string;\n title: string;\n children: JSX.Element;\n tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;\n};\n\nconst dataKey = 'plugin.explore.exploreLayoutRoute';\n\nconst Route: (props: SubRoute) => null = () => null;\nattachComponentData(Route, dataKey, true);\n\n// This causes all mount points that are discovered within this route to use the path of the route itself\nattachComponentData(Route, 'core.gatherMountPoints', true);\n\n/** @public */\nexport type ExploreLayoutProps = {\n title?: string;\n subtitle?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Explore is a compound component, which allows you to define a custom layout\n *\n * @example\n * ```jsx\n * <ExploreLayout title=\"Explore ACME's ecosystem\">\n * <ExploreLayout.Route path=\"/example\" title=\"Example tab\">\n * <div>This is rendered under /example/anything-here route</div>\n * </ExploreLayout.Route>\n * </ExploreLayout>\n * ```\n *\n * @public\n */\nexport const ExploreLayout = (props: ExploreLayoutProps) => {\n const { title, subtitle, children } = props;\n\n const routes = useElementFilter(children, elements =>\n elements\n .selectByComponentData({\n key: dataKey,\n withStrictError:\n 'Child of ExploreLayout must be an ExploreLayout.Route',\n })\n .getElements<SubRoute>()\n .map(child => child.props),\n );\n\n return (\n <Page themeId=\"home\">\n <Header\n title={title ?? 'Explore our ecosystem'}\n subtitle={subtitle ?? 'Discover solutions available in our ecosystem'}\n />\n <RoutedTabs routes={routes} />\n </Page>\n );\n};\n\nExploreLayout.Route = Route;\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DomainEntity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\nimport React from 'react';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const DomainCard = (props: { entity: DomainEntity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description}\n </CardContent>\n <CardActions>\n <LinkButton to={url} color=\"primary\">\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const exploreRouteRef = createRouteRef({\n id: 'explore',\n});\n\n/**\n * @deprecated This route is no longer used and can be removed\n * @public\n */\nexport const catalogEntityRouteRef = createExternalRouteRef({\n id: 'catalog-entity',\n params: ['namespace', 'kind', 'name'],\n optional: true,\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { exploreToolsConfigRef } from '@backstage-community/plugin-explore-react';\nimport { catalogEntityRouteRef, exploreRouteRef } from './routes';\nimport {\n createApiFactory,\n createPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { ExploreClient, exploreApiRef } from './api';\nimport { ToolSearchResultListItemProps } from './components/ToolSearchResultListItem';\n// import { exampleTools } from './util/examples';\n\n/** @public */\nexport const explorePlugin = createPlugin({\n id: 'explore',\n apis: [\n createApiFactory({\n api: exploreApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n exploreToolsConfig: exploreToolsConfigRef,\n },\n factory: ({ discoveryApi, fetchApi, exploreToolsConfig }) =>\n // NOTE: The exploreToolsConfig is for backwards compatibility and will be removed in the future\n new ExploreClient({ discoveryApi, fetchApi, exploreToolsConfig }),\n }),\n /**\n * @deprecated Use ExploreApi from `@backstage-community/plugin-explore` instead\n *\n * Register a default for exploreToolsConfigRef, you may want to override\n * the API locally in your app.\n */\n createApiFactory({\n api: exploreToolsConfigRef,\n deps: {},\n factory: () => ({\n async getTools() {\n // Returning `undefined` will enable the explore-backend to be used via the ExploreClient.\n // If this API has been customized and returns data it will be respected first.\n return undefined as any;\n },\n }),\n }),\n ],\n routes: {\n explore: exploreRouteRef,\n },\n externalRoutes: {\n catalogEntity: catalogEntityRouteRef,\n },\n});\n\n/** @public */\nexport const ToolSearchResultListItem: (\n props: SearchResultListItemExtensionProps<ToolSearchResultListItemProps>,\n) => JSX.Element | null = explorePlugin.provide(\n createSearchResultListItemExtension({\n name: 'ToolSearchResultListItem',\n component: () =>\n import('./components/ToolSearchResultListItem').then(\n m => m.ToolSearchResultListItem,\n ),\n predicate: result => result.type === 'tools',\n }),\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { explorePlugin } from './plugin';\nimport { exploreRouteRef } from './routes';\nimport {\n createComponentExtension,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const ExplorePage = explorePlugin.provide(\n createRoutableExtension({\n name: 'ExplorePage',\n component: () =>\n import('./components/ExplorePage').then(m => m.ExplorePage),\n mountPoint: exploreRouteRef,\n }),\n);\n\n/** @public */\nexport const DomainExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'DomainExplorerContent',\n component: {\n lazy: () =>\n import('./components/DomainExplorerContent').then(\n m => m.DomainExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const GroupsExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'GroupsExplorerContent',\n component: {\n lazy: () =>\n import('./components/GroupsExplorerContent').then(\n m => m.GroupsExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const ToolExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'ToolExplorerContent',\n component: {\n lazy: () =>\n import('./components/ToolExplorerContent').then(\n m => m.ToolExplorerContent,\n ),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8BO,MAAM,aAAoC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY/C,YAAY,OAIT,EAAA;AAfH,IAAiB,aAAA,CAAA,IAAA,EAAA,cAAA,CAAA,CAAA;AACjB,IAAiB,aAAA,CAAA,IAAA,EAAA,UAAA,CAAA,CAAA;AAEjB;AAAA,IAAiB,aAAA,CAAA,IAAA,EAAA,oBAAA,CAAA,CAAA;AAaf,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA,CAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAQ,CAAA,QAAA,CAAA;AACxB,IAAA,IAAA,CAAK,qBAAqB,OAAQ,CAAA,kBAAA,CAAA;AAAA,GACpC;AAAA,EAEA,MAAM,QAAA,CACJ,OAAkC,GAAA,EACA,EAAA;AAtDtC,IAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AAwDI,IAAA,IAAI,KAAK,kBAAoB,EAAA;AAC3B,MAAA,MAAM,KAAQ,GAAA,MAAM,IAAK,CAAA,kBAAA,CAAmB,QAAS,EAAA,CAAA;AACrD,MAAA,IAAI,KAAO,EAAA;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OAAK,CAAE,CAAA,qBAAA;AAAA,OACT;AAAA,KACJ;AAAA,GACD,CAAA;AACH,EAAA;AAGO,MAAM,sBAAsB,aAAc,CAAA,OAAA;AAAA,EAC/C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,qBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,yBAAkC,CAAE,CAAA,IAAA;AAAA,QACzC,OAAK,CAAE,CAAA,mBAAA;AAAA,OACT;AAAA,KACJ;AAAA,GACD,CAAA;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"index-WGpyPF9K.esm.js","sources":["../../src/api/ExploreClient.ts","../../src/api/ExploreApi.ts","../../src/components/EntityCard/EntityCard.tsx","../../src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx","../../src/components/ExploreLayout/ExploreLayout.tsx","../../src/components/DomainCard/DomainCard.tsx","../../src/routes.ts","../../src/plugin.ts","../../src/extensions.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\nimport { ExploreToolsConfig } from '@backstage-community/plugin-explore-react';\nimport { ExploreApi } from './ExploreApi';\n\n/**\n * Default implementation of the {@link ExploreApi}.\n *\n * @public\n */\nexport class ExploreClient implements ExploreApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n private readonly exploreToolsConfig: ExploreToolsConfig | undefined;\n\n /**\n * @remarks\n *\n * The `exploreToolsConfig` is for backwards compatibility with the `exploreToolsConfigRef`•\n * and will be removed in the future.\n */\n constructor(options: {\n discoveryApi: DiscoveryApi;\n fetchApi: FetchApi;\n exploreToolsConfig?: ExploreToolsConfig;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n this.exploreToolsConfig = options.exploreToolsConfig;\n }\n\n async getTools(\n request: GetExploreToolsRequest = {},\n ): Promise<GetExploreToolsResponse> {\n // NOTE: This will be removed in the future as it is replaced by the ExploreApi.getTools method\n if (this.exploreToolsConfig) {\n const tools = await this.exploreToolsConfig.getTools();\n if (tools) {\n return { tools };\n }\n }\n\n const { fetch } = this.fetchApi;\n\n const filter = request.filter ?? {};\n const baseUrl = await this.discoveryApi.getBaseUrl('explore');\n\n const tags = filter?.tags?.map(t => `tag=${encodeURIComponent(t)}`) ?? [];\n const lifecycles =\n filter?.lifecycle?.map(l => `lifecycle=${encodeURIComponent(l)}`) ?? [];\n const query = [...tags, ...lifecycles].join('&');\n\n const response = await fetch(`${baseUrl}/tools${query ? `?${query}` : ''}`);\n\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n\n return response.json() as Promise<GetExploreToolsResponse>;\n }\n}\n","/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n GetExploreToolsRequest,\n GetExploreToolsResponse,\n} from '@backstage-community/plugin-explore-common';\n\n/**\n * Interface for the explore plugin.\n *\n * @public\n */\nexport interface ExploreApi {\n /**\n * Returns a list of explore tools.\n *\n * @param request - The request query options\n */\n getTools(request?: GetExploreToolsRequest): Promise<GetExploreToolsResponse>;\n}\n\n/**\n * @public\n */\nexport const exploreApiRef = createApiRef<ExploreApi>({\n id: 'plugin.explore.service',\n});\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\nimport React from 'react';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const EntityCard = (props: { entity: Entity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description}\n </CardContent>\n <CardActions>\n <LinkButton to={url} color=\"primary\">\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Button from '@material-ui/core/Button';\nimport React from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { EntityCard } from '../EntityCard';\nimport {\n Content,\n ContentHeader,\n EmptyState,\n ItemCardGrid,\n Progress,\n SupportButton,\n WarningPanel,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport pluralize from 'pluralize';\n\nconst Body = (props: { kind: string }) => {\n const { kind } = props;\n const kindPlural = pluralize(kind);\n const catalogApi = useApi(catalogApiRef);\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: { kind },\n });\n return response.items as Entity[];\n }, [kind]);\n\n if (loading) {\n return <Progress />;\n }\n\n if (error) {\n return (\n <WarningPanel severity=\"error\" title={`Could not load ${kindPlural}.`}>\n {error.message}\n </WarningPanel>\n );\n }\n\n if (!entities?.length) {\n return (\n <EmptyState\n missing=\"info\"\n title={`No ${kindPlural} to display`}\n description={`You haven't added any ${kindPlural} yet.`}\n action={\n <Button\n variant=\"contained\"\n color=\"primary\"\n href={`https://backstage.io/docs/features/software-catalog/descriptor-format#kind-${kind}`}\n >\n Read more\n </Button>\n }\n />\n );\n }\n\n return (\n <ItemCardGrid>\n {entities.map((entity, index) => (\n <EntityCard key={index} entity={entity} />\n ))}\n </ItemCardGrid>\n );\n};\n\n/** @public */\nexport const CatalogKindExploreContent = (props: {\n title?: string;\n kind: string;\n}) => {\n const { kind, title } = props;\n const kindLowercase = kind.toLocaleLowerCase();\n const kindCapitalized = `${kind[0].toLocaleUpperCase()}${kind.substring(1)}`;\n return (\n <Content noPadding>\n <ContentHeader title={title || `${pluralize(kindCapitalized)}`}>\n <SupportButton>\n <>Discover the {pluralize(kindLowercase)} in your ecosystem.</>\n </SupportButton>\n </ContentHeader>\n <Body kind={kindLowercase} />\n </Content>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Header, Page, RoutedTabs } from '@backstage/core-components';\nimport {\n attachComponentData,\n useElementFilter,\n} from '@backstage/core-plugin-api';\nimport { TabProps } from '@material-ui/core/Tab';\nimport { default as React } from 'react';\n\n// TODO: This layout could be a shared based component if it was possible to create custom TabbedLayouts\n// A generalized version of createSubRoutesFromChildren, etc. would be required\n/** @public */\nexport type SubRoute = {\n path: string;\n title: string;\n children: JSX.Element;\n tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;\n};\n\nconst dataKey = 'plugin.explore.exploreLayoutRoute';\n\nconst Route: (props: SubRoute) => null = () => null;\nattachComponentData(Route, dataKey, true);\n\n// This causes all mount points that are discovered within this route to use the path of the route itself\nattachComponentData(Route, 'core.gatherMountPoints', true);\n\n/** @public */\nexport type ExploreLayoutProps = {\n title?: string;\n subtitle?: string;\n children?: React.ReactNode;\n};\n\n/**\n * Explore is a compound component, which allows you to define a custom layout\n *\n * @example\n * ```jsx\n * <ExploreLayout title=\"Explore ACME's ecosystem\">\n * <ExploreLayout.Route path=\"/example\" title=\"Example tab\">\n * <div>This is rendered under /example/anything-here route</div>\n * </ExploreLayout.Route>\n * </ExploreLayout>\n * ```\n *\n * @public\n */\nexport const ExploreLayout = (props: ExploreLayoutProps) => {\n const { title, subtitle, children } = props;\n\n const routes = useElementFilter(children, elements =>\n elements\n .selectByComponentData({\n key: dataKey,\n withStrictError:\n 'Child of ExploreLayout must be an ExploreLayout.Route',\n })\n .getElements<SubRoute>()\n .map(child => child.props),\n );\n\n return (\n <Page themeId=\"home\">\n <Header\n title={title ?? 'Explore our ecosystem'}\n subtitle={subtitle ?? 'Discover solutions available in our ecosystem'}\n />\n <RoutedTabs routes={routes} />\n </Page>\n );\n};\n\nExploreLayout.Route = Route;\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DomainEntity, RELATION_OWNED_BY } from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n entityRouteParams,\n getEntityRelations,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport Chip from '@material-ui/core/Chip';\nimport React from 'react';\n\nimport { LinkButton, ItemCardHeader } from '@backstage/core-components';\nimport { useRouteRef } from '@backstage/core-plugin-api';\n\n/** @public */\nexport const DomainCard = (props: { entity: DomainEntity }) => {\n const { entity } = props;\n\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n const url = catalogEntityRoute(entityRouteParams(entity));\n\n const owner = (\n <EntityRefLinks\n entityRefs={ownedByRelations}\n defaultKind=\"group\"\n color=\"inherit\"\n />\n );\n\n return (\n <Card>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n subtitle={owner}\n />\n </CardMedia>\n <CardContent>\n {entity.metadata.tags?.length ? (\n <Box>\n {entity.metadata.tags.map(tag => (\n <Chip size=\"small\" label={tag} key={tag} />\n ))}\n </Box>\n ) : null}\n {entity.metadata.description}\n </CardContent>\n <CardActions>\n <LinkButton to={url} color=\"primary\">\n Explore\n </LinkButton>\n </CardActions>\n </Card>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const exploreRouteRef = createRouteRef({\n id: 'explore',\n});\n\n/**\n * @deprecated This route is no longer used and can be removed\n * @public\n */\nexport const catalogEntityRouteRef = createExternalRouteRef({\n id: 'catalog-entity',\n params: ['namespace', 'kind', 'name'],\n optional: true,\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { exploreToolsConfigRef } from '@backstage-community/plugin-explore-react';\nimport { catalogEntityRouteRef, exploreRouteRef } from './routes';\nimport {\n createApiFactory,\n createPlugin,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { ExploreClient, exploreApiRef } from './api';\nimport { ToolSearchResultListItemProps } from './components/ToolSearchResultListItem';\n// import { exampleTools } from './util/examples';\n\n/** @public */\nexport const explorePlugin = createPlugin({\n id: 'explore',\n apis: [\n createApiFactory({\n api: exploreApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n exploreToolsConfig: exploreToolsConfigRef,\n },\n factory: ({ discoveryApi, fetchApi, exploreToolsConfig }) =>\n // NOTE: The exploreToolsConfig is for backwards compatibility and will be removed in the future\n new ExploreClient({ discoveryApi, fetchApi, exploreToolsConfig }),\n }),\n /**\n * @deprecated Use ExploreApi from `@backstage-community/plugin-explore` instead\n *\n * Register a default for exploreToolsConfigRef, you may want to override\n * the API locally in your app.\n */\n createApiFactory({\n api: exploreToolsConfigRef,\n deps: {},\n factory: () => ({\n async getTools() {\n // Returning `undefined` will enable the explore-backend to be used via the ExploreClient.\n // If this API has been customized and returns data it will be respected first.\n return undefined as any;\n },\n }),\n }),\n ],\n routes: {\n explore: exploreRouteRef,\n },\n externalRoutes: {\n catalogEntity: catalogEntityRouteRef,\n },\n});\n\n/** @public */\nexport const ToolSearchResultListItem: (\n props: SearchResultListItemExtensionProps<ToolSearchResultListItemProps>,\n) => JSX.Element | null = explorePlugin.provide(\n createSearchResultListItemExtension({\n name: 'ToolSearchResultListItem',\n component: () =>\n import('./components/ToolSearchResultListItem').then(\n m => m.ToolSearchResultListItem,\n ),\n predicate: result => result.type === 'tools',\n }),\n);\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { explorePlugin } from './plugin';\nimport { exploreRouteRef } from './routes';\nimport {\n createComponentExtension,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const ExplorePage = explorePlugin.provide(\n createRoutableExtension({\n name: 'ExplorePage',\n component: () =>\n import('./components/ExplorePage').then(m => m.ExplorePage),\n mountPoint: exploreRouteRef,\n }),\n);\n\n/** @public */\nexport const DomainExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'DomainExplorerContent',\n component: {\n lazy: () =>\n import('./components/DomainExplorerContent').then(\n m => m.DomainExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const GroupsExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'GroupsExplorerContent',\n component: {\n lazy: () =>\n import('./components/GroupsExplorerContent').then(\n m => m.GroupsExplorerContent,\n ),\n },\n }),\n);\n\n/** @public */\nexport const ToolExplorerContent = explorePlugin.provide(\n createComponentExtension({\n name: 'ToolExplorerContent',\n component: {\n lazy: () =>\n import('./components/ToolExplorerContent').then(\n m => m.ToolExplorerContent,\n ),\n },\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA8BO,MAAM,aAAoC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY/C,YAAY,OAIT,EAAA;AAfH,IAAiB,aAAA,CAAA,IAAA,EAAA,cAAA,CAAA,CAAA;AACjB,IAAiB,aAAA,CAAA,IAAA,EAA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A,CAAA,KAAK,EAAE,WAAW,CAAA;AAAA,IAC5D,UAAY,EAAA,eAAA;AAAA,GACb,CAAA;AACH,EAAA;AAGO,MAAM,wBAAwB,aAAc,CAAA,OAAA;AAAA,EACjD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,uBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,yBAAoC,CAAE,CAAA,IAAA;AAAA,QAC3C,OAAK,CAAE,CAAA,qBAAA;AAAA,OACT;AAAA,KACJ;AAAA,GACD,CAAA;AACH,EAAA;AAGO,MAAM,wBAAwB,aAAc,CAAA,OAAA;AAAA,EACjD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,uBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,yBAAoC,CAAE,CAAA,IAAA;AAAA,QAC3C,OAAK,CAAE,CAAA,qBAAA;AAAA,OACT;AAAA,KACJ;AAAA,GACD,CAAA;AACH,EAAA;AAGO,MAAM,sBAAsB,aAAc,CAAA,OAAA;AAAA,EAC/C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,qBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,yBAAkC,CAAE,CAAA,IAAA;AAAA,QACzC,OAAK,CAAE,CAAA,mBAAA;AAAA,OACT;AAAA,KACJ;AAAA,GACD,CAAA;AACH;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -107,6 +107,7 @@ declare const DomainExplorerContent: (props: {
|
|
|
107
107
|
declare const GroupsExplorerContent: (props: {
|
|
108
108
|
title?: string | undefined;
|
|
109
109
|
direction?: _backstage_core_components.DependencyGraphTypes.Direction | undefined;
|
|
110
|
+
hideChildren?: boolean | undefined;
|
|
110
111
|
}) => React.JSX.Element;
|
|
111
112
|
/** @public */
|
|
112
113
|
declare const ToolExplorerContent: (props: {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CatalogKindExploreContent, D as DomainCard, f as DomainExplorerContent, c as ExploreClient, a as ExploreLayout, d as ExplorePage, G as GroupsExplorerContent, g as ToolExplorerContent, T as ToolSearchResultListItem, i as catalogEntityRouteRef, e as exploreApiRef, b as explorePlugin, h as exploreRouteRef, b as plugin } from './esm/index-
|
|
1
|
+
export { C as CatalogKindExploreContent, D as DomainCard, f as DomainExplorerContent, c as ExploreClient, a as ExploreLayout, d as ExplorePage, G as GroupsExplorerContent, g as ToolExplorerContent, T as ToolSearchResultListItem, i as catalogEntityRouteRef, e as exploreApiRef, b as explorePlugin, h as exploreRouteRef, b as plugin } from './esm/index-WGpyPF9K.esm.js';
|
|
2
2
|
import '@backstage/errors';
|
|
3
3
|
import '@backstage/core-plugin-api';
|
|
4
4
|
import '@backstage/plugin-catalog-react';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GroupsExplorerContent-D_QfaGTY.esm.js","sources":["../../src/components/GroupsExplorerContent/GroupsDiagram.tsx","../../src/components/GroupsExplorerContent/GroupsExplorerContent.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n parseEntityRef,\n RELATION_CHILD_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n DependencyGraph,\n DependencyGraphTypes,\n Link,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n entityRouteRef,\n getEntityRelations,\n EntityDisplayName,\n} from '@backstage/plugin-catalog-react';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport ZoomOutMap from '@material-ui/icons/ZoomOutMap';\nimport classNames from 'classnames';\nimport React from 'react';\nimport useAsync from 'react-use/esm/useAsync';\n\nconst useStyles = makeStyles(\n theme => ({\n graph: {\n minHeight: '100%',\n flex: 1,\n },\n graphWrapper: {\n display: 'flex',\n height: '100%',\n },\n organizationNode: {\n fill: theme.palette.secondary.light,\n stroke: theme.palette.secondary.light,\n },\n groupNode: {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n centeredContent: {\n padding: theme.spacing(1),\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: theme.palette.common.black,\n },\n legend: {\n position: 'absolute',\n bottom: 0,\n right: 0,\n padding: theme.spacing(1),\n '& .icon': {\n verticalAlign: 'bottom',\n },\n },\n textOrganization: {\n color: theme.palette.secondary.contrastText,\n },\n textGroup: {\n color: theme.palette.primary.contrastText,\n },\n textWrapper: {\n display: '-webkit-box',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: 2,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textAlign: 'center',\n fontWeight: 'bold',\n fontSize: '20px',\n },\n }),\n {\n name: 'ExploreGroupsDiagram',\n },\n);\n\nfunction RenderNode(props: DependencyGraphTypes.RenderNodeProps<any>) {\n const nodeWidth = 180;\n const nodeHeight = 60;\n const theme = useTheme();\n const classes = useStyles();\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n\n if (props.node.id === 'root') {\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.organizationNode}\n />\n <title>{props.node.name}</title>\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div\n className={classNames(\n classes.textWrapper,\n classes.textOrganization,\n )}\n >\n {props.node.name}\n </div>\n </div>\n </foreignObject>\n </g>\n );\n }\n\n const ref = parseEntityRef(props.node.id);\n\n return (\n <g>\n <rect\n width={nodeWidth}\n height={nodeHeight}\n rx={theme.shape.borderRadius}\n className={classes.groupNode}\n />\n <title>\n <EntityDisplayName entityRef={props.node.id} hideIcon disableTooltip />\n </title>\n\n <Link\n to={catalogEntityRoute({\n kind: ref.kind,\n namespace: ref.namespace,\n name: ref.name,\n })}\n >\n <foreignObject width={nodeWidth} height={nodeHeight}>\n <div className={classes.centeredContent}>\n <div className={classNames(classes.textWrapper, classes.textGroup)}>\n <EntityDisplayName entityRef={props.node.id} hideIcon />\n </div>\n </div>\n </foreignObject>\n </Link>\n </g>\n );\n}\n\n/**\n * Dynamically generates a diagram of groups registered in the catalog.\n */\nexport function GroupsDiagram(props: {\n direction?: DependencyGraphTypes.Direction;\n}) {\n const nodes = new Array<{\n id: string;\n kind: string;\n name: string;\n }>();\n const edges = new Array<{ from: string; to: string; label: string }>();\n\n const classes = useStyles();\n const configApi = useApi(configApiRef);\n const catalogApi = useApi(catalogApiRef);\n const organizationName =\n configApi.getOptionalString('organization.name') ?? 'Backstage';\n const {\n loading,\n error,\n value: catalogResponse,\n } = useAsync(() => {\n return catalogApi.getEntities({\n filter: {\n kind: ['Group'],\n },\n });\n }, [catalogApi]);\n\n if (loading) {\n return <Progress />;\n } else if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n // the root of this diagram is the organization\n nodes.push({\n id: 'root',\n kind: 'Organization',\n name: organizationName,\n });\n\n for (const catalogItem of catalogResponse?.items || []) {\n const currentItemId = stringifyEntityRef(catalogItem);\n\n nodes.push({\n id: stringifyEntityRef(catalogItem),\n kind: catalogItem.kind,\n name: '',\n });\n\n // Edge to parent\n const catalogItemRelations_childOf = getEntityRelations(\n catalogItem,\n RELATION_CHILD_OF,\n );\n\n // if no parent is found, link the node to the root\n if (catalogItemRelations_childOf.length === 0) {\n edges.push({\n from: currentItemId,\n to: 'root',\n label: '',\n });\n }\n\n catalogItemRelations_childOf.forEach(relation => {\n edges.push({\n from: currentItemId,\n to: stringifyEntityRef(relation),\n label: '',\n });\n });\n }\n\n return (\n <div className={classes.graphWrapper}>\n <DependencyGraph\n nodes={nodes}\n edges={edges}\n nodeMargin={10}\n direction={props.direction || DependencyGraphTypes.Direction.RIGHT_LEFT}\n renderNode={RenderNode}\n className={classes.graph}\n fit=\"contain\"\n />\n\n <Typography\n variant=\"caption\"\n color=\"textSecondary\"\n display=\"block\"\n className={classes.legend}\n >\n <ZoomOutMap className=\"icon\" /> Use pinch & zoom to move around the\n diagram.\n </Typography>\n </div>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { GroupsDiagram } from './GroupsDiagram';\nimport {\n Content,\n ContentHeader,\n DependencyGraphTypes,\n SupportButton,\n} from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(\n {\n root: {\n height: '100%',\n maxHeight: '100%',\n minHeight: 0,\n },\n },\n { name: 'ExploreGroupsContent' },\n);\n\nexport const GroupsExplorerContent = (props: {\n title?: string;\n direction?: DependencyGraphTypes.Direction;\n}) => {\n const classes = useStyles();\n\n return (\n <Content noPadding stretch className={classes.root}>\n <ContentHeader title={props.title ?? 'Groups'}>\n <SupportButton>Explore your groups.</SupportButton>\n </ContentHeader>\n <GroupsDiagram direction={props.direction} />\n </Content>\n );\n};\n"],"names":["useStyles"],"mappings":";;;;;;;;;;;AA0CA,MAAMA,WAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,KAAO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C,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,aAAc,EAAA,EAAA,SAAA,EAAW,KAAM,CAAA,SAAA,EAAW,CAC7C,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-B_Dn9qT_.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DVlrZV4C.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|