@backstage/plugin-catalog-graph 0.4.9-next.2 → 0.4.9
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 +19 -0
- package/alpha/package.json +1 -1
- package/dist/components/CatalogGraphCard/CatalogGraphCard.esm.js.map +1 -1
- package/dist/components/CatalogGraphPage/CatalogGraphPage.esm.js.map +1 -1
- package/dist/components/CatalogGraphPage/MaxDepthFilter.esm.js.map +1 -1
- package/dist/components/CatalogGraphPage/SelectedKindsFilter.esm.js.map +1 -1
- package/dist/components/CatalogGraphPage/SelectedRelationsFilter.esm.js.map +1 -1
- package/dist/components/CatalogGraphPage/SwitchFilter.esm.js.map +1 -1
- package/dist/components/EntityRelationsGraph/DefaultRenderLabel.esm.js.map +1 -1
- package/dist/components/EntityRelationsGraph/DefaultRenderNode.esm.js.map +1 -1
- package/dist/components/EntityRelationsGraph/EntityRelationsGraph.esm.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-graph
|
|
2
2
|
|
|
3
|
+
## 0.4.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fec8b57: Updated exports to use the new type parameters for extensions and extension blueprints.
|
|
8
|
+
- da91078: Fixed a bug in the `CatalogGraphPage` component where, after clicking on some nodes, clicking the back button would break the navigation. This issue caused the entire navigation to fail and behaved differently across various browsers.
|
|
9
|
+
- 836127c: Updated dependency `@testing-library/react` to `^16.0.0`.
|
|
10
|
+
- 8a474f2: Updating docs to use `createFrontendModule` instead
|
|
11
|
+
- a159180: Added missing items to `overridableComponents`
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/core-components@0.15.0
|
|
14
|
+
- @backstage/plugin-catalog-react@1.13.0
|
|
15
|
+
- @backstage/frontend-plugin-api@0.8.0
|
|
16
|
+
- @backstage/core-compat-api@0.3.0
|
|
17
|
+
- @backstage/catalog-model@1.7.0
|
|
18
|
+
- @backstage/catalog-client@1.7.0
|
|
19
|
+
- @backstage/core-plugin-api@1.9.4
|
|
20
|
+
- @backstage/types@1.1.1
|
|
21
|
+
|
|
3
22
|
## 0.4.9-next.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/alpha/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogGraphCard.esm.js","sources":["../../../src/components/CatalogGraphCard/CatalogGraphCard.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 getCompoundEntityRef,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\nimport { useAnalytics, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n humanizeEntityRef,\n useEntity,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport qs from 'qs';\nimport React, { MouseEvent, useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { catalogGraphRouteRef } from '../../routes';\nimport {\n ALL_RELATION_PAIRS,\n Direction,\n EntityNode,\n EntityRelationsGraph,\n} from '../EntityRelationsGraph';\nimport { EntityRelationsGraphProps } from '../EntityRelationsGraph';\n\nconst useStyles = makeStyles<Theme, { height: number | undefined }>(\n {\n card: ({ height }) => ({\n display: 'flex',\n flexDirection: 'column',\n maxHeight: height,\n minHeight: height,\n }),\n graph: {\n flex: 1,\n minHeight: 0,\n },\n },\n { name: 'PluginCatalogGraphCatalogGraphCard' },\n);\n\nexport const CatalogGraphCard = (\n props: Partial<EntityRelationsGraphProps> & {\n variant?: InfoCardVariants;\n height?: number;\n title?: string;\n },\n) => {\n const {\n variant = 'gridItem',\n relationPairs = ALL_RELATION_PAIRS,\n maxDepth = 1,\n unidirectional = true,\n mergeRelations = true,\n direction = Direction.LEFT_RIGHT,\n kinds,\n relations,\n entityFilter,\n height,\n className,\n rootEntityNames,\n onNodeClick,\n title = 'Relations',\n zoom = 'enable-on-click',\n } = props;\n\n const { entity } = useEntity();\n const entityName = getCompoundEntityRef(entity);\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const catalogGraphRoute = useRouteRef(catalogGraphRouteRef);\n const navigate = useNavigate();\n const classes = useStyles({ height });\n const analytics = useAnalytics();\n\n const defaultOnNodeClick = useCallback(\n (node: EntityNode, _: MouseEvent<unknown>) => {\n const nodeEntityName = parseEntityRef(node.id);\n const path = catalogEntityRoute({\n kind: nodeEntityName.kind.toLocaleLowerCase('en-US'),\n namespace: nodeEntityName.namespace.toLocaleLowerCase('en-US'),\n name: nodeEntityName.name,\n });\n analytics.captureEvent(\n 'click',\n node.entity.metadata.title ?? humanizeEntityRef(nodeEntityName),\n { attributes: { to: path } },\n );\n navigate(path);\n },\n [catalogEntityRoute, navigate, analytics],\n );\n\n const catalogGraphParams = qs.stringify(\n {\n rootEntityRefs: [stringifyEntityRef(entity)],\n maxDepth: maxDepth,\n unidirectional,\n mergeRelations,\n selectedKinds: kinds,\n selectedRelations: relations,\n direction,\n },\n { arrayFormat: 'brackets', addQueryPrefix: true },\n );\n const catalogGraphUrl = `${catalogGraphRoute()}${catalogGraphParams}`;\n\n return (\n <InfoCard\n title={title}\n cardClassName={classes.card}\n variant={variant}\n noPadding\n deepLink={{\n title: 'View graph',\n link: catalogGraphUrl,\n }}\n >\n <EntityRelationsGraph\n {...props}\n rootEntityNames={rootEntityNames || entityName}\n onNodeClick={onNodeClick || defaultOnNodeClick}\n className={className || classes.graph}\n maxDepth={maxDepth}\n unidirectional={unidirectional}\n mergeRelations={mergeRelations}\n direction={direction}\n relationPairs={relationPairs}\n entityFilter={entityFilter}\n zoom={zoom}\n />\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"CatalogGraphCard.esm.js","sources":["../../../src/components/CatalogGraphCard/CatalogGraphCard.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 getCompoundEntityRef,\n parseEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\nimport { useAnalytics, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n humanizeEntityRef,\n useEntity,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { makeStyles, Theme } from '@material-ui/core/styles';\nimport qs from 'qs';\nimport React, { MouseEvent, useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { catalogGraphRouteRef } from '../../routes';\nimport {\n ALL_RELATION_PAIRS,\n Direction,\n EntityNode,\n EntityRelationsGraph,\n} from '../EntityRelationsGraph';\nimport { EntityRelationsGraphProps } from '../EntityRelationsGraph';\n\n/** @public */\nexport type CatalogGraphCardClassKey = 'card' | 'graph';\n\nconst useStyles = makeStyles<Theme, { height: number | undefined }>(\n {\n card: ({ height }) => ({\n display: 'flex',\n flexDirection: 'column',\n maxHeight: height,\n minHeight: height,\n }),\n graph: {\n flex: 1,\n minHeight: 0,\n },\n },\n { name: 'PluginCatalogGraphCatalogGraphCard' },\n);\n\nexport const CatalogGraphCard = (\n props: Partial<EntityRelationsGraphProps> & {\n variant?: InfoCardVariants;\n height?: number;\n title?: string;\n },\n) => {\n const {\n variant = 'gridItem',\n relationPairs = ALL_RELATION_PAIRS,\n maxDepth = 1,\n unidirectional = true,\n mergeRelations = true,\n direction = Direction.LEFT_RIGHT,\n kinds,\n relations,\n entityFilter,\n height,\n className,\n rootEntityNames,\n onNodeClick,\n title = 'Relations',\n zoom = 'enable-on-click',\n } = props;\n\n const { entity } = useEntity();\n const entityName = getCompoundEntityRef(entity);\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const catalogGraphRoute = useRouteRef(catalogGraphRouteRef);\n const navigate = useNavigate();\n const classes = useStyles({ height });\n const analytics = useAnalytics();\n\n const defaultOnNodeClick = useCallback(\n (node: EntityNode, _: MouseEvent<unknown>) => {\n const nodeEntityName = parseEntityRef(node.id);\n const path = catalogEntityRoute({\n kind: nodeEntityName.kind.toLocaleLowerCase('en-US'),\n namespace: nodeEntityName.namespace.toLocaleLowerCase('en-US'),\n name: nodeEntityName.name,\n });\n analytics.captureEvent(\n 'click',\n node.entity.metadata.title ?? humanizeEntityRef(nodeEntityName),\n { attributes: { to: path } },\n );\n navigate(path);\n },\n [catalogEntityRoute, navigate, analytics],\n );\n\n const catalogGraphParams = qs.stringify(\n {\n rootEntityRefs: [stringifyEntityRef(entity)],\n maxDepth: maxDepth,\n unidirectional,\n mergeRelations,\n selectedKinds: kinds,\n selectedRelations: relations,\n direction,\n },\n { arrayFormat: 'brackets', addQueryPrefix: true },\n );\n const catalogGraphUrl = `${catalogGraphRoute()}${catalogGraphParams}`;\n\n return (\n <InfoCard\n title={title}\n cardClassName={classes.card}\n variant={variant}\n noPadding\n deepLink={{\n title: 'View graph',\n link: catalogGraphUrl,\n }}\n >\n <EntityRelationsGraph\n {...props}\n rootEntityNames={rootEntityNames || entityName}\n onNodeClick={onNodeClick || defaultOnNodeClick}\n className={className || classes.graph}\n maxDepth={maxDepth}\n unidirectional={unidirectional}\n mergeRelations={mergeRelations}\n direction={direction}\n relationPairs={relationPairs}\n entityFilter={entityFilter}\n zoom={zoom}\n />\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4CA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,IAAM,EAAA,CAAC,EAAE,MAAA,EAAc,MAAA;AAAA,MACrB,OAAS,EAAA,MAAA;AAAA,MACT,aAAe,EAAA,QAAA;AAAA,MACf,SAAW,EAAA,MAAA;AAAA,MACX,SAAW,EAAA,MAAA;AAAA,KACb,CAAA;AAAA,IACA,KAAO,EAAA;AAAA,MACL,IAAM,EAAA,CAAA;AAAA,MACN,SAAW,EAAA,CAAA;AAAA,KACb;AAAA,GACF;AAAA,EACA,EAAE,MAAM,oCAAqC,EAAA;AAC/C,CAAA,CAAA;AAEa,MAAA,gBAAA,GAAmB,CAC9B,KAKG,KAAA;AACH,EAAM,MAAA;AAAA,IACJ,OAAU,GAAA,UAAA;AAAA,IACV,aAAgB,GAAA,kBAAA;AAAA,IAChB,QAAW,GAAA,CAAA;AAAA,IACX,cAAiB,GAAA,IAAA;AAAA,IACjB,cAAiB,GAAA,IAAA;AAAA,IACjB,YAAY,SAAU,CAAA,UAAA;AAAA,IACtB,KAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAQ,GAAA,WAAA;AAAA,IACR,IAAO,GAAA,iBAAA;AAAA,GACL,GAAA,KAAA,CAAA;AAEJ,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EAAM,MAAA,UAAA,GAAa,qBAAqB,MAAM,CAAA,CAAA;AAC9C,EAAM,MAAA,kBAAA,GAAqB,YAAY,cAAc,CAAA,CAAA;AACrD,EAAM,MAAA,iBAAA,GAAoB,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EAAgB,IAAK,EAAA;AAAA,GAClD,CAAA;AACA,EAAA,MAAM,eAAkB,GAAA,CAAA,EAAG,iBAAkB,EAAC,GAAG,kBAAkB,CAAA,CAAA,CAAA;AAEnE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,eAAe,OAAQ,CAAA,IAAA;AAAA,MACvB,OAAA;AAAA,MACA,SAAS,EAAA,IAAA;AAAA,MACT,QAAU,EAAA;AAAA,QACR,KAAO,EAAA,YAAA;AAAA,QACP,IAAM,EAAA,eAAA;AAAA,OACR;AAAA,KAAA;AAAA,oBAEA,KAAA,CAAA,aAAA;AAAA,MAAC,oBAAA;AAAA,MAAA;AAAA,QACE,GAAG,KAAA;AAAA,QACJ,iBAAiB,eAAmB,IAAA,UAAA;AAAA,QACpC,aAAa,WAAe,IAAA,kBAAA;AAAA,QAC5B,SAAA,EAAW,aAAa,OAAQ,CAAA,KAAA;AAAA,QAChC,QAAA;AAAA,QACA,cAAA;AAAA,QACA,cAAA;AAAA,QACA,SAAA;AAAA,QACA,aAAA;AAAA,QACA,YAAA;AAAA,QACA,IAAA;AAAA,OAAA;AAAA,KACF;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogGraphPage.esm.js","sources":["../../../src/components/CatalogGraphPage/CatalogGraphPage.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 { parseEntityRef } from '@backstage/catalog-model';\nimport {\n Content,\n ContentHeader,\n Header,\n Page,\n SupportButton,\n} from '@backstage/core-components';\nimport { useAnalytics, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n entityRouteRef,\n humanizeEntityRef,\n} from '@backstage/plugin-catalog-react';\nimport Grid from '@material-ui/core/Grid';\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport FilterListIcon from '@material-ui/icons/FilterList';\nimport ZoomOutMap from '@material-ui/icons/ZoomOutMap';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport React, { MouseEvent, useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport {\n ALL_RELATION_PAIRS,\n Direction,\n EntityNode,\n EntityRelationsGraph,\n EntityRelationsGraphProps,\n} from '../EntityRelationsGraph';\nimport { CurveFilter } from './CurveFilter';\nimport { DirectionFilter } from './DirectionFilter';\nimport { MaxDepthFilter } from './MaxDepthFilter';\nimport { SelectedKindsFilter } from './SelectedKindsFilter';\nimport { SelectedRelationsFilter } from './SelectedRelationsFilter';\nimport { SwitchFilter } from './SwitchFilter';\nimport { useCatalogGraphPage } from './useCatalogGraphPage';\n\nconst useStyles = makeStyles(\n theme => ({\n content: {\n minHeight: 0,\n },\n container: {\n height: '100%',\n maxHeight: '100%',\n minHeight: 0,\n },\n fullHeight: {\n maxHeight: '100%',\n display: 'flex',\n minHeight: 0,\n },\n graphWrapper: {\n position: 'relative',\n flex: 1,\n minHeight: 0,\n display: 'flex',\n },\n graph: {\n flex: 1,\n minHeight: 0,\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 filters: {\n display: 'grid',\n gridGap: theme.spacing(1),\n gridAutoRows: 'auto',\n [theme.breakpoints.up('lg')]: {\n display: 'block',\n },\n [theme.breakpoints.only('md')]: {\n gridTemplateColumns: 'repeat(3, 1fr)',\n },\n [theme.breakpoints.only('sm')]: {\n gridTemplateColumns: 'repeat(2, 1fr)',\n },\n [theme.breakpoints.down('xs')]: {\n gridTemplateColumns: 'repeat(1, 1fr)',\n },\n },\n }),\n { name: 'PluginCatalogGraphCatalogGraphPage' },\n);\n\nexport const CatalogGraphPage = (\n props: {\n initialState?: {\n selectedRelations?: string[];\n selectedKinds?: string[];\n rootEntityRefs?: string[];\n maxDepth?: number;\n unidirectional?: boolean;\n mergeRelations?: boolean;\n direction?: Direction;\n showFilters?: boolean;\n curve?: 'curveStepBefore' | 'curveMonotoneX';\n };\n } & Partial<EntityRelationsGraphProps>,\n) => {\n const {\n relationPairs = ALL_RELATION_PAIRS,\n initialState,\n entityFilter,\n } = props;\n\n const navigate = useNavigate();\n const classes = useStyles();\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const {\n maxDepth,\n setMaxDepth,\n selectedKinds,\n setSelectedKinds,\n selectedRelations,\n setSelectedRelations,\n unidirectional,\n setUnidirectional,\n mergeRelations,\n setMergeRelations,\n direction,\n setDirection,\n curve,\n setCurve,\n rootEntityNames,\n setRootEntityNames,\n showFilters,\n toggleShowFilters,\n } = useCatalogGraphPage({ initialState });\n const analytics = useAnalytics();\n const onNodeClick = useCallback(\n (node: EntityNode, event: MouseEvent<unknown>) => {\n const nodeEntityName = parseEntityRef(node.id);\n\n if (event.shiftKey) {\n const path = catalogEntityRoute({\n kind: nodeEntityName.kind.toLocaleLowerCase('en-US'),\n namespace: nodeEntityName.namespace.toLocaleLowerCase('en-US'),\n name: nodeEntityName.name,\n });\n\n analytics.captureEvent(\n 'click',\n node.entity.metadata.title ?? humanizeEntityRef(nodeEntityName),\n { attributes: { to: path } },\n );\n navigate(path);\n } else {\n analytics.captureEvent(\n 'click',\n node.entity.metadata.title ?? humanizeEntityRef(nodeEntityName),\n );\n setRootEntityNames([nodeEntityName]);\n }\n },\n [catalogEntityRoute, navigate, setRootEntityNames, analytics],\n );\n\n return (\n <Page themeId=\"home\">\n <Header\n title=\"Catalog Graph\"\n subtitle={rootEntityNames.map(e => humanizeEntityRef(e)).join(', ')}\n />\n <Content stretch className={classes.content}>\n <ContentHeader\n titleComponent={\n <ToggleButton\n value=\"show filters\"\n selected={showFilters}\n onChange={() => toggleShowFilters()}\n >\n <FilterListIcon /> Filters\n </ToggleButton>\n }\n >\n <SupportButton>\n Start tracking your component in by adding it to the software\n catalog.\n </SupportButton>\n </ContentHeader>\n <Grid container alignItems=\"stretch\" className={classes.container}>\n {showFilters && (\n <Grid item xs={12} lg={2} className={classes.filters}>\n <MaxDepthFilter value={maxDepth} onChange={setMaxDepth} />\n <SelectedKindsFilter\n value={selectedKinds}\n onChange={setSelectedKinds}\n />\n <SelectedRelationsFilter\n value={selectedRelations}\n onChange={setSelectedRelations}\n relationPairs={relationPairs}\n />\n <DirectionFilter value={direction} onChange={setDirection} />\n <CurveFilter value={curve} onChange={setCurve} />\n <SwitchFilter\n value={unidirectional}\n onChange={setUnidirectional}\n label=\"Simplified\"\n />\n <SwitchFilter\n value={mergeRelations}\n onChange={setMergeRelations}\n label=\"Merge Relations\"\n />\n </Grid>\n )}\n <Grid item xs className={classes.fullHeight}>\n <Paper className={classes.graphWrapper}>\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\n around the diagram. Click to change active node, shift click to\n navigate to entity.\n </Typography>\n <EntityRelationsGraph\n {...props}\n rootEntityNames={rootEntityNames}\n maxDepth={maxDepth}\n kinds={\n selectedKinds && selectedKinds.length > 0\n ? selectedKinds\n : undefined\n }\n relations={\n selectedRelations && selectedRelations.length > 0\n ? selectedRelations\n : undefined\n }\n mergeRelations={mergeRelations}\n unidirectional={unidirectional}\n onNodeClick={onNodeClick}\n direction={direction}\n relationPairs={relationPairs}\n entityFilter={entityFilter}\n className={classes.graph}\n zoom=\"enabled\"\n curve={curve}\n />\n </Paper>\n </Grid>\n </Grid>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;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AAA,KAAA,CAAA;AAAA,MAEN,cAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,SAAA;AAAA,MACA,aAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAW,OAAQ,CAAA,KAAA;AAAA,MACnB,IAAK,EAAA,SAAA;AAAA,MACL,KAAA;AAAA,KAAA;AAAA,GAEJ,CACF,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"CatalogGraphPage.esm.js","sources":["../../../src/components/CatalogGraphPage/CatalogGraphPage.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 { parseEntityRef } from '@backstage/catalog-model';\nimport {\n Content,\n ContentHeader,\n Header,\n Page,\n SupportButton,\n} from '@backstage/core-components';\nimport { useAnalytics, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n entityRouteRef,\n humanizeEntityRef,\n} from '@backstage/plugin-catalog-react';\nimport Grid from '@material-ui/core/Grid';\nimport Paper from '@material-ui/core/Paper';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport FilterListIcon from '@material-ui/icons/FilterList';\nimport ZoomOutMap from '@material-ui/icons/ZoomOutMap';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport React, { MouseEvent, useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport {\n ALL_RELATION_PAIRS,\n Direction,\n EntityNode,\n EntityRelationsGraph,\n EntityRelationsGraphProps,\n} from '../EntityRelationsGraph';\nimport { CurveFilter } from './CurveFilter';\nimport { DirectionFilter } from './DirectionFilter';\nimport { MaxDepthFilter } from './MaxDepthFilter';\nimport { SelectedKindsFilter } from './SelectedKindsFilter';\nimport { SelectedRelationsFilter } from './SelectedRelationsFilter';\nimport { SwitchFilter } from './SwitchFilter';\nimport { useCatalogGraphPage } from './useCatalogGraphPage';\n\n/** @public */\nexport type CatalogGraphPageClassKey =\n | 'content'\n | 'container'\n | 'fullHeight'\n | 'graphWrapper'\n | 'graph'\n | 'legend'\n | 'filters';\n\nconst useStyles = makeStyles(\n theme => ({\n content: {\n minHeight: 0,\n },\n container: {\n height: '100%',\n maxHeight: '100%',\n minHeight: 0,\n },\n fullHeight: {\n maxHeight: '100%',\n display: 'flex',\n minHeight: 0,\n },\n graphWrapper: {\n position: 'relative',\n flex: 1,\n minHeight: 0,\n display: 'flex',\n },\n graph: {\n flex: 1,\n minHeight: 0,\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 filters: {\n display: 'grid',\n gridGap: theme.spacing(1),\n gridAutoRows: 'auto',\n [theme.breakpoints.up('lg')]: {\n display: 'block',\n },\n [theme.breakpoints.only('md')]: {\n gridTemplateColumns: 'repeat(3, 1fr)',\n },\n [theme.breakpoints.only('sm')]: {\n gridTemplateColumns: 'repeat(2, 1fr)',\n },\n [theme.breakpoints.down('xs')]: {\n gridTemplateColumns: 'repeat(1, 1fr)',\n },\n },\n }),\n { name: 'PluginCatalogGraphCatalogGraphPage' },\n);\n\nexport const CatalogGraphPage = (\n props: {\n initialState?: {\n selectedRelations?: string[];\n selectedKinds?: string[];\n rootEntityRefs?: string[];\n maxDepth?: number;\n unidirectional?: boolean;\n mergeRelations?: boolean;\n direction?: Direction;\n showFilters?: boolean;\n curve?: 'curveStepBefore' | 'curveMonotoneX';\n };\n } & Partial<EntityRelationsGraphProps>,\n) => {\n const {\n relationPairs = ALL_RELATION_PAIRS,\n initialState,\n entityFilter,\n } = props;\n\n const navigate = useNavigate();\n const classes = useStyles();\n const catalogEntityRoute = useRouteRef(entityRouteRef);\n const {\n maxDepth,\n setMaxDepth,\n selectedKinds,\n setSelectedKinds,\n selectedRelations,\n setSelectedRelations,\n unidirectional,\n setUnidirectional,\n mergeRelations,\n setMergeRelations,\n direction,\n setDirection,\n curve,\n setCurve,\n rootEntityNames,\n setRootEntityNames,\n showFilters,\n toggleShowFilters,\n } = useCatalogGraphPage({ initialState });\n const analytics = useAnalytics();\n const onNodeClick = useCallback(\n (node: EntityNode, event: MouseEvent<unknown>) => {\n const nodeEntityName = parseEntityRef(node.id);\n\n if (event.shiftKey) {\n const path = catalogEntityRoute({\n kind: nodeEntityName.kind.toLocaleLowerCase('en-US'),\n namespace: nodeEntityName.namespace.toLocaleLowerCase('en-US'),\n name: nodeEntityName.name,\n });\n\n analytics.captureEvent(\n 'click',\n node.entity.metadata.title ?? humanizeEntityRef(nodeEntityName),\n { attributes: { to: path } },\n );\n navigate(path);\n } else {\n analytics.captureEvent(\n 'click',\n node.entity.metadata.title ?? humanizeEntityRef(nodeEntityName),\n );\n setRootEntityNames([nodeEntityName]);\n }\n },\n [catalogEntityRoute, navigate, setRootEntityNames, analytics],\n );\n\n return (\n <Page themeId=\"home\">\n <Header\n title=\"Catalog Graph\"\n subtitle={rootEntityNames.map(e => humanizeEntityRef(e)).join(', ')}\n />\n <Content stretch className={classes.content}>\n <ContentHeader\n titleComponent={\n <ToggleButton\n value=\"show filters\"\n selected={showFilters}\n onChange={() => toggleShowFilters()}\n >\n <FilterListIcon /> Filters\n </ToggleButton>\n }\n >\n <SupportButton>\n Start tracking your component in by adding it to the software\n catalog.\n </SupportButton>\n </ContentHeader>\n <Grid container alignItems=\"stretch\" className={classes.container}>\n {showFilters && (\n <Grid item xs={12} lg={2} className={classes.filters}>\n <MaxDepthFilter value={maxDepth} onChange={setMaxDepth} />\n <SelectedKindsFilter\n value={selectedKinds}\n onChange={setSelectedKinds}\n />\n <SelectedRelationsFilter\n value={selectedRelations}\n onChange={setSelectedRelations}\n relationPairs={relationPairs}\n />\n <DirectionFilter value={direction} onChange={setDirection} />\n <CurveFilter value={curve} onChange={setCurve} />\n <SwitchFilter\n value={unidirectional}\n onChange={setUnidirectional}\n label=\"Simplified\"\n />\n <SwitchFilter\n value={mergeRelations}\n onChange={setMergeRelations}\n label=\"Merge Relations\"\n />\n </Grid>\n )}\n <Grid item xs className={classes.fullHeight}>\n <Paper className={classes.graphWrapper}>\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\n around the diagram. Click to change active node, shift click to\n navigate to entity.\n </Typography>\n <EntityRelationsGraph\n {...props}\n rootEntityNames={rootEntityNames}\n maxDepth={maxDepth}\n kinds={\n selectedKinds && selectedKinds.length > 0\n ? selectedKinds\n : undefined\n }\n relations={\n selectedRelations && selectedRelations.length > 0\n ? selectedRelations\n : undefined\n }\n mergeRelations={mergeRelations}\n unidirectional={unidirectional}\n onNodeClick={onNodeClick}\n direction={direction}\n relationPairs={relationPairs}\n entityFilter={entityFilter}\n className={classes.graph}\n zoom=\"enabled\"\n curve={curve}\n />\n </Paper>\n </Grid>\n </Grid>\n </Content>\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+DA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,SAAW,EAAA,CAAA;AAAA,KACb;AAAA,IACA,SAAW,EAAA;AAAA,MACT,MAAQ,EAAA,MAAA;AAAA,MACR,SAAW,EAAA,MAAA;AAAA,MACX,SAAW,EAAA,CAAA;AAAA,KACb;AAAA,IACA,UAAY,EAAA;AAAA,MACV,SAAW,EAAA,MAAA;AAAA,MACX,OAAS,EAAA,MAAA;AAAA,MACT,SAAW,EAAA,CAAA;AAAA,KACb;AAAA,IACA,YAAc,EAAA;AAAA,MACZ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GAEV,CAAA,kBAED,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,MAAI,IAAC,EAAA,EAAA,EAAE,IAAC,EAAA,SAAA,EAAW,QAAQ,UAC/B,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,EAAA,EAAA,SAAA,EAAW,QAAQ,YACxB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,SAAA;AAAA,MACR,KAAM,EAAA,eAAA;AAAA,MACN,OAAQ,EAAA,OAAA;AAAA,MACR,WAAW,OAAQ,CAAA,MAAA;AAAA,KAAA;AAAA,oBAEnB,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,SAAA,EAAU,MAAO,EAAA,CAAA;AAAA,IAAE,+GAAA;AAAA,GAIjC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,eAAA;AAAA,MACA,QAAA;AAAA,MACA,KACE,EAAA,aAAA,IAAiB,aAAc,CAAA,MAAA,GAAS,IACpC,aACA,GAAA,KAAA,CAAA;AAAA,MAEN,SACE,EAAA,iBAAA,IAAqB,iBAAkB,CAAA,MAAA,GAAS,IAC5C,iBACA,GAAA,KAAA,CAAA;AAAA,MAEN,cAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,SAAA;AAAA,MACA,aAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAW,OAAQ,CAAA,KAAA;AAAA,MACnB,IAAK,EAAA,SAAA;AAAA,MACL,KAAA;AAAA,KAAA;AAAA,GAEJ,CACF,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaxDepthFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/MaxDepthFilter.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 */\nimport Box from '@material-ui/core/Box';\nimport FormControl from '@material-ui/core/FormControl';\nimport IconButton from '@material-ui/core/IconButton';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport OutlinedInput from '@material-ui/core/OutlinedInput';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ClearIcon from '@material-ui/icons/Clear';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\n\nexport type Props = {\n value: number;\n onChange: (value: number) => void;\n};\n\nconst useStyles = makeStyles(\n {\n formControl: {\n width: '100%',\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphMaxDepthFilter' },\n);\n\nexport const MaxDepthFilter = ({ value, onChange }: Props) => {\n const classes = useStyles();\n const onChangeRef = useRef(onChange);\n const [currentValue, setCurrentValue] = useState(value);\n\n // Keep a fresh reference to the latest callback\n useEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n\n // If the value changes externally, update ourselves\n useEffect(() => {\n setCurrentValue(value);\n }, [value]);\n\n // When the entered text changes, update ourselves and communicate externally\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValueNumeric = Number(event.target.value);\n const newValue =\n Number.isFinite(newValueNumeric) && newValueNumeric > 0\n ? newValueNumeric\n : Number.POSITIVE_INFINITY;\n setCurrentValue(newValue);\n onChangeRef.current(newValue);\n },\n [],\n );\n\n const reset = useCallback(() => {\n setCurrentValue(Number.POSITIVE_INFINITY);\n onChangeRef.current(Number.POSITIVE_INFINITY);\n }, [onChangeRef]);\n\n return (\n <Box pb={1} pt={1}>\n <FormControl variant=\"outlined\" className={classes.formControl}>\n <Typography variant=\"button\">Max Depth</Typography>\n <OutlinedInput\n type=\"number\"\n placeholder=\"∞ Infinite\"\n value={Number.isFinite(currentValue) ? String(currentValue) : ''}\n onChange={handleChange}\n endAdornment={\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"clear max depth\"\n onClick={reset}\n edge=\"end\"\n >\n <ClearIcon />\n </IconButton>\n </InputAdornment>\n }\n inputProps={{\n 'aria-label': 'maxp',\n }}\n labelWidth={0}\n />\n </FormControl>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"MaxDepthFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/MaxDepthFilter.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 */\nimport Box from '@material-ui/core/Box';\nimport FormControl from '@material-ui/core/FormControl';\nimport IconButton from '@material-ui/core/IconButton';\nimport InputAdornment from '@material-ui/core/InputAdornment';\nimport OutlinedInput from '@material-ui/core/OutlinedInput';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport ClearIcon from '@material-ui/icons/Clear';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\n\nexport type Props = {\n value: number;\n onChange: (value: number) => void;\n};\n\n/** @public */\nexport type MaxDepthFilterClassKey = 'formControl';\n\nconst useStyles = makeStyles(\n {\n formControl: {\n width: '100%',\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphMaxDepthFilter' },\n);\n\nexport const MaxDepthFilter = ({ value, onChange }: Props) => {\n const classes = useStyles();\n const onChangeRef = useRef(onChange);\n const [currentValue, setCurrentValue] = useState(value);\n\n // Keep a fresh reference to the latest callback\n useEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n\n // If the value changes externally, update ourselves\n useEffect(() => {\n setCurrentValue(value);\n }, [value]);\n\n // When the entered text changes, update ourselves and communicate externally\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValueNumeric = Number(event.target.value);\n const newValue =\n Number.isFinite(newValueNumeric) && newValueNumeric > 0\n ? newValueNumeric\n : Number.POSITIVE_INFINITY;\n setCurrentValue(newValue);\n onChangeRef.current(newValue);\n },\n [],\n );\n\n const reset = useCallback(() => {\n setCurrentValue(Number.POSITIVE_INFINITY);\n onChangeRef.current(Number.POSITIVE_INFINITY);\n }, [onChangeRef]);\n\n return (\n <Box pb={1} pt={1}>\n <FormControl variant=\"outlined\" className={classes.formControl}>\n <Typography variant=\"button\">Max Depth</Typography>\n <OutlinedInput\n type=\"number\"\n placeholder=\"∞ Infinite\"\n value={Number.isFinite(currentValue) ? String(currentValue) : ''}\n onChange={handleChange}\n endAdornment={\n <InputAdornment position=\"end\">\n <IconButton\n aria-label=\"clear max depth\"\n onClick={reset}\n edge=\"end\"\n >\n <ClearIcon />\n </IconButton>\n </InputAdornment>\n }\n inputProps={{\n 'aria-label': 'maxp',\n }}\n labelWidth={0}\n />\n </FormControl>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAiCA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,WAAa,EAAA;AAAA,MACX,KAAO,EAAA,MAAA;AAAA,MACP,QAAU,EAAA,GAAA;AAAA,KACZ;AAAA,GACF;AAAA,EACA,EAAE,MAAM,kCAAmC,EAAA;AAC7C,CAAA,CAAA;AAEO,MAAM,cAAiB,GAAA,CAAC,EAAE,KAAA,EAAO,UAAsB,KAAA;AAC5D,EAAA,MAAM,UAAU,SAAU,EAAA,C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AAS,WAAS,CACtC,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,IAAK,EAAA,QAAA;AAAA,MACL,WAAY,EAAA,iBAAA;AAAA,MACZ,OAAO,MAAO,CAAA,QAAA,CAAS,YAAY,CAAI,GAAA,MAAA,CAAO,YAAY,CAAI,GAAA,EAAA;AAAA,MAC9D,QAAU,EAAA,YAAA;AAAA,MACV,YACE,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,QAAA,EAAS,KACvB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,YAAW,EAAA,iBAAA;AAAA,UACX,OAAS,EAAA,KAAA;AAAA,UACT,IAAK,EAAA,KAAA;AAAA,SAAA;AAAA,4CAEJ,SAAU,EAAA,IAAA,CAAA;AAAA,OAEf,CAAA;AAAA,MAEF,UAAY,EAAA;AAAA,QACV,YAAc,EAAA,MAAA;AAAA,OAChB;AAAA,MACA,UAAY,EAAA,CAAA;AAAA,KAAA;AAAA,GAEhB,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectedKindsFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/SelectedKindsFilter.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 */\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\n\nconst useStyles = makeStyles(\n {\n formControl: {\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphSelectedKindsFilter' },\n);\n\nexport type Props = {\n value: string[] | undefined;\n onChange: (value: string[] | undefined) => void;\n};\n\nexport const SelectedKindsFilter = ({ value, onChange }: Props) => {\n const classes = useStyles();\n const alertApi = useApi(alertApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const { error, value: kinds } = useAsync(async () => {\n return await catalogApi\n .getEntityFacets({ facets: ['kind'] })\n .then(response => response.facets.kind?.map(f => f.value).sort() || []);\n });\n\n useEffect(() => {\n if (error) {\n alertApi.post({\n message: `Failed to load entity kinds`,\n severity: 'error',\n });\n }\n }, [error, alertApi]);\n\n const normalizedKinds = useMemo(\n () => (kinds ? kinds.map(k => k.toLocaleLowerCase('en-US')) : kinds),\n [kinds],\n );\n\n const handleChange = useCallback(\n (_: unknown, v: string[]) => {\n onChange(\n normalizedKinds && normalizedKinds.every(r => v.includes(r))\n ? undefined\n : v,\n );\n },\n [normalizedKinds, onChange],\n );\n\n const handleEmpty = useCallback(() => {\n onChange(value?.length ? value : undefined);\n }, [value, onChange]);\n\n if (!kinds?.length || !normalizedKinds?.length || error) {\n return <></>;\n }\n\n return (\n <Box pb={1} pt={1}>\n <Typography variant=\"button\">Kinds</Typography>\n <Autocomplete\n className={classes.formControl}\n multiple\n limitTags={4}\n disableCloseOnSelect\n aria-label=\"Kinds\"\n options={normalizedKinds}\n value={value ?? normalizedKinds}\n getOptionLabel={k => kinds[normalizedKinds.indexOf(k)] ?? k}\n onChange={handleChange}\n onBlur={handleEmpty}\n renderOption={(option, { selected }) => (\n <FormControlLabel\n control={\n <Checkbox\n icon={<CheckBoxOutlineBlankIcon fontSize=\"small\" />}\n checkedIcon={<CheckBoxIcon fontSize=\"small\" />}\n checked={selected}\n />\n }\n label={kinds[normalizedKinds.indexOf(option)] ?? option}\n />\n )}\n size=\"small\"\n popupIcon={<ExpandMoreIcon data-testid=\"selected-kinds-expand\" />}\n renderInput={params => <TextField {...params} variant=\"outlined\" />}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SelectedKindsFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/SelectedKindsFilter.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 */\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\nimport { catalogApiRef } from '@backstage/plugin-catalog-react';\nimport Box from '@material-ui/core/Box';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\n\n/** @public */\nexport type SelectedKindsFilterClassKey = 'formControl';\n\nconst useStyles = makeStyles(\n {\n formControl: {\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphSelectedKindsFilter' },\n);\n\nexport type Props = {\n value: string[] | undefined;\n onChange: (value: string[] | undefined) => void;\n};\n\nexport const SelectedKindsFilter = ({ value, onChange }: Props) => {\n const classes = useStyles();\n const alertApi = useApi(alertApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const { error, value: kinds } = useAsync(async () => {\n return await catalogApi\n .getEntityFacets({ facets: ['kind'] })\n .then(response => response.facets.kind?.map(f => f.value).sort() || []);\n });\n\n useEffect(() => {\n if (error) {\n alertApi.post({\n message: `Failed to load entity kinds`,\n severity: 'error',\n });\n }\n }, [error, alertApi]);\n\n const normalizedKinds = useMemo(\n () => (kinds ? kinds.map(k => k.toLocaleLowerCase('en-US')) : kinds),\n [kinds],\n );\n\n const handleChange = useCallback(\n (_: unknown, v: string[]) => {\n onChange(\n normalizedKinds && normalizedKinds.every(r => v.includes(r))\n ? undefined\n : v,\n );\n },\n [normalizedKinds, onChange],\n );\n\n const handleEmpty = useCallback(() => {\n onChange(value?.length ? value : undefined);\n }, [value, onChange]);\n\n if (!kinds?.length || !normalizedKinds?.length || error) {\n return <></>;\n }\n\n return (\n <Box pb={1} pt={1}>\n <Typography variant=\"button\">Kinds</Typography>\n <Autocomplete\n className={classes.formControl}\n multiple\n limitTags={4}\n disableCloseOnSelect\n aria-label=\"Kinds\"\n options={normalizedKinds}\n value={value ?? normalizedKinds}\n getOptionLabel={k => kinds[normalizedKinds.indexOf(k)] ?? k}\n onChange={handleChange}\n onBlur={handleEmpty}\n renderOption={(option, { selected }) => (\n <FormControlLabel\n control={\n <Checkbox\n icon={<CheckBoxOutlineBlankIcon fontSize=\"small\" />}\n checkedIcon={<CheckBoxIcon fontSize=\"small\" />}\n checked={selected}\n />\n }\n label={kinds[normalizedKinds.indexOf(option)] ?? option}\n />\n )}\n size=\"small\"\n popupIcon={<ExpandMoreIcon data-testid=\"selected-kinds-expand\" />}\n renderInput={params => <TextField {...params} variant=\"outlined\" />}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,WAAa,EAAA;AAAA,MACX,QAAU,EAAA,GAAA;AAAA,KACZ;AAAA,GACF;AAAA,EACA,EAAE,MAAM,uCAAwC,EAAA;AAClD,CAAA,CAAA;AAOO,MAAM,mBAAsB,GAAA,CAAC,EAAE,KAAA,EAAO,UAAsB,KAAA;AACjE,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA,CAAA;AACnC,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AAEvC,EAAA,MAAM,EAAE,KAAO,EAAA,KAAA,EAAO,KAAM,EAAA,GAAI,SAAS,YAAY;AACnD,IAAO,OAAA,MAAM,WACV,eAAgB,CAAA,EAAE,QAAQ,CAAC,MAAM,CAAE,EAAC,CACpC,CAAA,IAAA,CAAK,cAAY,QAAS,CAAA,MAAA,CAAO,IAAM,EAAA,GAAA,CAAI,CAAK,CAAA,KAAA,CAAA,CAAE,KAAK,CAAE,CAAA,IAAA,EAAU,IAAA,EAAE,CAAA,CAAA;AAAA,GACzE,CAAA,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,KAAO,EAAA;AACT,MAAA,QAAA,CAAS,IAAK,CAAA;AAAA,QACZ,OAAS,EAAA,CAAA,2BAAA,CAAA;AAAA,QACT,QAAU,EAAA,OAAA;AAAA,OACX,CAAA,CAAA;AAAA,KACH;AAAA,GACC,EAAA,CAAC,KAAO,EAAA,QAAQ,CAAC,CAAA,CAAA;AAEpB,EAAA,MAAM,eAAkB,GAAA,OAAA;AAAA,IACtB,MAAO,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AAAA,MACX,OAAS,EAAA,eAAA;AAAA,MACT,OAAO,KAAS,IAAA,eAAA;AAAA,MAChB,gBAAgB,CAAK,CAAA,KAAA,KAAA,CAAM,gBAAgB,OAAQ,CAAA,CAAC,CAAC,CAAK,IAAA,CAAA;AAAA,MAC1D,QAAU,EAAA,YAAA;AAAA,MACV,MAAQ,EAAA,WAAA;AAAA,MACR,YAAc,EAAA,CAAC,MAAQ,EAAA,EAAE,UACvB,qBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,gBAAA;AAAA,QAAA;AAAA,UACC,OACE,kBAAA,KAAA,CAAA,aAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,IAAM,kBAAA,KAAA,CAAA,aAAA,CAAC,wBAAyB,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,cACjD,WAAa,kBAAA,KAAA,CAAA,aAAA,CAAC,YAAa,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,cAC5C,OAAS,EAAA,QAAA;AAAA,aAAA;AAAA,WACX;AAAA,UAEF,OAAO,KAAM,CAAA,eAAA,CAAgB,OAAQ,CAAA,MAAM,CAAC,CAAK,IAAA,MAAA;AAAA,SAAA;AAAA,OACnD;AAAA,MAEF,IAAK,EAAA,OAAA;AAAA,MACL,SAAW,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,aAAA,EAAY,uBAAwB,EAAA,CAAA;AAAA,MAC/D,aAAa,CAAU,MAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,aAAW,GAAG,MAAA,EAAQ,SAAQ,UAAW,EAAA,CAAA;AAAA,KAAA;AAAA,GAErE,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectedRelationsFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/SelectedRelationsFilter.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 */\nimport Box from '@material-ui/core/Box';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport React, { useCallback, useMemo } from 'react';\nimport { RelationPairs } from '../EntityRelationsGraph';\n\nconst useStyles = makeStyles(\n {\n formControl: {\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphSelectedRelationsFilter' },\n);\n\nexport type Props = {\n relationPairs: RelationPairs;\n value: string[] | undefined;\n onChange: (value: string[] | undefined) => void;\n};\n\nexport const SelectedRelationsFilter = ({\n relationPairs,\n value,\n onChange,\n}: Props) => {\n const classes = useStyles();\n const relations = useMemo(() => relationPairs.flat(), [relationPairs]);\n\n const handleChange = useCallback(\n (_: unknown, v: string[]) => {\n onChange(relations.every(r => v.includes(r)) ? undefined : v);\n },\n [relations, onChange],\n );\n\n const handleEmpty = useCallback(() => {\n onChange(value?.length ? value : undefined);\n }, [value, onChange]);\n\n return (\n <Box pb={1} pt={1}>\n <Typography variant=\"button\">Relations</Typography>\n <Autocomplete\n className={classes.formControl}\n multiple\n limitTags={4}\n disableCloseOnSelect\n aria-label=\"Relations\"\n options={relations}\n value={value ?? relations}\n onChange={handleChange}\n onBlur={handleEmpty}\n renderOption={(option, { selected }) => (\n <FormControlLabel\n control={\n <Checkbox\n icon={<CheckBoxOutlineBlankIcon fontSize=\"small\" />}\n checkedIcon={<CheckBoxIcon fontSize=\"small\" />}\n checked={selected}\n />\n }\n label={option}\n />\n )}\n size=\"small\"\n popupIcon={<ExpandMoreIcon data-testid=\"selected-relations-expand\" />}\n renderInput={params => <TextField {...params} variant=\"outlined\" />}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SelectedRelationsFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/SelectedRelationsFilter.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 */\nimport Box from '@material-ui/core/Box';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport TextField from '@material-ui/core/TextField';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport CheckBoxIcon from '@material-ui/icons/CheckBox';\nimport CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank';\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport React, { useCallback, useMemo } from 'react';\nimport { RelationPairs } from '../EntityRelationsGraph';\n\n/** @public */\nexport type SelectedRelationsFilterClassKey = 'formControl';\n\nconst useStyles = makeStyles(\n {\n formControl: {\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphSelectedRelationsFilter' },\n);\n\nexport type Props = {\n relationPairs: RelationPairs;\n value: string[] | undefined;\n onChange: (value: string[] | undefined) => void;\n};\n\nexport const SelectedRelationsFilter = ({\n relationPairs,\n value,\n onChange,\n}: Props) => {\n const classes = useStyles();\n const relations = useMemo(() => relationPairs.flat(), [relationPairs]);\n\n const handleChange = useCallback(\n (_: unknown, v: string[]) => {\n onChange(relations.every(r => v.includes(r)) ? undefined : v);\n },\n [relations, onChange],\n );\n\n const handleEmpty = useCallback(() => {\n onChange(value?.length ? value : undefined);\n }, [value, onChange]);\n\n return (\n <Box pb={1} pt={1}>\n <Typography variant=\"button\">Relations</Typography>\n <Autocomplete\n className={classes.formControl}\n multiple\n limitTags={4}\n disableCloseOnSelect\n aria-label=\"Relations\"\n options={relations}\n value={value ?? relations}\n onChange={handleChange}\n onBlur={handleEmpty}\n renderOption={(option, { selected }) => (\n <FormControlLabel\n control={\n <Checkbox\n icon={<CheckBoxOutlineBlankIcon fontSize=\"small\" />}\n checkedIcon={<CheckBoxIcon fontSize=\"small\" />}\n checked={selected}\n />\n }\n label={option}\n />\n )}\n size=\"small\"\n popupIcon={<ExpandMoreIcon data-testid=\"selected-relations-expand\" />}\n renderInput={params => <TextField {...params} variant=\"outlined\" />}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AA+BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,WAAa,EAAA;AAAA,MACX,QAAU,EAAA,GAAA;AAAA,KACZ;AAAA,GACF;AAAA,EACA,EAAE,MAAM,2CAA4C,EAAA;AACtD,CAAA,CAAA;AAQO,MAAM,0BAA0B,CAAC;AAAA,EACtC,aAAA;AAAA,EACA,KAAA;AAAA,EACA,QAAA;AACF,CAAa,KAAA;AACX,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAM,MAAA,SAAA,GAAY,QAAQ,MAAM,aAAA,CAAc,MAAQ,EAAA,CAAC,aAAa,CAAC,CAAA,CAAA;AAErE,EAAA,MAAM,YAAe,GAAA,WAAA;AA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AAQ,EAAA,CAAA;AAAA,cACjD,WAAa,kBAAA,KAAA,CAAA,aAAA,CAAC,YAAa,EAAA,EAAA,QAAA,EAAS,OAAQ,EAAA,CAAA;AAAA,cAC5C,OAAS,EAAA,QAAA;AAAA,aAAA;AAAA,WACX;AAAA,UAEF,KAAO,EAAA,MAAA;AAAA,SAAA;AAAA,OACT;AAAA,MAEF,IAAK,EAAA,OAAA;AAAA,MACL,SAAW,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,aAAA,EAAY,2BAA4B,EAAA,CAAA;AAAA,MACnE,aAAa,CAAU,MAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,aAAW,GAAG,MAAA,EAAQ,SAAQ,UAAW,EAAA,CAAA;AAAA,KAAA;AAAA,GAErE,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/SwitchFilter.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 */\nimport Box from '@material-ui/core/Box';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Switch from '@material-ui/core/Switch';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useCallback } from 'react';\n\nexport type Props = {\n label: string;\n value: boolean;\n onChange: (value: boolean) => void;\n};\n\nconst useStyles = makeStyles(\n {\n root: {\n width: '100%',\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphSwitchFilter' },\n);\n\nexport const SwitchFilter = ({ label, value, onChange }: Props) => {\n const classes = useStyles();\n\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange(event.target.checked);\n },\n [onChange],\n );\n\n return (\n <Box pb={1} pt={1}>\n <FormControlLabel\n control={\n <Switch\n checked={value}\n onChange={handleChange}\n name={label}\n color=\"primary\"\n />\n }\n label={label}\n className={classes.root}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"SwitchFilter.esm.js","sources":["../../../src/components/CatalogGraphPage/SwitchFilter.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 */\nimport Box from '@material-ui/core/Box';\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\nimport Switch from '@material-ui/core/Switch';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useCallback } from 'react';\n\nexport type Props = {\n label: string;\n value: boolean;\n onChange: (value: boolean) => void;\n};\n\n/** @public */\nexport type SwitchFilterClassKey = 'root';\n\nconst useStyles = makeStyles(\n {\n root: {\n width: '100%',\n maxWidth: 300,\n },\n },\n { name: 'PluginCatalogGraphSwitchFilter' },\n);\n\nexport const SwitchFilter = ({ label, value, onChange }: Props) => {\n const classes = useStyles();\n\n const handleChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange(event.target.checked);\n },\n [onChange],\n );\n\n return (\n <Box pb={1} pt={1}>\n <FormControlLabel\n control={\n <Switch\n checked={value}\n onChange={handleChange}\n name={label}\n color=\"primary\"\n />\n }\n label={label}\n className={classes.root}\n />\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;AA8BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA,MAAA;AAAA,MACP,QAAU,EAAA,GAAA;AAAA,KACZ;AAAA,GACF;AAAA,EACA,EAAE,MAAM,gCAAiC,EAAA;AAC3C,CAAA,CAAA;AAEO,MAAM,eAAe,CAAC,EAAE,KAAO,EAAA,KAAA,EAAO,UAAsB,KAAA;AACjE,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAE1B,EAAA,MAAM,YAAe,GAAA,WAAA;AAAA,IACnB,CAAC,KAA+C,KAAA;AAC9C,MAAS,QAAA,CAAA,KAAA,CAAM,OAAO,OAAO,CAAA,CAAA;AAAA,KAC/B;AAAA,IACA,CAAC,QAAQ,CAAA;AAAA,GACX,CAAA;AAEA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,CAAA,EAAG,IAAI,CACd,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,OACE,kBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,OAAS,EAAA,KAAA;AAAA,UACT,QAAU,EAAA,YAAA;AAAA,UACV,IAAM,EAAA,KAAA;AAAA,UACN,KAAM,EAAA,SAAA;AAAA,SAAA;AAAA,OACR;AAAA,MAEF,KAAA;AAAA,MACA,WAAW,OAAQ,CAAA,IAAA;AAAA,KAAA;AAAA,GAEvB,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultRenderLabel.esm.js","sources":["../../../src/components/EntityRelationsGraph/DefaultRenderLabel.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 */\nimport { DependencyGraphTypes } from '@backstage/core-components';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport React from 'react';\nimport { EntityEdgeData } from './types';\nimport classNames from 'classnames';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fill: theme.palette.textContrast,\n },\n secondary: {\n fill: theme.palette.textSubtle,\n },\n }),\n { name: 'PluginCatalogGraphCustomLabel' },\n);\n\nexport function DefaultRenderLabel({\n edge: { relations },\n}: DependencyGraphTypes.RenderLabelProps<EntityEdgeData>) {\n const classes = useStyles();\n return (\n <text className={classes.text} textAnchor=\"middle\">\n {relations.map((r, i) => (\n <tspan key={r} className={classNames(i % 2 !== 0 && classes.secondary)}>\n {i > 0 && <tspan> / </tspan>}\n {r}\n </tspan>\n ))}\n </text>\n );\n}\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"DefaultRenderLabel.esm.js","sources":["../../../src/components/EntityRelationsGraph/DefaultRenderLabel.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 */\nimport { DependencyGraphTypes } from '@backstage/core-components';\nimport makeStyles from '@material-ui/core/styles/makeStyles';\nimport React from 'react';\nimport { EntityEdgeData } from './types';\nimport classNames from 'classnames';\n\n/** @public */\nexport type CustomLabelClassKey = 'text' | 'secondary';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fill: theme.palette.textContrast,\n },\n secondary: {\n fill: theme.palette.textSubtle,\n },\n }),\n { name: 'PluginCatalogGraphCustomLabel' },\n);\n\nexport function DefaultRenderLabel({\n edge: { relations },\n}: DependencyGraphTypes.RenderLabelProps<EntityEdgeData>) {\n const classes = useStyles();\n return (\n <text className={classes.text} textAnchor=\"middle\">\n {relations.map((r, i) => (\n <tspan key={r} className={classNames(i % 2 !== 0 && classes.secondary)}>\n {i > 0 && <tspan> / </tspan>}\n {r}\n </tspan>\n ))}\n </text>\n );\n}\n"],"names":[],"mappings":";;;;AAwBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,IAAA,EAAM,MAAM,OAAQ,CAAA,YAAA;AAAA,KACtB;AAAA,IACA,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MAAM,OAAQ,CAAA,UAAA;AAAA,KACtB;AAAA,GACF,CAAA;AAAA,EACA,EAAE,MAAM,+BAAgC,EAAA;AAC1C,CAAA,CAAA;AAEO,SAAS,kBAAmB,CAAA;AAAA,EACjC,IAAA,EAAM,EAAE,SAAU,EAAA;AACpB,CAA0D,EAAA;AACxD,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAK,SAAW,EAAA,OAAA,CAAQ,MAAM,UAAW,EAAA,QAAA,EAAA,EACvC,SAAU,CAAA,GAAA,CAAI,CAAC,CAAA,EAAG,CACjB,qBAAA,KAAA,CAAA,aAAA,CAAC,WAAM,GAAK,EAAA,CAAA,EAAG,SAAW,EAAA,UAAA,CAAW,CAAI,GAAA,CAAA,KAAM,CAAK,IAAA,OAAA,CAAQ,SAAS,CAClE,EAAA,EAAA,CAAA,GAAI,CAAK,oBAAA,KAAA,CAAA,aAAA,CAAC,OAAM,EAAA,IAAA,EAAA,KAAG,CACnB,EAAA,CACH,CACD,CACH,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultRenderNode.esm.js","sources":["../../../src/components/EntityRelationsGraph/DefaultRenderNode.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 */\nimport { DependencyGraphTypes } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\nimport { useEntityPresentation } from '@backstage/plugin-catalog-react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { EntityIcon } from './EntityIcon';\nimport { EntityNodeData } from './types';\nimport { DEFAULT_NAMESPACE } from '@backstage/catalog-model';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n fill: theme.palette.grey[300],\n stroke: theme.palette.grey[300],\n\n '&.primary': {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n '&.secondary': {\n fill: theme.palette.secondary.light,\n stroke: theme.palette.secondary.light,\n },\n },\n text: {\n fill: theme.palette.getContrastText(theme.palette.grey[300]),\n\n '&.primary': {\n fill: theme.palette.primary.contrastText,\n },\n '&.secondary': {\n fill: theme.palette.secondary.contrastText,\n },\n '&.focused': {\n fontWeight: 'bold',\n },\n },\n clickable: {\n cursor: 'pointer',\n },\n }),\n { name: 'PluginCatalogGraphCustomNode' },\n);\n\nexport function DefaultRenderNode({\n node: { id, entity, color = 'default', focused, onClick },\n}: DependencyGraphTypes.RenderNodeProps<EntityNodeData>) {\n const classes = useStyles();\n const [width, setWidth] = useState(0);\n const [height, setHeight] = useState(0);\n const idRef = useRef<SVGTextElement | null>(null);\n const entityRefPresentationSnapshot = useEntityPresentation(entity, {\n defaultNamespace: DEFAULT_NAMESPACE,\n });\n\n useLayoutEffect(() => {\n // set the width to the length of the ID\n if (idRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n idRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setWidth(renderedWidth);\n setHeight(renderedHeight);\n }\n }\n }, [width, height]);\n\n const hasKindIcon = !!entityRefPresentationSnapshot.Icon;\n const padding = 10;\n const iconSize = height;\n const paddedIconWidth = hasKindIcon ? iconSize + padding : 0;\n const paddedWidth = paddedIconWidth + width + padding * 2;\n const paddedHeight = height + padding * 2;\n\n const displayTitle = entityRefPresentationSnapshot.primaryTitle ?? id;\n\n return (\n <g onClick={onClick} className={classNames(onClick && classes.clickable)}>\n <rect\n className={classNames(\n classes.node,\n color === 'primary' && 'primary',\n color === 'secondary' && 'secondary',\n )}\n width={paddedWidth}\n height={paddedHeight}\n rx={10}\n />\n {hasKindIcon && (\n <EntityIcon\n icon={entityRefPresentationSnapshot.Icon as IconComponent}\n y={padding}\n x={padding}\n width={iconSize}\n height={iconSize}\n className={classNames(\n classes.text,\n focused && 'focused',\n color === 'primary' && 'primary',\n color === 'secondary' && 'secondary',\n )}\n />\n )}\n <text\n ref={idRef}\n className={classNames(\n classes.text,\n focused && 'focused',\n color === 'primary' && 'primary',\n color === 'secondary' && 'secondary',\n )}\n y={paddedHeight / 2}\n x={paddedIconWidth + (width + padding * 2) / 2}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {displayTitle}\n </text>\n <title>{entityRefPresentationSnapshot.entityRef}</title>\n </g>\n );\n}\n"],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"DefaultRenderNode.esm.js","sources":["../../../src/components/EntityRelationsGraph/DefaultRenderNode.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 */\nimport { DependencyGraphTypes } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\nimport { useEntityPresentation } from '@backstage/plugin-catalog-react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { EntityIcon } from './EntityIcon';\nimport { EntityNodeData } from './types';\nimport { DEFAULT_NAMESPACE } from '@backstage/catalog-model';\n\n/** @public */\nexport type CustomNodeClassKey = 'node' | 'text' | 'clickable';\n\nconst useStyles = makeStyles(\n theme => ({\n node: {\n fill: theme.palette.grey[300],\n stroke: theme.palette.grey[300],\n\n '&.primary': {\n fill: theme.palette.primary.light,\n stroke: theme.palette.primary.light,\n },\n '&.secondary': {\n fill: theme.palette.secondary.light,\n stroke: theme.palette.secondary.light,\n },\n },\n text: {\n fill: theme.palette.getContrastText(theme.palette.grey[300]),\n\n '&.primary': {\n fill: theme.palette.primary.contrastText,\n },\n '&.secondary': {\n fill: theme.palette.secondary.contrastText,\n },\n '&.focused': {\n fontWeight: 'bold',\n },\n },\n clickable: {\n cursor: 'pointer',\n },\n }),\n { name: 'PluginCatalogGraphCustomNode' },\n);\n\nexport function DefaultRenderNode({\n node: { id, entity, color = 'default', focused, onClick },\n}: DependencyGraphTypes.RenderNodeProps<EntityNodeData>) {\n const classes = useStyles();\n const [width, setWidth] = useState(0);\n const [height, setHeight] = useState(0);\n const idRef = useRef<SVGTextElement | null>(null);\n const entityRefPresentationSnapshot = useEntityPresentation(entity, {\n defaultNamespace: DEFAULT_NAMESPACE,\n });\n\n useLayoutEffect(() => {\n // set the width to the length of the ID\n if (idRef.current) {\n let { height: renderedHeight, width: renderedWidth } =\n idRef.current.getBBox();\n renderedHeight = Math.round(renderedHeight);\n renderedWidth = Math.round(renderedWidth);\n\n if (renderedHeight !== height || renderedWidth !== width) {\n setWidth(renderedWidth);\n setHeight(renderedHeight);\n }\n }\n }, [width, height]);\n\n const hasKindIcon = !!entityRefPresentationSnapshot.Icon;\n const padding = 10;\n const iconSize = height;\n const paddedIconWidth = hasKindIcon ? iconSize + padding : 0;\n const paddedWidth = paddedIconWidth + width + padding * 2;\n const paddedHeight = height + padding * 2;\n\n const displayTitle = entityRefPresentationSnapshot.primaryTitle ?? id;\n\n return (\n <g onClick={onClick} className={classNames(onClick && classes.clickable)}>\n <rect\n className={classNames(\n classes.node,\n color === 'primary' && 'primary',\n color === 'secondary' && 'secondary',\n )}\n width={paddedWidth}\n height={paddedHeight}\n rx={10}\n />\n {hasKindIcon && (\n <EntityIcon\n icon={entityRefPresentationSnapshot.Icon as IconComponent}\n y={padding}\n x={padding}\n width={iconSize}\n height={iconSize}\n className={classNames(\n classes.text,\n focused && 'focused',\n color === 'primary' && 'primary',\n color === 'secondary' && 'secondary',\n )}\n />\n )}\n <text\n ref={idRef}\n className={classNames(\n classes.text,\n focused && 'focused',\n color === 'primary' && 'primary',\n color === 'secondary' && 'secondary',\n )}\n y={paddedHeight / 2}\n x={paddedIconWidth + (width + padding * 2) / 2}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {displayTitle}\n </text>\n <title>{entityRefPresentationSnapshot.entityRef}</title>\n </g>\n );\n}\n"],"names":[],"mappings":";;;;;;;AA4BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,IAAM,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAA;AAAA,MAC5B,MAAQ,EAA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X,iBAAkB,EAAA,QAAA;AAAA,KAAA;AAAA,IAEjB,YAAA;AAAA,GAEH,kBAAA,KAAA,CAAA,aAAA,CAAC,OAAO,EAAA,IAAA,EAAA,6BAAA,CAA8B,SAAU,CAClD,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityRelationsGraph.esm.js","sources":["../../../src/components/EntityRelationsGraph/EntityRelationsGraph.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 CompoundEntityRef,\n Entity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n DependencyGraph,\n DependencyGraphTypes,\n} from '@backstage/core-components';\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { MouseEvent, useEffect, useMemo } from 'react';\nimport { DefaultRenderLabel } from './DefaultRenderLabel';\nimport { DefaultRenderNode } from './DefaultRenderNode';\nimport { ALL_RELATION_PAIRS, RelationPairs } from './relations';\nimport { Direction, EntityEdge, EntityNode } from './types';\nimport { useEntityRelationNodesAndEdges } from './useEntityRelationNodesAndEdges';\n\nconst useStyles = makeStyles(\n theme => ({\n progress: {\n position: 'absolute',\n left: '50%',\n top: '50%',\n marginLeft: '-20px',\n marginTop: '-20px',\n },\n container: {\n position: 'relative',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n },\n graph: {\n width: '100%',\n flex: 1,\n // Right now there is no good way to style edges between nodes, we have to\n // fall back to these hacks:\n '& path[marker-end]': {\n transition: 'filter 0.1s ease-in-out',\n },\n '& path[marker-end]:hover': {\n filter: `drop-shadow(2px 2px 4px ${theme.palette.primary.dark});`,\n },\n '& g[data-testid=label]': {\n transition: 'transform 0s',\n },\n },\n }),\n { name: 'PluginCatalogGraphEntityRelationsGraph' },\n);\n\n/**\n * @public\n */\nexport type EntityRelationsGraphProps = {\n rootEntityNames: CompoundEntityRef | CompoundEntityRef[];\n maxDepth?: number;\n unidirectional?: boolean;\n mergeRelations?: boolean;\n kinds?: string[];\n relations?: string[];\n entityFilter?: (entity: Entity) => boolean;\n direction?: Direction;\n onNodeClick?: (value: EntityNode, event: MouseEvent<unknown>) => void;\n relationPairs?: RelationPairs;\n className?: string;\n zoom?: 'enabled' | 'disabled' | 'enable-on-click';\n renderNode?: DependencyGraphTypes.RenderNodeFunction<EntityNode>;\n renderLabel?: DependencyGraphTypes.RenderLabelFunction<EntityEdge>;\n curve?: 'curveStepBefore' | 'curveMonotoneX';\n showArrowHeads?: boolean;\n};\n\n/**\n * Core building block for custom entity relations diagrams.\n *\n * @public\n */\nexport const EntityRelationsGraph = (props: EntityRelationsGraphProps) => {\n const {\n rootEntityNames,\n maxDepth = 2,\n unidirectional = true,\n mergeRelations = true,\n kinds,\n relations,\n entityFilter,\n direction = Direction.LEFT_RIGHT,\n onNodeClick,\n relationPairs = ALL_RELATION_PAIRS,\n className,\n zoom = 'enabled',\n renderNode,\n renderLabel,\n curve,\n showArrowHeads,\n } = props;\n\n const theme = useTheme();\n const classes = useStyles();\n const rootEntityRefs = useMemo(\n () =>\n (Array.isArray(rootEntityNames)\n ? rootEntityNames\n : [rootEntityNames]\n ).map(e => stringifyEntityRef(e)),\n [rootEntityNames],\n );\n const errorApi = useApi(errorApiRef);\n const { loading, error, nodes, edges } = useEntityRelationNodesAndEdges({\n rootEntityRefs,\n maxDepth,\n unidirectional,\n mergeRelations,\n kinds,\n relations,\n entityFilter,\n onNodeClick,\n relationPairs,\n });\n\n useEffect(() => {\n if (error) {\n errorApi.post(error);\n }\n }, [errorApi, error]);\n\n return (\n <div className={classNames(classes.container, className)}>\n {loading && <CircularProgress className={classes.progress} />}\n {nodes && edges && (\n <DependencyGraph\n nodes={nodes}\n edges={edges}\n renderNode={renderNode || DefaultRenderNode}\n renderLabel={renderLabel || DefaultRenderLabel}\n direction={direction}\n className={classes.graph}\n paddingX={theme.spacing(4)}\n paddingY={theme.spacing(4)}\n labelPosition={DependencyGraphTypes.LabelPosition.RIGHT}\n labelOffset={theme.spacing(1)}\n zoom={zoom}\n curve={curve}\n showArrowHeads={showArrowHeads}\n />\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"EntityRelationsGraph.esm.js","sources":["../../../src/components/EntityRelationsGraph/EntityRelationsGraph.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 CompoundEntityRef,\n Entity,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n DependencyGraph,\n DependencyGraphTypes,\n} from '@backstage/core-components';\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { MouseEvent, useEffect, useMemo } from 'react';\nimport { DefaultRenderLabel } from './DefaultRenderLabel';\nimport { DefaultRenderNode } from './DefaultRenderNode';\nimport { ALL_RELATION_PAIRS, RelationPairs } from './relations';\nimport { Direction, EntityEdge, EntityNode } from './types';\nimport { useEntityRelationNodesAndEdges } from './useEntityRelationNodesAndEdges';\n\n/** @public */\nexport type EntityRelationsGraphClassKey = 'progress' | 'container' | 'graph';\n\nconst useStyles = makeStyles(\n theme => ({\n progress: {\n position: 'absolute',\n left: '50%',\n top: '50%',\n marginLeft: '-20px',\n marginTop: '-20px',\n },\n container: {\n position: 'relative',\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n },\n graph: {\n width: '100%',\n flex: 1,\n // Right now there is no good way to style edges between nodes, we have to\n // fall back to these hacks:\n '& path[marker-end]': {\n transition: 'filter 0.1s ease-in-out',\n },\n '& path[marker-end]:hover': {\n filter: `drop-shadow(2px 2px 4px ${theme.palette.primary.dark});`,\n },\n '& g[data-testid=label]': {\n transition: 'transform 0s',\n },\n },\n }),\n { name: 'PluginCatalogGraphEntityRelationsGraph' },\n);\n\n/**\n * @public\n */\nexport type EntityRelationsGraphProps = {\n rootEntityNames: CompoundEntityRef | CompoundEntityRef[];\n maxDepth?: number;\n unidirectional?: boolean;\n mergeRelations?: boolean;\n kinds?: string[];\n relations?: string[];\n entityFilter?: (entity: Entity) => boolean;\n direction?: Direction;\n onNodeClick?: (value: EntityNode, event: MouseEvent<unknown>) => void;\n relationPairs?: RelationPairs;\n className?: string;\n zoom?: 'enabled' | 'disabled' | 'enable-on-click';\n renderNode?: DependencyGraphTypes.RenderNodeFunction<EntityNode>;\n renderLabel?: DependencyGraphTypes.RenderLabelFunction<EntityEdge>;\n curve?: 'curveStepBefore' | 'curveMonotoneX';\n showArrowHeads?: boolean;\n};\n\n/**\n * Core building block for custom entity relations diagrams.\n *\n * @public\n */\nexport const EntityRelationsGraph = (props: EntityRelationsGraphProps) => {\n const {\n rootEntityNames,\n maxDepth = 2,\n unidirectional = true,\n mergeRelations = true,\n kinds,\n relations,\n entityFilter,\n direction = Direction.LEFT_RIGHT,\n onNodeClick,\n relationPairs = ALL_RELATION_PAIRS,\n className,\n zoom = 'enabled',\n renderNode,\n renderLabel,\n curve,\n showArrowHeads,\n } = props;\n\n const theme = useTheme();\n const classes = useStyles();\n const rootEntityRefs = useMemo(\n () =>\n (Array.isArray(rootEntityNames)\n ? rootEntityNames\n : [rootEntityNames]\n ).map(e => stringifyEntityRef(e)),\n [rootEntityNames],\n );\n const errorApi = useApi(errorApiRef);\n const { loading, error, nodes, edges } = useEntityRelationNodesAndEdges({\n rootEntityRefs,\n maxDepth,\n unidirectional,\n mergeRelations,\n kinds,\n relations,\n entityFilter,\n onNodeClick,\n relationPairs,\n });\n\n useEffect(() => {\n if (error) {\n errorApi.post(error);\n }\n }, [errorApi, error]);\n\n return (\n <div className={classNames(classes.container, className)}>\n {loading && <CircularProgress className={classes.progress} />}\n {nodes && edges && (\n <DependencyGraph\n nodes={nodes}\n edges={edges}\n renderNode={renderNode || DefaultRenderNode}\n renderLabel={renderLabel || DefaultRenderLabel}\n direction={direction}\n className={classes.graph}\n paddingX={theme.spacing(4)}\n paddingY={theme.spacing(4)}\n labelPosition={DependencyGraphTypes.LabelPosition.RIGHT}\n labelOffset={theme.spacing(1)}\n zoom={zoom}\n curve={curve}\n showArrowHeads={showArrowHeads}\n />\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuCA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,QAAU,EAAA;AAAA,MACR,QAAU,EAAA,UAAA;AAAA,MACV,IAAM,EAAA,KAAA;AAAA,MACN,GAAK,EAAA,KAAA;AAAA,MACL,UAAY,EAAA,OAAA;AAAA,MACZ,SAAW,EAAA,OAAA;AAAA,KACb;AAAA,IACA,SAAW,EAAA;AAAA,MACT,QAAU,EAAA,UAAA;AAAA,MACV,KAAO,EAAA,MAAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,aAAe,EAAA,QAAA;AAAA,KACjB;AAAA,IACA,KAAO,EAAA;AAAA,MACL,KAAO,EAAA,MAAA;AAAA,MACP,IAAM,EAAA,CAAA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8 @@ declare enum Direction {
|
|
|
123
123
|
RIGHT_LEFT = "RL"
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
/** @public */
|
|
127
|
+
type EntityRelationsGraphClassKey = 'progress' | 'container' | 'graph';
|
|
126
128
|
/**
|
|
127
129
|
* @public
|
|
128
130
|
*/
|
|
@@ -151,6 +153,12 @@ type EntityRelationsGraphProps = {
|
|
|
151
153
|
*/
|
|
152
154
|
declare const EntityRelationsGraph: (props: EntityRelationsGraphProps) => React__default.JSX.Element;
|
|
153
155
|
|
|
156
|
+
/** @public */
|
|
157
|
+
type CustomLabelClassKey = 'text' | 'secondary';
|
|
158
|
+
|
|
159
|
+
/** @public */
|
|
160
|
+
type CustomNodeClassKey = 'node' | 'text' | 'clickable';
|
|
161
|
+
|
|
154
162
|
/**
|
|
155
163
|
* A card that displays the directly related entities to the current entity.
|
|
156
164
|
*
|
|
@@ -202,4 +210,4 @@ declare const catalogGraphPlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
|
202
210
|
*/
|
|
203
211
|
declare const catalogGraphRouteRef: _backstage_core_plugin_api.RouteRef<undefined>;
|
|
204
212
|
|
|
205
|
-
export { ALL_RELATION_PAIRS, CatalogGraphPage, Direction, EntityCatalogGraphCard, type EntityEdge, type EntityEdgeData, type EntityNode, type EntityNodeData, EntityRelationsGraph, type EntityRelationsGraphProps, type RelationPairs, catalogGraphPlugin, catalogGraphRouteRef };
|
|
213
|
+
export { ALL_RELATION_PAIRS, CatalogGraphPage, type CustomLabelClassKey, type CustomNodeClassKey, Direction, EntityCatalogGraphCard, type EntityEdge, type EntityEdgeData, type EntityNode, type EntityNodeData, EntityRelationsGraph, type EntityRelationsGraphClassKey, type EntityRelationsGraphProps, type RelationPairs, catalogGraphPlugin, catalogGraphRouteRef };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-graph",
|
|
3
|
-
"version": "0.4.9
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"backstage": {
|
|
5
5
|
"role": "frontend-plugin",
|
|
6
6
|
"pluginId": "catalog-graph",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"test": "backstage-cli package test"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@backstage/catalog-client": "^1.7.0
|
|
52
|
-
"@backstage/catalog-model": "^1.
|
|
53
|
-
"@backstage/core-compat-api": "^0.3.0
|
|
54
|
-
"@backstage/core-components": "^0.
|
|
55
|
-
"@backstage/core-plugin-api": "^1.9.4
|
|
56
|
-
"@backstage/frontend-plugin-api": "^0.8.0
|
|
57
|
-
"@backstage/plugin-catalog-react": "^1.13.0
|
|
51
|
+
"@backstage/catalog-client": "^1.7.0",
|
|
52
|
+
"@backstage/catalog-model": "^1.7.0",
|
|
53
|
+
"@backstage/core-compat-api": "^0.3.0",
|
|
54
|
+
"@backstage/core-components": "^0.15.0",
|
|
55
|
+
"@backstage/core-plugin-api": "^1.9.4",
|
|
56
|
+
"@backstage/frontend-plugin-api": "^0.8.0",
|
|
57
|
+
"@backstage/plugin-catalog-react": "^1.13.0",
|
|
58
58
|
"@backstage/types": "^1.1.1",
|
|
59
59
|
"@material-ui/core": "^4.12.2",
|
|
60
60
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"react-use": "^17.2.4"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@backstage/cli": "^0.27.1
|
|
71
|
-
"@backstage/core-app-api": "^1.
|
|
72
|
-
"@backstage/dev-utils": "^1.1.0
|
|
73
|
-
"@backstage/plugin-catalog": "^1.23.0
|
|
74
|
-
"@backstage/test-utils": "^1.6.0
|
|
70
|
+
"@backstage/cli": "^0.27.1",
|
|
71
|
+
"@backstage/core-app-api": "^1.15.0",
|
|
72
|
+
"@backstage/dev-utils": "^1.1.0",
|
|
73
|
+
"@backstage/plugin-catalog": "^1.23.0",
|
|
74
|
+
"@backstage/test-utils": "^1.6.0",
|
|
75
75
|
"@testing-library/dom": "^10.0.0",
|
|
76
76
|
"@testing-library/jest-dom": "^6.0.0",
|
|
77
77
|
"@testing-library/react": "^16.0.0",
|