@backstage/plugin-api-docs 0.8.2 → 0.8.3

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @backstage/plugin-api-docs
2
2
 
3
+ ## 0.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - a422d7ce5e: chore(deps): bump `@testing-library/react` from 11.2.6 to 12.1.3
8
+ - c689d7a94c: Switched to using `CatalogFilterLayout` from `@backstage/plugin-catalog-react`.
9
+ - f24ef7864e: Minor typo fixes
10
+ - Updated dependencies
11
+ - @backstage/core-components@0.9.2
12
+ - @backstage/core-plugin-api@1.0.0
13
+ - @backstage/plugin-catalog-react@1.0.0
14
+ - @backstage/plugin-catalog@1.0.0
15
+ - @backstage/catalog-model@1.0.0
16
+
3
17
  ## 0.8.2
4
18
 
5
19
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncApiDefinition-5fccfdab.esm.js","sources":["../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinition.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 AsyncApi from '@asyncapi/react-component';\nimport '@asyncapi/react-component/styles/default.css';\nimport { makeStyles, alpha, darken } from '@material-ui/core/styles';\nimport { BackstageTheme } from '@backstage/theme';\nimport React from 'react';\nimport { useTheme } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: BackstageTheme) => ({\n root: {\n fontFamily: 'inherit',\n '& .bg-white': {\n background: 'none',\n },\n '& .text-4xl': {\n ...theme.typography.h3,\n },\n ' & h2': {\n ...theme.typography.h4,\n },\n '& .border': {\n borderColor: alpha(theme.palette.border, 0.1),\n },\n '& .min-w-min': {\n minWidth: 'fit-content',\n },\n '& .examples': {\n padding: '1rem',\n },\n '& .bg-teal-500': {\n backgroundColor: theme.palette.status.ok,\n },\n '& .bg-blue-500': {\n backgroundColor: theme.palette.info.main,\n },\n '& .bg-blue-400': {\n backgroundColor: theme.palette.info.light,\n },\n '& .bg-indigo-400': {\n backgroundColor: theme.palette.warning.main,\n },\n '& .text-teal-50': {\n color: theme.palette.status.ok,\n },\n '& .text-red-600': {\n color: theme.palette.error.main,\n },\n '& .text-orange-600': {\n color: theme.palette.warning.main,\n },\n '& .text-teal-500': {\n color: theme.palette.status.ok,\n },\n '& .text-blue-500': {\n color: theme.palette.info.main,\n },\n '& .-rotate-90': {\n '--tw-rotate': '0deg',\n },\n '& button': {\n ...theme.typography.button,\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.primary.main,\n },\n '& a': {\n color: theme.palette.link,\n },\n '& a.no-underline': {\n ...theme.typography.button,\n background: 'none',\n boxSizing: 'border-box',\n minWidth: 64,\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(\n ['background-color', 'box-shadow', 'border'],\n {\n duration: theme.transitions.duration.short,\n },\n ),\n padding: '5px 15px',\n color: theme.palette.primary.main,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.5)}`,\n '&:hover': {\n textDecoration: 'none',\n border: `1px solid ${theme.palette.primary.main}`,\n backgroundColor: alpha(\n theme.palette.primary.main,\n theme.palette.action.hoverOpacity,\n ),\n },\n },\n '& li.no-underline': {\n '& a': {\n textDecoration: 'none',\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n },\n },\n dark: {\n '& svg': {\n fill: theme.palette.text.primary,\n },\n '& .prose': {\n color: theme.palette.text.secondary,\n '& h3': {\n color: theme.palette.text.primary,\n },\n },\n '& .bg-gray-100, .bg-gray-200': {\n backgroundColor: theme.palette.background.default,\n },\n '& .text-gray-600': {\n color: theme.palette.grey['50'],\n },\n '& .text-gray-700': {\n color: theme.palette.grey['100'],\n },\n '& .panel--right': {\n background: darken(theme.palette.navigation.background, 0.1),\n },\n '& .examples': {\n backgroundColor: darken(theme.palette.navigation.background, 0.1),\n '& pre': {\n backgroundColor: darken(theme.palette.background.default, 0.2),\n },\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const AsyncApiDefinition = ({ definition }: Props): JSX.Element => {\n const classes = useStyles();\n const theme = useTheme();\n const classNames = `${classes.root} ${\n theme.palette.type === 'dark' ? classes.dark : ''\n }`;\n\n return (\n <div className={classNames}>\n <AsyncApi schema={definition} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,YAAY,WAAW,CAAC;AAA2B,EACvD,MAAM;AAAA,IACJ,YAAY;AAAA,IACZ,eAAe;AAAA,MACb,YAAY;AAAA;AAAA,IAEd,eAAe;AAAA,SACV,MAAM,WAAW;AAAA;AAAA,IAEtB,SAAS;AAAA,SACJ,MAAM,WAAW;AAAA;AAAA,IAEtB,aAAa;AAAA,MACX,aAAa,MAAM,MAAM,QAAQ,QAAQ;AAAA;AAAA,IAE3C,gBAAgB;AAAA,MACd,UAAU;AAAA;AAAA,IAEZ,eAAe;AAAA,MACb,SAAS;AAAA;AAAA,IAEX,kBAAkB;AAAA,MAChB,iBAAiB,MAAM,QAAQ,OAAO;AAAA;AAAA,IAExC,kBAAkB;AAAA,MAChB,iBAAiB,MAAM,QAAQ,KAAK;AAAA;AAAA,IAEtC,kBAAkB;AAAA,MAChB,iBAAiB,MAAM,QAAQ,KAAK;AAAA;AAAA,IAEtC,oBAAoB;AAAA,MAClB,iBAAiB,MAAM,QAAQ,QAAQ;AAAA;AAAA,IAEzC,mBAAmB;AAAA,MACjB,OAAO,MAAM,QAAQ,OAAO;AAAA;AAAA,IAE9B,mBAAmB;AAAA,MACjB,OAAO,MAAM,QAAQ,MAAM;AAAA;AAAA,I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AAM,QAAQ,KAAK;AAAA;AAAA;AAAA,IAG9B,gCAAgC;AAAA,MAC9B,iBAAiB,MAAM,QAAQ,WAAW;AAAA;AAAA,IAE5C,oBAAoB;AAAA,MAClB,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,IAE5B,oBAAoB;AAAA,MAClB,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,IAE5B,mBAAmB;AAAA,MACjB,YAAY,OAAO,MAAM,QAAQ,WAAW,YAAY;AAAA;AAAA,IAE1D,eAAe;AAAA,MACb,iBAAiB,OAAO,MAAM,QAAQ,WAAW,YAAY;AAAA,MAC7D,SAAS;AAAA,QACP,iBAAiB,OAAO,MAAM,QAAQ,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;MAUrD,qBAAqB,CAAC,EAAE,iBAAqC;AACxE,QAAM,UAAU;AAChB,QAAM,QAAQ;AACd,QAAM,aAAa,GAAG,QAAQ,QAC5B,MAAM,QAAQ,SAAS,SAAS,QAAQ,OAAO;AAGjD,6CACG,OAAD;AAAA,IAAK,WAAW;AAAA,yCACb,UAAD;AAAA,IAAU,QAAQ;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"AsyncApiDefinition-5fccfdab.esm.js","sources":["../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinition.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 AsyncApi from '@asyncapi/react-component';\nimport '@asyncapi/react-component/styles/default.css';\nimport { makeStyles, alpha, darken } from '@material-ui/core/styles';\nimport { BackstageTheme } from '@backstage/theme';\nimport React from 'react';\nimport { useTheme } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: BackstageTheme) => ({\n root: {\n fontFamily: 'inherit',\n '& .bg-white': {\n background: 'none',\n },\n '& .text-4xl': {\n ...theme.typography.h3,\n },\n ' & h2': {\n ...theme.typography.h4,\n },\n '& .border': {\n borderColor: alpha(theme.palette.border, 0.1),\n },\n '& .min-w-min': {\n minWidth: 'fit-content',\n },\n '& .examples': {\n padding: '1rem',\n },\n '& .bg-teal-500': {\n backgroundColor: theme.palette.status.ok,\n },\n '& .bg-blue-500': {\n backgroundColor: theme.palette.info.main,\n },\n '& .bg-blue-400': {\n backgroundColor: theme.palette.info.light,\n },\n '& .bg-indigo-400': {\n backgroundColor: theme.palette.warning.main,\n },\n '& .text-teal-50': {\n color: theme.palette.status.ok,\n },\n '& .text-red-600': {\n color: theme.palette.error.main,\n },\n '& .text-orange-600': {\n color: theme.palette.warning.main,\n },\n '& .text-teal-500': {\n color: theme.palette.status.ok,\n },\n '& .text-blue-500': {\n color: theme.palette.info.main,\n },\n '& .-rotate-90': {\n '--tw-rotate': '0deg',\n },\n '& button': {\n ...theme.typography.button,\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.primary.main,\n },\n '& a': {\n color: theme.palette.link,\n },\n '& a.no-underline': {\n ...theme.typography.button,\n background: 'none',\n boxSizing: 'border-box',\n minWidth: 64,\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(\n ['background-color', 'box-shadow', 'border'],\n {\n duration: theme.transitions.duration.short,\n },\n ),\n padding: '5px 15px',\n color: theme.palette.primary.main,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.5)}`,\n '&:hover': {\n textDecoration: 'none',\n border: `1px solid ${theme.palette.primary.main}`,\n backgroundColor: alpha(\n theme.palette.primary.main,\n theme.palette.action.hoverOpacity,\n ),\n },\n },\n '& li.no-underline': {\n '& a': {\n textDecoration: 'none',\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n },\n },\n dark: {\n '& svg': {\n fill: theme.palette.text.primary,\n },\n '& .prose': {\n color: theme.palette.text.secondary,\n '& h3': {\n color: theme.palette.text.primary,\n },\n },\n '& .bg-gray-100, .bg-gray-200': {\n backgroundColor: theme.palette.background.default,\n },\n '& .text-gray-600': {\n color: theme.palette.grey['50'],\n },\n '& .text-gray-700': {\n color: theme.palette.grey['100'],\n },\n '& .panel--right': {\n background: darken(theme.palette.navigation.background, 0.1),\n },\n '& .examples': {\n backgroundColor: darken(theme.palette.navigation.background, 0.1),\n '& pre': {\n backgroundColor: darken(theme.palette.background.default, 0.2),\n },\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const AsyncApiDefinition = ({ definition }: Props): JSX.Element => {\n const classes = useStyles();\n const theme = useTheme();\n const classNames = `${classes.root} ${\n theme.palette.type === 'dark' ? classes.dark : ''\n }`;\n\n return (\n <div className={classNames}>\n <AsyncApi schema={definition} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,SAAA,GAAY,UAAW,CAAA,CAAC,KAA2B,MAAA;AAAA,EACvD,IAAM,EAAA;AAAA,IACJ,UAAY,EAAA,SAAA;AAAA,IACZ,aAAe,EAAA;AAAA,MACb,UAAY,EAAA,MAAA;AAAA,KAAA;AAAA,IAEd,aAAe,EAAA;AAAA,MAAA,GACV,MAAM,UAAW,CAAA,EAAA;AAAA,KAAA;AAAA,IAEtB,OAAS,EAAA;AAAA,MAAA,GACJ,MAAM,UAAW,CAAA,EAAA;AAAA,KAAA;AAAA,IAEtB,WAAa,EAAA;AAAA,MACX,WAAa,EAAA,KAAA,CAAM,KAAM,CAAA,OAAA,CAAQ,MAAQ,EAAA,GAAA,CAAA;AAAA,KAAA;AAAA,IAE3C,cAAgB,EAAA;AAAA,MACd,QAAU,EAAA,aAAA;AAAA,KAAA;AAAA,IAEZ,aAAe,EAAA;AAAA,MACb,OAAS,EAAA,MAAA;AAAA,KAAA;AAAA,IAEX,gBAAkB,EAAA;AAAA,MAChB,eAAA,EAAiB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CAAA,CAAA,EAC5B,MAAM,OAAQ,CAAA,IAAA,KAAS,MAAS,GAAA,OAAA,CAAQ,IAAO,GAAA,EAAA,CAAA,CAAA,CAAA;AAGjD,EAAA,2CACG,KAAD,EAAA;AAAA,IAAK,SAAW,EAAA,UAAA;AAAA,GAAA,sCACb,QAAD,EAAA;AAAA,IAAU,MAAQ,EAAA,UAAA;AAAA,GAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQlDefinition-b8afc092.esm.js","sources":["../../src/components/GraphQlDefinitionWidget/GraphQlDefinition.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 { BackstageTheme } from '@backstage/theme';\nimport { makeStyles } from '@material-ui/core/styles';\nimport GraphiQL from 'graphiql';\nimport 'graphiql/graphiql.css';\nimport { buildSchema } from 'graphql';\nimport React from 'react';\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n graphiQlWrapper: {\n flex: 1,\n '@global': {\n '.graphiql-container': {\n boxSizing: 'initial',\n height: '100%',\n minHeight: '600px',\n flex: '1 1 auto',\n },\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const GraphQlDefinition = ({ definition }: Props) => {\n const classes = useStyles();\n const schema = buildSchema(definition);\n\n return (\n <div className={classes.root}>\n <div className={classes.graphiQlWrapper}>\n <GraphiQL\n fetcher={() => Promise.resolve(null) as any}\n schema={schema}\n docExplorerOpen\n defaultSecondaryEditorOpen={false}\n />\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,YAAY,WAA2B;AAAO,EAClD,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA;AAAA,EAEZ,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,WAAW;AAAA,MACT,uBAAuB;AAAA,QACrB,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,MAAM;AAAA;AAAA;AAAA;AAAA;MAUD,oBAAoB,CAAC,EAAE,iBAAwB;AAC1D,QAAM,UAAU;AAChB,QAAM,SAAS,YAAY;AAE3B,6CACG,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,UAAD;AAAA,IACE,SAAS,MAAM,QAAQ,QAAQ;AAAA,IAC/B;AAAA,IACA,iBAAe;AAAA,IACf,4BAA4B;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"GraphQlDefinition-b8afc092.esm.js","sources":["../../src/components/GraphQlDefinitionWidget/GraphQlDefinition.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 { BackstageTheme } from '@backstage/theme';\nimport { makeStyles } from '@material-ui/core/styles';\nimport GraphiQL from 'graphiql';\nimport 'graphiql/graphiql.css';\nimport { buildSchema } from 'graphql';\nimport React from 'react';\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n graphiQlWrapper: {\n flex: 1,\n '@global': {\n '.graphiql-container': {\n boxSizing: 'initial',\n height: '100%',\n minHeight: '600px',\n flex: '1 1 auto',\n },\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const GraphQlDefinition = ({ definition }: Props) => {\n const classes = useStyles();\n const schema = buildSchema(definition);\n\n return (\n <div className={classes.root}>\n <div className={classes.graphiQlWrapper}>\n <GraphiQL\n fetcher={() => Promise.resolve(null) as any}\n schema={schema}\n docExplorerOpen\n defaultSecondaryEditorOpen={false}\n />\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,SAAA,GAAY,WAA2B,OAAO;AAAA,EAClD,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,GAAA;AAAA,EAEZ,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,CAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,qBAAuB,EAAA;AAAA,QACrB,SAAW,EAAA,SAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,SAAW,EAAA,OAAA;AAAA,QACX,IAAM,EAAA,UAAA;AAAA,OAAA;AAAA,KAAA;AAAA,GAAA;AAAA,CAAA,CAAA,CAAA,CAAA;AAUD,MAAA,iBAAA,GAAoB,CAAC,EAAE,UAAwB,EAAA,KAAA;AAC1D,EAAA,MAAM,OAAU,GAAA,SAAA,EAAA,CAAA;AAChB,EAAA,MAAM,SAAS,WAAY,CAAA,UAAA,CAAA,CAAA;AAE3B,EAAA,2CACG,KAAD,EAAA;AAAA,IAAK,WAAW,OAAQ,CAAA,IAAA;AAAA,GAAA,sCACrB,KAAD,EAAA;AAAA,IAAK,WAAW,OAAQ,CAAA,eAAA;AAAA,GAAA,sCACrB,QAAD,EAAA;AAAA,IACE,OAAA,EAAS,MAAM,OAAA,CAAQ,OAAQ,CAAA,IAAA,CAAA;AAAA,IAC/B,MAAA;AAAA,IACA,eAAe,EAAA,IAAA;AAAA,IACf,0BAA4B,EAAA,KAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiDefinition-ecf6e13e.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.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 { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header, \n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model, \n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model, \n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.hint,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method, \n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def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C1B,YAAY,MAAM,WAAW;AAAA;AAAA,OAE9B,kBAAkB;AAAA,QACjB,OAAO,MAAM,QAAQ,KAAK;AAAA,QAC1B,iBAAiB,MAAM,QAAQ,WAAW;AAAA;AAAA,OAE3C;AAAA,qBACc;AAAA,QACb,YAAY,MAAM,WAAW;AAAA;AAAA,OAE9B,4BAA4B;AAAA,SAC1B,YAAY;AAAA,UACX,YAAY,MAAM,WAAW;AAAA,UAC7B,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA;AAAA,OAG7B,QAAQ;AAAA,QACP,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA,OAE9B,6BAA6B;AAAA,QAC5B,OAAO,MAAM,QAAQ,UAAU;AAAA;AAAA,OAEhC,mCAAmC;AAAA,QAClC,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B,qBAAqB;AAAA,QACpB,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA;MAUxB,oBAAoB,CAAC,EAAE,iBAAyC;AAC3E,QAAM,UAAU;AAIhB,QAAM,CAAC,KAAK,UAAU,SAAS;AAE/B,YAAU,MAAM;AACd,UAAM,QAAQ,WAAW,MAAM,OAAO,aAAa;AACnD,WAAO,MAAM,aAAa;AAAA,KACzB,CAAC,YAAY;AAEhB,6CACG,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,WAAD;AAAA,IAAW,MAAM;AAAA,IAAK,KAAI;AAAA,IAAG,aAAW;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"OpenApiDefinition-ecf6e13e.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.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 { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header, \n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model, \n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model, \n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.hint,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method, \n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def} url=\"\" deepLinking />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,eAAiB,EAAA;AAAA,MACf,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,MAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,MAAA,CAEzB,CAAwB,mBAAA,CAAA,GAAA;AAAA,QACvB,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA,OAAA;AAAA,OAAA;AAAA,MAE3C,CAAA,CAAA;AAAA;A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AAA,QAClC,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,OAAA;AAAA,MAAA,CAE3B,CAAqB,gBAAA,CAAA,GAAA;AAAA,QACpB,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,OAAQ,CAAA,KAAA;AAAA,OAAA;AAAA,KAAA;AAAA,GAAA;AAAA,CAAA,CAAA,CAAA,CAAA;AAUxB,MAAA,iBAAA,GAAoB,CAAC,EAAE,UAAyC,EAAA,KAAA;AAC3E,EAAA,MAAM,OAAU,GAAA,SAAA,EAAA,CAAA;AAIhB,EAAM,MAAA,CAAC,GAAK,EAAA,MAAA,CAAA,GAAU,QAAS,CAAA,EAAA,CAAA,CAAA;AAE/B,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,KAAQ,GAAA,UAAA,CAAW,MAAM,MAAA,CAAO,UAAa,CAAA,EAAA,CAAA,CAAA,CAAA;AACnD,IAAA,OAAO,MAAM,YAAa,CAAA,KAAA,CAAA,CAAA;AAAA,GAAA,EACzB,CAAC,UAAY,EAAA,MAAA,CAAA,CAAA,CAAA;AAEhB,EAAA,2CACG,KAAD,EAAA;AAAA,IAAK,WAAW,OAAQ,CAAA,IAAA;AAAA,GAAA,sCACrB,SAAD,EAAA;AAAA,IAAW,IAAM,EAAA,GAAA;AAAA,IAAK,GAAI,EAAA,EAAA;AAAA,IAAG,WAAW,EAAA,IAAA;AAAA,GAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -8,4 +8,4 @@ import '@backstage/plugin-catalog-react';
8
8
  import '@material-ui/lab';
9
9
  import '@backstage/catalog-model';
10
10
  import '@material-ui/core';
11
- //# sourceMappingURL=index-2e20379b.esm.js.map
11
+ //# sourceMappingURL=index-4e2fe8cb.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-4e2fe8cb.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -8,4 +8,4 @@ import '@backstage/plugin-catalog-react';
8
8
  import '@material-ui/lab';
9
9
  import '@backstage/catalog-model';
10
10
  import '@material-ui/core';
11
- //# sourceMappingURL=index-fe6dd6ae.esm.js.map
11
+ //# sourceMappingURL=index-992613e5.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-992613e5.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -8,4 +8,4 @@ import '@backstage/plugin-catalog-react';
8
8
  import '@material-ui/lab';
9
9
  import '@backstage/catalog-model';
10
10
  import '@material-ui/core';
11
- //# sourceMappingURL=index-3b4f795d.esm.js.map
11
+ //# sourceMappingURL=index-aa08b9c8.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-aa08b9c8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -8,4 +8,4 @@ import '@backstage/plugin-catalog-react';
8
8
  import '@material-ui/lab';
9
9
  import '@backstage/catalog-model';
10
10
  import '@material-ui/core';
11
- //# sourceMappingURL=index-6c8e3913.esm.js.map
11
+ //# sourceMappingURL=index-e6a6e177.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-e6a6e177.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
package/dist/index.esm.js CHANGED
@@ -2,8 +2,8 @@ import React, { Suspense } from 'react';
2
2
  import { useOutlet } from 'react-router';
3
3
  import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton, CodeSnippet, TabbedCard, CardTab, Progress, InfoCard, WarningPanel, Link } from '@backstage/core-components';
4
4
  import { createRouteRef, createExternalRouteRef, useApi, configApiRef, useRouteRef, createApiRef, createPlugin, createApiFactory, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
5
- import { CatalogTable, FilteredEntityLayout, FilterContainer, EntityListContainer } from '@backstage/plugin-catalog';
6
- import { EntityListProvider, EntityKindPicker, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker, useEntity, EntityTable, useRelatedEntities } from '@backstage/plugin-catalog-react';
5
+ import { CatalogTable } from '@backstage/plugin-catalog';
6
+ import { EntityListProvider, CatalogFilterLayout, EntityKindPicker, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker, useEntity, EntityTable, useRelatedEntities } from '@backstage/plugin-catalog-react';
7
7
  import { Alert } from '@material-ui/lab';
8
8
  import { RELATION_CONSUMES_API, RELATION_HAS_PART, RELATION_PROVIDES_API, RELATION_API_CONSUMED_BY, RELATION_API_PROVIDED_BY } from '@backstage/catalog-model';
9
9
  import { Typography } from '@material-ui/core';
@@ -44,12 +44,12 @@ const DefaultApiExplorerPage = ({
44
44
  }, /* @__PURE__ */ React.createElement(CreateButton, {
45
45
  title: "Register Existing API",
46
46
  to: registerComponentLink == null ? void 0 : registerComponentLink()
47
- }), /* @__PURE__ */ React.createElement(SupportButton, null, "All your APIs")), /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(FilteredEntityLayout, null, /* @__PURE__ */ React.createElement(FilterContainer, null, /* @__PURE__ */ React.createElement(EntityKindPicker, {
47
+ }), /* @__PURE__ */ React.createElement(SupportButton, null, "All your APIs")), /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(EntityKindPicker, {
48
48
  initialFilter: "api",
49
49
  hidden: true
50
50
  }), /* @__PURE__ */ React.createElement(EntityTypePicker, null), /* @__PURE__ */ React.createElement(UserListPicker, {
51
51
  initialFilter: initiallySelectedFilter
52
- }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(EntityListContainer, null, /* @__PURE__ */ React.createElement(CatalogTable, {
52
+ }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(CatalogTable, {
53
53
  columns: columns || defaultColumns,
54
54
  actions
55
55
  }))))));
@@ -439,43 +439,43 @@ const apiDocsPlugin = createPlugin({
439
439
  });
440
440
  const ApiExplorerPage = apiDocsPlugin.provide(createRoutableExtension({
441
441
  name: "ApiExplorerPage",
442
- component: () => import('./esm/index-fe6dd6ae.esm.js').then((m) => m.ApiExplorerIndexPage),
442
+ component: () => import('./esm/index-992613e5.esm.js').then((m) => m.ApiExplorerIndexPage),
443
443
  mountPoint: rootRoute
444
444
  }));
445
445
  const EntityApiDefinitionCard = apiDocsPlugin.provide(createComponentExtension({
446
446
  name: "EntityApiDefinitionCard",
447
447
  component: {
448
- lazy: () => import('./esm/index-6c8e3913.esm.js').then((m) => m.ApiDefinitionCard)
448
+ lazy: () => import('./esm/index-e6a6e177.esm.js').then((m) => m.ApiDefinitionCard)
449
449
  }
450
450
  }));
451
451
  const EntityConsumedApisCard = apiDocsPlugin.provide(createComponentExtension({
452
452
  name: "EntityConsumedApisCard",
453
453
  component: {
454
- lazy: () => import('./esm/index-2e20379b.esm.js').then((m) => m.ConsumedApisCard)
454
+ lazy: () => import('./esm/index-4e2fe8cb.esm.js').then((m) => m.ConsumedApisCard)
455
455
  }
456
456
  }));
457
457
  const EntityConsumingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
458
458
  name: "EntityConsumingComponentsCard",
459
459
  component: {
460
- lazy: () => import('./esm/index-3b4f795d.esm.js').then((m) => m.ConsumingComponentsCard)
460
+ lazy: () => import('./esm/index-aa08b9c8.esm.js').then((m) => m.ConsumingComponentsCard)
461
461
  }
462
462
  }));
463
463
  const EntityProvidedApisCard = apiDocsPlugin.provide(createComponentExtension({
464
464
  name: "EntityProvidedApisCard",
465
465
  component: {
466
- lazy: () => import('./esm/index-2e20379b.esm.js').then((m) => m.ProvidedApisCard)
466
+ lazy: () => import('./esm/index-4e2fe8cb.esm.js').then((m) => m.ProvidedApisCard)
467
467
  }
468
468
  }));
469
469
  const EntityProvidingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
470
470
  name: "EntityProvidingComponentsCard",
471
471
  component: {
472
- lazy: () => import('./esm/index-3b4f795d.esm.js').then((m) => m.ProvidingComponentsCard)
472
+ lazy: () => import('./esm/index-aa08b9c8.esm.js').then((m) => m.ProvidingComponentsCard)
473
473
  }
474
474
  }));
475
475
  const EntityHasApisCard = apiDocsPlugin.provide(createComponentExtension({
476
476
  name: "EntityHasApisCard",
477
477
  component: {
478
- lazy: () => import('./esm/index-2e20379b.esm.js').then((m) => m.HasApisCard)
478
+ lazy: () => import('./esm/index-4e2fe8cb.esm.js').then((m) => m.HasApisCard)
479
479
  }
480
480
  }));
481
481
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx","../src/components/ApiExplorerPage/ApiExplorerPage.tsx","../src/config.ts","../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionCard.tsx","../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx","../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx","../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiTypeTitle.tsx","../src/components/ApisCards/presets.tsx","../src/components/ApisCards/ConsumedApisCard.tsx","../src/components/ApisCards/HasApisCard.tsx","../src/components/ApisCards/ProvidedApisCard.tsx","../src/components/ComponentsCards/ConsumingComponentsCard.tsx","../src/components/ComponentsCards/ProvidingComponentsCard.tsx","../src/plugin.ts"],"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 {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\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 {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogTable,\n CatalogTableRow,\n FilteredEntityLayout,\n EntityListContainer,\n FilterContainer,\n} from '@backstage/plugin-catalog';\nimport {\n EntityKindPicker,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { registerComponentRouteRef } from '../../routes';\n\nconst defaultColumns: TableColumn<CatalogTableRow>[] = [\n CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),\n CatalogTable.columns.createSystemColumn(),\n CatalogTable.columns.createOwnerColumn(),\n CatalogTable.columns.createSpecTypeColumn(),\n CatalogTable.columns.createSpecLifecycleColumn(),\n CatalogTable.columns.createMetadataDescriptionColumn(),\n CatalogTable.columns.createTagsColumn(),\n];\n\n/**\n * DefaultApiExplorerPageProps\n * @public\n */\nexport type DefaultApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n};\n\n/**\n * DefaultApiExplorerPage\n * @public\n */\nexport const DefaultApiExplorerPage = ({\n initiallySelectedFilter = 'all',\n columns,\n actions,\n}: DefaultApiExplorerPageProps) => {\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const registerComponentLink = useRouteRef(registerComponentRouteRef);\n\n return (\n <PageWithHeader\n themeId=\"apis\"\n title=\"APIs\"\n subtitle={generatedSubtitle}\n pageTitleOverride=\"APIs\"\n >\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title=\"Register Existing API\"\n to={registerComponentLink?.()}\n />\n <SupportButton>All your APIs</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <FilteredEntityLayout>\n <FilterContainer>\n <EntityKindPicker initialFilter=\"api\" hidden />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </FilterContainer>\n <EntityListContainer>\n <CatalogTable\n columns={columns || defaultColumns}\n actions={actions}\n />\n </EntityListContainer>\n </FilteredEntityLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\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';\nimport {\n DefaultApiExplorerPage,\n DefaultApiExplorerPageProps,\n} from './DefaultApiExplorerPage';\n\n/**\n * ApiExplorerPage\n * @public\n */\nexport const ApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultApiExplorerPage {...props} />;\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 { ApiEntity } from '@backstage/catalog-model';\nimport { ApiDefinitionWidget } from './components/ApiDefinitionCard/ApiDefinitionWidget';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\nexport const apiDocsConfigRef = createApiRef<ApiDocsConfig>({\n id: 'plugin.api-docs.config',\n});\n\nexport interface ApiDocsConfig {\n getApiDefinitionWidget: (\n apiEntity: ApiEntity,\n ) => ApiDefinitionWidget | undefined;\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 React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nexport type PlainApiDefinitionWidgetProps = {\n definition: any;\n language: string;\n};\n\nexport const PlainApiDefinitionWidget = (\n props: PlainApiDefinitionWidgetProps,\n) => {\n return (\n <CodeSnippet\n text={props.definition}\n language={props.language}\n showCopyCodeButton\n />\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 { ApiEntity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { Alert } from '@material-ui/lab';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';\n\nimport { CardTab, TabbedCard } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiDefinitionCard = () => {\n const { entity } = useEntity<ApiEntity>();\n const config = useApi(apiDocsConfigRef);\n const { getApiDefinitionWidget } = config;\n\n if (!entity) {\n return <Alert severity=\"error\">Could not fetch the API</Alert>;\n }\n\n const definitionWidget = getApiDefinitionWidget(entity);\n const entityTitle = entity.metadata.title ?? entity.metadata.name;\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entityTitle}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entityTitle}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The asyncapi component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyAsyncApiDefinition = React.lazy(() =>\n import('./AsyncApiDefinition').then(m => ({\n default: m.AsyncApiDefinition,\n })),\n);\n\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const AsyncApiDefinitionWidget = (\n props: AsyncApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyAsyncApiDefinition {...props} />\n </Suspense>\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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The graphql component, graphql and related CSS has a significant size, only\n// load it if the element is actually used.\nconst LazyGraphQlDefinition = React.lazy(() =>\n import('./GraphQlDefinition').then(m => ({\n default: m.GraphQlDefinition,\n })),\n);\n\nexport type GraphQlDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const GraphQlDefinitionWidget = (\n props: GraphQlDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyGraphQlDefinition {...props} />\n </Suspense>\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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The swagger-ui component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyOpenApiDefinition = React.lazy(() =>\n import('./OpenApiDefinition').then(m => ({\n default: m.OpenApiDefinition,\n })),\n);\n\nexport type OpenApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const OpenApiDefinitionWidget = (\n props: OpenApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyOpenApiDefinition {...props} />\n </Suspense>\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 */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\n\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\nexport function defaultDefinitionWidgets(): ApiDefinitionWidget[] {\n return [\n {\n type: 'openapi',\n title: 'OpenAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <OpenApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'asyncapi',\n title: 'AsyncAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <AsyncApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'graphql',\n title: 'GraphQL',\n rawLanguage: 'graphql',\n component: definition => (\n <GraphQlDefinitionWidget definition={definition} />\n ),\n },\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 { ApiEntity } from '@backstage/catalog-model';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiTypeTitle = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <span>{type}</span>;\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 { ApiEntity } from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { TableColumn } from '@backstage/core-components';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\n// TODO: This could be moved to plugin-catalog-react if we wouldn't have a\n// special createSpecApiTypeColumn. But this is required to use ApiTypeTitle to\n// resolve the display name of an entity. Is the display name really worth it?\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\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 { ApiEntity, RELATION_CONSUMES_API } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ConsumedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_CONSUMES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumed APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not consume any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\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 { ApiEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createSpecApiTypeColumn } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nconst columns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n\nexport const HasApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_HAS_PART,\n kind: 'API',\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not contain any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={entities as ApiEntity[]}\n />\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 { ApiEntity, RELATION_PROVIDES_API } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ProvidedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_PROVIDES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Provided APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not provide any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\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 ComponentEntity,\n RELATION_API_CONSUMED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ConsumingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_CONSUMED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component consumes this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\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 ComponentEntity,\n RELATION_API_PROVIDED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ProvidingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_PROVIDED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Providers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component provides this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\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 { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { registerComponentRouteRef, rootRoute } from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nexport const apiDocsPlugin = createPlugin({\n id: 'api-docs',\n routes: {\n root: rootRoute,\n },\n apis: [\n createApiFactory({\n api: apiDocsConfigRef,\n deps: {},\n factory: () => {\n const definitionWidgets = defaultDefinitionWidgets();\n return {\n getApiDefinitionWidget: (apiEntity: ApiEntity) => {\n return definitionWidgets.find(d => d.type === apiEntity.spec.type);\n },\n };\n },\n }),\n ],\n externalRoutes: {\n registerApi: registerComponentRouteRef,\n },\n});\n\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerIndexPage),\n mountPoint: rootRoute,\n }),\n);\n\nexport const EntityApiDefinitionCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityApiDefinitionCard',\n component: {\n lazy: () =>\n import('./components/ApiDefinitionCard').then(m => m.ApiDefinitionCard),\n },\n }),\n);\n\nexport const EntityConsumedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ConsumedApisCard),\n },\n }),\n);\n\nexport const EntityConsumingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ConsumingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityProvidedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ProvidedApisCard),\n },\n }),\n);\n\nexport const EntityProvidingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ProvidingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityHasApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityHasApisCard',\n component: {\n lazy: () => import('./components/ApisCards').then(m => m.HasApisCard),\n },\n }),\n);\n"],"names":["ApiExplorerPage"],"mappings":";;;;;;;;;;MAqBa,YAAY,eAAe;AAAA,EACtC,IAAI;AAAA;MAGO,4BAA4B,uBAAuB;AAAA,EAC9D,IAAI;AAAA,EACJ,UAAU;AAAA;;ACmBZ,MAAM,iBAAiD;AAAA,EACrD,aAAa,QAAQ,iBAAiB,EAA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A,EACN,WAAW;AAAA,IACT,MAAM,MAAM,OAAO,+BAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx","../src/components/ApiExplorerPage/ApiExplorerPage.tsx","../src/config.ts","../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionCard.tsx","../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx","../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx","../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx","../src/components/ApiDefinitionCard/ApiTypeTitle.tsx","../src/components/ApisCards/presets.tsx","../src/components/ApisCards/ConsumedApisCard.tsx","../src/components/ApisCards/HasApisCard.tsx","../src/components/ApisCards/ProvidedApisCard.tsx","../src/components/ComponentsCards/ConsumingComponentsCard.tsx","../src/components/ComponentsCards/ProvidingComponentsCard.tsx","../src/plugin.ts"],"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 {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\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 {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { CatalogTable, CatalogTableRow } from '@backstage/plugin-catalog';\nimport {\n EntityKindPicker,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n CatalogFilterLayout,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { registerComponentRouteRef } from '../../routes';\n\nconst defaultColumns: TableColumn<CatalogTableRow>[] = [\n CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),\n CatalogTable.columns.createSystemColumn(),\n CatalogTable.columns.createOwnerColumn(),\n CatalogTable.columns.createSpecTypeColumn(),\n CatalogTable.columns.createSpecLifecycleColumn(),\n CatalogTable.columns.createMetadataDescriptionColumn(),\n CatalogTable.columns.createTagsColumn(),\n];\n\n/**\n * DefaultApiExplorerPageProps\n * @public\n */\nexport type DefaultApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n};\n\n/**\n * DefaultApiExplorerPage\n * @public\n */\nexport const DefaultApiExplorerPage = ({\n initiallySelectedFilter = 'all',\n columns,\n actions,\n}: DefaultApiExplorerPageProps) => {\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const registerComponentLink = useRouteRef(registerComponentRouteRef);\n\n return (\n <PageWithHeader\n themeId=\"apis\"\n title=\"APIs\"\n subtitle={generatedSubtitle}\n pageTitleOverride=\"APIs\"\n >\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title=\"Register Existing API\"\n to={registerComponentLink?.()}\n />\n <SupportButton>All your APIs</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter=\"api\" hidden />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns || defaultColumns}\n actions={actions}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\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';\nimport {\n DefaultApiExplorerPage,\n DefaultApiExplorerPageProps,\n} from './DefaultApiExplorerPage';\n\n/**\n * ApiExplorerPage\n * @public\n */\nexport const ApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultApiExplorerPage {...props} />;\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 { ApiEntity } from '@backstage/catalog-model';\nimport { ApiDefinitionWidget } from './components/ApiDefinitionCard/ApiDefinitionWidget';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\nexport const apiDocsConfigRef = createApiRef<ApiDocsConfig>({\n id: 'plugin.api-docs.config',\n});\n\nexport interface ApiDocsConfig {\n getApiDefinitionWidget: (\n apiEntity: ApiEntity,\n ) => ApiDefinitionWidget | undefined;\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 React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nexport type PlainApiDefinitionWidgetProps = {\n definition: any;\n language: string;\n};\n\nexport const PlainApiDefinitionWidget = (\n props: PlainApiDefinitionWidgetProps,\n) => {\n return (\n <CodeSnippet\n text={props.definition}\n language={props.language}\n showCopyCodeButton\n />\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 { ApiEntity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { Alert } from '@material-ui/lab';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';\n\nimport { CardTab, TabbedCard } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiDefinitionCard = () => {\n const { entity } = useEntity<ApiEntity>();\n const config = useApi(apiDocsConfigRef);\n const { getApiDefinitionWidget } = config;\n\n if (!entity) {\n return <Alert severity=\"error\">Could not fetch the API</Alert>;\n }\n\n const definitionWidget = getApiDefinitionWidget(entity);\n const entityTitle = entity.metadata.title ?? entity.metadata.name;\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entityTitle}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entityTitle}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The asyncapi component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyAsyncApiDefinition = React.lazy(() =>\n import('./AsyncApiDefinition').then(m => ({\n default: m.AsyncApiDefinition,\n })),\n);\n\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const AsyncApiDefinitionWidget = (\n props: AsyncApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyAsyncApiDefinition {...props} />\n </Suspense>\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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The graphql component, graphql and related CSS has a significant size, only\n// load it if the element is actually used.\nconst LazyGraphQlDefinition = React.lazy(() =>\n import('./GraphQlDefinition').then(m => ({\n default: m.GraphQlDefinition,\n })),\n);\n\nexport type GraphQlDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const GraphQlDefinitionWidget = (\n props: GraphQlDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyGraphQlDefinition {...props} />\n </Suspense>\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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The swagger-ui component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyOpenApiDefinition = React.lazy(() =>\n import('./OpenApiDefinition').then(m => ({\n default: m.OpenApiDefinition,\n })),\n);\n\nexport type OpenApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const OpenApiDefinitionWidget = (\n props: OpenApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyOpenApiDefinition {...props} />\n </Suspense>\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 */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\n\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\nexport function defaultDefinitionWidgets(): ApiDefinitionWidget[] {\n return [\n {\n type: 'openapi',\n title: 'OpenAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <OpenApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'asyncapi',\n title: 'AsyncAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <AsyncApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'graphql',\n title: 'GraphQL',\n rawLanguage: 'graphql',\n component: definition => (\n <GraphQlDefinitionWidget definition={definition} />\n ),\n },\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 { ApiEntity } from '@backstage/catalog-model';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiTypeTitle = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <span>{type}</span>;\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 { ApiEntity } from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { TableColumn } from '@backstage/core-components';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\n// TODO: This could be moved to plugin-catalog-react if we wouldn't have a\n// special createSpecApiTypeColumn. But this is required to use ApiTypeTitle to\n// resolve the display name of an entity. Is the display name really worth it?\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\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 { ApiEntity, RELATION_CONSUMES_API } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ConsumedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_CONSUMES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumed APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not consume any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\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 { ApiEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createSpecApiTypeColumn } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nconst columns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n\nexport const HasApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_HAS_PART,\n kind: 'API',\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not contain any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={entities as ApiEntity[]}\n />\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 { ApiEntity, RELATION_PROVIDES_API } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ProvidedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_PROVIDES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Provided APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not provide any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\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 ComponentEntity,\n RELATION_API_CONSUMED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ConsumingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_CONSUMED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component consumes this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\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 ComponentEntity,\n RELATION_API_PROVIDED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nexport const ProvidingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_PROVIDED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Providers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component provides this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\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 { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { registerComponentRouteRef, rootRoute } from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nexport const apiDocsPlugin = createPlugin({\n id: 'api-docs',\n routes: {\n root: rootRoute,\n },\n apis: [\n createApiFactory({\n api: apiDocsConfigRef,\n deps: {},\n factory: () => {\n const definitionWidgets = defaultDefinitionWidgets();\n return {\n getApiDefinitionWidget: (apiEntity: ApiEntity) => {\n return definitionWidgets.find(d => d.type === apiEntity.spec.type);\n },\n };\n },\n }),\n ],\n externalRoutes: {\n registerApi: registerComponentRouteRef,\n },\n});\n\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerIndexPage),\n mountPoint: rootRoute,\n }),\n);\n\nexport const EntityApiDefinitionCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityApiDefinitionCard',\n component: {\n lazy: () =>\n import('./components/ApiDefinitionCard').then(m => m.ApiDefinitionCard),\n },\n }),\n);\n\nexport const EntityConsumedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ConsumedApisCard),\n },\n }),\n);\n\nexport const EntityConsumingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ConsumingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityProvidedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ProvidedApisCard),\n },\n }),\n);\n\nexport const EntityProvidingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ProvidingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityHasApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityHasApisCard',\n component: {\n lazy: () => import('./components/ApisCards').then(m => m.HasApisCard),\n },\n }),\n);\n"],"names":["ApiExplorerPage"],"mappings":";;;;;;;;;;AAqBO,MAAM,YAAY,cAAe,CAAA;AAAA,EACtC,EAAI,EAAA,UAAA;AAAA,CAAA,CAAA,CAAA;AAGC,MAAM,4BAA4B,sBAAuB,CAAA;AAAA,EAC9D,EAAI,EAAA,oBAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AAAA,CAAA,CAAA;;ACcZ,MAAM,cAAiD,GAAA;AAAA,EACrD,YAAa,CAAA,OAAA,CAAQ,gBAAiB,CAAA,EAAE,WAAa,EAAA,KAAA,EAAA,CAAA;AAAA,EACrD,aAAa,OAAQ,CAAA,kBAAA,EAAA;AAAA,EACrB,aAAa,OAAQ,CAAA,iBAAA,EAAA;AAAA,EACrB,aAAa,OAAQ,CAAA,oBAAA,EAAA;AAAA,EACrB,aAAa,OAAQ,CAAA,yBAAA,EAAA;AAAA,EACrB,aAAa,OAAQ,CAAA,+BAAA,EAAA;AAAA,EACrB,aAAa,OAAQ,CAAA,gBAAA,EAAA;AAAA,CAAA,CAAA;AAiBhB,MAAM,yBAAyB,CAAC;AAAA,EACrC,uBAA0B,GAAA,KAAA;AA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A0B,CAAA,CAAA,IAAA,CAAK,OAAK,CAAE,CAAA,WAAA,CAAA;AAAA,GAAA;AAAA,CAAA,CAAA;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
3
  "description": "A Backstage plugin that helps represent API entities in the frontend",
4
- "version": "0.8.2",
4
+ "version": "0.8.3",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@asyncapi/react-component": "1.0.0-next.33",
37
- "@backstage/catalog-model": "^0.13.0",
38
- "@backstage/core-components": "^0.9.1",
39
- "@backstage/core-plugin-api": "^0.8.0",
40
- "@backstage/plugin-catalog": "^0.10.0",
41
- "@backstage/plugin-catalog-react": "^0.9.0",
37
+ "@backstage/catalog-model": "^1.0.0",
38
+ "@backstage/core-components": "^0.9.2",
39
+ "@backstage/core-plugin-api": "^1.0.0",
40
+ "@backstage/plugin-catalog": "^1.0.0",
41
+ "@backstage/plugin-catalog-react": "^1.0.0",
42
42
  "@backstage/theme": "^0.2.15",
43
43
  "@material-ui/core": "^4.12.2",
44
44
  "@material-ui/icons": "^4.9.1",
@@ -56,12 +56,12 @@
56
56
  "react": "^16.13.1 || ^17.0.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@backstage/cli": "^0.15.2",
60
- "@backstage/core-app-api": "^0.6.0",
61
- "@backstage/dev-utils": "^0.2.25",
62
- "@backstage/test-utils": "^0.3.0",
59
+ "@backstage/cli": "^0.16.0",
60
+ "@backstage/core-app-api": "^1.0.0",
61
+ "@backstage/dev-utils": "^1.0.0",
62
+ "@backstage/test-utils": "^1.0.0",
63
63
  "@testing-library/jest-dom": "^5.10.1",
64
- "@testing-library/react": "^11.2.5",
64
+ "@testing-library/react": "^12.1.3",
65
65
  "@testing-library/user-event": "^13.1.8",
66
66
  "@types/jest": "^26.0.7",
67
67
  "@types/node": "^14.14.32",
@@ -72,5 +72,5 @@
72
72
  "files": [
73
73
  "dist"
74
74
  ],
75
- "gitHead": "60c4e39d1fcaeb10d6488ada1d907f34dc2a105a"
75
+ "gitHead": "e9496f746b31600dbfac7fa76987479e66426257"
76
76
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-2e20379b.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-3b4f795d.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-6c8e3913.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-fe6dd6ae.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}