@backstage/plugin-api-docs 0.6.16 → 0.6.20
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 +37 -0
- package/dist/esm/AsyncApiDefinition-c39ae15d.esm.js +133 -0
- package/dist/esm/AsyncApiDefinition-c39ae15d.esm.js.map +1 -0
- package/dist/esm/{GraphQlDefinition-547f34fe.esm.js → GraphQlDefinition-fa85d425.esm.js} +2 -2
- package/dist/esm/{GraphQlDefinition-547f34fe.esm.js.map → GraphQlDefinition-fa85d425.esm.js.map} +1 -1
- package/dist/esm/{OpenApiDefinition-64011770.esm.js → OpenApiDefinition-48ae3040.esm.js} +2 -2
- package/dist/esm/{OpenApiDefinition-64011770.esm.js.map → OpenApiDefinition-48ae3040.esm.js.map} +1 -1
- package/dist/esm/{index-29e3fb16.esm.js → index-00af9be1.esm.js} +2 -2
- package/dist/esm/index-00af9be1.esm.js.map +1 -0
- package/dist/esm/{index-8c4016a8.esm.js → index-160e3ddd.esm.js} +3 -3
- package/dist/esm/{index-8c4016a8.esm.js.map → index-160e3ddd.esm.js.map} +1 -1
- package/dist/esm/{index-31dd65a0.esm.js → index-674cfd0b.esm.js} +2 -2
- package/dist/esm/index-674cfd0b.esm.js.map +1 -0
- package/dist/esm/{index-c1d775ea.esm.js → index-83f082c6.esm.js} +41 -40
- package/dist/esm/index-83f082c6.esm.js.map +1 -0
- package/dist/esm/{index-5bfec09f.esm.js → index-a8bf5768.esm.js} +2 -2
- package/dist/esm/index-a8bf5768.esm.js.map +1 -0
- package/dist/index.esm.js +1 -1
- package/package.json +17 -16
- package/dist/esm/AsyncApiDefinition-21854d8d.esm.js +0 -116
- package/dist/esm/AsyncApiDefinition-21854d8d.esm.js.map +0 -1
- package/dist/esm/index-29e3fb16.esm.js.map +0 -1
- package/dist/esm/index-31dd65a0.esm.js.map +0 -1
- package/dist/esm/index-5bfec09f.esm.js.map +0 -1
- package/dist/esm/index-c1d775ea.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @backstage/plugin-api-docs
|
|
2
2
|
|
|
3
|
+
## 0.6.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- de81b7455e: Display entity title on `ApiDefinitionCard` if defined
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/plugin-catalog@0.7.6
|
|
10
|
+
- @backstage/plugin-catalog-react@0.6.9
|
|
11
|
+
|
|
12
|
+
## 0.6.19
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @backstage/core-plugin-api@0.4.0
|
|
18
|
+
- @backstage/plugin-catalog-react@0.6.8
|
|
19
|
+
- @backstage/core-components@0.8.2
|
|
20
|
+
- @backstage/plugin-catalog@0.7.5
|
|
21
|
+
|
|
22
|
+
## 0.6.18
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- cd450844f6: Moved React dependencies to `peerDependencies` and allow both React v16 and v17 to be used.
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @backstage/core-components@0.8.0
|
|
29
|
+
- @backstage/core-plugin-api@0.3.0
|
|
30
|
+
- @backstage/plugin-catalog@0.7.4
|
|
31
|
+
- @backstage/plugin-catalog-react@0.6.5
|
|
32
|
+
|
|
33
|
+
## 0.6.17
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- dde1681f33: chore(dependencies): bump `graphiql` package to latest
|
|
38
|
+
- ef64a444ca: Update AsyncAPI component to 1.0.0-x releases
|
|
39
|
+
|
|
3
40
|
## 0.6.16
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import AsyncApi from '@asyncapi/react-component';
|
|
2
|
+
import '@asyncapi/react-component/styles/default.css';
|
|
3
|
+
import { makeStyles, alpha, darken } from '@material-ui/core/styles';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useTheme } from '@material-ui/core';
|
|
6
|
+
|
|
7
|
+
const useStyles = makeStyles((theme) => ({
|
|
8
|
+
root: {
|
|
9
|
+
fontFamily: "inherit",
|
|
10
|
+
"& .bg-white": {
|
|
11
|
+
background: "none"
|
|
12
|
+
},
|
|
13
|
+
"& .text-4xl": {
|
|
14
|
+
...theme.typography.h3
|
|
15
|
+
},
|
|
16
|
+
" & h2": {
|
|
17
|
+
...theme.typography.h4
|
|
18
|
+
},
|
|
19
|
+
"& .border": {
|
|
20
|
+
borderColor: alpha(theme.palette.border, 0.1)
|
|
21
|
+
},
|
|
22
|
+
"& .min-w-min": {
|
|
23
|
+
minWidth: "fit-content"
|
|
24
|
+
},
|
|
25
|
+
"& .examples": {
|
|
26
|
+
padding: "1rem"
|
|
27
|
+
},
|
|
28
|
+
"& .bg-teal-500": {
|
|
29
|
+
backgroundColor: theme.palette.status.ok
|
|
30
|
+
},
|
|
31
|
+
"& .bg-blue-500": {
|
|
32
|
+
backgroundColor: theme.palette.info.main
|
|
33
|
+
},
|
|
34
|
+
"& .bg-blue-400": {
|
|
35
|
+
backgroundColor: theme.palette.info.light
|
|
36
|
+
},
|
|
37
|
+
"& .bg-indigo-400": {
|
|
38
|
+
backgroundColor: theme.palette.warning.main
|
|
39
|
+
},
|
|
40
|
+
"& .text-teal-50": {
|
|
41
|
+
color: theme.palette.status.ok
|
|
42
|
+
},
|
|
43
|
+
"& .text-red-600": {
|
|
44
|
+
color: theme.palette.error.main
|
|
45
|
+
},
|
|
46
|
+
"& .text-orange-600": {
|
|
47
|
+
color: theme.palette.warning.main
|
|
48
|
+
},
|
|
49
|
+
"& .text-teal-500": {
|
|
50
|
+
color: theme.palette.status.ok
|
|
51
|
+
},
|
|
52
|
+
"& .text-blue-500": {
|
|
53
|
+
color: theme.palette.info.main
|
|
54
|
+
},
|
|
55
|
+
"& .-rotate-90": {
|
|
56
|
+
"--tw-rotate": "0deg"
|
|
57
|
+
},
|
|
58
|
+
"& button": {
|
|
59
|
+
...theme.typography.button,
|
|
60
|
+
borderRadius: theme.shape.borderRadius,
|
|
61
|
+
color: theme.palette.primary.main
|
|
62
|
+
},
|
|
63
|
+
"& a": {
|
|
64
|
+
color: theme.palette.link
|
|
65
|
+
},
|
|
66
|
+
"& a.no-underline": {
|
|
67
|
+
...theme.typography.button,
|
|
68
|
+
background: "none",
|
|
69
|
+
boxSizing: "border-box",
|
|
70
|
+
minWidth: 64,
|
|
71
|
+
borderRadius: theme.shape.borderRadius,
|
|
72
|
+
transition: theme.transitions.create(["background-color", "box-shadow", "border"], {
|
|
73
|
+
duration: theme.transitions.duration.short
|
|
74
|
+
}),
|
|
75
|
+
padding: "5px 15px",
|
|
76
|
+
color: theme.palette.primary.main,
|
|
77
|
+
border: `1px solid ${alpha(theme.palette.primary.main, 0.5)}`,
|
|
78
|
+
"&:hover": {
|
|
79
|
+
textDecoration: "none",
|
|
80
|
+
border: `1px solid ${theme.palette.primary.main}`,
|
|
81
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"& li.no-underline": {
|
|
85
|
+
"& a": {
|
|
86
|
+
textDecoration: "none",
|
|
87
|
+
color: theme.palette.getContrastText(theme.palette.primary.main)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
dark: {
|
|
92
|
+
"& svg": {
|
|
93
|
+
fill: theme.palette.text.primary
|
|
94
|
+
},
|
|
95
|
+
"& .prose": {
|
|
96
|
+
color: theme.palette.text.secondary,
|
|
97
|
+
"& h3": {
|
|
98
|
+
color: theme.palette.text.primary
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"& .bg-gray-100, .bg-gray-200": {
|
|
102
|
+
backgroundColor: theme.palette.background.default
|
|
103
|
+
},
|
|
104
|
+
"& .text-gray-600": {
|
|
105
|
+
color: theme.palette.grey["50"]
|
|
106
|
+
},
|
|
107
|
+
"& .text-gray-700": {
|
|
108
|
+
color: theme.palette.grey["100"]
|
|
109
|
+
},
|
|
110
|
+
"& .panel--right": {
|
|
111
|
+
background: darken(theme.palette.navigation.background, 0.1)
|
|
112
|
+
},
|
|
113
|
+
"& .examples": {
|
|
114
|
+
backgroundColor: darken(theme.palette.navigation.background, 0.1),
|
|
115
|
+
"& pre": {
|
|
116
|
+
backgroundColor: darken(theme.palette.background.default, 0.2)
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
121
|
+
const AsyncApiDefinition = ({ definition }) => {
|
|
122
|
+
const classes = useStyles();
|
|
123
|
+
const theme = useTheme();
|
|
124
|
+
const classNames = `${classes.root} ${theme.palette.type === "dark" ? classes.dark : ""}`;
|
|
125
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
126
|
+
className: classNames
|
|
127
|
+
}, /* @__PURE__ */ React.createElement(AsyncApi, {
|
|
128
|
+
schema: definition
|
|
129
|
+
}));
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export { AsyncApiDefinition };
|
|
133
|
+
//# sourceMappingURL=AsyncApiDefinition-c39ae15d.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsyncApiDefinition-c39ae15d.esm.js","sources":["../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport AsyncApi from '@asyncapi/react-component';\nimport '@asyncapi/react-component/styles/default.css';\nimport { makeStyles, alpha, darken } from '@material-ui/core/styles';\nimport { BackstageTheme } from '@backstage/theme';\nimport React from 'react';\nimport { useTheme } from '@material-ui/core';\n\nconst useStyles = makeStyles((theme: BackstageTheme) => ({\n root: {\n fontFamily: 'inherit',\n '& .bg-white': {\n background: 'none',\n },\n '& .text-4xl': {\n ...theme.typography.h3,\n },\n ' & h2': {\n ...theme.typography.h4,\n },\n '& .border': {\n borderColor: alpha(theme.palette.border, 0.1),\n },\n '& .min-w-min': {\n minWidth: 'fit-content',\n },\n '& .examples': {\n padding: '1rem',\n },\n '& .bg-teal-500': {\n backgroundColor: theme.palette.status.ok,\n },\n '& .bg-blue-500': {\n backgroundColor: theme.palette.info.main,\n },\n '& .bg-blue-400': {\n backgroundColor: theme.palette.info.light,\n },\n '& .bg-indigo-400': {\n backgroundColor: theme.palette.warning.main,\n },\n '& .text-teal-50': {\n color: theme.palette.status.ok,\n },\n '& .text-red-600': {\n color: theme.palette.error.main,\n },\n '& .text-orange-600': {\n color: theme.palette.warning.main,\n },\n '& .text-teal-500': {\n color: theme.palette.status.ok,\n },\n '& .text-blue-500': {\n color: theme.palette.info.main,\n },\n '& .-rotate-90': {\n '--tw-rotate': '0deg',\n },\n '& button': {\n ...theme.typography.button,\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.primary.main,\n },\n '& a': {\n color: theme.palette.link,\n },\n '& a.no-underline': {\n ...theme.typography.button,\n background: 'none',\n boxSizing: 'border-box',\n minWidth: 64,\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(\n ['background-color', 'box-shadow', 'border'],\n {\n duration: theme.transitions.duration.short,\n },\n ),\n padding: '5px 15px',\n color: theme.palette.primary.main,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.5)}`,\n '&:hover': {\n textDecoration: 'none',\n border: `1px solid ${theme.palette.primary.main}`,\n backgroundColor: alpha(\n theme.palette.primary.main,\n theme.palette.action.hoverOpacity,\n ),\n },\n },\n '& li.no-underline': {\n '& a': {\n textDecoration: 'none',\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n },\n },\n dark: {\n '& svg': {\n fill: theme.palette.text.primary,\n },\n '& .prose': {\n color: theme.palette.text.secondary,\n '& h3': {\n color: theme.palette.text.primary,\n },\n },\n '& .bg-gray-100, .bg-gray-200': {\n backgroundColor: theme.palette.background.default,\n },\n '& .text-gray-600': {\n color: theme.palette.grey['50'],\n },\n '& .text-gray-700': {\n color: theme.palette.grey['100'],\n },\n '& .panel--right': {\n background: darken(theme.palette.navigation.background, 0.1),\n },\n '& .examples': {\n backgroundColor: darken(theme.palette.navigation.background, 0.1),\n '& pre': {\n backgroundColor: darken(theme.palette.background.default, 0.2),\n },\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const AsyncApiDefinition = ({ definition }: Props): JSX.Element => {\n const classes = useStyles();\n const theme = useTheme();\n const classNames = `${classes.root} ${\n theme.palette.type === 'dark' ? classes.dark : ''\n }`;\n\n return (\n <div className={classNames}>\n <AsyncApi schema={definition} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,YAAY,WAAW,CAAC;AAA2B,EACvD,MAAM;AAAA,IACJ,YAAY;AAAA,IACZ,eAAe;AAAA,MACb,YAAY;AAAA;AAAA,IAEd,eAAe;AAAA,SACV,MAAM,WAAW;AAAA;AAAA,IAEtB,SAAS;AAAA,SACJ,MAAM,WAAW;AAAA;AAAA,IAEtB,aAAa;AAAA,MACX,aAAa,MAAM,MAAM,QAAQ,QAAQ;AAAA;AAAA,IAE3C,gBAAgB;AAAA,MACd,UAAU;AAAA;AAAA,IAEZ,eAAe;AAAA,MACb,SAAS;AAAA;AAAA,IAEX,kBAAkB;AAAA,MAChB,iBAAiB,MAAM,QAAQ,OAAO;AAAA;AAAA,IAExC,kBAAkB;AAAA,MAChB,iBAAiB,MAAM,QAAQ,KAAK;AAAA;AAAA,IAEtC,kBAAkB;AAAA,MAChB,iBAAiB,MAAM,QAAQ,KAAK;AAAA;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QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA,EAIjE,MAAM;AAAA,IACJ,SAAS;AAAA,MACP,MAAM,MAAM,QAAQ,KAAK;AAAA;AAAA,IAE3B,YAAY;AAAA,MACV,OAAO,MAAM,QAAQ,KAAK;AAAA,MAC1B,QAAQ;AAAA,QACN,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA;AAAA,IAG9B,gCAAgC;AAAA,MAC9B,iBAAiB,MAAM,QAAQ,WAAW;AAAA;AAAA,IAE5C,oBAAoB;AAAA,MAClB,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,IAE5B,oBAAoB;AAAA,MAClB,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,IAE5B,mBAAmB;AAAA,MACjB,YAAY,OAAO,MAAM,QAAQ,WAAW,YAAY;AAAA;AAAA,IAE1D,eAAe;AAAA,MACb,iBAAiB,OAAO,MAAM,QAAQ,WAAW,YAAY;AAAA,MAC7D,SAAS;AAAA,QACP,iBAAiB,OAAO,MAAM,QAAQ,WAAW,SAAS;AAAA;AAAA;AAAA;AAAA;MAUrD,qBAAqB,CAAC,EAAE,iBAAqC;AACxE,QAAM,UAAU;AAChB,QAAM,QAAQ;AACd,QAAM,aAAa,GAAG,QAAQ,QAC5B,MAAM,QAAQ,SAAS,SAAS,QAAQ,OAAO;AAGjD,6CACG,OAAD;AAAA,IAAK,WAAW;AAAA,yCACb,UAAD;AAAA,IAAU,QAAQ;AAAA;AAAA;;;;"}
|
|
@@ -22,7 +22,7 @@ const useStyles = makeStyles(() => ({
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}));
|
|
25
|
-
const GraphQlDefinition = ({definition}) => {
|
|
25
|
+
const GraphQlDefinition = ({ definition }) => {
|
|
26
26
|
const classes = useStyles();
|
|
27
27
|
const schema = buildSchema(definition);
|
|
28
28
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -38,4 +38,4 @@ const GraphQlDefinition = ({definition}) => {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export { GraphQlDefinition };
|
|
41
|
-
//# sourceMappingURL=GraphQlDefinition-
|
|
41
|
+
//# sourceMappingURL=GraphQlDefinition-fa85d425.esm.js.map
|
package/dist/esm/{GraphQlDefinition-547f34fe.esm.js.map → GraphQlDefinition-fa85d425.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphQlDefinition-
|
|
1
|
+
{"version":3,"file":"GraphQlDefinition-fa85d425.esm.js","sources":["../../src/components/GraphQlDefinitionWidget/GraphQlDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstageTheme } from '@backstage/theme';\nimport { makeStyles } from '@material-ui/core/styles';\nimport GraphiQL from 'graphiql';\nimport 'graphiql/graphiql.css';\nimport { buildSchema } from 'graphql';\nimport React from 'react';\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n graphiQlWrapper: {\n flex: 1,\n '@global': {\n '.graphiql-container': {\n boxSizing: 'initial',\n height: '100%',\n minHeight: '600px',\n flex: '1 1 auto',\n },\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const GraphQlDefinition = ({ definition }: Props) => {\n const classes = useStyles();\n const schema = buildSchema(definition);\n\n return (\n <div className={classes.root}>\n <div className={classes.graphiQlWrapper}>\n <GraphiQL\n fetcher={() => Promise.resolve(null) as any}\n schema={schema}\n docExplorerOpen\n defaultSecondaryEditorOpen={false}\n />\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAuBA,MAAM,YAAY,WAA2B;AAAO,EAClD,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA;AAAA,EAEZ,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,WAAW;AAAA,MACT,uBAAuB;AAAA,QACrB,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,WAAW;AAAA,QACX,MAAM;AAAA;AAAA;AAAA;AAAA;MAUD,oBAAoB,CAAC,EAAE,iBAAwB;AAC1D,QAAM,UAAU;AAChB,QAAM,SAAS,YAAY;AAE3B,6CACG,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,UAAD;AAAA,IACE,SAAS,MAAM,QAAQ,QAAQ;AAAA,IAC/B;AAAA,IACA,iBAAe;AAAA,IACf,4BAA4B;AAAA;AAAA;;;;"}
|
|
@@ -112,7 +112,7 @@ const useStyles = makeStyles((theme) => ({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
}));
|
|
115
|
-
const OpenApiDefinition = ({definition}) => {
|
|
115
|
+
const OpenApiDefinition = ({ definition }) => {
|
|
116
116
|
const classes = useStyles();
|
|
117
117
|
const [def, setDef] = useState("");
|
|
118
118
|
useEffect(() => {
|
|
@@ -128,4 +128,4 @@ const OpenApiDefinition = ({definition}) => {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
export { OpenApiDefinition };
|
|
131
|
-
//# sourceMappingURL=OpenApiDefinition-
|
|
131
|
+
//# sourceMappingURL=OpenApiDefinition-48ae3040.esm.js.map
|
package/dist/esm/{OpenApiDefinition-64011770.esm.js.map → OpenApiDefinition-48ae3040.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenApiDefinition-
|
|
1
|
+
{"version":3,"file":"OpenApiDefinition-48ae3040.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header, \n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model, \n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model, \n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.hint,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method, \n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n};\n\nexport const OpenApiDefinition = ({ definition }: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def} deepLinking />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,YAAY,WAAW;AAAU,EACrC,MAAM;AAAA,IACJ,iBAAiB;AAAA,MACf,YAAY,MAAM,WAAW;AAAA,MAC7B,OAAO,MAAM,QAAQ,KAAK;AAAA,O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AAA;AAAA,OAE9B,4BAA4B;AAAA,SAC1B,YAAY;AAAA,UACX,YAAY,MAAM,WAAW;AAAA,UAC7B,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA;AAAA,OAG7B,QAAQ;AAAA,QACP,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA,OAE9B,6BAA6B;AAAA,QAC5B,OAAO,MAAM,QAAQ,UAAU;AAAA;AAAA,OAEhC,mCAAmC;AAAA,QAClC,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA,OAE3B,qBAAqB;AAAA,QACpB,OAAO,MAAM,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA;MAUxB,oBAAoB,CAAC,EAAE,iBAAyC;AAC3E,QAAM,UAAU;AAIhB,QAAM,CAAC,KAAK,UAAU,SAAS;AAE/B,YAAU,MAAM;AACd,UAAM,QAAQ,WAAW,MAAM,OAAO,aAAa;AACnD,WAAO,MAAM,aAAa;AAAA,KACzB,CAAC,YAAY;AAEhB,6CACG,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,WAAD;AAAA,IAAW,MAAM;AAAA,IAAK,aAAW;AAAA;AAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApiDefinitionCard, a as ApiTypeTitle, d as defaultDefinitionWidgets } from './index-
|
|
1
|
+
export { A as ApiDefinitionCard, a as ApiTypeTitle, d as defaultDefinitionWidgets } from './index-83f082c6.esm.js';
|
|
2
2
|
import '@backstage/plugin-catalog-react';
|
|
3
3
|
import '@material-ui/lab';
|
|
4
4
|
import 'react';
|
|
@@ -6,4 +6,4 @@ import '@backstage/core-plugin-api';
|
|
|
6
6
|
import '@backstage/core-components';
|
|
7
7
|
import '@backstage/catalog-model';
|
|
8
8
|
import '@material-ui/core';
|
|
9
|
-
//# sourceMappingURL=index-
|
|
9
|
+
//# sourceMappingURL=index-00af9be1.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-00af9be1.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -3,13 +3,13 @@ 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-83f082c6.esm.js';
|
|
7
7
|
import '@material-ui/lab';
|
|
8
8
|
import '@backstage/catalog-model';
|
|
9
9
|
import '@material-ui/core';
|
|
10
10
|
|
|
11
11
|
const defaultColumns = [
|
|
12
|
-
CatalogTable.columns.createNameColumn({defaultKind: "API"}),
|
|
12
|
+
CatalogTable.columns.createNameColumn({ defaultKind: "API" }),
|
|
13
13
|
CatalogTable.columns.createSystemColumn(),
|
|
14
14
|
CatalogTable.columns.createOwnerColumn(),
|
|
15
15
|
CatalogTable.columns.createSpecTypeColumn(),
|
|
@@ -48,4 +48,4 @@ const ApiExplorerPage = ({
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export { ApiExplorerPage };
|
|
51
|
-
//# sourceMappingURL=index-
|
|
51
|
+
//# sourceMappingURL=index-160e3ddd.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-160e3ddd.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,EAAE,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,4 +1,4 @@
|
|
|
1
|
-
export { b as ConsumingComponentsCard, e as ProvidingComponentsCard } from './index-
|
|
1
|
+
export { b as ConsumingComponentsCard, e as ProvidingComponentsCard } from './index-83f082c6.esm.js';
|
|
2
2
|
import '@backstage/plugin-catalog-react';
|
|
3
3
|
import '@material-ui/lab';
|
|
4
4
|
import 'react';
|
|
@@ -6,4 +6,4 @@ import '@backstage/core-plugin-api';
|
|
|
6
6
|
import '@backstage/core-components';
|
|
7
7
|
import '@backstage/catalog-model';
|
|
8
8
|
import '@material-ui/core';
|
|
9
|
-
//# sourceMappingURL=index-
|
|
9
|
+
//# sourceMappingURL=index-674cfd0b.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-674cfd0b.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -7,8 +7,7 @@ import { RELATION_CONSUMES_API, RELATION_HAS_PART, RELATION_PROVIDES_API, RELATI
|
|
|
7
7
|
import { Typography } from '@material-ui/core';
|
|
8
8
|
|
|
9
9
|
const apiDocsConfigRef = createApiRef({
|
|
10
|
-
id: "plugin.api-docs.config"
|
|
11
|
-
description: "Used to configure api-docs widgets"
|
|
10
|
+
id: "plugin.api-docs.config"
|
|
12
11
|
});
|
|
13
12
|
|
|
14
13
|
const PlainApiDefinitionWidget = (props) => {
|
|
@@ -20,18 +19,20 @@ const PlainApiDefinitionWidget = (props) => {
|
|
|
20
19
|
};
|
|
21
20
|
|
|
22
21
|
const ApiDefinitionCard = (_) => {
|
|
23
|
-
|
|
22
|
+
var _a;
|
|
23
|
+
const { entity } = useEntity();
|
|
24
24
|
const config = useApi(apiDocsConfigRef);
|
|
25
|
-
const {getApiDefinitionWidget} = config;
|
|
25
|
+
const { getApiDefinitionWidget } = config;
|
|
26
26
|
if (!entity) {
|
|
27
27
|
return /* @__PURE__ */ React.createElement(Alert, {
|
|
28
28
|
severity: "error"
|
|
29
29
|
}, "Could not fetch the API");
|
|
30
30
|
}
|
|
31
31
|
const definitionWidget = getApiDefinitionWidget(entity);
|
|
32
|
+
const entityTitle = (_a = entity.metadata.title) != null ? _a : entity.metadata.name;
|
|
32
33
|
if (definitionWidget) {
|
|
33
34
|
return /* @__PURE__ */ React.createElement(TabbedCard, {
|
|
34
|
-
title:
|
|
35
|
+
title: entityTitle
|
|
35
36
|
}, /* @__PURE__ */ React.createElement(CardTab, {
|
|
36
37
|
label: definitionWidget.title,
|
|
37
38
|
key: "widget"
|
|
@@ -44,7 +45,7 @@ const ApiDefinitionCard = (_) => {
|
|
|
44
45
|
})));
|
|
45
46
|
}
|
|
46
47
|
return /* @__PURE__ */ React.createElement(TabbedCard, {
|
|
47
|
-
title:
|
|
48
|
+
title: entityTitle,
|
|
48
49
|
children: [
|
|
49
50
|
/* @__PURE__ */ React.createElement(CardTab, {
|
|
50
51
|
label: entity.spec.type,
|
|
@@ -57,7 +58,7 @@ const ApiDefinitionCard = (_) => {
|
|
|
57
58
|
});
|
|
58
59
|
};
|
|
59
60
|
|
|
60
|
-
const LazyAsyncApiDefinition = React.lazy(() => import('./AsyncApiDefinition-
|
|
61
|
+
const LazyAsyncApiDefinition = React.lazy(() => import('./AsyncApiDefinition-c39ae15d.esm.js').then((m) => ({
|
|
61
62
|
default: m.AsyncApiDefinition
|
|
62
63
|
})));
|
|
63
64
|
const AsyncApiDefinitionWidget = (props) => {
|
|
@@ -68,7 +69,7 @@ const AsyncApiDefinitionWidget = (props) => {
|
|
|
68
69
|
}));
|
|
69
70
|
};
|
|
70
71
|
|
|
71
|
-
const LazyGraphQlDefinition = React.lazy(() => import('./GraphQlDefinition-
|
|
72
|
+
const LazyGraphQlDefinition = React.lazy(() => import('./GraphQlDefinition-fa85d425.esm.js').then((m) => ({
|
|
72
73
|
default: m.GraphQlDefinition
|
|
73
74
|
})));
|
|
74
75
|
const GraphQlDefinitionWidget = (props) => {
|
|
@@ -79,7 +80,7 @@ const GraphQlDefinitionWidget = (props) => {
|
|
|
79
80
|
}));
|
|
80
81
|
};
|
|
81
82
|
|
|
82
|
-
const LazyOpenApiDefinition = React.lazy(() => import('./OpenApiDefinition-
|
|
83
|
+
const LazyOpenApiDefinition = React.lazy(() => import('./OpenApiDefinition-48ae3040.esm.js').then((m) => ({
|
|
83
84
|
default: m.OpenApiDefinition
|
|
84
85
|
})));
|
|
85
86
|
const OpenApiDefinitionWidget = (props) => {
|
|
@@ -119,7 +120,7 @@ function defaultDefinitionWidgets() {
|
|
|
119
120
|
];
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
const ApiTypeTitle = ({apiEntity}) => {
|
|
123
|
+
const ApiTypeTitle = ({ apiEntity }) => {
|
|
123
124
|
const config = useApi(apiDocsConfigRef);
|
|
124
125
|
const definition = config.getApiDefinitionWidget(apiEntity);
|
|
125
126
|
const type = definition ? definition.title : apiEntity.spec.type;
|
|
@@ -136,7 +137,7 @@ function createSpecApiTypeColumn() {
|
|
|
136
137
|
};
|
|
137
138
|
}
|
|
138
139
|
const apiEntityColumns = [
|
|
139
|
-
EntityTable.columns.createEntityRefColumn({defaultKind: "API"}),
|
|
140
|
+
EntityTable.columns.createEntityRefColumn({ defaultKind: "API" }),
|
|
140
141
|
EntityTable.columns.createSystemColumn(),
|
|
141
142
|
EntityTable.columns.createOwnerColumn(),
|
|
142
143
|
createSpecApiTypeColumn(),
|
|
@@ -144,9 +145,9 @@ const apiEntityColumns = [
|
|
|
144
145
|
EntityTable.columns.createMetadataDescriptionColumn()
|
|
145
146
|
];
|
|
146
147
|
|
|
147
|
-
const ConsumedApisCard = ({variant = "gridItem"}) => {
|
|
148
|
-
const {entity} = useEntity();
|
|
149
|
-
const {entities, loading, error} = useRelatedEntities(entity, {
|
|
148
|
+
const ConsumedApisCard = ({ variant = "gridItem" }) => {
|
|
149
|
+
const { entity } = useEntity();
|
|
150
|
+
const { entities, loading, error } = useRelatedEntities(entity, {
|
|
150
151
|
type: RELATION_CONSUMES_API
|
|
151
152
|
});
|
|
152
153
|
if (loading) {
|
|
@@ -172,7 +173,7 @@ const ConsumedApisCard = ({variant = "gridItem"}) => {
|
|
|
172
173
|
title: "Consumed APIs",
|
|
173
174
|
variant,
|
|
174
175
|
emptyContent: /* @__PURE__ */ React.createElement("div", {
|
|
175
|
-
style: {textAlign: "center"}
|
|
176
|
+
style: { textAlign: "center" }
|
|
176
177
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
177
178
|
variant: "body1"
|
|
178
179
|
}, "This ", entity.kind.toLocaleLowerCase("en-US"), " does not consume any APIs."), /* @__PURE__ */ React.createElement(Typography, {
|
|
@@ -186,15 +187,15 @@ const ConsumedApisCard = ({variant = "gridItem"}) => {
|
|
|
186
187
|
};
|
|
187
188
|
|
|
188
189
|
const columns = [
|
|
189
|
-
EntityTable.columns.createEntityRefColumn({defaultKind: "API"}),
|
|
190
|
+
EntityTable.columns.createEntityRefColumn({ defaultKind: "API" }),
|
|
190
191
|
EntityTable.columns.createOwnerColumn(),
|
|
191
192
|
createSpecApiTypeColumn(),
|
|
192
193
|
EntityTable.columns.createSpecLifecycleColumn(),
|
|
193
194
|
EntityTable.columns.createMetadataDescriptionColumn()
|
|
194
195
|
];
|
|
195
|
-
const HasApisCard = ({variant = "gridItem"}) => {
|
|
196
|
-
const {entity} = useEntity();
|
|
197
|
-
const {entities, loading, error} = useRelatedEntities(entity, {
|
|
196
|
+
const HasApisCard = ({ variant = "gridItem" }) => {
|
|
197
|
+
const { entity } = useEntity();
|
|
198
|
+
const { entities, loading, error } = useRelatedEntities(entity, {
|
|
198
199
|
type: RELATION_HAS_PART,
|
|
199
200
|
kind: "API"
|
|
200
201
|
});
|
|
@@ -221,7 +222,7 @@ const HasApisCard = ({variant = "gridItem"}) => {
|
|
|
221
222
|
title: "APIs",
|
|
222
223
|
variant,
|
|
223
224
|
emptyContent: /* @__PURE__ */ React.createElement("div", {
|
|
224
|
-
style: {textAlign: "center"}
|
|
225
|
+
style: { textAlign: "center" }
|
|
225
226
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
226
227
|
variant: "body1"
|
|
227
228
|
}, "This ", entity.kind.toLocaleLowerCase("en-US"), " does not contain any APIs."), /* @__PURE__ */ React.createElement(Typography, {
|
|
@@ -234,9 +235,9 @@ const HasApisCard = ({variant = "gridItem"}) => {
|
|
|
234
235
|
});
|
|
235
236
|
};
|
|
236
237
|
|
|
237
|
-
const ProvidedApisCard = ({variant = "gridItem"}) => {
|
|
238
|
-
const {entity} = useEntity();
|
|
239
|
-
const {entities, loading, error} = useRelatedEntities(entity, {
|
|
238
|
+
const ProvidedApisCard = ({ variant = "gridItem" }) => {
|
|
239
|
+
const { entity } = useEntity();
|
|
240
|
+
const { entities, loading, error } = useRelatedEntities(entity, {
|
|
240
241
|
type: RELATION_PROVIDES_API
|
|
241
242
|
});
|
|
242
243
|
if (loading) {
|
|
@@ -262,7 +263,7 @@ const ProvidedApisCard = ({variant = "gridItem"}) => {
|
|
|
262
263
|
title: "Provided APIs",
|
|
263
264
|
variant,
|
|
264
265
|
emptyContent: /* @__PURE__ */ React.createElement("div", {
|
|
265
|
-
style: {textAlign: "center"}
|
|
266
|
+
style: { textAlign: "center" }
|
|
266
267
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
267
268
|
variant: "body1"
|
|
268
269
|
}, "This ", entity.kind.toLocaleLowerCase("en-US"), " does not provide any APIs."), /* @__PURE__ */ React.createElement(Typography, {
|
|
@@ -275,9 +276,9 @@ const ProvidedApisCard = ({variant = "gridItem"}) => {
|
|
|
275
276
|
});
|
|
276
277
|
};
|
|
277
278
|
|
|
278
|
-
const ConsumingComponentsCard = ({variant = "gridItem"}) => {
|
|
279
|
-
const {entity} = useEntity();
|
|
280
|
-
const {entities, loading, error} = useRelatedEntities(entity, {
|
|
279
|
+
const ConsumingComponentsCard = ({ variant = "gridItem" }) => {
|
|
280
|
+
const { entity } = useEntity();
|
|
281
|
+
const { entities, loading, error } = useRelatedEntities(entity, {
|
|
281
282
|
type: RELATION_API_CONSUMED_BY
|
|
282
283
|
});
|
|
283
284
|
if (loading) {
|
|
@@ -303,7 +304,7 @@ const ConsumingComponentsCard = ({variant = "gridItem"}) => {
|
|
|
303
304
|
title: "Consumers",
|
|
304
305
|
variant,
|
|
305
306
|
emptyContent: /* @__PURE__ */ React.createElement("div", {
|
|
306
|
-
style: {textAlign: "center"}
|
|
307
|
+
style: { textAlign: "center" }
|
|
307
308
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
308
309
|
variant: "body1"
|
|
309
310
|
}, "No component consumes this API."), /* @__PURE__ */ React.createElement(Typography, {
|
|
@@ -316,9 +317,9 @@ const ConsumingComponentsCard = ({variant = "gridItem"}) => {
|
|
|
316
317
|
});
|
|
317
318
|
};
|
|
318
319
|
|
|
319
|
-
const ProvidingComponentsCard = ({variant = "gridItem"}) => {
|
|
320
|
-
const {entity} = useEntity();
|
|
321
|
-
const {entities, loading, error} = useRelatedEntities(entity, {
|
|
320
|
+
const ProvidingComponentsCard = ({ variant = "gridItem" }) => {
|
|
321
|
+
const { entity } = useEntity();
|
|
322
|
+
const { entities, loading, error } = useRelatedEntities(entity, {
|
|
322
323
|
type: RELATION_API_PROVIDED_BY
|
|
323
324
|
});
|
|
324
325
|
if (loading) {
|
|
@@ -344,7 +345,7 @@ const ProvidingComponentsCard = ({variant = "gridItem"}) => {
|
|
|
344
345
|
title: "Providers",
|
|
345
346
|
variant,
|
|
346
347
|
emptyContent: /* @__PURE__ */ React.createElement("div", {
|
|
347
|
-
style: {textAlign: "center"}
|
|
348
|
+
style: { textAlign: "center" }
|
|
348
349
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
349
350
|
variant: "body1"
|
|
350
351
|
}, "No component provides this API."), /* @__PURE__ */ React.createElement(Typography, {
|
|
@@ -390,45 +391,45 @@ const apiDocsPlugin = createPlugin({
|
|
|
390
391
|
});
|
|
391
392
|
const ApiExplorerPage = apiDocsPlugin.provide(createRoutableExtension({
|
|
392
393
|
name: "ApiExplorerPage",
|
|
393
|
-
component: () => import('./index-
|
|
394
|
+
component: () => import('./index-160e3ddd.esm.js').then((m) => m.ApiExplorerPage),
|
|
394
395
|
mountPoint: rootRoute
|
|
395
396
|
}));
|
|
396
397
|
const EntityApiDefinitionCard = apiDocsPlugin.provide(createComponentExtension({
|
|
397
398
|
name: "EntityApiDefinitionCard",
|
|
398
399
|
component: {
|
|
399
|
-
lazy: () => import('./index-
|
|
400
|
+
lazy: () => import('./index-00af9be1.esm.js').then((m) => m.ApiDefinitionCard)
|
|
400
401
|
}
|
|
401
402
|
}));
|
|
402
403
|
const EntityConsumedApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
403
404
|
name: "EntityConsumedApisCard",
|
|
404
405
|
component: {
|
|
405
|
-
lazy: () => import('./index-
|
|
406
|
+
lazy: () => import('./index-a8bf5768.esm.js').then((m) => m.ConsumedApisCard)
|
|
406
407
|
}
|
|
407
408
|
}));
|
|
408
409
|
const EntityConsumingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
|
|
409
410
|
name: "EntityConsumingComponentsCard",
|
|
410
411
|
component: {
|
|
411
|
-
lazy: () => import('./index-
|
|
412
|
+
lazy: () => import('./index-674cfd0b.esm.js').then((m) => m.ConsumingComponentsCard)
|
|
412
413
|
}
|
|
413
414
|
}));
|
|
414
415
|
const EntityProvidedApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
415
416
|
name: "EntityProvidedApisCard",
|
|
416
417
|
component: {
|
|
417
|
-
lazy: () => import('./index-
|
|
418
|
+
lazy: () => import('./index-a8bf5768.esm.js').then((m) => m.ProvidedApisCard)
|
|
418
419
|
}
|
|
419
420
|
}));
|
|
420
421
|
const EntityProvidingComponentsCard = apiDocsPlugin.provide(createComponentExtension({
|
|
421
422
|
name: "EntityProvidingComponentsCard",
|
|
422
423
|
component: {
|
|
423
|
-
lazy: () => import('./index-
|
|
424
|
+
lazy: () => import('./index-674cfd0b.esm.js').then((m) => m.ProvidingComponentsCard)
|
|
424
425
|
}
|
|
425
426
|
}));
|
|
426
427
|
const EntityHasApisCard = apiDocsPlugin.provide(createComponentExtension({
|
|
427
428
|
name: "EntityHasApisCard",
|
|
428
429
|
component: {
|
|
429
|
-
lazy: () => import('./index-
|
|
430
|
+
lazy: () => import('./index-a8bf5768.esm.js').then((m) => m.HasApisCard)
|
|
430
431
|
}
|
|
431
432
|
}));
|
|
432
433
|
|
|
433
434
|
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 };
|
|
434
|
-
//# sourceMappingURL=index-
|
|
435
|
+
//# sourceMappingURL=index-83f082c6.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-83f082c6.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});\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 const entityTitle = entity.metadata.title ?? entity.metadata.name;\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entityTitle}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entityTitle}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The asyncapi component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyAsyncApiDefinition = React.lazy(() =>\n import('./AsyncApiDefinition').then(m => ({\n default: m.AsyncApiDefinition,\n })),\n);\n\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const AsyncApiDefinitionWidget = (\n props: AsyncApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyAsyncApiDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The graphql component, graphql and related CSS has a significant size, only\n// load it if the element is actually used.\nconst LazyGraphQlDefinition = React.lazy(() =>\n import('./GraphQlDefinition').then(m => ({\n default: m.GraphQlDefinition,\n })),\n);\n\nexport type GraphQlDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const GraphQlDefinitionWidget = (\n props: GraphQlDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyGraphQlDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\n\n// The swagger-ui component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyOpenApiDefinition = React.lazy(() =>\n import('./OpenApiDefinition').then(m => ({\n default: m.OpenApiDefinition,\n })),\n);\n\nexport type OpenApiDefinitionWidgetProps = {\n definition: string;\n};\n\nexport const OpenApiDefinitionWidget = (\n props: OpenApiDefinitionWidgetProps,\n) => {\n return (\n <Suspense fallback={<Progress />}>\n <LazyOpenApiDefinition {...props} />\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\n\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\nexport function defaultDefinitionWidgets(): ApiDefinitionWidget[] {\n return [\n {\n type: 'openapi',\n title: 'OpenAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <OpenApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'asyncapi',\n title: 'AsyncAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <AsyncApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'graphql',\n title: 'GraphQL',\n rawLanguage: 'graphql',\n component: definition => (\n <GraphQlDefinitionWidget definition={definition} />\n ),\n },\n ];\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiTypeTitle = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <span>{type}</span>;\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { TableColumn } from '@backstage/core-components';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\n// TODO: This could be moved to plugin-catalog-react if we wouldn't have a\n// special createSpecApiTypeColumn. But this is required to use ApiTypeTitle to\n// resolve the display name of an entity. Is the display name really worth it?\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\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\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\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":[],"mappings":";;;;;;;;MAoBa,mBAAmB,aAA4B;AAAA,EAC1D,IAAI;AAAA;;MCGO,2BAA2B,CACtC,UACG;AACH,6CACG,aAAD;AAAA,IACE,MAAM,MAAM;AAAA,IACZ,UAAU,MAAM;AAAA,IAChB,oBAAkB;AAAA;AAAA;;MCAX,oBAAoB,CAAC,MAAa;AA/B/C;AAgCE,QAAM,EAAE,WAAW;AACnB,QAAM,SAAS,OAAO;AACtB,QAAM,EAAE,2BAA2B;AAEnC,MAAI,CAAC,QAAQ;AACX,+CAAQ,OAAD;AAAA,MAAO,UAAS;AAAA,OAAQ;AAAA;AAGjC,QAAM,mBAAmB,uBAAuB;AAChD,QAAM,cAAc,aAAO,SAAS,UAAhB,YAAyB,OAAO,SAAS;AAE7D,MAAI,kBAAkB;AACpB,+CACG,YAAD;AAAA,MAAY,OAAO;AAAA,2CAChB,SAAD;AAAA,MAAS,OAAO,iBAAiB;AAAA,MAAO,KAAI;AAAA,OACzC,iBAAiB,UAAU,OAAO,KAAK,kDAEzC,SAAD;AAAA,MAAS,OAAM;AAAA,MAAM,KAAI;AAAA,2CACtB,0BAAD;AAAA,MACE,YAAY,OAAO,KAAK;AAAA,MACxB,UAAU,iBAAiB,eAAe,OAAO,KAAK;AAAA;AAAA;AAOhE,6CACG,YAAD;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,0CAEP,SAAD;AAAA,QAAS,OAAO,OAAO,KAAK;AAAA,QAAM,KAAI;AAAA,6CACnC,0BAAD;AAAA,QACE,YAAY,OAAO,K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AA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,2BAAkC,KAAK,OAAK,EAAE;AAAA;AAAA;MAKhD,yBAAyB,cAAc,QAClD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,2BAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;MAKxC,gCAAgC,cAAc,QACzD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,2BAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,yBAAyB,cAAc,QAClD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,2BAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;MAKxC,gCAAgC,cAAc,QACzD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACJ,OAAO,2BAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,oBAAoB,cAAc,QAC7C,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MAAM,OAAO,2BAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './index-
|
|
1
|
+
export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './index-83f082c6.esm.js';
|
|
2
2
|
import '@backstage/plugin-catalog-react';
|
|
3
3
|
import '@material-ui/lab';
|
|
4
4
|
import 'react';
|
|
@@ -6,4 +6,4 @@ import '@backstage/core-plugin-api';
|
|
|
6
6
|
import '@backstage/core-components';
|
|
7
7
|
import '@backstage/catalog-model';
|
|
8
8
|
import '@material-ui/core';
|
|
9
|
-
//# sourceMappingURL=index-
|
|
9
|
+
//# sourceMappingURL=index-a8bf5768.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-a8bf5768.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-83f082c6.esm.js';
|
|
2
2
|
import '@backstage/plugin-catalog-react';
|
|
3
3
|
import '@material-ui/lab';
|
|
4
4
|
import 'react';
|
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.20",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -30,33 +30,34 @@
|
|
|
30
30
|
"clean": "backstage-cli clean"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@asyncapi/react-component": "^0.
|
|
33
|
+
"@asyncapi/react-component": "^1.0.0-next.25",
|
|
34
34
|
"@backstage/catalog-model": "^0.9.7",
|
|
35
|
-
"@backstage/core-components": "^0.
|
|
36
|
-
"@backstage/core-plugin-api": "^0.
|
|
37
|
-
"@backstage/plugin-catalog": "^0.7.
|
|
38
|
-
"@backstage/plugin-catalog-react": "^0.6.
|
|
35
|
+
"@backstage/core-components": "^0.8.2",
|
|
36
|
+
"@backstage/core-plugin-api": "^0.4.0",
|
|
37
|
+
"@backstage/plugin-catalog": "^0.7.6",
|
|
38
|
+
"@backstage/plugin-catalog-react": "^0.6.9",
|
|
39
39
|
"@backstage/theme": "^0.2.14",
|
|
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",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"graphql": "^15.3.0",
|
|
43
|
+
"graphiql": "^1.5.12",
|
|
44
|
+
"graphql": "^16.0.0",
|
|
46
45
|
"isomorphic-form-data": "^2.0.0",
|
|
47
|
-
"react": "^16.13.1",
|
|
48
|
-
"react-dom": "^16.13.1",
|
|
49
46
|
"react-router": "6.0.0-beta.0",
|
|
50
47
|
"react-router-dom": "6.0.0-beta.0",
|
|
51
48
|
"react-use": "^17.2.4",
|
|
52
49
|
"swagger-client": "3.16.1",
|
|
53
50
|
"swagger-ui-react": "^4.0.0-rc.3"
|
|
54
51
|
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@types/react": "^16.13.1 || ^17.0.0",
|
|
54
|
+
"react": "^16.13.1 || ^17.0.0"
|
|
55
|
+
},
|
|
55
56
|
"devDependencies": {
|
|
56
|
-
"@backstage/cli": "^0.10.
|
|
57
|
-
"@backstage/core-app-api": "^0.
|
|
58
|
-
"@backstage/dev-utils": "^0.2.
|
|
59
|
-
"@backstage/test-utils": "^0.1
|
|
57
|
+
"@backstage/cli": "^0.10.4",
|
|
58
|
+
"@backstage/core-app-api": "^0.3.0",
|
|
59
|
+
"@backstage/dev-utils": "^0.2.15",
|
|
60
|
+
"@backstage/test-utils": "^0.2.1",
|
|
60
61
|
"@testing-library/jest-dom": "^5.10.1",
|
|
61
62
|
"@testing-library/react": "^11.2.5",
|
|
62
63
|
"@testing-library/user-event": "^13.1.8",
|
|
@@ -69,5 +70,5 @@
|
|
|
69
70
|
"files": [
|
|
70
71
|
"dist"
|
|
71
72
|
],
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "4b2a8ed96ff427735c872a72c1864321ef698436"
|
|
73
74
|
}
|
|
@@ -1,116 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,IA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kCAAkC;AAAA,MAChC,OAAO,MAAM,QAAQ,KAAK;AAAA;AAAA;AAAA;MASnB,qBAAqB,CAAC,CAAE,gBAAwB;AAC3D,QAAM,UAAU;AAEhB,6CACG,OAAD;AAAA,IAAK,WAAW,QAAQ;AAAA,yCACrB,UAAD;AAAA,IAAU,QAAQ;AAAA;AAAA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-29e3fb16.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-31dd65a0.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-5bfec09f.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-c1d775ea.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\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\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":[],"mappings":";;;;;;;;MAoBa,mBAAmB,aAA4B;AAAA,EAC1D,IAAI;AAAA,EACJ,aAAa;AAAA;;MCEF,2BAA2B,CACtC,UACG;AACH,6CACG,aAAD;AAAA,IACE,MAAM,MAAM;AAAA,IACZ,UAAU,MAAM;AAAA,IAChB,oBAAkB;AAAA;AAAA;;MCAX,oBAAoB,CAAC,MAAa;AAC7C,QAAM,CAAE,UAAW;AACnB,QAAM,SAAS,OAAO;AACtB,QAAM,CAAE,0BAA2B;AAEnC,MAAI,CAAC,QAAQ;AACX,+CAAQ,OAAD;AAAA,MAAO,UAAS;AAAA,OAAQ;AAAA;AAGjC,QAAM,mBAAmB,uBAAuB;AAEhD,MAAI,kBAAkB;AACpB,+CACG,YAAD;AAAA,MAAY,OAAO,OAAO,SAAS;AAAA,2CAChC,SAAD;AAAA,MAAS,OAAO,iBAAiB;AAAA,MAAO,KAAI;AAAA,OACzC,iBAAiB,UAAU,OAAO,KAAK,kDAEzC,SAAD;AAAA,MAAS,OAAM;AAAA,MAAM,KAAI;AAAA,2CACtB,0BAAD;AAAA,MACE,YAAY,OAAO,KAAK;AAAA,MACxB,UAAU,iBAAiB,eAAe,OAAO,KAAK;AAAA;AAAA;AAOhE,6CACG,YAAD;AAAA,IACE,OAAO,OAAO,SAAS;AAAA,IACvB,UAAU;AAAA,0CAEP,SAAD;AAAA,QAAS,OAAO,OAAO,KAAK;AAAA,QAAM,KAAI;AAAA,6CACnC,0BAAD;AAAA,QACE,YAAY,OAAO,KAAK;AAAA,QACxB,UAAU,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;;AC7ClC,MAAM,yBAAyB,MAAM,KAAK,MACxC,+CAA+B,KAAK;AAAM,EACxC,SAAS,EAAE;AAAA;MAQF,2BAA2B,CACtC,UACG;AACH,6CACG,UAAD;AAAA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