@backstage/plugin-api-docs 0.12.0 → 0.12.2-next.0
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 +16 -0
- package/dist/alpha.esm.js +1 -1
- package/dist/components/ApisCards/ProvidedApisCard.esm.js +2 -2
- package/dist/components/ApisCards/ProvidedApisCard.esm.js.map +1 -1
- package/dist/components/AsyncApiDefinitionWidget/AsyncApiDefinition.esm.js +1 -1
- package/dist/plugin.esm.js +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/plugin-api-docs
|
|
2
2
|
|
|
3
|
+
## 0.12.2-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 11babd9: Fix link styling in ProvidedApisCard component so it aligns with other card components.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-catalog-react@1.14.3-next.0
|
|
10
|
+
- @backstage/frontend-plugin-api@0.9.3-next.0
|
|
11
|
+
- @backstage/catalog-model@1.7.1
|
|
12
|
+
- @backstage/core-compat-api@0.3.4-next.0
|
|
13
|
+
- @backstage/core-components@0.16.2-next.0
|
|
14
|
+
- @backstage/core-plugin-api@1.10.1
|
|
15
|
+
- @backstage/plugin-catalog@1.25.2-next.0
|
|
16
|
+
- @backstage/plugin-catalog-common@1.1.1
|
|
17
|
+
- @backstage/plugin-permission-react@0.4.28
|
|
18
|
+
|
|
3
19
|
## 0.12.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
3
|
import { NavItemBlueprint, ApiBlueprint, createApiFactory, PageBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
4
|
-
import {
|
|
4
|
+
import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
|
|
5
5
|
import { RELATION_HAS_PART, parseEntityRef } from '@backstage/catalog-model';
|
|
6
6
|
import '@backstage/plugin-catalog-react';
|
|
7
7
|
import '@material-ui/lab/Alert';
|
|
@@ -34,14 +34,14 @@ const ProvidedApisCard = (props) => {
|
|
|
34
34
|
{
|
|
35
35
|
title,
|
|
36
36
|
variant,
|
|
37
|
-
emptyContent: /* @__PURE__ */ React.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "This ", entity.kind.toLocaleLowerCase("en-US"), " does not provide any APIs."), /* @__PURE__ */ React.createElement(
|
|
37
|
+
emptyContent: /* @__PURE__ */ React.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "This ", entity.kind.toLocaleLowerCase("en-US"), " does not provide any APIs."), /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, /* @__PURE__ */ React.createElement(
|
|
38
38
|
Link,
|
|
39
39
|
{
|
|
40
40
|
to: "https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional",
|
|
41
41
|
externalLinkIcon: true
|
|
42
42
|
},
|
|
43
43
|
"Learn how to change this"
|
|
44
|
-
)),
|
|
44
|
+
))),
|
|
45
45
|
columns,
|
|
46
46
|
tableOptions,
|
|
47
47
|
entities
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProvidedApisCard.esm.js","sources":["../../../src/components/ApisCards/ProvidedApisCard.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 { ApiEntity, RELATION_PROVIDES_API } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\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 InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n TableOptions,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ProvidedApisCard = (props: {\n variant?: InfoCardVariants;\n title?: string;\n columns?: TableColumn<ApiEntity>[];\n tableOptions?: TableOptions;\n}) => {\n const {\n variant = 'gridItem',\n title = 'Provided APIs',\n columns = apiEntityColumns,\n tableOptions = {},\n } = 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={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title={title}>\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={title}\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 <Link\n
|
|
1
|
+
{"version":3,"file":"ProvidedApisCard.esm.js","sources":["../../../src/components/ApisCards/ProvidedApisCard.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 { ApiEntity, RELATION_PROVIDES_API } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\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 InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n TableOptions,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ProvidedApisCard = (props: {\n variant?: InfoCardVariants;\n title?: string;\n columns?: TableColumn<ApiEntity>[];\n tableOptions?: TableOptions;\n}) => {\n const {\n variant = 'gridItem',\n title = 'Provided APIs',\n columns = apiEntityColumns,\n tableOptions = {},\n } = 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={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title={title}>\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={title}\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\n to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\"\n externalLinkIcon\n >\n Learn how to change this\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n tableOptions={tableOptions}\n entities={entities as ApiEntity[]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AAuCa,MAAA,gBAAA,GAAmB,CAAC,KAK3B,KAAA;AACJ,EAAM,MAAA;AAAA,IACJ,OAAU,GAAA,UAAA;AA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AA,KAAA,CAAA,aAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,EAAG,EAAA,iGAAA;AAAA,UACH,gBAAgB,EAAA;AAAA,SAAA;AAAA,QACjB;AAAA,OAGH,CACF,CAAA;AAAA,MAEF,OAAA;AAAA,MACA,YAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import AsyncApi from '@asyncapi/react-component';
|
|
2
2
|
import '@asyncapi/react-component/styles/default.css';
|
|
3
|
-
import { makeStyles,
|
|
3
|
+
import { makeStyles, alpha, darken, useTheme } from '@material-ui/core/styles';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
6
|
const useStyles = makeStyles((theme) => ({
|
package/dist/plugin.esm.js
CHANGED
|
@@ -6,7 +6,7 @@ import '@backstage/core-components';
|
|
|
6
6
|
import { createPlugin, createApiFactory, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
|
|
7
7
|
import { defaultDefinitionWidgets } from './components/ApiDefinitionCard/ApiDefinitionWidget.esm.js';
|
|
8
8
|
import '@material-ui/core/Typography';
|
|
9
|
-
import {
|
|
9
|
+
import { rootRoute, registerComponentRouteRef } from './routes.esm.js';
|
|
10
10
|
|
|
11
11
|
const apiDocsPlugin = createPlugin({
|
|
12
12
|
id: "api-docs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-api-docs",
|
|
3
|
-
"version": "0.12.0",
|
|
3
|
+
"version": "0.12.2-next.0",
|
|
4
4
|
"description": "A Backstage plugin that helps represent API entities in the frontend",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -63,15 +63,15 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@asyncapi/react-component": "^2.3.3",
|
|
66
|
-
"@backstage/catalog-model": "
|
|
67
|
-
"@backstage/core-compat-api": "
|
|
68
|
-
"@backstage/core-components": "
|
|
69
|
-
"@backstage/core-plugin-api": "
|
|
70
|
-
"@backstage/frontend-plugin-api": "
|
|
71
|
-
"@backstage/plugin-catalog": "
|
|
72
|
-
"@backstage/plugin-catalog-common": "
|
|
73
|
-
"@backstage/plugin-catalog-react": "
|
|
74
|
-
"@backstage/plugin-permission-react": "
|
|
66
|
+
"@backstage/catalog-model": "1.7.1",
|
|
67
|
+
"@backstage/core-compat-api": "0.3.4-next.0",
|
|
68
|
+
"@backstage/core-components": "0.16.2-next.0",
|
|
69
|
+
"@backstage/core-plugin-api": "1.10.1",
|
|
70
|
+
"@backstage/frontend-plugin-api": "0.9.3-next.0",
|
|
71
|
+
"@backstage/plugin-catalog": "1.25.2-next.0",
|
|
72
|
+
"@backstage/plugin-catalog-common": "1.1.1",
|
|
73
|
+
"@backstage/plugin-catalog-react": "1.14.3-next.0",
|
|
74
|
+
"@backstage/plugin-permission-react": "0.4.28",
|
|
75
75
|
"@graphiql/react": "^0.23.0",
|
|
76
76
|
"@material-ui/core": "^4.12.2",
|
|
77
77
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"swagger-ui-react": "^5.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@backstage/cli": "
|
|
88
|
-
"@backstage/core-app-api": "
|
|
89
|
-
"@backstage/dev-utils": "
|
|
90
|
-
"@backstage/test-utils": "
|
|
87
|
+
"@backstage/cli": "0.29.3-next.0",
|
|
88
|
+
"@backstage/core-app-api": "1.15.3-next.0",
|
|
89
|
+
"@backstage/dev-utils": "1.1.5-next.0",
|
|
90
|
+
"@backstage/test-utils": "1.7.3-next.0",
|
|
91
91
|
"@testing-library/dom": "^10.0.0",
|
|
92
92
|
"@testing-library/jest-dom": "^6.0.0",
|
|
93
93
|
"@testing-library/react": "^16.0.0",
|