@backstage/plugin-api-docs 0.6.12 → 0.6.13
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 +13 -0
- package/dist/esm/AsyncApiDefinition-21854d8d.esm.js +116 -0
- package/dist/esm/AsyncApiDefinition-21854d8d.esm.js.map +1 -0
- package/dist/esm/GraphQlDefinition-547f34fe.esm.js +41 -0
- package/dist/esm/GraphQlDefinition-547f34fe.esm.js.map +1 -0
- package/dist/esm/OpenApiDefinition-c327180d.esm.js +109 -0
- package/dist/esm/OpenApiDefinition-c327180d.esm.js.map +1 -0
- package/dist/esm/index-47e93b67.esm.js +9 -0
- package/dist/esm/index-47e93b67.esm.js.map +1 -0
- package/dist/esm/index-69af27cc.esm.js +9 -0
- package/dist/esm/index-69af27cc.esm.js.map +1 -0
- package/dist/esm/index-7b56f9d6.esm.js +9 -0
- package/dist/esm/index-7b56f9d6.esm.js.map +1 -0
- package/dist/esm/{index-0916153c.esm.js → index-a11a0d9f.esm.js} +2 -9
- package/dist/esm/{index-0916153c.esm.js.map → index-a11a0d9f.esm.js.map} +1 -1
- package/dist/esm/{index-33c067eb.esm.js → index-dbcc0856.esm.js} +35 -212
- package/dist/esm/index-dbcc0856.esm.js.map +1 -0
- package/dist/index.d.ts +19 -19
- package/dist/index.esm.js +1 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +12 -12
- package/dist/esm/index-33c067eb.esm.js.map +0 -1
- package/dist/esm/index-33fd6142.esm.js +0 -16
- package/dist/esm/index-33fd6142.esm.js.map +0 -1
- package/dist/esm/index-8d2b93f8.esm.js +0 -16
- package/dist/esm/index-8d2b93f8.esm.js.map +0 -1
- package/dist/esm/index-8f134ba4.esm.js +0 -16
- package/dist/esm/index-8f134ba4.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @backstage/plugin-api-docs
|
|
2
2
|
|
|
3
|
+
## 0.6.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 044c38e739: Lazy load all API definition widgets. The widgets use libraries like
|
|
8
|
+
`swagger-ui`, `graphiql`, and `@asyncapi/react-component` which are quite heavy
|
|
9
|
+
weight. To improve initial load times, the widgets are only loaded once used.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- @backstage/core-components@0.7.3
|
|
12
|
+
- @backstage/theme@0.2.13
|
|
13
|
+
- @backstage/core-plugin-api@0.1.13
|
|
14
|
+
- @backstage/plugin-catalog-react@0.6.3
|
|
15
|
+
|
|
3
16
|
## 0.6.12
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import AsyncApi from '@asyncapi/react-component';
|
|
2
|
+
import '@asyncapi/react-component/lib/styles/fiori.css';
|
|
3
|
+
import { makeStyles, alpha } from '@material-ui/core/styles';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
const useStyles = makeStyles((theme) => ({
|
|
7
|
+
root: {
|
|
8
|
+
"& .asyncapi": {
|
|
9
|
+
"font-family": "inherit",
|
|
10
|
+
background: "none"
|
|
11
|
+
},
|
|
12
|
+
"& h2": {
|
|
13
|
+
...theme.typography.h6
|
|
14
|
+
},
|
|
15
|
+
"& .text-teal": {
|
|
16
|
+
color: theme.palette.primary.main
|
|
17
|
+
},
|
|
18
|
+
"& button": {
|
|
19
|
+
...theme.typography.button,
|
|
20
|
+
background: "none",
|
|
21
|
+
boxSizing: "border-box",
|
|
22
|
+
minWidth: 64,
|
|
23
|
+
borderRadius: theme.shape.borderRadius,
|
|
24
|
+
transition: theme.transitions.create(["background-color", "box-shadow", "border"], {
|
|
25
|
+
duration: theme.transitions.duration.short
|
|
26
|
+
}),
|
|
27
|
+
padding: "5px 15px",
|
|
28
|
+
color: theme.palette.primary.main,
|
|
29
|
+
border: `1px solid ${alpha(theme.palette.primary.main, 0.5)}`,
|
|
30
|
+
"&:hover": {
|
|
31
|
+
textDecoration: "none",
|
|
32
|
+
"&.Mui-disabled": {
|
|
33
|
+
backgroundColor: "transparent"
|
|
34
|
+
},
|
|
35
|
+
border: `1px solid ${theme.palette.primary.main}`,
|
|
36
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
|
37
|
+
"@media (hover: none)": {
|
|
38
|
+
backgroundColor: "transparent"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"&.Mui-disabled": {
|
|
42
|
+
color: theme.palette.action.disabled
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"& .asyncapi__collapse-button:hover": {
|
|
46
|
+
color: theme.palette.primary.main
|
|
47
|
+
},
|
|
48
|
+
"& button.asyncapi__toggle-button": {
|
|
49
|
+
"min-width": "inherit"
|
|
50
|
+
},
|
|
51
|
+
"& .asyncapi__info-list li": {
|
|
52
|
+
"border-color": theme.palette.primary.main,
|
|
53
|
+
"&:hover": {
|
|
54
|
+
color: theme.palette.text.primary,
|
|
55
|
+
"border-color": theme.palette.primary.main,
|
|
56
|
+
"background-color": theme.palette.primary.main
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"& .asyncapi__info-list li a": {
|
|
60
|
+
color: theme.palette.primary.main,
|
|
61
|
+
"&:hover": {
|
|
62
|
+
color: theme.palette.getContrastText(theme.palette.primary.main)
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"& .asyncapi__enum": {
|
|
66
|
+
color: theme.palette.secondary.main
|
|
67
|
+
},
|
|
68
|
+
"& .asyncapi__info, .asyncapi__channel, .asyncapi__channels > div, .asyncapi__schema, .asyncapi__channel-operations-list .asyncapi__messages-list-item .asyncapi__message, .asyncapi__message, .asyncapi__server, .asyncapi__servers > div, .asyncapi__messages > div, .asyncapi__schemas > div": {
|
|
69
|
+
"background-color": "inherit"
|
|
70
|
+
},
|
|
71
|
+
"& .asyncapi__channel-parameters-header, .asyncapi__channel-operations-header, .asyncapi__channel-operation-oneOf-subscribe-header, .asyncapi__channel-operation-oneOf-publish-header, .asyncapi__channel-operation-message-header, .asyncapi__message-header, .asyncapi__message-header-title, .asyncapi__message-header-title > h3, .asyncapi__bindings, .asyncapi__bindings-header, .asyncapi__bindings-header > h4": {
|
|
72
|
+
"background-color": "inherit",
|
|
73
|
+
color: theme.palette.text.primary
|
|
74
|
+
},
|
|
75
|
+
"& .asyncapi__additional-properties-notice": {
|
|
76
|
+
color: theme.palette.text.hint
|
|
77
|
+
},
|
|
78
|
+
"& .asyncapi__code, .asyncapi__code-pre": {
|
|
79
|
+
background: theme.palette.background.default
|
|
80
|
+
},
|
|
81
|
+
"& .asyncapi__schema-example-header-title": {
|
|
82
|
+
color: theme.palette.text.secondary
|
|
83
|
+
},
|
|
84
|
+
"& .asyncapi__message-headers-header, .asyncapi__message-payload-header, .asyncapi__server-variables-header, .asyncapi__server-security-header": {
|
|
85
|
+
"background-color": "inherit",
|
|
86
|
+
color: theme.palette.text.secondary
|
|
87
|
+
},
|
|
88
|
+
"& .asyncapi__table-header": {
|
|
89
|
+
background: theme.palette.background.default
|
|
90
|
+
},
|
|
91
|
+
"& .asyncapi__table-body": {
|
|
92
|
+
color: theme.palette.text.primary
|
|
93
|
+
},
|
|
94
|
+
"& .asyncapi__server-security-flow": {
|
|
95
|
+
background: theme.palette.background.default,
|
|
96
|
+
border: "none"
|
|
97
|
+
},
|
|
98
|
+
"& .asyncapi__server-security-flows-list a": {
|
|
99
|
+
color: theme.palette.primary.main
|
|
100
|
+
},
|
|
101
|
+
"& .asyncapi__table-row--nested": {
|
|
102
|
+
color: theme.palette.text.secondary
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}));
|
|
106
|
+
const AsyncApiDefinition = ({definition}) => {
|
|
107
|
+
const classes = useStyles();
|
|
108
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
109
|
+
className: classes.root
|
|
110
|
+
}, /* @__PURE__ */ React.createElement(AsyncApi, {
|
|
111
|
+
schema: definition
|
|
112
|
+
}));
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export { AsyncApiDefinition };
|
|
116
|
+
//# sourceMappingURL=AsyncApiDefinition-21854d8d.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsyncApiDefinition-21854d8d.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/lib/styles/fiori.css';\nimport { alpha, makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .asyncapi': {\n 'font-family': 'inherit',\n background: 'none',\n },\n '& h2': {\n ...theme.typography.h6,\n },\n '& .text-teal': {\n color: theme.palette.primary.main,\n },\n '& button': {\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 '&.Mui-disabled': {\n backgroundColor: 'transparent',\n },\n border: `1px solid ${theme.palette.primary.main}`,\n backgroundColor: alpha(\n theme.palette.primary.main,\n theme.palette.action.hoverOpacity,\n ),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent',\n },\n },\n '&.Mui-disabled': {\n color: theme.palette.action.disabled,\n },\n },\n '& .asyncapi__collapse-button:hover': {\n color: theme.palette.primary.main,\n },\n '& button.asyncapi__toggle-button': {\n 'min-width': 'inherit',\n },\n '& .asyncapi__info-list li': {\n 'border-color': theme.palette.primary.main,\n '&:hover': {\n color: theme.palette.text.primary,\n 'border-color': theme.palette.primary.main,\n 'background-color': theme.palette.primary.main,\n },\n },\n '& .asyncapi__info-list li a': {\n color: theme.palette.primary.main,\n '&:hover': {\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n },\n '& .asyncapi__enum': {\n color: theme.palette.secondary.main,\n },\n '& .asyncapi__info, .asyncapi__channel, .asyncapi__channels > div, .asyncapi__schema, .asyncapi__channel-operations-list .asyncapi__messages-list-item .asyncapi__message, .asyncapi__message, .asyncapi__server, .asyncapi__servers > div, .asyncapi__messages > div, .asyncapi__schemas > div':\n {\n 'background-color': 'inherit',\n },\n '& .asyncapi__channel-parameters-header, .asyncapi__channel-operations-header, .asyncapi__channel-operation-oneOf-subscribe-header, .asyncapi__channel-operation-oneOf-publish-header, .asyncapi__channel-operation-message-header, .asyncapi__message-header, .asyncapi__message-header-title, .asyncapi__message-header-title > h3, .asyncapi__bindings, .asyncapi__bindings-header, .asyncapi__bindings-header > h4':\n {\n 'background-color': 'inherit',\n color: theme.palette.text.primary,\n },\n '& .asyncapi__additional-properties-notice': {\n color: theme.palette.text.hint,\n },\n '& .asyncapi__code, .asyncapi__code-pre': {\n background: theme.palette.background.default,\n },\n '& .asyncapi__schema-example-header-title': {\n color: theme.palette.text.secondary,\n },\n '& .asyncapi__message-headers-header, .asyncapi__message-payload-header, .asyncapi__server-variables-header, .asyncapi__server-security-header':\n {\n 'background-color': 'inherit',\n color: theme.palette.text.secondary,\n },\n '& .asyncapi__table-header': {\n background: theme.palette.background.default,\n },\n '& .asyncapi__table-body': {\n color: theme.palette.text.primary,\n },\n '& .asyncapi__server-security-flow': {\n background: theme.palette.background.default,\n border: 'none',\n },\n '& .asyncapi__server-security-flows-list a': {\n color: theme.palette.primary.main,\n },\n '& .asyncapi__table-row--nested': {\n color: theme.palette.text.secondary,\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const AsyncApiDefinition = ({ definition }: Props) => {\n const classes = useStyles();\n\n return (\n <div className={classes.root}>\n <AsyncApi schema={definition} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,YAAY,WAAW;AAAU,EACrC,MAAM;AAAA,IACJ,eAAe;AAAA,MACb,eAAe;AAAA,MACf,YAAY;AAAA;AAAA,IAEd,QAAQ;AAAA,SACH,MAAM,WAAW;AAAA;AAAA,IAEtB,gBAAgB;AAAA,MACd,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA,IAE/B,YAAY;AAAA,SACP,MAAM,WAAW;AAAA,MACpB,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,UAAU;AAAA,MACV,cAAc,MAAM,MAAM;AAAA,MAC1B,YAAY,MAAM,YAAY,OAC5B,CAAC,oBAAoB,cAAc,WACnC;AAAA,QACE,UAAU,MAAM,YAAY,SAAS;AAAA;AAAA,MAGzC,SAAS;AAAA,MACT,OAAO,MAAM,QAAQ,QAAQ;AAAA,MAC7B,QAAQ,aAAa,MAAM,MAAM,QAAQ,QAAQ,MAAM;AAAA,MACvD,WAAW;AAAA,QACT,gBAAgB;AAAA,QAChB,kBAAkB;AAAA,UAChB,iBAAiB;AAAA;AAAA,QAEnB,QAAQ,aAAa,MAAM,QAAQ,QAAQ;AAAA,QAC3C,iBAAiB,MACf,MAAM,QAAQ,QAAQ,MACtB,MAAM,QAAQ,OAAO;AAAA,QAGvB,wBAAwB;AAAA,UACtB,iBAAiB;AAAA;AAAA;AAAA,MAGrB,kBAAkB;AAAA,QAChB,OAAO,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA,IAGhC,sCAAsC;AAAA,MACpC,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA,IAE/B,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BAAqB,CAAC,CAAE,gBAAwB;AAC3D,QAAM,UAAU;AAEhB,6CACG,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,UAAD;AAAA,IAAU,QAAQ;AAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
2
|
+
import GraphiQL from 'graphiql';
|
|
3
|
+
import 'graphiql/graphiql.css';
|
|
4
|
+
import { buildSchema } from 'graphql';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
const useStyles = makeStyles(() => ({
|
|
8
|
+
root: {
|
|
9
|
+
height: "100%",
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexFlow: "column nowrap"
|
|
12
|
+
},
|
|
13
|
+
graphiQlWrapper: {
|
|
14
|
+
flex: 1,
|
|
15
|
+
"@global": {
|
|
16
|
+
".graphiql-container": {
|
|
17
|
+
boxSizing: "initial",
|
|
18
|
+
height: "100%",
|
|
19
|
+
minHeight: "600px",
|
|
20
|
+
flex: "1 1 auto"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
const GraphQlDefinition = ({definition}) => {
|
|
26
|
+
const classes = useStyles();
|
|
27
|
+
const schema = buildSchema(definition);
|
|
28
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
29
|
+
className: classes.root
|
|
30
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
31
|
+
className: classes.graphiQlWrapper
|
|
32
|
+
}, /* @__PURE__ */ React.createElement(GraphiQL, {
|
|
33
|
+
fetcher: () => Promise.resolve(null),
|
|
34
|
+
schema,
|
|
35
|
+
docExplorerOpen: true,
|
|
36
|
+
defaultSecondaryEditorOpen: false
|
|
37
|
+
})));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { GraphQlDefinition };
|
|
41
|
+
//# sourceMappingURL=GraphQlDefinition-547f34fe.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphQlDefinition-547f34fe.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,CAAE,gBAAwB;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;;;;"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
|
+
import SwaggerUI from 'swagger-ui-react';
|
|
4
|
+
import 'swagger-ui-react/swagger-ui.css';
|
|
5
|
+
|
|
6
|
+
const useStyles = makeStyles((theme) => ({
|
|
7
|
+
root: {
|
|
8
|
+
"& .swagger-ui": {
|
|
9
|
+
fontFamily: "inherit",
|
|
10
|
+
color: theme.palette.text.primary,
|
|
11
|
+
[`& .info h1,
|
|
12
|
+
.info h2,
|
|
13
|
+
.info h3,
|
|
14
|
+
.info h4,
|
|
15
|
+
.info h5,
|
|
16
|
+
.info h6`]: {
|
|
17
|
+
fontFamily: "inherit",
|
|
18
|
+
color: theme.palette.text.primary
|
|
19
|
+
},
|
|
20
|
+
[`& .scheme-container`]: {
|
|
21
|
+
backgroundColor: theme.palette.background.default
|
|
22
|
+
},
|
|
23
|
+
[`& .opblock-tag,
|
|
24
|
+
.opblock-tag small,
|
|
25
|
+
table thead tr td,
|
|
26
|
+
table thead tr th`]: {
|
|
27
|
+
fontFamily: "inherit",
|
|
28
|
+
color: theme.palette.text.primary,
|
|
29
|
+
borderColor: theme.palette.divider
|
|
30
|
+
},
|
|
31
|
+
[`& section.models,
|
|
32
|
+
section.models.is-open h4`]: {
|
|
33
|
+
borderColor: theme.palette.divider
|
|
34
|
+
},
|
|
35
|
+
[`& .opblock .opblock-summary-description,
|
|
36
|
+
.parameter__type,
|
|
37
|
+
table.headers td,
|
|
38
|
+
.model-title,
|
|
39
|
+
.model .property.primitive,
|
|
40
|
+
section h3`]: {
|
|
41
|
+
fontFamily: "inherit",
|
|
42
|
+
color: theme.palette.text.secondary
|
|
43
|
+
},
|
|
44
|
+
[`& .opblock .opblock-summary-operation-id,
|
|
45
|
+
.opblock .opblock-summary-path,
|
|
46
|
+
.opblock .opblock-summary-path__deprecated,
|
|
47
|
+
.opblock .opblock-section-header h4,
|
|
48
|
+
.parameter__name,
|
|
49
|
+
.response-col_status,
|
|
50
|
+
.response-col_links,
|
|
51
|
+
.responses-inner h4,
|
|
52
|
+
.responses-inner h5,
|
|
53
|
+
.opblock-section-header .btn,
|
|
54
|
+
.tab li,
|
|
55
|
+
.info li,
|
|
56
|
+
.info p,
|
|
57
|
+
.info table,
|
|
58
|
+
section.models h4,
|
|
59
|
+
.info .title,
|
|
60
|
+
table.model tr.description,
|
|
61
|
+
.property-row`]: {
|
|
62
|
+
fontFamily: "inherit",
|
|
63
|
+
color: theme.palette.text.primary
|
|
64
|
+
},
|
|
65
|
+
[`& .opblock .opblock-section-header,
|
|
66
|
+
.model-box,
|
|
67
|
+
section.models .model-container`]: {
|
|
68
|
+
background: theme.palette.background.default
|
|
69
|
+
},
|
|
70
|
+
[`& .prop-format,
|
|
71
|
+
.parameter__in`]: {
|
|
72
|
+
color: theme.palette.text.disabled
|
|
73
|
+
},
|
|
74
|
+
[`& .opblock-description-wrapper p,
|
|
75
|
+
.opblock-external-docs-wrapper p,
|
|
76
|
+
.opblock-title_normal p,
|
|
77
|
+
.response-control-media-type__accept-message,
|
|
78
|
+
.opblock .opblock-section-header>label,
|
|
79
|
+
.scheme-container .schemes>label,
|
|
80
|
+
.info .base-url,
|
|
81
|
+
.model`]: {
|
|
82
|
+
color: theme.palette.text.hint
|
|
83
|
+
},
|
|
84
|
+
[`& .parameter__name.required:after`]: {
|
|
85
|
+
color: theme.palette.warning.dark
|
|
86
|
+
},
|
|
87
|
+
[`& .prop-type`]: {
|
|
88
|
+
color: theme.palette.primary.main
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
93
|
+
const OpenApiDefinition = ({definition}) => {
|
|
94
|
+
const classes = useStyles();
|
|
95
|
+
const [def, setDef] = useState("");
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
const timer = setTimeout(() => setDef(definition), 0);
|
|
98
|
+
return () => clearTimeout(timer);
|
|
99
|
+
}, [definition, setDef]);
|
|
100
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
101
|
+
className: classes.root
|
|
102
|
+
}, /* @__PURE__ */ React.createElement(SwaggerUI, {
|
|
103
|
+
spec: def,
|
|
104
|
+
deepLinking: true
|
|
105
|
+
}));
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export { OpenApiDefinition };
|
|
109
|
+
//# sourceMappingURL=OpenApiDefinition-c327180d.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OpenApiDefinition-c327180d.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: 'inherit',\n color: theme.palette.text.primary,\n\n [`& .info h1,\n .info h2,\n .info h3,\n .info h4,\n .info h5,\n .info h6`]: {\n fontFamily: 'inherit',\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: 'inherit',\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 [`& .opblock .opblock-summary-description,\n .parameter__type,\n table.headers td,\n .model-title,\n .model .property.primitive,\n section h3`]: {\n fontFamily: 'inherit',\n color: theme.palette.text.secondary,\n },\n [`& .opblock .opblock-summary-operation-id, \n .opblock .opblock-summary-path,\n .opblock .opblock-summary-path__deprecated,\n .opblock .opblock-section-header h4,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .responses-inner h4,\n .responses-inner h5,\n .opblock-section-header .btn,\n .tab li,\n .info li,\n .info p,\n .info table,\n section.models h4,\n .info .title,\n table.model tr.description,\n .property-row`]: {\n fontFamily: 'inherit',\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 [`& .opblock-description-wrapper p,\n .opblock-external-docs-wrapper p,\n .opblock-title_normal p,\n .response-control-media-type__accept-message,\n .opblock .opblock-section-header>label,\n .scheme-container .schemes>label,\n .info .base-url,\n .model`]: {\n color: theme.palette.text.hint,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& .prop-type`]: {\n color: theme.palette.primary.main,\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} deepLinking />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,YAAY,WAAW;AAAU,EACrC,MAAM;AAAA,IACJ,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,OAAO,MAAM,QAAQ,KAAK;AAAA,OAEzB;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKe;AAAA,QACd,YAAY;AAAA,QACZ,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B,wBAAwB;AAAA,QACvB,iBAAiB,MAAM,QAAQ,WAAW;AAAA;AAAA,OAE3C;AAAA;AAAA;AAAA,+BAGwB;AAAA,QACvB,YAAY;AAAA,QACZ,OAAO,MAAM,QAAQ,KAAK;AAAA,QAC1B,aAAa,MAAM,QAAQ;AAAA;AAAA,OAE5B;AAAA,uCACgC;AAAA,QAC/B,aAAa,MAAM,QAAQ;AAAA;AAAA,OAE5B;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKiB;AAAA,QAChB,YAAY;AAAA,QACZ,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAiBoB;AAAA,QACnB,YAAY;AAAA,QACZ,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B;AAAA;AAAA,6CAEsC;AAAA,QACrC,YAAY,MAAM,QAAQ,WAAW;AAAA;AAAA,OAEtC;AAAA,4BACqB;AAAA,QACpB,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAOa;AAAA,QACZ,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B,sCAAsC;AAAA,QACrC,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA,OAE9B,iBAAiB;AAAA,QAChB,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA;MAUxB,oBAAoB,CAAC,CAAE,gBAAyC;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,aAAW;AAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './index-dbcc0856.esm.js';
|
|
2
|
+
import '@backstage/plugin-catalog-react';
|
|
3
|
+
import '@material-ui/lab';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@backstage/core-plugin-api';
|
|
6
|
+
import '@backstage/core-components';
|
|
7
|
+
import '@backstage/catalog-model';
|
|
8
|
+
import '@material-ui/core';
|
|
9
|
+
//# sourceMappingURL=index-47e93b67.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-47e93b67.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { A as ApiDefinitionCard, a as ApiTypeTitle, d as defaultDefinitionWidgets } from './index-dbcc0856.esm.js';
|
|
2
|
+
import '@backstage/plugin-catalog-react';
|
|
3
|
+
import '@material-ui/lab';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@backstage/core-plugin-api';
|
|
6
|
+
import '@backstage/core-components';
|
|
7
|
+
import '@backstage/catalog-model';
|
|
8
|
+
import '@material-ui/core';
|
|
9
|
+
//# sourceMappingURL=index-69af27cc.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-69af27cc.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { b as ConsumingComponentsCard, e as ProvidingComponentsCard } from './index-dbcc0856.esm.js';
|
|
2
|
+
import '@backstage/plugin-catalog-react';
|
|
3
|
+
import '@material-ui/lab';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@backstage/core-plugin-api';
|
|
6
|
+
import '@backstage/core-components';
|
|
7
|
+
import '@backstage/catalog-model';
|
|
8
|
+
import '@material-ui/core';
|
|
9
|
+
//# sourceMappingURL=index-7b56f9d6.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-7b56f9d6.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -3,15 +3,8 @@ import { useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
|
3
3
|
import { CatalogTable, FilteredEntityLayout, FilterContainer, EntityListContainer } from '@backstage/plugin-catalog';
|
|
4
4
|
import { EntityListProvider, EntityKindPicker, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { c as createComponentRouteRef } from './index-
|
|
6
|
+
import { c as createComponentRouteRef } from './index-dbcc0856.esm.js';
|
|
7
7
|
import '@material-ui/lab';
|
|
8
|
-
import '@asyncapi/react-component';
|
|
9
|
-
import '@asyncapi/react-component/lib/styles/fiori.css';
|
|
10
|
-
import '@material-ui/core/styles';
|
|
11
|
-
import 'graphiql/graphiql.css';
|
|
12
|
-
import 'graphql';
|
|
13
|
-
import 'swagger-ui-react';
|
|
14
|
-
import 'swagger-ui-react/swagger-ui.css';
|
|
15
8
|
import '@backstage/catalog-model';
|
|
16
9
|
import '@material-ui/core';
|
|
17
10
|
|
|
@@ -55,4 +48,4 @@ const ApiExplorerPage = ({
|
|
|
55
48
|
};
|
|
56
49
|
|
|
57
50
|
export { ApiExplorerPage };
|
|
58
|
-
//# sourceMappingURL=index-
|
|
51
|
+
//# sourceMappingURL=index-a11a0d9f.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-a11a0d9f.esm.js","sources":["../../src/components/ApiExplorerPage/ApiExplorerPage.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 {\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 { createComponentRouteRef } 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\ntype ApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n};\n\nexport const ApiExplorerPage = ({\n initiallySelectedFilter = 'all',\n columns,\n actions,\n}: ApiExplorerPageProps) => {\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const createComponentLink = useRouteRef(createComponentRouteRef);\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={createComponentLink?.()}\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"],"names":[],"mappings":";;;;;;;;;;AA8CA,MAAM,iBAAiD;AAAA,EACrD,aAAa,QAAQ,iBAAiB,CAAE,aAAa;AAAA,EACrD,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA;MASV,kBAAkB,CAAC;AAAA,EAC9B,0BAA0B;AAAA,EAC1B;AAAA,EACA;AAAA,MAC0B;AAlE5B;AAmEE,QAAM,YAAY,OAAO;AACzB,QAAM,oBAAoB,GACxB,gBAAU,kBAAkB,yBAA5B,YAAoD;AAEtD,QAAM,sBAAsB,YAAY;AAExC,6CACG,gBAAD;AAAA,IACE,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,UAAU;AAAA,IACV,mBAAkB;AAAA,yCAEjB,SAAD,0CACG,eAAD;AAAA,IAAe,OAAM;AAAA,yCAClB,cAAD;AAAA,IACE,OAAM;AAAA,IACN,IAAI;AAAA,0CAEL,eAAD,MAAe,uDAEhB,oBAAD,0CACG,sBAAD,0CACG,iBAAD,0CACG,kBAAD;AAAA,IAAkB,eAAc;AAAA,IAAM,QAAM;AAAA,0CAC3C,kBAAD,2CACC,gBAAD;AAAA,IAAgB,eAAe;AAAA,0CAC9B,mBAAD,2CACC,uBAAD,2CACC,iBAAD,4CAED,qBAAD,0CACG,cAAD;AAAA,IACE,SAAS,WAAW;AAAA,IACpB;AAAA;AAAA;;;;"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { useEntity, EntityTable, useRelatedEntities } from '@backstage/plugin-catalog-react';
|
|
2
2
|
import { Alert } from '@material-ui/lab';
|
|
3
|
-
import React, { Suspense
|
|
3
|
+
import React, { Suspense } from 'react';
|
|
4
4
|
import { createApiRef, useApi, createRouteRef, createExternalRouteRef, createPlugin, createApiFactory, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
|
|
5
5
|
import { CodeSnippet, TabbedCard, CardTab, Progress, InfoCard, WarningPanel, Link } from '@backstage/core-components';
|
|
6
|
-
import AsyncApi from '@asyncapi/react-component';
|
|
7
|
-
import '@asyncapi/react-component/lib/styles/fiori.css';
|
|
8
|
-
import { makeStyles, fade } from '@material-ui/core/styles';
|
|
9
|
-
import 'graphiql/graphiql.css';
|
|
10
|
-
import { buildSchema } from 'graphql';
|
|
11
|
-
import SwaggerUI from 'swagger-ui-react';
|
|
12
|
-
import 'swagger-ui-react/swagger-ui.css';
|
|
13
6
|
import { RELATION_CONSUMES_API, RELATION_HAS_PART, RELATION_PROVIDES_API, RELATION_API_CONSUMED_BY, RELATION_API_PROVIDED_BY } from '@backstage/catalog-model';
|
|
14
7
|
import { Typography } from '@material-ui/core';
|
|
15
8
|
|
|
@@ -18,10 +11,10 @@ const apiDocsConfigRef = createApiRef({
|
|
|
18
11
|
description: "Used to configure api-docs widgets"
|
|
19
12
|
});
|
|
20
13
|
|
|
21
|
-
const PlainApiDefinitionWidget = (
|
|
14
|
+
const PlainApiDefinitionWidget = (props) => {
|
|
22
15
|
return /* @__PURE__ */ React.createElement(CodeSnippet, {
|
|
23
|
-
text: definition,
|
|
24
|
-
language,
|
|
16
|
+
text: props.definition,
|
|
17
|
+
language: props.language,
|
|
25
18
|
showCopyCodeButton: true
|
|
26
19
|
});
|
|
27
20
|
};
|
|
@@ -64,206 +57,36 @@ const ApiDefinitionCard = (_) => {
|
|
|
64
57
|
});
|
|
65
58
|
};
|
|
66
59
|
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
"& .text-teal": {
|
|
77
|
-
color: theme.palette.primary.main
|
|
78
|
-
},
|
|
79
|
-
"& button": {
|
|
80
|
-
...theme.typography.button,
|
|
81
|
-
background: "none",
|
|
82
|
-
boxSizing: "border-box",
|
|
83
|
-
minWidth: 64,
|
|
84
|
-
borderRadius: theme.shape.borderRadius,
|
|
85
|
-
transition: theme.transitions.create(["background-color", "box-shadow", "border"], {
|
|
86
|
-
duration: theme.transitions.duration.short
|
|
87
|
-
}),
|
|
88
|
-
padding: "5px 15px",
|
|
89
|
-
color: theme.palette.primary.main,
|
|
90
|
-
border: `1px solid ${fade(theme.palette.primary.main, 0.5)}`,
|
|
91
|
-
"&:hover": {
|
|
92
|
-
textDecoration: "none",
|
|
93
|
-
"&.Mui-disabled": {
|
|
94
|
-
backgroundColor: "transparent"
|
|
95
|
-
},
|
|
96
|
-
border: `1px solid ${theme.palette.primary.main}`,
|
|
97
|
-
backgroundColor: fade(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
|
98
|
-
"@media (hover: none)": {
|
|
99
|
-
backgroundColor: "transparent"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"&.Mui-disabled": {
|
|
103
|
-
color: theme.palette.action.disabled
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
"& .asyncapi__collapse-button:hover": {
|
|
107
|
-
color: theme.palette.primary.main
|
|
108
|
-
},
|
|
109
|
-
"& button.asyncapi__toggle-button": {
|
|
110
|
-
"min-width": "inherit"
|
|
111
|
-
},
|
|
112
|
-
"& .asyncapi__info-list li": {
|
|
113
|
-
"border-color": theme.palette.primary.main,
|
|
114
|
-
"&:hover": {
|
|
115
|
-
color: theme.palette.text.primary,
|
|
116
|
-
"border-color": theme.palette.primary.main,
|
|
117
|
-
"background-color": theme.palette.primary.main
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"& .asyncapi__info-list li a": {
|
|
121
|
-
color: theme.palette.primary.main,
|
|
122
|
-
"&:hover": {
|
|
123
|
-
color: theme.palette.getContrastText(theme.palette.primary.main)
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"& .asyncapi__enum": {
|
|
127
|
-
color: theme.palette.secondary.main
|
|
128
|
-
},
|
|
129
|
-
"& .asyncapi__info, .asyncapi__channel, .asyncapi__channels > div, .asyncapi__schema, .asyncapi__channel-operations-list .asyncapi__messages-list-item .asyncapi__message, .asyncapi__message, .asyncapi__server, .asyncapi__servers > div, .asyncapi__messages > div, .asyncapi__schemas > div": {
|
|
130
|
-
"background-color": "inherit"
|
|
131
|
-
},
|
|
132
|
-
"& .asyncapi__channel-parameters-header, .asyncapi__channel-operations-header, .asyncapi__channel-operation-oneOf-subscribe-header, .asyncapi__channel-operation-oneOf-publish-header, .asyncapi__channel-operation-message-header, .asyncapi__message-header, .asyncapi__message-header-title, .asyncapi__message-header-title > h3, .asyncapi__bindings, .asyncapi__bindings-header, .asyncapi__bindings-header > h4": {
|
|
133
|
-
"background-color": "inherit",
|
|
134
|
-
color: theme.palette.text.primary
|
|
135
|
-
},
|
|
136
|
-
"& .asyncapi__additional-properties-notice": {
|
|
137
|
-
color: theme.palette.text.hint
|
|
138
|
-
},
|
|
139
|
-
"& .asyncapi__code, .asyncapi__code-pre": {
|
|
140
|
-
background: theme.palette.background.default
|
|
141
|
-
},
|
|
142
|
-
"& .asyncapi__schema-example-header-title": {
|
|
143
|
-
color: theme.palette.text.secondary
|
|
144
|
-
},
|
|
145
|
-
"& .asyncapi__message-headers-header, .asyncapi__message-payload-header, .asyncapi__server-variables-header, .asyncapi__server-security-header": {
|
|
146
|
-
"background-color": "inherit",
|
|
147
|
-
color: theme.palette.text.secondary
|
|
148
|
-
},
|
|
149
|
-
"& .asyncapi__table-header": {
|
|
150
|
-
background: theme.palette.background.default
|
|
151
|
-
},
|
|
152
|
-
"& .asyncapi__table-body": {
|
|
153
|
-
color: theme.palette.text.primary
|
|
154
|
-
},
|
|
155
|
-
"& .asyncapi__server-security-flow": {
|
|
156
|
-
background: theme.palette.background.default,
|
|
157
|
-
border: "none"
|
|
158
|
-
},
|
|
159
|
-
"& .asyncapi__server-security-flows-list a": {
|
|
160
|
-
color: theme.palette.primary.main
|
|
161
|
-
},
|
|
162
|
-
"& .asyncapi__table-row--nested": {
|
|
163
|
-
color: theme.palette.text.secondary
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}));
|
|
167
|
-
const AsyncApiDefinitionWidget = ({definition}) => {
|
|
168
|
-
const classes = useStyles$2();
|
|
169
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
170
|
-
className: classes.root
|
|
171
|
-
}, /* @__PURE__ */ React.createElement(AsyncApi, {
|
|
172
|
-
schema: definition
|
|
60
|
+
const LazyAsyncApiDefinition = React.lazy(() => import('./AsyncApiDefinition-21854d8d.esm.js').then((m) => ({
|
|
61
|
+
default: m.AsyncApiDefinition
|
|
62
|
+
})));
|
|
63
|
+
const AsyncApiDefinitionWidget = (props) => {
|
|
64
|
+
return /* @__PURE__ */ React.createElement(Suspense, {
|
|
65
|
+
fallback: /* @__PURE__ */ React.createElement(Progress, null)
|
|
66
|
+
}, /* @__PURE__ */ React.createElement(LazyAsyncApiDefinition, {
|
|
67
|
+
...props
|
|
173
68
|
}));
|
|
174
69
|
};
|
|
175
70
|
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
display: "flex",
|
|
181
|
-
flexFlow: "column nowrap"
|
|
182
|
-
},
|
|
183
|
-
graphiQlWrapper: {
|
|
184
|
-
flex: 1,
|
|
185
|
-
"@global": {
|
|
186
|
-
".graphiql-container": {
|
|
187
|
-
boxSizing: "initial",
|
|
188
|
-
height: "100%",
|
|
189
|
-
minHeight: "600px",
|
|
190
|
-
flex: "1 1 auto"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}));
|
|
195
|
-
const GraphQlDefinitionWidget = ({definition}) => {
|
|
196
|
-
const classes = useStyles$1();
|
|
197
|
-
const schema = buildSchema(definition);
|
|
71
|
+
const LazyGraphQlDefinition = React.lazy(() => import('./GraphQlDefinition-547f34fe.esm.js').then((m) => ({
|
|
72
|
+
default: m.GraphQlDefinition
|
|
73
|
+
})));
|
|
74
|
+
const GraphQlDefinitionWidget = (props) => {
|
|
198
75
|
return /* @__PURE__ */ React.createElement(Suspense, {
|
|
199
76
|
fallback: /* @__PURE__ */ React.createElement(Progress, null)
|
|
200
|
-
}, /* @__PURE__ */ React.createElement(
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
className: classes.graphiQlWrapper
|
|
204
|
-
}, /* @__PURE__ */ React.createElement(GraphiQL, {
|
|
205
|
-
fetcher: () => Promise.resolve(null),
|
|
206
|
-
schema,
|
|
207
|
-
docExplorerOpen: true,
|
|
208
|
-
defaultSecondaryEditorOpen: false
|
|
209
|
-
}))));
|
|
77
|
+
}, /* @__PURE__ */ React.createElement(LazyGraphQlDefinition, {
|
|
78
|
+
...props
|
|
79
|
+
}));
|
|
210
80
|
};
|
|
211
81
|
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
"& .opblock-tag, .opblock-tag small, table thead tr td, table thead tr th": {
|
|
222
|
-
color: theme.palette.text.primary,
|
|
223
|
-
"border-color": theme.palette.divider
|
|
224
|
-
},
|
|
225
|
-
"& section.models, section.models.is-open h4": {
|
|
226
|
-
"border-color": theme.palette.divider
|
|
227
|
-
},
|
|
228
|
-
"& .opblock .opblock-summary-description, .parameter__type, table.headers td, .model-title, .model .property.primitive, section h3": {
|
|
229
|
-
color: theme.palette.text.secondary
|
|
230
|
-
},
|
|
231
|
-
"& .opblock .opblock-summary-operation-id, .opblock .opblock-summary-path, .opblock .opblock-summary-path__deprecated, .opblock .opblock-section-header h4, .parameter__name, .response-col_status, .response-col_links, .responses-inner h4, .swagger-ui .responses-inner h5, .opblock-section-header .btn, .tab li, .info li, .info p, .info table, section.models h4, .info .title, table.model tr.description, .property-row": {
|
|
232
|
-
color: theme.palette.text.primary
|
|
233
|
-
},
|
|
234
|
-
"& .opblock .opblock-section-header, .model-box, section.models .model-container": {
|
|
235
|
-
background: theme.palette.background.default
|
|
236
|
-
},
|
|
237
|
-
"& .prop-format, .parameter__in": {
|
|
238
|
-
color: theme.palette.text.disabled
|
|
239
|
-
},
|
|
240
|
-
"& ": {
|
|
241
|
-
color: theme.palette.text.primary,
|
|
242
|
-
"border-color": theme.palette.divider
|
|
243
|
-
},
|
|
244
|
-
"& .opblock-description-wrapper p, .opblock-external-docs-wrapper p, .opblock-title_normal p, .response-control-media-type__accept-message, .opblock .opblock-section-header>label, .scheme-container .schemes>label, .info .base-url, .model": {
|
|
245
|
-
color: theme.palette.text.hint
|
|
246
|
-
},
|
|
247
|
-
"& .parameter__name.required:after": {
|
|
248
|
-
color: theme.palette.warning.dark
|
|
249
|
-
},
|
|
250
|
-
"& .prop-type": {
|
|
251
|
-
color: theme.palette.primary.main
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}));
|
|
255
|
-
const OpenApiDefinitionWidget = ({definition}) => {
|
|
256
|
-
const classes = useStyles();
|
|
257
|
-
const [def, setDef] = useState("");
|
|
258
|
-
useEffect(() => {
|
|
259
|
-
const timer = setTimeout(() => setDef(definition), 0);
|
|
260
|
-
return () => clearTimeout(timer);
|
|
261
|
-
}, [definition, setDef]);
|
|
262
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
263
|
-
className: classes.root
|
|
264
|
-
}, /* @__PURE__ */ React.createElement(SwaggerUI, {
|
|
265
|
-
spec: def,
|
|
266
|
-
deepLinking: true
|
|
82
|
+
const LazyOpenApiDefinition = React.lazy(() => import('./OpenApiDefinition-c327180d.esm.js').then((m) => ({
|
|
83
|
+
default: m.OpenApiDefinition
|
|
84
|
+
})));
|
|
85
|
+
const OpenApiDefinitionWidget = (props) => {
|
|
86
|
+
return /* @__PURE__ */ React.createElement(Suspense, {
|
|
87
|
+
fallback: /* @__PURE__ */ React.createElement(Progress, null)
|
|
88
|
+
}, /* @__PURE__ */ React.createElement(LazyOpenApiDefinition, {
|
|
89
|
+
...props
|
|
267
90
|
}));
|
|
268
91
|
};
|
|
269
92
|
|
|
@@ -570,45 +393,45 @@ const apiDocsPlugin = createPlugin({
|
|
|
570
393
|
});
|
|
571
394
|
const ApiExplorerPage = apiDocsPlugin.provide(createRoutableExtension({
|
|
572
395
|
name: "ApiExplorerPage",
|
|
573
|
-
component: () => import('./index-
|
|
396
|
+
component: () => import('./index-a11a0d9f.esm.js').then((m) => m.ApiExplorerPage),
|
|
574
397
|
mountPoint: rootRoute
|
|
575
398
|
}));
|
|
576
399
|
const EntityApiDefinitionCard = apiDocsPlugin.provide(createComponentExtension({
|
|
577
400
|
name: "EntityApiDefinitionCard",
|
|
578
401
|
component: {
|
|
579
|
-
lazy: () => import('./index-
|
|
402
|
+
lazy: () => import('./index-69af27cc.esm.js').then((m) => m.ApiDefinitionCard)
|
|
580
403
|
}
|
|
581
404
|
}));
|
|
582
405
|
const EntityConsumedApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
583
406
|
name: "EntityConsumedApisCard",
|
|
584
407
|
component: {
|
|
585
|
-
lazy: () => import('./index-
|
|
408
|
+
lazy: () => import('./index-47e93b67.esm.js').then((m) => m.ConsumedApisCard)
|
|
586
409
|
}
|
|
587
410
|
}));
|
|
588
411
|
const EntityConsumingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
|
|
589
412
|
name: "EntityConsumingComponentsCard",
|
|
590
413
|
component: {
|
|
591
|
-
lazy: () => import('./index-
|
|
414
|
+
lazy: () => import('./index-7b56f9d6.esm.js').then((m) => m.ConsumingComponentsCard)
|
|
592
415
|
}
|
|
593
416
|
}));
|
|
594
417
|
const EntityProvidedApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
595
418
|
name: "EntityProvidedApisCard",
|
|
596
419
|
component: {
|
|
597
|
-
lazy: () => import('./index-
|
|
420
|
+
lazy: () => import('./index-47e93b67.esm.js').then((m) => m.ProvidedApisCard)
|
|
598
421
|
}
|
|
599
422
|
}));
|
|
600
423
|
const EntityProvidingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
|
|
601
424
|
name: "EntityProvidingComponentsCard",
|
|
602
425
|
component: {
|
|
603
|
-
lazy: () => import('./index-
|
|
426
|
+
lazy: () => import('./index-7b56f9d6.esm.js').then((m) => m.ProvidingComponentsCard)
|
|
604
427
|
}
|
|
605
428
|
}));
|
|
606
429
|
const EntityHasApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
607
430
|
name: "EntityHasApisCard",
|
|
608
431
|
component: {
|
|
609
|
-
lazy: () => import('./index-
|
|
432
|
+
lazy: () => import('./index-47e93b67.esm.js').then((m) => m.HasApisCard)
|
|
610
433
|
}
|
|
611
434
|
}));
|
|
612
435
|
|
|
613
436
|
export { ApiDefinitionCard as A, ConsumedApisCard as C, EntityApiDefinitionCard as E, HasApisCard as H, OpenApiDefinitionWidget as O, ProvidedApisCard as P, ApiTypeTitle as a, ConsumingComponentsCard as b, createComponentRouteRef as c, defaultDefinitionWidgets as d, ProvidingComponentsCard as e, apiDocsConfigRef as f, apiDocsPlugin as g, ApiExplorerPage as h, EntityConsumedApisCard as i, EntityConsumingComponentsCard as j, EntityHasApisCard as k, EntityProvidedApisCard as l, EntityProvidingComponentsCard as m, AsyncApiDefinitionWidget as n, PlainApiDefinitionWidget as o };
|
|
614
|
-
//# sourceMappingURL=index-
|
|
437
|
+
//# sourceMappingURL=index-dbcc0856.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-dbcc0856.esm.js","sources":["../../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/routes.ts","../../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 { 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 description: 'Used to configure api-docs widgets',\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\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n apiEntity?: ApiEntity;\n};\n\nexport const ApiDefinitionCard = (_: Props) => {\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\n if (definitionWidget) {\n return (\n <TabbedCard title={entity.metadata.name}>\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={entity.metadata.name}\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 {\n ApiEntity,\n Entity,\n RELATION_CONSUMES_API,\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 { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 {\n ApiEntity,\n Entity,\n RELATION_PROVIDES_API,\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 { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 Entity,\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 /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 Entity,\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 /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nconst NoIcon = () => null;\n\nexport const rootRoute = createRouteRef({\n icon: NoIcon,\n path: '/api-docs',\n title: 'APIs',\n});\n\nexport const createComponentRouteRef = createExternalRouteRef({\n id: 'create-component',\n optional: true,\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { createComponentRouteRef, 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 createComponent: createComponentRouteRef,\n },\n});\n\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerPage),\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":[],"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W;AAAA,IACT,MAAM,MACG,kCAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,yBAAyB,cAAc,QAClD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;MAKxC,gCAAgC,cAAc,QACzD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,oBAAoB,cAAc,QAC7C,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MAAa,kCAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,11 +8,11 @@ import * as _backstage_core_components from '@backstage/core-components';
|
|
|
8
8
|
import * as _backstage_plugin_catalog from '@backstage/plugin-catalog';
|
|
9
9
|
import * as _backstage_plugin_catalog_react from '@backstage/plugin-catalog-react';
|
|
10
10
|
|
|
11
|
-
declare type Props$
|
|
11
|
+
declare type Props$5 = {
|
|
12
12
|
/** @deprecated The entity is now grabbed from context instead */
|
|
13
13
|
apiEntity?: ApiEntity;
|
|
14
14
|
};
|
|
15
|
-
declare const ApiDefinitionCard: (_: Props$
|
|
15
|
+
declare const ApiDefinitionCard: (_: Props$5) => JSX.Element;
|
|
16
16
|
|
|
17
17
|
declare type ApiDefinitionWidget = {
|
|
18
18
|
type: string;
|
|
@@ -26,54 +26,54 @@ declare const ApiTypeTitle: ({ apiEntity }: {
|
|
|
26
26
|
apiEntity: ApiEntity;
|
|
27
27
|
}) => JSX.Element;
|
|
28
28
|
|
|
29
|
-
declare type Props$
|
|
29
|
+
declare type Props$4 = {
|
|
30
30
|
/** @deprecated The entity is now grabbed from context instead */
|
|
31
31
|
entity?: Entity;
|
|
32
32
|
variant?: 'gridItem';
|
|
33
33
|
};
|
|
34
|
-
declare const ConsumedApisCard: ({ variant }: Props$
|
|
34
|
+
declare const ConsumedApisCard: ({ variant }: Props$4) => JSX.Element;
|
|
35
35
|
|
|
36
|
-
declare type Props$
|
|
36
|
+
declare type Props$3 = {
|
|
37
37
|
variant?: 'gridItem';
|
|
38
38
|
};
|
|
39
|
-
declare const HasApisCard: ({ variant }: Props$
|
|
39
|
+
declare const HasApisCard: ({ variant }: Props$3) => JSX.Element;
|
|
40
40
|
|
|
41
|
-
declare type Props$
|
|
41
|
+
declare type Props$2 = {
|
|
42
42
|
/** @deprecated The entity is now grabbed from context instead */
|
|
43
43
|
entity?: Entity;
|
|
44
44
|
variant?: 'gridItem';
|
|
45
45
|
};
|
|
46
|
-
declare const ProvidedApisCard: ({ variant }: Props$
|
|
46
|
+
declare const ProvidedApisCard: ({ variant }: Props$2) => JSX.Element;
|
|
47
47
|
|
|
48
|
-
declare type
|
|
48
|
+
declare type AsyncApiDefinitionWidgetProps = {
|
|
49
49
|
definition: string;
|
|
50
50
|
};
|
|
51
|
-
declare const AsyncApiDefinitionWidget: (
|
|
51
|
+
declare const AsyncApiDefinitionWidget: (props: AsyncApiDefinitionWidgetProps) => JSX.Element;
|
|
52
52
|
|
|
53
|
-
declare type Props$
|
|
53
|
+
declare type Props$1 = {
|
|
54
54
|
/** @deprecated The entity is now grabbed from context instead */
|
|
55
55
|
entity?: Entity;
|
|
56
56
|
variant?: 'gridItem';
|
|
57
57
|
};
|
|
58
|
-
declare const ConsumingComponentsCard: ({ variant }: Props$
|
|
58
|
+
declare const ConsumingComponentsCard: ({ variant }: Props$1) => JSX.Element;
|
|
59
59
|
|
|
60
|
-
declare type Props
|
|
60
|
+
declare type Props = {
|
|
61
61
|
/** @deprecated The entity is now grabbed from context instead */
|
|
62
62
|
entity?: Entity;
|
|
63
63
|
variant?: 'gridItem';
|
|
64
64
|
};
|
|
65
|
-
declare const ProvidingComponentsCard: ({ variant }: Props
|
|
65
|
+
declare const ProvidingComponentsCard: ({ variant }: Props) => JSX.Element;
|
|
66
66
|
|
|
67
|
-
declare type
|
|
67
|
+
declare type OpenApiDefinitionWidgetProps = {
|
|
68
68
|
definition: string;
|
|
69
69
|
};
|
|
70
|
-
declare const OpenApiDefinitionWidget: (
|
|
70
|
+
declare const OpenApiDefinitionWidget: (props: OpenApiDefinitionWidgetProps) => JSX.Element;
|
|
71
71
|
|
|
72
|
-
declare type
|
|
72
|
+
declare type PlainApiDefinitionWidgetProps = {
|
|
73
73
|
definition: any;
|
|
74
74
|
language: string;
|
|
75
75
|
};
|
|
76
|
-
declare const PlainApiDefinitionWidget: (
|
|
76
|
+
declare const PlainApiDefinitionWidget: (props: PlainApiDefinitionWidgetProps) => JSX.Element;
|
|
77
77
|
|
|
78
78
|
declare const apiDocsConfigRef: _backstage_core_plugin_api.ApiRef<ApiDocsConfig>;
|
|
79
79
|
interface ApiDocsConfig {
|
|
@@ -116,4 +116,4 @@ declare const EntityHasApisCard: ({ variant }: {
|
|
|
116
116
|
variant?: "gridItem" | undefined;
|
|
117
117
|
}) => JSX.Element;
|
|
118
118
|
|
|
119
|
-
export { ApiDefinitionCard, ApiDefinitionWidget, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, ConsumedApisCard, ConsumingComponentsCard, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, HasApisCard, OpenApiDefinitionWidget, PlainApiDefinitionWidget, ProvidedApisCard, ProvidingComponentsCard, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
|
|
119
|
+
export { ApiDefinitionCard, ApiDefinitionWidget, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, AsyncApiDefinitionWidgetProps, ConsumedApisCard, ConsumingComponentsCard, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, HasApisCard, OpenApiDefinitionWidget, OpenApiDefinitionWidgetProps, PlainApiDefinitionWidget, PlainApiDefinitionWidgetProps, ProvidedApisCard, ProvidingComponentsCard, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
export { A as ApiDefinitionCard, h as ApiExplorerPage, a as ApiTypeTitle, n as AsyncApiDefinitionWidget, C as ConsumedApisCard, b as ConsumingComponentsCard, E as EntityApiDefinitionCard, i as EntityConsumedApisCard, j as EntityConsumingComponentsCard, k as EntityHasApisCard, l as EntityProvidedApisCard, m as EntityProvidingComponentsCard, H as HasApisCard, O as OpenApiDefinitionWidget, o as PlainApiDefinitionWidget, P as ProvidedApisCard, e as ProvidingComponentsCard, f as apiDocsConfigRef, g as apiDocsPlugin, d as defaultDefinitionWidgets, g as plugin } from './esm/index-
|
|
1
|
+
export { A as ApiDefinitionCard, h as ApiExplorerPage, a as ApiTypeTitle, n as AsyncApiDefinitionWidget, C as ConsumedApisCard, b as ConsumingComponentsCard, E as EntityApiDefinitionCard, i as EntityConsumedApisCard, j as EntityConsumingComponentsCard, k as EntityHasApisCard, l as EntityProvidedApisCard, m as EntityProvidingComponentsCard, H as HasApisCard, O as OpenApiDefinitionWidget, o as PlainApiDefinitionWidget, P as ProvidedApisCard, e as ProvidingComponentsCard, f as apiDocsConfigRef, g as apiDocsPlugin, d as defaultDefinitionWidgets, g as plugin } from './esm/index-dbcc0856.esm.js';
|
|
2
2
|
import '@backstage/plugin-catalog-react';
|
|
3
3
|
import '@material-ui/lab';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@backstage/core-plugin-api';
|
|
6
6
|
import '@backstage/core-components';
|
|
7
|
-
import '@asyncapi/react-component';
|
|
8
|
-
import '@asyncapi/react-component/lib/styles/fiori.css';
|
|
9
|
-
import '@material-ui/core/styles';
|
|
10
|
-
import 'graphiql/graphiql.css';
|
|
11
|
-
import 'graphql';
|
|
12
|
-
import 'swagger-ui-react';
|
|
13
|
-
import 'swagger-ui-react/swagger-ui.css';
|
|
14
7
|
import '@backstage/catalog-model';
|
|
15
8
|
import '@material-ui/core';
|
|
16
9
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
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.6.
|
|
4
|
+
"version": "0.6.13",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@asyncapi/react-component": "^0.23.0",
|
|
34
|
-
"@backstage/catalog-model": "^0.9.
|
|
35
|
-
"@backstage/core-components": "^0.7.
|
|
36
|
-
"@backstage/core-plugin-api": "^0.1.
|
|
37
|
-
"@backstage/plugin-catalog": "^0.7.
|
|
38
|
-
"@backstage/plugin-catalog-react": "^0.6.
|
|
39
|
-
"@backstage/theme": "^0.2.
|
|
34
|
+
"@backstage/catalog-model": "^0.9.5",
|
|
35
|
+
"@backstage/core-components": "^0.7.3",
|
|
36
|
+
"@backstage/core-plugin-api": "^0.1.13",
|
|
37
|
+
"@backstage/plugin-catalog": "^0.7.2",
|
|
38
|
+
"@backstage/plugin-catalog-react": "^0.6.3",
|
|
39
|
+
"@backstage/theme": "^0.2.13",
|
|
40
40
|
"@material-ui/core": "^4.12.2",
|
|
41
41
|
"@material-ui/icons": "^4.9.1",
|
|
42
42
|
"@material-ui/lab": "4.0.0-alpha.57",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"swagger-ui-react": "^4.0.0-rc.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@backstage/cli": "^0.
|
|
57
|
-
"@backstage/core-app-api": "^0.1.
|
|
56
|
+
"@backstage/cli": "^0.8.2",
|
|
57
|
+
"@backstage/core-app-api": "^0.1.20",
|
|
58
58
|
"@backstage/dev-utils": "^0.2.12",
|
|
59
|
-
"@backstage/test-utils": "^0.1.
|
|
59
|
+
"@backstage/test-utils": "^0.1.21",
|
|
60
60
|
"@testing-library/jest-dom": "^5.10.1",
|
|
61
61
|
"@testing-library/react": "^11.2.5",
|
|
62
62
|
"@testing-library/user-event": "^13.1.8",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"@types/node": "^14.14.32",
|
|
65
65
|
"@types/swagger-ui-react": "^3.23.3",
|
|
66
66
|
"cross-fetch": "^3.0.6",
|
|
67
|
-
"msw": "^0.
|
|
67
|
+
"msw": "^0.35.0"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
70
|
"dist"
|
|
71
71
|
],
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "5bdaccc40b4a814cf0b45d429f15a3afacc2f60b"
|
|
73
73
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-33c067eb.esm.js","sources":["../../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/routes.ts","../../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 { 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 description: 'Used to configure api-docs widgets',\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\ntype Props = {\n definition: any;\n language: string;\n};\n\nexport const PlainApiDefinitionWidget = ({ definition, language }: Props) => {\n return (\n <CodeSnippet text={definition} language={language} showCopyCodeButton />\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\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n apiEntity?: ApiEntity;\n};\n\nexport const ApiDefinitionCard = (_: Props) => {\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\n if (definitionWidget) {\n return (\n <TabbedCard title={entity.metadata.name}>\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={entity.metadata.name}\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 AsyncApi from '@asyncapi/react-component';\nimport '@asyncapi/react-component/lib/styles/fiori.css';\nimport { fade, makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .asyncapi': {\n 'font-family': 'inherit',\n background: 'none',\n },\n '& h2': {\n ...theme.typography.h6,\n },\n '& .text-teal': {\n color: theme.palette.primary.main,\n },\n '& button': {\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 ${fade(theme.palette.primary.main, 0.5)}`,\n '&:hover': {\n textDecoration: 'none',\n '&.Mui-disabled': {\n backgroundColor: 'transparent',\n },\n border: `1px solid ${theme.palette.primary.main}`,\n backgroundColor: fade(\n theme.palette.primary.main,\n theme.palette.action.hoverOpacity,\n ),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent',\n },\n },\n '&.Mui-disabled': {\n color: theme.palette.action.disabled,\n },\n },\n '& .asyncapi__collapse-button:hover': {\n color: theme.palette.primary.main,\n },\n '& button.asyncapi__toggle-button': {\n 'min-width': 'inherit',\n },\n '& .asyncapi__info-list li': {\n 'border-color': theme.palette.primary.main,\n '&:hover': {\n color: theme.palette.text.primary,\n 'border-color': theme.palette.primary.main,\n 'background-color': theme.palette.primary.main,\n },\n },\n '& .asyncapi__info-list li a': {\n color: theme.palette.primary.main,\n '&:hover': {\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n },\n '& .asyncapi__enum': {\n color: theme.palette.secondary.main,\n },\n '& .asyncapi__info, .asyncapi__channel, .asyncapi__channels > div, .asyncapi__schema, .asyncapi__channel-operations-list .asyncapi__messages-list-item .asyncapi__message, .asyncapi__message, .asyncapi__server, .asyncapi__servers > div, .asyncapi__messages > div, .asyncapi__schemas > div':\n {\n 'background-color': 'inherit',\n },\n '& .asyncapi__channel-parameters-header, .asyncapi__channel-operations-header, .asyncapi__channel-operation-oneOf-subscribe-header, .asyncapi__channel-operation-oneOf-publish-header, .asyncapi__channel-operation-message-header, .asyncapi__message-header, .asyncapi__message-header-title, .asyncapi__message-header-title > h3, .asyncapi__bindings, .asyncapi__bindings-header, .asyncapi__bindings-header > h4':\n {\n 'background-color': 'inherit',\n color: theme.palette.text.primary,\n },\n '& .asyncapi__additional-properties-notice': {\n color: theme.palette.text.hint,\n },\n '& .asyncapi__code, .asyncapi__code-pre': {\n background: theme.palette.background.default,\n },\n '& .asyncapi__schema-example-header-title': {\n color: theme.palette.text.secondary,\n },\n '& .asyncapi__message-headers-header, .asyncapi__message-payload-header, .asyncapi__server-variables-header, .asyncapi__server-security-header':\n {\n 'background-color': 'inherit',\n color: theme.palette.text.secondary,\n },\n '& .asyncapi__table-header': {\n background: theme.palette.background.default,\n },\n '& .asyncapi__table-body': {\n color: theme.palette.text.primary,\n },\n '& .asyncapi__server-security-flow': {\n background: theme.palette.background.default,\n border: 'none',\n },\n '& .asyncapi__server-security-flows-list a': {\n color: theme.palette.primary.main,\n },\n '& .asyncapi__table-row--nested': {\n color: theme.palette.text.secondary,\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const AsyncApiDefinitionWidget = ({ definition }: Props) => {\n const classes = useStyles();\n\n return (\n <div className={classes.root}>\n <AsyncApi schema={definition} />\n </div>\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 { BackstageTheme } from '@backstage/theme';\nimport { makeStyles } from '@material-ui/core/styles';\nimport 'graphiql/graphiql.css';\nimport { buildSchema } from 'graphql';\nimport React, { Suspense } from 'react';\nimport { Progress } from '@backstage/core-components';\n\nconst GraphiQL = React.lazy(() => import('graphiql'));\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: any;\n};\n\nexport const GraphQlDefinitionWidget = ({ definition }: Props) => {\n const classes = useStyles();\n const schema = buildSchema(definition);\n\n return (\n <Suspense fallback={<Progress />}>\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 </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 { 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\n// TODO: Schemas\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui, .info h1, .info h2, .info h3, .info h4, .info h': {\n 'font-family': 'inherit',\n color: theme.palette.text.primary,\n },\n '& .scheme-container': {\n 'background-color': theme.palette.background.default,\n },\n '& .opblock-tag, .opblock-tag small, table thead tr td, table thead tr th':\n {\n color: theme.palette.text.primary,\n 'border-color': theme.palette.divider,\n },\n '& section.models, section.models.is-open h4': {\n 'border-color': theme.palette.divider,\n },\n '& .opblock .opblock-summary-description, .parameter__type, table.headers td, .model-title, .model .property.primitive, section h3':\n {\n color: theme.palette.text.secondary,\n },\n '& .opblock .opblock-summary-operation-id, .opblock .opblock-summary-path, .opblock .opblock-summary-path__deprecated, .opblock .opblock-section-header h4, .parameter__name, .response-col_status, .response-col_links, .responses-inner h4, .swagger-ui .responses-inner h5, .opblock-section-header .btn, .tab li, .info li, .info p, .info table, section.models h4, .info .title, table.model tr.description, .property-row':\n {\n color: theme.palette.text.primary,\n },\n '& .opblock .opblock-section-header, .model-box, section.models .model-container':\n {\n background: theme.palette.background.default,\n },\n '& .prop-format, .parameter__in': {\n color: theme.palette.text.disabled,\n },\n '& ': {\n color: theme.palette.text.primary,\n 'border-color': theme.palette.divider,\n },\n '& .opblock-description-wrapper p, .opblock-external-docs-wrapper p, .opblock-title_normal p, .response-control-media-type__accept-message, .opblock .opblock-section-header>label, .scheme-container .schemes>label, .info .base-url, .model':\n {\n color: theme.palette.text.hint,\n },\n '& .parameter__name.required:after': {\n color: theme.palette.warning.dark,\n },\n '& .prop-type': {\n color: theme.palette.primary.main,\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const OpenApiDefinitionWidget = ({ definition }: Props) => {\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} deepLinking />\n </div>\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 {\n ApiEntity,\n Entity,\n RELATION_CONSUMES_API,\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 { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 {\n ApiEntity,\n Entity,\n RELATION_PROVIDES_API,\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 { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 Entity,\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 /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 Entity,\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 /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\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 {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nconst NoIcon = () => null;\n\nexport const rootRoute = createRouteRef({\n icon: NoIcon,\n path: '/api-docs',\n title: 'APIs',\n});\n\nexport const createComponentRouteRef = createExternalRouteRef({\n id: 'create-component',\n optional: true,\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { createComponentRouteRef, 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 createComponent: createComponentRouteRef,\n },\n});\n\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerPage),\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":["useStyles"],"mappings":";;;;;;;;;;;;;;;MAoBa,mBAAmB,aAA4B;AAAA,EAC1D,IAAI;AAAA,EACJ,aAAa;AAAA;;MCEF,2BAA2B,CAAC,CAAE,YAAY,cAAsB;AAC3E,6CACG,aAAD;AAAA,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A,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,oBAAoB,cAAc,QAC7C,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MAAa,kCAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;;;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { b as ConsumingComponentsCard, e as ProvidingComponentsCard } from './index-33c067eb.esm.js';
|
|
2
|
-
import '@backstage/plugin-catalog-react';
|
|
3
|
-
import '@material-ui/lab';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '@backstage/core-plugin-api';
|
|
6
|
-
import '@backstage/core-components';
|
|
7
|
-
import '@asyncapi/react-component';
|
|
8
|
-
import '@asyncapi/react-component/lib/styles/fiori.css';
|
|
9
|
-
import '@material-ui/core/styles';
|
|
10
|
-
import 'graphiql/graphiql.css';
|
|
11
|
-
import 'graphql';
|
|
12
|
-
import 'swagger-ui-react';
|
|
13
|
-
import 'swagger-ui-react/swagger-ui.css';
|
|
14
|
-
import '@backstage/catalog-model';
|
|
15
|
-
import '@material-ui/core';
|
|
16
|
-
//# sourceMappingURL=index-33fd6142.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-33fd6142.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { A as ApiDefinitionCard, a as ApiTypeTitle, d as defaultDefinitionWidgets } from './index-33c067eb.esm.js';
|
|
2
|
-
import '@backstage/plugin-catalog-react';
|
|
3
|
-
import '@material-ui/lab';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '@backstage/core-plugin-api';
|
|
6
|
-
import '@backstage/core-components';
|
|
7
|
-
import '@asyncapi/react-component';
|
|
8
|
-
import '@asyncapi/react-component/lib/styles/fiori.css';
|
|
9
|
-
import '@material-ui/core/styles';
|
|
10
|
-
import 'graphiql/graphiql.css';
|
|
11
|
-
import 'graphql';
|
|
12
|
-
import 'swagger-ui-react';
|
|
13
|
-
import 'swagger-ui-react/swagger-ui.css';
|
|
14
|
-
import '@backstage/catalog-model';
|
|
15
|
-
import '@material-ui/core';
|
|
16
|
-
//# sourceMappingURL=index-8d2b93f8.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-8d2b93f8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './index-33c067eb.esm.js';
|
|
2
|
-
import '@backstage/plugin-catalog-react';
|
|
3
|
-
import '@material-ui/lab';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '@backstage/core-plugin-api';
|
|
6
|
-
import '@backstage/core-components';
|
|
7
|
-
import '@asyncapi/react-component';
|
|
8
|
-
import '@asyncapi/react-component/lib/styles/fiori.css';
|
|
9
|
-
import '@material-ui/core/styles';
|
|
10
|
-
import 'graphiql/graphiql.css';
|
|
11
|
-
import 'graphql';
|
|
12
|
-
import 'swagger-ui-react';
|
|
13
|
-
import 'swagger-ui-react/swagger-ui.css';
|
|
14
|
-
import '@backstage/catalog-model';
|
|
15
|
-
import '@material-ui/core';
|
|
16
|
-
//# sourceMappingURL=index-8f134ba4.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-8f134ba4.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|