@backstage/plugin-api-docs 0.11.1-next.2 → 0.11.1

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/alpha/package.json +1 -1
  3. package/dist/alpha.esm.js +12 -12
  4. package/dist/alpha.esm.js.map +1 -1
  5. package/dist/esm/{ApiDefinitionCard-504c2432.esm.js → ApiDefinitionCard-04c70017.esm.js} +4 -4
  6. package/dist/esm/ApiDefinitionCard-04c70017.esm.js.map +1 -0
  7. package/dist/esm/{ApiDefinitionWidget-798ee85f.esm.js → ApiDefinitionWidget-90e56cf9.esm.js} +2 -2
  8. package/dist/esm/{ApiDefinitionWidget-798ee85f.esm.js.map → ApiDefinitionWidget-90e56cf9.esm.js.map} +1 -1
  9. package/dist/esm/{ApiExplorerPage-ce544a95.esm.js → ApiExplorerPage-93d899e2.esm.js} +2 -2
  10. package/dist/esm/{ApiExplorerPage-ce544a95.esm.js.map → ApiExplorerPage-93d899e2.esm.js.map} +1 -1
  11. package/dist/esm/{ApiTypeTitle-cc79a2f3.esm.js → ApiTypeTitle-af01a0df.esm.js} +2 -2
  12. package/dist/esm/{ApiTypeTitle-cc79a2f3.esm.js.map → ApiTypeTitle-af01a0df.esm.js.map} +1 -1
  13. package/dist/esm/{AsyncApiDefinition-ffed9c50.esm.js → AsyncApiDefinition-b9802a28.esm.js} +2 -3
  14. package/dist/esm/AsyncApiDefinition-b9802a28.esm.js.map +1 -0
  15. package/dist/esm/{ProvidedApisCard-e92fbd29.esm.js → ProvidedApisCard-9d6d6f82.esm.js} +15 -6
  16. package/dist/esm/ProvidedApisCard-9d6d6f82.esm.js.map +1 -0
  17. package/dist/esm/{ProvidingComponentsCard-5b679445.esm.js → ProvidingComponentsCard-4722ca0e.esm.js} +2 -2
  18. package/dist/esm/ProvidingComponentsCard-4722ca0e.esm.js.map +1 -0
  19. package/dist/esm/{index-c969ed3d.esm.js → index-2ee1c1df.esm.js} +3 -3
  20. package/dist/esm/index-2ee1c1df.esm.js.map +1 -0
  21. package/dist/esm/{index-435dfc01.esm.js → index-74538c23.esm.js} +3 -3
  22. package/dist/esm/index-74538c23.esm.js.map +1 -0
  23. package/dist/esm/index-7ee30e13.esm.js +22 -0
  24. package/dist/esm/index-7ee30e13.esm.js.map +1 -0
  25. package/dist/esm/{index-6f21bd2e.esm.js → index-8451fe54.esm.js} +5 -5
  26. package/dist/esm/index-8451fe54.esm.js.map +1 -0
  27. package/dist/index.esm.js +24 -16
  28. package/dist/index.esm.js.map +1 -1
  29. package/package.json +15 -15
  30. package/dist/esm/ApiDefinitionCard-504c2432.esm.js.map +0 -1
  31. package/dist/esm/AsyncApiDefinition-ffed9c50.esm.js.map +0 -1
  32. package/dist/esm/ProvidedApisCard-e92fbd29.esm.js.map +0 -1
  33. package/dist/esm/ProvidingComponentsCard-5b679445.esm.js.map +0 -1
  34. package/dist/esm/index-435dfc01.esm.js.map +0 -1
  35. package/dist/esm/index-5f0727eb.esm.js +0 -14
  36. package/dist/esm/index-5f0727eb.esm.js.map +0 -1
  37. package/dist/esm/index-6f21bd2e.esm.js.map +0 -1
  38. package/dist/esm/index-c969ed3d.esm.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @backstage/plugin-api-docs
2
2
 
3
+ ## 0.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c60dc3b: added an optional ESLint rule - no-top-level-material-ui-4-imports - in api-docs plugin which has an auto fix function to migrate the imports and used it to migrate the material-ui imports for plugins/api-docs
8
+ - 7854120: Use the `AppIcon` component in the navigation item extension.
9
+ - 2be27b9: Updated dependency `graphiql` to `3.1.1`.
10
+ - efba3d2: Updated dependency `@asyncapi/react-component` to `1.3.1`.
11
+ - Updated dependencies
12
+ - @backstage/core-components@0.14.1
13
+ - @backstage/plugin-catalog@1.18.0
14
+ - @backstage/plugin-catalog-react@1.11.0
15
+ - @backstage/catalog-model@1.4.5
16
+ - @backstage/core-compat-api@0.2.1
17
+ - @backstage/core-plugin-api@1.9.1
18
+ - @backstage/frontend-plugin-api@0.6.1
19
+ - @backstage/plugin-catalog-common@1.0.22
20
+ - @backstage/plugin-permission-react@0.4.21
21
+
3
22
  ## 0.11.1-next.2
4
23
 
5
24
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.11.1-next.2",
3
+ "version": "0.11.1",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/alpha.esm.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- import { Grid } from '@material-ui/core';
2
+ import Grid from '@material-ui/core/Grid';
3
3
  import { createNavItemExtension, createApiExtension, createApiFactory, createPageExtension, createSchemaFromZod, createPlugin } from '@backstage/frontend-plugin-api';
4
4
  import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
5
5
  import { createEntityCardExtension, createEntityContentExtension } from '@backstage/plugin-catalog-react/alpha';
6
6
  import { RELATION_HAS_PART, parseEntityRef } from '@backstage/catalog-model';
7
7
  import '@backstage/plugin-catalog-react';
8
- import '@material-ui/lab';
9
- import { r as rootRoute, a as apiDocsConfigRef, b as registerComponentRouteRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-798ee85f.esm.js';
8
+ import '@material-ui/lab/Alert';
9
+ import { r as rootRoute, a as apiDocsConfigRef, b as registerComponentRouteRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-90e56cf9.esm.js';
10
10
  import { AppIcon } from '@backstage/core-components';
11
11
  import '@backstage/core-plugin-api';
12
12
  import '@material-ui/core/Typography';
@@ -42,7 +42,7 @@ const apiDocsExplorerPage = createPageExtension({
42
42
  // Ommiting columns and actions for now as their types are too complex to map to zod
43
43
  })
44
44
  ),
45
- loader: ({ config }) => import('./esm/index-435dfc01.esm.js').then(
45
+ loader: ({ config }) => import('./esm/index-74538c23.esm.js').then(
46
46
  (m) => compatWrapper(
47
47
  /* @__PURE__ */ React.createElement(
48
48
  m.ApiExplorerIndexPage,
@@ -64,14 +64,14 @@ const apiDocsHasApisEntityCard = createEntityCardExtension({
64
64
  ({ type, targetRef }) => type.toLocaleLowerCase("en-US") === RELATION_HAS_PART && parseEntityRef(targetRef).kind === "API"
65
65
  ));
66
66
  },
67
- loader: () => import('./esm/index-5f0727eb.esm.js').then(
67
+ loader: () => import('./esm/index-7ee30e13.esm.js').then(
68
68
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.HasApisCard, null))
69
69
  )
70
70
  });
71
71
  const apiDocsDefinitionEntityCard = createEntityCardExtension({
72
72
  name: "definition",
73
73
  filter: "kind:api",
74
- loader: () => import('./esm/index-6f21bd2e.esm.js').then(
74
+ loader: () => import('./esm/index-8451fe54.esm.js').then(
75
75
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.ApiDefinitionCard, null))
76
76
  )
77
77
  });
@@ -81,7 +81,7 @@ const apiDocsConsumedApisEntityCard = createEntityCardExtension({
81
81
  // We are skipping variants and columns are too complex to map to zod
82
82
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
83
83
  filter: "kind:component",
84
- loader: () => import('./esm/index-5f0727eb.esm.js').then(
84
+ loader: () => import('./esm/index-7ee30e13.esm.js').then(
85
85
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.ConsumedApisCard, null))
86
86
  )
87
87
  });
@@ -91,7 +91,7 @@ const apiDocsProvidedApisEntityCard = createEntityCardExtension({
91
91
  // We are skipping variants and columns are too complex to map to zod
92
92
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
93
93
  filter: "kind:component",
94
- loader: () => import('./esm/index-5f0727eb.esm.js').then(
94
+ loader: () => import('./esm/index-7ee30e13.esm.js').then(
95
95
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.ProvidedApisCard, null))
96
96
  )
97
97
  });
@@ -101,7 +101,7 @@ const apiDocsConsumingComponentsEntityCard = createEntityCardExtension({
101
101
  // We are skipping variants
102
102
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
103
103
  filter: "kind:api",
104
- loader: () => import('./esm/index-c969ed3d.esm.js').then(
104
+ loader: () => import('./esm/index-2ee1c1df.esm.js').then(
105
105
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.ConsumingComponentsCard, null))
106
106
  )
107
107
  });
@@ -111,7 +111,7 @@ const apiDocsProvidingComponentsEntityCard = createEntityCardExtension({
111
111
  // We are skipping variants
112
112
  // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252
113
113
  filter: "kind:api",
114
- loader: () => import('./esm/index-c969ed3d.esm.js').then(
114
+ loader: () => import('./esm/index-2ee1c1df.esm.js').then(
115
115
  (m) => compatWrapper(/* @__PURE__ */ React.createElement(m.ProvidingComponentsCard, null))
116
116
  )
117
117
  });
@@ -120,7 +120,7 @@ const apiDocsDefinitionEntityContent = createEntityContentExtension({
120
120
  defaultPath: "/defintion",
121
121
  defaultTitle: "Definition",
122
122
  filter: "kind:api",
123
- loader: async () => import('./esm/index-6f21bd2e.esm.js').then(
123
+ loader: async () => import('./esm/index-8451fe54.esm.js').then(
124
124
  (m) => compatWrapper(
125
125
  /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3 }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(m.ApiDefinitionCard, null)))
126
126
  )
@@ -131,7 +131,7 @@ const apiDocsApisEntityContent = createEntityContentExtension({
131
131
  defaultPath: "/apis",
132
132
  defaultTitle: "APIs",
133
133
  filter: "kind:component",
134
- loader: async () => import('./esm/index-5f0727eb.esm.js').then(
134
+ loader: async () => import('./esm/index-7ee30e13.esm.js').then(
135
135
  (m) => compatWrapper(
136
136
  /* @__PURE__ */ React.createElement(Grid, { container: true, spacing: 3, alignItems: "stretch" }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(m.ProvidedApisCard, null)), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(m.ConsumedApisCard, null)))
137
137
  )
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 { Grid } from '@material-ui/core';\n\nimport {\n createApiExtension,\n createApiFactory,\n createNavItemExtension,\n createPageExtension,\n createPlugin,\n createSchemaFromZod,\n} from '@backstage/frontend-plugin-api';\n\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\n\nimport {\n createEntityCardExtension,\n createEntityContentExtension,\n} from '@backstage/plugin-catalog-react/alpha';\nimport {\n ApiEntity,\n parseEntityRef,\n RELATION_HAS_PART,\n} from '@backstage/catalog-model';\n\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { rootRoute, registerComponentRouteRef } from './routes';\nimport { apiDocsConfigRef } from './config';\nimport { AppIcon } from '@backstage/core-components';\n\nconst apiDocsNavItem = createNavItemExtension({\n title: 'APIs',\n routeRef: convertLegacyRouteRef(rootRoute),\n icon: () => compatWrapper(<AppIcon id=\"kind:api\" />),\n});\n\nconst apiDocsConfigApi = createApiExtension({\n factory: 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\nconst apiDocsExplorerPage = createPageExtension({\n defaultPath: '/api-docs',\n routeRef: convertLegacyRouteRef(rootRoute),\n // Mapping DefaultApiExplorerPageProps to config\n configSchema: createSchemaFromZod(z =>\n z.object({\n path: z.string().default('/api-docs'),\n initiallySelectedFilter: z.enum(['owned', 'starred', 'all']).optional(),\n // Ommiting columns and actions for now as their types are too complex to map to zod\n }),\n ),\n loader: ({ config }) =>\n import('./components/ApiExplorerPage').then(m =>\n compatWrapper(\n <m.ApiExplorerIndexPage\n initiallySelectedFilter={config.initiallySelectedFilter}\n />,\n ),\n ),\n});\n\nconst apiDocsHasApisEntityCard = createEntityCardExtension({\n name: 'has-apis',\n // Ommiting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: entity => {\n return (\n entity.kind === 'Component' &&\n entity.relations?.some(\n ({ type, targetRef }) =>\n type.toLocaleLowerCase('en-US') === RELATION_HAS_PART &&\n parseEntityRef(targetRef).kind === 'API',\n )!!\n );\n },\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.HasApisCard />),\n ),\n});\n\nconst apiDocsDefinitionEntityCard = createEntityCardExtension({\n name: 'definition',\n filter: 'kind:api',\n loader: () =>\n import('./components/ApiDefinitionCard').then(m =>\n compatWrapper(<m.ApiDefinitionCard />),\n ),\n});\n\nconst apiDocsConsumedApisEntityCard = createEntityCardExtension({\n name: 'consumed-apis',\n // Ommiting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.ConsumedApisCard />),\n ),\n});\n\nconst apiDocsProvidedApisEntityCard = createEntityCardExtension({\n name: 'provided-apis',\n // Ommiting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.ProvidedApisCard />),\n ),\n});\n\nconst apiDocsConsumingComponentsEntityCard = createEntityCardExtension({\n name: 'consuming-components',\n // Ommiting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m =>\n compatWrapper(<m.ConsumingComponentsCard />),\n ),\n});\n\nconst apiDocsProvidingComponentsEntityCard = createEntityCardExtension({\n name: 'providing-components',\n // Ommiting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m =>\n compatWrapper(<m.ProvidingComponentsCard />),\n ),\n});\n\nconst apiDocsDefinitionEntityContent = createEntityContentExtension({\n name: 'definition',\n defaultPath: '/defintion',\n defaultTitle: 'Definition',\n filter: 'kind:api',\n loader: async () =>\n import('./components/ApiDefinitionCard').then(m =>\n compatWrapper(\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <m.ApiDefinitionCard />\n </Grid>\n </Grid>,\n ),\n ),\n});\n\nconst apiDocsApisEntityContent = createEntityContentExtension({\n name: 'apis',\n defaultPath: '/apis',\n defaultTitle: 'APIs',\n filter: 'kind:component',\n loader: async () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(\n <Grid container spacing={3} alignItems=\"stretch\">\n <Grid item xs={12}>\n <m.ProvidedApisCard />\n </Grid>\n <Grid item xs={12}>\n <m.ConsumedApisCard />\n </Grid>\n </Grid>,\n ),\n ),\n});\n\nexport default createPlugin({\n id: 'api-docs',\n routes: {\n root: convertLegacyRouteRef(rootRoute),\n },\n externalRoutes: {\n registerApi: convertLegacyRouteRef(registerComponentRouteRef),\n },\n extensions: [\n apiDocsNavItem,\n apiDocsConfigApi,\n apiDocsExplorerPage,\n apiDocsHasApisEntityCard,\n apiDocsDefinitionEntityCard,\n apiDocsProvidedApisEntityCard,\n apiDocsConsumedApisEntityCard,\n apiDocsConsumingComponentsEntityCard,\n apiDocsProvidingComponentsEntityCard,\n apiDocsDefinitionEntityContent,\n apiDocsApisEntityContent,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAgDA,MAAM,iBAAiB,sBAAuB,CAAA;AAAA,EAC5C,KAAO,EAAA,MAAA;AAAA,EACP,QAAA,EAAU,sBAAsB,SAAS,CAAA;AAAA,EACzC,MAAM,MAAM,aAAA,qCAAe,OAAQ,EAAA,EAAA,EAAA,EAAG,YAAW,CAAE,CAAA;AACrD,CAAC,CAAA,CAAA;AAED,MAAM,mBAAmB,kBAAmB,CAAA;AAAA,EAC1C,SAAS,gBAAiB,CAAA;AAAA,IACxB,GAAK,EAAA,gBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,SAAS,MAAM;AACb,MAAA,MAAM,oBAAoB,wBAAyB,EAAA,CAAA;AACnD,MAAO,OAAA;AAAA,QACL,sBAAA,EAAwB,CAAC,SAAyB,KAAA;AAChD,UAAA,OAAO,kBAAkB,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,IAAS,KAAA,SAAA,CAAU,KAAK,IAAI,CAAA,CAAA;AAAA,SACnE;AAAA,OACF,CAAA;AAAA,KACF;AAAA,GACD,CAAA;AACH,CAAC,CAAA,CAAA;AAED,MAAM,sBAAsB,mBAAoB,CAAA;AAAA,EAC9C,WAAa,EAAA,WAAA;AAAA,EACb,QAAA,EAAU,sBAAsB,SAAS,CAAA;AAAA;AAAA,EAEzC,YAAc,EAAA,mBAAA;AAAA,IAAoB,CAAA,CAAA,KAChC,EAAE,MAAO,CAAA;AAAA,MACP,IAAM,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAQ,WAAW,CAAA;AAAA,MACpC,uBAAA,EAAyB,EAAE,IAAK,CAAA,CAAC,SAAS,SAAW,EAAA,KAAK,CAAC,CAAA,CAAE,QAAS,EAAA;AAAA;AAAA,KAEvE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KAAA,CAAA,aAAA,CAAA,CAAA,CAAE,gBAAF,EAAA,IAAmB,CACtB,CACF,CAAA;AAAA,KACF;AAAA,GACF;AACJ,CAAC,CAAA,CAAA;AAED,YAAe,YAAa,CAAA;AAAA,EAC1B,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,sBAAsB,SAAS,CAAA;AAAA,GACvC;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,WAAA,EAAa,sBAAsB,yBAAyB,CAAA;AAAA,GAC9D;AAAA,EACA,UAAY,EAAA;AAAA,IACV,cAAA;AAAA,IACA,gBAAA;AAAA,IACA,mBAAA;AAAA,IACA,wBAAA;AAAA,IACA,2BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA,oCAAA;AAAA,IACA,oCAAA;AAAA,IACA,8BAAA;AAAA,IACA,wBAAA;AAAA,GACF;AACF,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 Grid from '@material-ui/core/Grid';\n\nimport {\n createApiExtension,\n createApiFactory,\n createNavItemExtension,\n createPageExtension,\n createPlugin,\n createSchemaFromZod,\n} from '@backstage/frontend-plugin-api';\n\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\n\nimport {\n createEntityCardExtension,\n createEntityContentExtension,\n} from '@backstage/plugin-catalog-react/alpha';\nimport {\n ApiEntity,\n parseEntityRef,\n RELATION_HAS_PART,\n} from '@backstage/catalog-model';\n\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { rootRoute, registerComponentRouteRef } from './routes';\nimport { apiDocsConfigRef } from './config';\nimport { AppIcon } from '@backstage/core-components';\n\nconst apiDocsNavItem = createNavItemExtension({\n title: 'APIs',\n routeRef: convertLegacyRouteRef(rootRoute),\n icon: () => compatWrapper(<AppIcon id=\"kind:api\" />),\n});\n\nconst apiDocsConfigApi = createApiExtension({\n factory: 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\nconst apiDocsExplorerPage = createPageExtension({\n defaultPath: '/api-docs',\n routeRef: convertLegacyRouteRef(rootRoute),\n // Mapping DefaultApiExplorerPageProps to config\n configSchema: createSchemaFromZod(z =>\n z.object({\n path: z.string().default('/api-docs'),\n initiallySelectedFilter: z.enum(['owned', 'starred', 'all']).optional(),\n // Ommiting columns and actions for now as their types are too complex to map to zod\n }),\n ),\n loader: ({ config }) =>\n import('./components/ApiExplorerPage').then(m =>\n compatWrapper(\n <m.ApiExplorerIndexPage\n initiallySelectedFilter={config.initiallySelectedFilter}\n />,\n ),\n ),\n});\n\nconst apiDocsHasApisEntityCard = createEntityCardExtension({\n name: 'has-apis',\n // Ommiting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: entity => {\n return (\n entity.kind === 'Component' &&\n entity.relations?.some(\n ({ type, targetRef }) =>\n type.toLocaleLowerCase('en-US') === RELATION_HAS_PART &&\n parseEntityRef(targetRef).kind === 'API',\n )!!\n );\n },\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.HasApisCard />),\n ),\n});\n\nconst apiDocsDefinitionEntityCard = createEntityCardExtension({\n name: 'definition',\n filter: 'kind:api',\n loader: () =>\n import('./components/ApiDefinitionCard').then(m =>\n compatWrapper(<m.ApiDefinitionCard />),\n ),\n});\n\nconst apiDocsConsumedApisEntityCard = createEntityCardExtension({\n name: 'consumed-apis',\n // Ommiting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.ConsumedApisCard />),\n ),\n});\n\nconst apiDocsProvidedApisEntityCard = createEntityCardExtension({\n name: 'provided-apis',\n // Ommiting configSchema for now\n // We are skipping variants and columns are too complex to map to zod\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:component',\n loader: () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(<m.ProvidedApisCard />),\n ),\n});\n\nconst apiDocsConsumingComponentsEntityCard = createEntityCardExtension({\n name: 'consuming-components',\n // Ommiting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m =>\n compatWrapper(<m.ConsumingComponentsCard />),\n ),\n});\n\nconst apiDocsProvidingComponentsEntityCard = createEntityCardExtension({\n name: 'providing-components',\n // Ommiting configSchema for now\n // We are skipping variants\n // See: https://github.com/backstage/backstage/pull/22619#discussion_r1477333252\n filter: 'kind:api',\n loader: () =>\n import('./components/ComponentsCards').then(m =>\n compatWrapper(<m.ProvidingComponentsCard />),\n ),\n});\n\nconst apiDocsDefinitionEntityContent = createEntityContentExtension({\n name: 'definition',\n defaultPath: '/defintion',\n defaultTitle: 'Definition',\n filter: 'kind:api',\n loader: async () =>\n import('./components/ApiDefinitionCard').then(m =>\n compatWrapper(\n <Grid container spacing={3}>\n <Grid item xs={12}>\n <m.ApiDefinitionCard />\n </Grid>\n </Grid>,\n ),\n ),\n});\n\nconst apiDocsApisEntityContent = createEntityContentExtension({\n name: 'apis',\n defaultPath: '/apis',\n defaultTitle: 'APIs',\n filter: 'kind:component',\n loader: async () =>\n import('./components/ApisCards').then(m =>\n compatWrapper(\n <Grid container spacing={3} alignItems=\"stretch\">\n <Grid item xs={12}>\n <m.ProvidedApisCard />\n </Grid>\n <Grid item xs={12}>\n <m.ConsumedApisCard />\n </Grid>\n </Grid>,\n ),\n ),\n});\n\nexport default createPlugin({\n id: 'api-docs',\n routes: {\n root: convertLegacyRouteRef(rootRoute),\n },\n externalRoutes: {\n registerApi: convertLegacyRouteRef(registerComponentRouteRef),\n },\n extensions: [\n apiDocsNavItem,\n apiDocsConfigApi,\n apiDocsExplorerPage,\n apiDocsHasApisEntityCard,\n apiDocsDefinitionEntityCard,\n apiDocsProvidedApisEntityCard,\n apiDocsConsumedApisEntityCard,\n apiDocsConsumingComponentsEntityCard,\n apiDocsProvidingComponentsEntityCard,\n apiDocsDefinitionEntityContent,\n apiDocsApisEntityContent,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAgDA,MAAM,iBAAiB,sBAAuB,CAAA;AAAA,EAC5C,KAAO,EAAA,MAAA;AAAA,EACP,QAAA,EAAU,sBAAsB,SAAS,CAAA;AAAA,EACzC,MAAM,MAAM,aAAA,qCAAe,OAAQ,EAAA,EAAA,EAAA,EAAG,YAAW,CAAE,CAAA;AACrD,CAAC,CAAA,CAAA;AAED,MAAM,mBAAmB,kBAAmB,CAAA;AAAA,EAC1C,SAAS,gBAAiB,CAAA;AAAA,IACxB,GAAK,EAAA,gBAAA;AAAA,IACL,MAAM,EAAC;AAAA,IACP,SAAS,MAAM;AACb,MAAA,MAAM,oBAAoB,wBAAyB,EAAA,CAAA;AACnD,MAAO,OAAA;AAAA,QACL,sBAAA,EAAwB,CAAC,SAAyB,KAAA;AAChD,UAAA,OAAO,kBAAkB,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,IAAS,KAAA,SAAA,CAAU,KAAK,IAAI,CAAA,CAAA;AAAA,SACnE;AAAA,OACF,C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6BAAwB,CAAE,CAAA,IAAA;AAAA,IAAK,CACpC,CAAA,KAAA,aAAA;AAAA,sBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,SAAS,EAAA,IAAA,EAAC,OAAS,EAAA,CAAA,EAAG,UAAW,EAAA,SAAA,EAAA,kBACpC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EACb,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,gBAAA,EAAF,IAAmB,CACtB,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,EAAA,EAAA,kBACZ,KAAA,CAAA,aAAA,CAAA,CAAA,CAAE,gBAAF,EAAA,IAAmB,CACtB,CACF,CAAA;AAAA,KACF;AAAA,GACF;AACJ,CAAC,CAAA,CAAA;AAED,YAAe,YAAa,CAAA;AAAA,EAC1B,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,sBAAsB,SAAS,CAAA;AAAA,GACvC;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,WAAA,EAAa,sBAAsB,yBAAyB,CAAA;AAAA,GAC9D;AAAA,EACA,UAAY,EAAA;AAAA,IACV,cAAA;AAAA,IACA,gBAAA;AAAA,IACA,mBAAA;AAAA,IACA,wBAAA;AAAA,IACA,2BAAA;AAAA,IACA,6BAAA;AAAA,IACA,6BAAA;AAAA,IACA,oCAAA;AAAA,IACA,oCAAA;AAAA,IACA,8BAAA;AAAA,IACA,wBAAA;AAAA,GACF;AACF,CAAC,CAAA;;;;"}
@@ -1,8 +1,8 @@
1
1
  import { useEntity } from '@backstage/plugin-catalog-react';
2
- import { Alert } from '@material-ui/lab';
2
+ import Alert from '@material-ui/lab/Alert';
3
3
  import React from 'react';
4
- import { a as apiDocsConfigRef } from './ApiDefinitionWidget-798ee85f.esm.js';
5
- import { P as PlainApiDefinitionWidget } from './ApiTypeTitle-cc79a2f3.esm.js';
4
+ import { a as apiDocsConfigRef } from './ApiDefinitionWidget-90e56cf9.esm.js';
5
+ import { P as PlainApiDefinitionWidget } from './ApiTypeTitle-af01a0df.esm.js';
6
6
  import { TabbedCard, CardTab } from '@backstage/core-components';
7
7
  import { useApi } from '@backstage/core-plugin-api';
8
8
 
@@ -44,4 +44,4 @@ const ApiDefinitionCard = () => {
44
44
  };
45
45
 
46
46
  export { ApiDefinitionCard as A };
47
- //# sourceMappingURL=ApiDefinitionCard-504c2432.esm.js.map
47
+ //# sourceMappingURL=ApiDefinitionCard-04c70017.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApiDefinitionCard-04c70017.esm.js","sources":["../../src/components/ApiDefinitionCard/ApiDefinitionCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport Alert from '@material-ui/lab/Alert';\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\n/** @public */\nexport const ApiDefinitionCard = () => {\n const { entity } = useEntity<ApiEntity>();\n const config = useApi(apiDocsConfigRef);\n const { getApiDefinitionWidget } = config;\n\n if (!entity) {\n return <Alert severity=\"error\">Could not fetch the API</Alert>;\n }\n\n const definitionWidget = getApiDefinitionWidget(entity);\n const entityTitle = entity.metadata.title ?? entity.metadata.name;\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entityTitle}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entityTitle}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA2BO,MAAM,oBAAoB,MAAM;AA3BvC,EAAA,IAAA,EAAA,CAAA;AA4BE,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAqB,EAAA,CAAA;AACxC,EAAM,MAAA,MAAA,GAAS,OAAO,gBAAgB,CAAA,CAAA;AACtC,EAAM,MAAA,EAAE,wBAA2B,GAAA,MAAA,CAAA;AAEnC,EAAA,IAAI,CAAC,MAAQ,EAAA;AACX,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAM,QAAS,EAAA,OAAA,EAAA,EAAQ,yBAAuB,CAAA,CAAA;AAAA,GACxD;AAEA,EAAM,MAAA,gBAAA,GAAmB,uBAAuB,MAAM,CAAA,CAAA;AACtD,EAAA,MAAM,eAAc,EAAO,GAAA,MAAA,CAAA,QAAA,CAAS,KAAhB,KAAA,IAAA,GAAA,EAAA,GAAyB,OAAO,QAAS,CAAA,IAAA,CAAA;AAE7D,EAAA,IAAI,gBAAkB,EAAA;AACpB,IACE,uBAAA,KAAA,CAAA,aAAA,CAAC,cAAW,KAAO,EAAA,WAAA,EAAA,sCAChB,OAAQ,EAAA,EAAA,KAAA,EAAO,gBAAiB,CAAA,KAAA,EAAO,GAAI,EAAA,QAAA,EAAA,EACzC,iBAAiB,SAAU,CAAA,MAAA,CAAO,IAAK,CAAA,UAAU,CACpD,CAAA,sCACC,OAAQ,EAAA,EAAA,KAAA,EAAM,KAAM,EAAA,GAAA,EAAI,KACvB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,wBAAA;AAAA,MAAA;AAAA,QACC,UAAA,EAAY,OAAO,IAAK,CAAA,UAAA;AAAA,QACxB,QAAU,EAAA,gBAAA,CAAiB,WAAe,IAAA,MAAA,CAAO,IAAK,CAAA,IAAA;AAAA,OAAA;AAAA,KAE1D,CACF,CAAA,CAAA;AAAA,GAEJ;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA,WAAA;AAAA,MACP,QAAU,EAAA;AAAA;AAAA,4CAEP,OAAQ,EAAA,EAAA,KAAA,EAAO,OAAO,IAAK,CAAA,IAAA,EAAM,KAAI,KACpC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,UAAC,wBAAA;AAAA,UAAA;AAAA,YACC,UAAA,EAAY,OAAO,IAAK,CAAA,UAAA;AAAA,YACxB,QAAA,EAAU,OAAO,IAAK,CAAA,IAAA;AAAA,WAAA;AAAA,SAE1B,CAAA;AAAA,OACF;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -16,7 +16,7 @@ const apiDocsConfigRef = createApiRef({
16
16
  });
17
17
 
18
18
  const LazyAsyncApiDefinition = React.lazy(
19
- () => import('./AsyncApiDefinition-ffed9c50.esm.js').then((m) => ({
19
+ () => import('./AsyncApiDefinition-b9802a28.esm.js').then((m) => ({
20
20
  default: m.AsyncApiDefinition
21
21
  }))
22
22
  );
@@ -113,4 +113,4 @@ function defaultDefinitionWidgets() {
113
113
  }
114
114
 
115
115
  export { AsyncApiDefinitionWidget as A, GraphQlDefinitionWidget as G, OpenApiDefinitionWidget as O, TrpcApiDefinitionWidget as T, apiDocsConfigRef as a, registerComponentRouteRef as b, defaultDefinitionWidgets as d, rootRoute as r };
116
- //# sourceMappingURL=ApiDefinitionWidget-798ee85f.esm.js.map
116
+ //# sourceMappingURL=ApiDefinitionWidget-90e56cf9.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiDefinitionWidget-798ee85f.esm.js","sources":["../../src/routes.ts","../../src/config.ts","../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx","../../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx","../../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx","../../src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.tsx","../../src/components/TrpcDefinitionWidget/TrpcApiDefinitionWidget.tsx","../../src/components/ApiDefinitionCard/ApiDefinitionWidget.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 createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\n});\n","/*\n * Copyright 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\n/** @public */\nexport const apiDocsConfigRef = createApiRef<ApiDocsConfig>({\n id: 'plugin.api-docs.config',\n});\n\n/** @public */\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 { 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\n/** @public */\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\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\n/** @public */\nexport type GraphQlDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\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\n/** @public */\nexport type OpenApiDefinitionWidgetProps = {\n definition: string;\n requestInterceptor?: (req: any) => any | Promise<any>;\n supportedSubmitMethods?: string[];\n};\n\n/** @public */\nexport const OpenApiDefinitionWidget = (\n props: OpenApiDefinitionWidgetProps,\n) => {\n const validSubmitMethods = props.supportedSubmitMethods?.map(method =>\n method.toLocaleLowerCase(),\n );\n return (\n <Suspense fallback={<Progress />}>\n <LazyOpenApiDefinition\n {...props}\n supportedSubmitMethods={validSubmitMethods}\n />\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 React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\nimport { useTheme } from '@material-ui/core/styles';\n\n/** @public */\nexport type GrpcApiDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\nexport const GrpcApiDefinitionWidget = (\n props: GrpcApiDefinitionWidgetProps,\n) => {\n const theme = useTheme();\n return (\n <CodeSnippet\n customStyle={{ backgroundColor: theme.palette.background.default }}\n text={props.definition}\n language=\"protobuf\"\n showCopyCodeButton\n />\n );\n};\n","/*\n * Copyright 2023 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 { CodeSnippet } from '@backstage/core-components';\nimport { useTheme } from '@material-ui/core/styles';\n\n/** @public */\nexport type TrpcApiDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\nexport const TrpcApiDefinitionWidget = (\n props: TrpcApiDefinitionWidgetProps,\n) => {\n const { definition } = props;\n const theme = useTheme();\n return (\n <CodeSnippet\n customStyle={{ backgroundColor: theme.palette.background.default }}\n text={definition}\n language=\"typescript\"\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 */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\nimport { GrpcApiDefinitionWidget } from '../GrpcApiDefinitionWidget';\nimport { TrpcApiDefinitionWidget } from '../TrpcDefinitionWidget';\n\n/** @public */\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\n/** @public */\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 type: 'grpc',\n title: 'gRPC',\n component: definition => (\n <GrpcApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'trpc',\n title: 'tRPC',\n component: definition => (\n <TrpcApiDefinitionWidget definition={definition} />\n ),\n },\n ];\n}\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,YAAY,cAAe,CAAA;AAAA,EACtC,EAAI,EAAA,UAAA;AACN,CAAC,EAAA;AAEM,MAAM,4BAA4B,sBAAuB,CAAA;AAAA,EAC9D,EAAI,EAAA,oBAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AACZ,CAAC;;ACPM,MAAM,mBAAmB,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AS,wBAAkD,GAAA;AAChE,EAAO,OAAA;AAAA,IACL;AAAA,MACE,IAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA,SAAA;AAAA,MACP,WAAa,EAAA,MAAA;AAAA,MACb,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,UAAwB,EAAA,CAAA;AAAA,KAErD;AAAA,IACA;AAAA,MACE,IAAM,EAAA,UAAA;AAAA,MACN,KAAO,EAAA,UAAA;AAAA,MACP,WAAa,EAAA,MAAA;AAAA,MACb,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,wBAAA,EAAA,EAAyB,UAAwB,EAAA,CAAA;AAAA,KAEtD;AAAA,IACA;AAAA,MACE,IAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA,SAAA;AAAA,MACP,WAAa,EAAA,SAAA;AAAA,MACb,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,UAAwB,EAAA,CAAA;AAAA,KAErD;AAAA,IACA;AAAA,MACE,IAAM,EAAA,MAAA;AAAA,MACN,KAAO,EAAA,MAAA;AAAA,MACP,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,UAAwB,EAAA,CAAA;AAAA,KAErD;AAAA,IACA;AAAA,MACE,IAAM,EAAA,MAAA;AAAA,MACN,KAAO,EAAA,MAAA;AAAA,MACP,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,UAAwB,EAAA,CAAA;AAAA,KAErD;AAAA,GACF,CAAA;AACF;;;;"}
1
+ {"version":3,"file":"ApiDefinitionWidget-90e56cf9.esm.js","sources":["../../src/routes.ts","../../src/config.ts","../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx","../../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx","../../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx","../../src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.tsx","../../src/components/TrpcDefinitionWidget/TrpcApiDefinitionWidget.tsx","../../src/components/ApiDefinitionCard/ApiDefinitionWidget.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 createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nexport const rootRoute = createRouteRef({\n id: 'api-docs',\n});\n\nexport const registerComponentRouteRef = createExternalRouteRef({\n id: 'register-component',\n optional: true,\n});\n","/*\n * Copyright 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\n/** @public */\nexport const apiDocsConfigRef = createApiRef<ApiDocsConfig>({\n id: 'plugin.api-docs.config',\n});\n\n/** @public */\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 { 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\n/** @public */\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\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\n/** @public */\nexport type GraphQlDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\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\n/** @public */\nexport type OpenApiDefinitionWidgetProps = {\n definition: string;\n requestInterceptor?: (req: any) => any | Promise<any>;\n supportedSubmitMethods?: string[];\n};\n\n/** @public */\nexport const OpenApiDefinitionWidget = (\n props: OpenApiDefinitionWidgetProps,\n) => {\n const validSubmitMethods = props.supportedSubmitMethods?.map(method =>\n method.toLocaleLowerCase(),\n );\n return (\n <Suspense fallback={<Progress />}>\n <LazyOpenApiDefinition\n {...props}\n supportedSubmitMethods={validSubmitMethods}\n />\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 React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\nimport { useTheme } from '@material-ui/core/styles';\n\n/** @public */\nexport type GrpcApiDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\nexport const GrpcApiDefinitionWidget = (\n props: GrpcApiDefinitionWidgetProps,\n) => {\n const theme = useTheme();\n return (\n <CodeSnippet\n customStyle={{ backgroundColor: theme.palette.background.default }}\n text={props.definition}\n language=\"protobuf\"\n showCopyCodeButton\n />\n );\n};\n","/*\n * Copyright 2023 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 { CodeSnippet } from '@backstage/core-components';\nimport { useTheme } from '@material-ui/core/styles';\n\n/** @public */\nexport type TrpcApiDefinitionWidgetProps = {\n definition: string;\n};\n\n/** @public */\nexport const TrpcApiDefinitionWidget = (\n props: TrpcApiDefinitionWidgetProps,\n) => {\n const { definition } = props;\n const theme = useTheme();\n return (\n <CodeSnippet\n customStyle={{ backgroundColor: theme.palette.background.default }}\n text={definition}\n language=\"typescript\"\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 */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\nimport { GrpcApiDefinitionWidget } from '../GrpcApiDefinitionWidget';\nimport { TrpcApiDefinitionWidget } from '../TrpcDefinitionWidget';\n\n/** @public */\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\n/** @public */\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 type: 'grpc',\n title: 'gRPC',\n component: definition => (\n <GrpcApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'trpc',\n title: 'tRPC',\n component: definition => (\n <TrpcApiDefinitionWidget definition={definition} />\n ),\n },\n ];\n}\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,YAAY,cAAe,CAAA;AAAA,EACtC,EAAI,EAAA,UAAA;AACN,CAAC,EAAA;AAEM,MAAM,4BAA4B,sBAAuB,CAAA;AAAA,EAC9D,EAAI,EAAA,oBAAA;AAAA,EACJ,QAAU,EAAA,IAAA;AACZ,CAAC;;ACPM,MAAM,mBAAmB,YAA4B,CAAA;AAAA,EAC1D,EAAI,EAAA,wBAAA;AACN,CAAC;;ACFD,MAAM,yBAAyB,KAAM,CAAA,IAAA;AAAA,EAAK,MACxC,OAAO,sCAAsB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,IACxC,SAAS,CAAE,CAAA,kBAAA;AAAA,GACX,CAAA,CAAA;AACJ,CAAA,CAAA;AAQa,MAAA,wBAAA,GAA2B,CACtC,KACG,KAAA;AACH,EACE,uBAAA,KAAA,CAA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UAAA;AAAA,MACP,WAAa,EAAA,MAAA;AAAA,MACb,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,wBAAA,EAAA,EAAyB,UAAwB,EAAA,CAAA;AAAA,KAEtD;AAAA,IACA;AAAA,MACE,IAAM,EAAA,SAAA;AAAA,MACN,KAAO,EAAA,SAAA;AAAA,MACP,WAAa,EAAA,SAAA;AAAA,MACb,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,UAAwB,EAAA,CAAA;AAAA,KAErD;AAAA,IACA;AAAA,MACE,IAAM,EAAA,MAAA;AAAA,MACN,KAAO,EAAA,MAAA;AAAA,MACP,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,UAAwB,EAAA,CAAA;AAAA,KAErD;AAAA,IACA;AAAA,MACE,IAAM,EAAA,MAAA;AAAA,MACN,KAAO,EAAA,MAAA;AAAA,MACP,SAAW,EAAA,CAAA,UAAA,qBACR,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA,EAAwB,UAAwB,EAAA,CAAA;AAAA,KAErD;AAAA,GACF,CAAA;AACF;;;;"}
@@ -4,7 +4,7 @@ import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton } f
4
4
  import { useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
5
5
  import { CatalogTable } from '@backstage/plugin-catalog';
6
6
  import { EntityListProvider, CatalogFilterLayout, EntityKindPicker, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
7
- import { b as registerComponentRouteRef } from './ApiDefinitionWidget-798ee85f.esm.js';
7
+ import { b as registerComponentRouteRef } from './ApiDefinitionWidget-90e56cf9.esm.js';
8
8
  import { usePermission } from '@backstage/plugin-permission-react';
9
9
  import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
10
10
 
@@ -57,4 +57,4 @@ const ApiExplorerPage = (props) => {
57
57
  };
58
58
 
59
59
  export { ApiExplorerPage as A, DefaultApiExplorerPage as D };
60
- //# sourceMappingURL=ApiExplorerPage-ce544a95.esm.js.map
60
+ //# sourceMappingURL=ApiExplorerPage-93d899e2.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiExplorerPage-ce544a95.esm.js","sources":["../../src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx","../../src/components/ApiExplorerPage/ApiExplorerPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { CatalogTable, CatalogTableRow } from '@backstage/plugin-catalog';\nimport {\n EntityKindPicker,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n CatalogFilterLayout,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { registerComponentRouteRef } from '../../routes';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';\n\nconst defaultColumns: TableColumn<CatalogTableRow>[] = [\n CatalogTable.columns.createTitleColumn({ hidden: true }),\n CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),\n CatalogTable.columns.createSystemColumn(),\n CatalogTable.columns.createOwnerColumn(),\n CatalogTable.columns.createSpecTypeColumn(),\n CatalogTable.columns.createSpecLifecycleColumn(),\n CatalogTable.columns.createMetadataDescriptionColumn(),\n CatalogTable.columns.createTagsColumn(),\n];\n\n/**\n * DefaultApiExplorerPageProps\n * @public\n */\nexport type DefaultApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n};\n\n/**\n * DefaultApiExplorerPage\n * @public\n */\nexport const DefaultApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const { initiallySelectedFilter = 'all', columns, actions } = props;\n\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const registerComponentLink = useRouteRef(registerComponentRouteRef);\n const { allowed } = usePermission({\n permission: catalogEntityCreatePermission,\n });\n\n return (\n <PageWithHeader\n themeId=\"apis\"\n title=\"APIs\"\n subtitle={generatedSubtitle}\n pageTitleOverride=\"APIs\"\n >\n <Content>\n <ContentHeader title=\"\">\n {allowed && (\n <CreateButton\n title=\"Register Existing API\"\n to={registerComponentLink?.()}\n />\n )}\n <SupportButton>All your APIs</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter=\"api\" hidden />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns || defaultColumns}\n actions={actions}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport {\n DefaultApiExplorerPage,\n DefaultApiExplorerPageProps,\n} from './DefaultApiExplorerPage';\n\n/**\n * ApiExplorerPage\n * @public\n */\nexport const ApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultApiExplorerPage {...props} />;\n};\n"],"names":[],"mappings":";;;;;;;;;;AA2CA,MAAM,cAAiD,GAAA;AAAA,EACrD,aAAa,OAAQ,CAAA,iBAAA,CAAkB,EAAE,MAAA,EAAQ,MAAM,CAAA;AAAA,EACvD,aAAa,OAAQ,CAAA,gBAAA,CAAiB,EAAE,WAAA,EAAa,OAAO,CAAA;AAAA,EAC5D,YAAA,CAAa,QAAQ,kBAAmB,EAAA;AAAA,EACxC,YAAA,CAAa,QAAQ,iBAAkB,EAAA;AAAA,EACvC,YAAA,CAAa,QAAQ,oBAAqB,EAAA;AAAA,EAC1C,YAAA,CAAa,QAAQ,yBAA0B,EAAA;AAAA,EAC/C,YAAA,CAAa,QAAQ,+BAAgC,EAAA;AAAA,EACrD,YAAA,CAAa,QAAQ,gBAAiB,EAAA;AACxC,CAAA,CAAA;AAgBa,MAAA,sBAAA,GAAyB,CAAC,KAAuC,KAAA;AApE9E,EAAA,IAAA,EAAA,CAAA;AAqEE,EAAA,MAAM,EAAE,uBAAA,GAA0B,KAAO,EAAA,OAAA,EAAS,SAAY,GAAA,KAAA,CAAA;AAE9D,EAAM,MAAA,SAAA,GAAY,OAAO,YAAY,CAAA,CAAA;AACrC,EAAA,MAAM,oBAAoB,CACxB,EAAA,CAAA,EAAA,GAAA,SAAA,CAAU,kBAAkB,mBAAmB,CAAA,KAA/C,YAAoD,WAC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ACC,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,SAAS,OAAW,IAAA,cAAA;AAAA,QACpB,OAAA;AAAA,OAAA;AAAA,KAEJ,CACF,CACF,CACF,CAAA;AAAA,GACF,CAAA;AAEJ;;AC3Fa,MAAA,eAAA,GAAkB,CAAC,KAAuC,KAAA;AACrE,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,OAAO,MAAU,oBAAA,KAAA,CAAA,aAAA,CAAC,sBAAwB,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA,CAAA;AACtD;;;;"}
1
+ {"version":3,"file":"ApiExplorerPage-93d899e2.esm.js","sources":["../../src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx","../../src/components/ApiExplorerPage/ApiExplorerPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport { CatalogTable, CatalogTableRow } from '@backstage/plugin-catalog';\nimport {\n EntityKindPicker,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n CatalogFilterLayout,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { registerComponentRouteRef } from '../../routes';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';\n\nconst defaultColumns: TableColumn<CatalogTableRow>[] = [\n CatalogTable.columns.createTitleColumn({ hidden: true }),\n CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),\n CatalogTable.columns.createSystemColumn(),\n CatalogTable.columns.createOwnerColumn(),\n CatalogTable.columns.createSpecTypeColumn(),\n CatalogTable.columns.createSpecLifecycleColumn(),\n CatalogTable.columns.createMetadataDescriptionColumn(),\n CatalogTable.columns.createTagsColumn(),\n];\n\n/**\n * DefaultApiExplorerPageProps\n * @public\n */\nexport type DefaultApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n};\n\n/**\n * DefaultApiExplorerPage\n * @public\n */\nexport const DefaultApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const { initiallySelectedFilter = 'all', columns, actions } = props;\n\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const registerComponentLink = useRouteRef(registerComponentRouteRef);\n const { allowed } = usePermission({\n permission: catalogEntityCreatePermission,\n });\n\n return (\n <PageWithHeader\n themeId=\"apis\"\n title=\"APIs\"\n subtitle={generatedSubtitle}\n pageTitleOverride=\"APIs\"\n >\n <Content>\n <ContentHeader title=\"\">\n {allowed && (\n <CreateButton\n title=\"Register Existing API\"\n to={registerComponentLink?.()}\n />\n )}\n <SupportButton>All your APIs</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter=\"api\" hidden />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns || defaultColumns}\n actions={actions}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n};\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport {\n DefaultApiExplorerPage,\n DefaultApiExplorerPageProps,\n} from './DefaultApiExplorerPage';\n\n/**\n * ApiExplorerPage\n * @public\n */\nexport const ApiExplorerPage = (props: DefaultApiExplorerPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultApiExplorerPage {...props} />;\n};\n"],"names":[],"mappings":";;;;;;;;;;AA2CA,MAAM,cAAiD,GAAA;AAAA,EACrD,aAAa,OAAQ,CAAA,iBAAA,CAAkB,EAAE,MAAA,EAAQ,MAAM,CAAA;AAAA,EACvD,aAAa,OAAQ,CAAA,gBAAA,CAAiB,EAAE,WAAA,EAAa,OAAO,CAAA;AAAA,EAC5D,YAAA,CAAa,QAAQ,kBAAmB,EAAA;AAAA,EACxC,YAAA,CAAa,QAAQ,iBAAkB,EAAA;AAAA,EACvC,YAAA,CAAa,QAAQ,oBAAqB,EAAA;AAAA,EAC1C,YAAA,CAAa,QAAQ,yBAA0B,EAAA;AAAA,EAC/C,YAAA,CAAa,QAAQ,+BAAgC,EAAA;AAAA,EACrD,YAAA,CAAa,QAAQ,gBAAiB,EAAA;AACxC,CAAA,CAAA;AAgBa,MAAA,sBAAA,GAAyB,CAAC,KAAuC,KAAA;AApE9E,EAAA,IAAA,EAAA,CAAA;AAqEE,EAAA,MAAM,EAAE,uBAAA,GAA0B,KAAO,EAAA,OAAA,EAA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EAAA,EAAe,eAAe,uBAAyB,EAAA,CAAA,sCACvD,iBAAkB,EAAA,IAAA,CAAA,sCAClB,qBAAsB,EAAA,IAAA,CAAA,sCACtB,eAAgB,EAAA,IAAA,CACnB,mBACC,KAAA,CAAA,aAAA,CAAA,mBAAA,CAAoB,SAApB,IACC,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,SAAS,OAAW,IAAA,cAAA;AAAA,QACpB,OAAA;AAAA,OAAA;AAAA,KAEJ,CACF,CACF,CACF,CAAA;AAAA,GACF,CAAA;AAEJ;;AC3Fa,MAAA,eAAA,GAAkB,CAAC,KAAuC,KAAA;AACrE,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,OAAO,MAAU,oBAAA,KAAA,CAAA,aAAA,CAAC,sBAAwB,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA,CAAA;AACtD;;;;"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { CodeSnippet } from '@backstage/core-components';
3
3
  import Typography from '@material-ui/core/Typography';
4
- import { a as apiDocsConfigRef } from './ApiDefinitionWidget-798ee85f.esm.js';
4
+ import { a as apiDocsConfigRef } from './ApiDefinitionWidget-90e56cf9.esm.js';
5
5
  import { useApi } from '@backstage/core-plugin-api';
6
6
 
7
7
  const PlainApiDefinitionWidget = (props) => {
@@ -24,4 +24,4 @@ const ApiTypeTitle = (props) => {
24
24
  };
25
25
 
26
26
  export { ApiTypeTitle as A, PlainApiDefinitionWidget as P };
27
- //# sourceMappingURL=ApiTypeTitle-cc79a2f3.esm.js.map
27
+ //# sourceMappingURL=ApiTypeTitle-af01a0df.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ApiTypeTitle-cc79a2f3.esm.js","sources":["../../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx","../../src/components/ApiDefinitionCard/ApiTypeTitle.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 React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\n/** @public */\nexport type PlainApiDefinitionWidgetProps = {\n definition: any;\n language: string;\n};\n\n/** @public */\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 Typography from '@material-ui/core/Typography';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\n/**\n * @public\n */\nexport const ApiTypeTitle = (props: { apiEntity: ApiEntity }) => {\n const { apiEntity } = props;\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <Typography component=\"span\">{type}</Typography>;\n};\n"],"names":[],"mappings":";;;;;;AA0Ba,MAAA,wBAAA,GAA2B,CACtC,KACG,KAAA;AACH,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,UAAU,KAAM,CAAA,QAAA;AAAA,MAChB,kBAAkB,EAAA,IAAA;AAAA,KAAA;AAAA,GACpB,CAAA;AAEJ;;ACXa,MAAA,YAAA,GAAe,CAAC,KAAoC,KAAA;AAC/D,EAAM,MAAA,EAAE,WAAc,GAAA,KAAA,CAAA;AACtB,EAAM,MAAA,MAAA,GAAS,OAAO,gBAAgB,CAAA,CAAA;AACtC,EAAM,MAAA,UAAA,GAAa,MAAO,CAAA,sBAAA,CAAuB,SAAS,CAAA,CAAA;AAC1D,EAAA,MAAM,IAAO,GAAA,UAAA,GAAa,UAAW,CAAA,KAAA,GAAQ,UAAU,IAAK,CAAA,IAAA,CAAA;AAE5D,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,SAAU,EAAA,MAAA,EAAA,EAAQ,IAAK,CAAA,CAAA;AAC5C;;;;"}
1
+ {"version":3,"file":"ApiTypeTitle-af01a0df.esm.js","sources":["../../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx","../../src/components/ApiDefinitionCard/ApiTypeTitle.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 React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\n/** @public */\nexport type PlainApiDefinitionWidgetProps = {\n definition: any;\n language: string;\n};\n\n/** @public */\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 Typography from '@material-ui/core/Typography';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\n/**\n * @public\n */\nexport const ApiTypeTitle = (props: { apiEntity: ApiEntity }) => {\n const { apiEntity } = props;\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <Typography component=\"span\">{type}</Typography>;\n};\n"],"names":[],"mappings":";;;;;;AA0Ba,MAAA,wBAAA,GAA2B,CACtC,KACG,KAAA;AACH,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,UAAU,KAAM,CAAA,QAAA;AAAA,MAChB,kBAAkB,EAAA,IAAA;AAAA,KAAA;AAAA,GACpB,CAAA;AAEJ;;ACXa,MAAA,YAAA,GAAe,CAAC,KAAoC,KAAA;AAC/D,EAAM,MAAA,EAAE,WAAc,GAAA,KAAA,CAAA;AACtB,EAAM,MAAA,MAAA,GAAS,OAAO,gBAAgB,CAAA,CAAA;AACtC,EAAM,MAAA,UAAA,GAAa,MAAO,CAAA,sBAAA,CAAuB,SAAS,CAAA,CAAA;AAC1D,EAAA,MAAM,IAAO,GAAA,UAAA,GAAa,UAAW,CAAA,KAAA,GAAQ,UAAU,IAAK,CAAA,IAAA,CAAA;AAE5D,EAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,SAAU,EAAA,MAAA,EAAA,EAAQ,IAAK,CAAA,CAAA;AAC5C;;;;"}
@@ -1,8 +1,7 @@
1
1
  import AsyncApi from '@asyncapi/react-component';
2
2
  import '@asyncapi/react-component/styles/default.css';
3
- import { makeStyles, alpha, darken } from '@material-ui/core/styles';
3
+ import { makeStyles, alpha, darken, useTheme } from '@material-ui/core/styles';
4
4
  import React from 'react';
5
- import { useTheme } from '@material-ui/core';
6
5
 
7
6
  const useStyles = makeStyles((theme) => ({
8
7
  root: {
@@ -161,4 +160,4 @@ const AsyncApiDefinition = ({ definition }) => {
161
160
  };
162
161
 
163
162
  export { AsyncApiDefinition };
164
- //# sourceMappingURL=AsyncApiDefinition-ffed9c50.esm.js.map
163
+ //# sourceMappingURL=AsyncApiDefinition-b9802a28.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncApiDefinition-b9802a28.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 React from 'react';\nimport { useTheme } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\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 // override whatever may be in the theme's typography to ensure consistency with asyncapi\n textTransform: 'inherit',\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\nconst httpsFetchResolver = {\n schema: 'https',\n order: 1,\n canRead: true,\n async read(uri: any) {\n const response = await fetch(uri.toString());\n return response.text();\n },\n};\n\nconst httpFetchResolver = {\n schema: 'http',\n order: 1,\n canRead: true,\n async read(uri: any) {\n const response = await fetch(uri.toString());\n return response.text();\n },\n};\n\nconst config = {\n parserOptions: {\n __unstable: {\n resolver: {\n resolvers: [httpsFetchResolver, httpFetchResolver],\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} config={config} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAsBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,UAAY,EAAA,SAAA;AAAA,IACZ,aAAe,EAAA;AAAA,MACb,UAAY,EAAA,MAAA;AAAA,KACd;AAAA,IACA,aAAe,EAAA;AAAA,MACb,GAAG,MAAM,UAAW,CAAA,EAAA;AAAA,KACtB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,GAAG,MAAM,UAAW,CAAA,EAAA;AAAA,KACtB;AAAA,IACA,WAAa,EAAA;AAAA,MACX,WAAa,EAAA,KAAA,CAAM,KAAM,CAAA,OAAA,CAAQ,QAAQ,GAAG,CAAA;AAAA,KAC9C;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,QAAU,EAAA,aAAA;AAAA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@
1
1
  import { RELATION_CONSUMES_API, RELATION_HAS_PART, RELATION_PROVIDES_API } from '@backstage/catalog-model';
2
- import { makeStyles, Dialog, DialogTitle, Typography, DialogContent, Tabs, Tab, DialogActions, Button, Box } from '@material-ui/core';
2
+ import Typography from '@material-ui/core/Typography';
3
3
  import { EntityTable, useEntity, useRelatedEntities } from '@backstage/plugin-catalog-react';
4
4
  import React, { useEffect, useState } from 'react';
5
5
  import { InfoCard, Progress, WarningPanel, CodeSnippet, Link } from '@backstage/core-components';
6
6
  import ExtensionIcon from '@material-ui/icons/Extension';
7
- import { ToggleButton } from '@material-ui/lab';
8
- import { a as apiDocsConfigRef } from './ApiDefinitionWidget-798ee85f.esm.js';
7
+ import ToggleButton from '@material-ui/lab/ToggleButton';
8
+ import '@material-ui/lab/Alert';
9
+ import { a as apiDocsConfigRef } from './ApiDefinitionWidget-90e56cf9.esm.js';
9
10
  import { useApi } from '@backstage/core-plugin-api';
10
- import '@material-ui/core/styles';
11
- import { P as PlainApiDefinitionWidget, A as ApiTypeTitle } from './ApiTypeTitle-cc79a2f3.esm.js';
11
+ import { makeStyles } from '@material-ui/core/styles';
12
+ import { P as PlainApiDefinitionWidget, A as ApiTypeTitle } from './ApiTypeTitle-af01a0df.esm.js';
13
+ import Box from '@material-ui/core/Box';
14
+ import Button from '@material-ui/core/Button';
15
+ import Dialog from '@material-ui/core/Dialog';
16
+ import DialogActions from '@material-ui/core/DialogActions';
17
+ import DialogContent from '@material-ui/core/DialogContent';
18
+ import DialogTitle from '@material-ui/core/DialogTitle';
19
+ import Tab from '@material-ui/core/Tab';
20
+ import Tabs from '@material-ui/core/Tabs';
12
21
 
13
22
  const useStyles = makeStyles((theme) => ({
14
23
  fullHeightDialog: {
@@ -253,4 +262,4 @@ const ProvidedApisCard = (props) => {
253
262
  };
254
263
 
255
264
  export { ApiDefinitionDialog as A, ConsumedApisCard as C, HasApisCard as H, ProvidedApisCard as P };
256
- //# sourceMappingURL=ProvidedApisCard-e92fbd29.esm.js.map
265
+ //# sourceMappingURL=ProvidedApisCard-9d6d6f82.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProvidedApisCard-9d6d6f82.esm.js","sources":["../../src/components/ApiDefinitionDialog/ApiDefinitionDialog.tsx","../../src/components/ApisCards/presets.tsx","../../src/components/ApisCards/ConsumedApisCard.tsx","../../src/components/ApisCards/HasApisCard.tsx","../../src/components/ApisCards/ProvidedApisCard.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 { useApi } from '@backstage/core-plugin-api';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogActions from '@material-ui/core/DialogActions';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport Tab from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect } from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';\n\nconst useStyles = makeStyles(theme => ({\n fullHeightDialog: {\n height: 'calc(100% - 64px)',\n },\n root: {\n display: 'flex',\n flexGrow: 1,\n width: '100%',\n height: '100%',\n },\n tabs: {\n borderRight: `1px solid ${theme.palette.divider}`,\n flexShrink: 0,\n },\n tabContents: {\n flexGrow: 1,\n overflowX: 'auto',\n },\n title: {\n color: theme.palette.text.primary,\n wordBreak: 'break-word',\n fontSize: theme.typography.h3.fontSize,\n marginBottom: 0,\n },\n type: {\n textTransform: 'uppercase',\n fontSize: 11,\n opacity: 0.8,\n marginBottom: theme.spacing(1),\n color: theme.palette.text.primary,\n },\n}));\n\nfunction TabPanel(props: {\n children?: React.ReactNode;\n index: number;\n value: number;\n}) {\n const { children, value, index, ...other } = props;\n const classes = useStyles();\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`vertical-tabpanel-${index}`}\n aria-labelledby={`vertical-tab-${index}`}\n className={classes.tabContents}\n {...other}\n >\n {value === index && (\n <Box pl={3} pr={3}>\n {children}\n </Box>\n )}\n </div>\n );\n}\n\nfunction a11yProps(index: number) {\n return {\n id: `vertical-tab-${index}`,\n 'aria-controls': `vertical-tabpanel-${index}`,\n };\n}\n\n/**\n * A dialog that lets users inspect the API definition.\n *\n * @public\n */\nexport function ApiDefinitionDialog(props: {\n open: boolean;\n entity: ApiEntity;\n onClose: () => void;\n}) {\n const { open, entity, onClose } = props;\n const [activeTab, setActiveTab] = React.useState(0);\n const classes = useStyles();\n\n useEffect(() => {\n setActiveTab(0);\n }, [open]);\n\n const config = useApi(apiDocsConfigRef);\n const definitionWidget = config.getApiDefinitionWidget(entity);\n\n let tabIndex = 0;\n let tabPanelIndex = 0;\n\n return (\n <Dialog\n fullWidth\n maxWidth=\"xl\"\n open={open}\n onClose={onClose}\n aria-labelledby=\"api-definition-dialog-title\"\n PaperProps={{ className: classes.fullHeightDialog }}\n >\n <DialogTitle id=\"api-definition-dialog-title\" disableTypography>\n <Typography className={classes.type}>\n API - {definitionWidget?.title ?? 'Raw'}\n </Typography>\n <Typography className={classes.title} variant=\"h1\">\n {entity.metadata.title ?? entity.metadata.name}\n </Typography>\n </DialogTitle>\n <DialogContent dividers className={classes.root}>\n <Tabs\n orientation=\"vertical\"\n variant=\"scrollable\"\n value={activeTab}\n onChange={(_, newValue) => setActiveTab(newValue)}\n aria-label=\"API definition options\"\n className={classes.tabs}\n >\n {definitionWidget ? (\n <Tab label={definitionWidget.title} {...a11yProps(tabIndex++)} />\n ) : null}\n <Tab label=\"Raw\" {...a11yProps(tabIndex++)} />\n </Tabs>\n\n {definitionWidget ? (\n <TabPanel value={activeTab} index={tabPanelIndex++}>\n {definitionWidget.component(entity.spec.definition)}\n </TabPanel>\n ) : null}\n <TabPanel value={activeTab} index={tabPanelIndex++}>\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget?.rawLanguage ?? entity.spec.type}\n />\n </TabPanel>\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose} color=\"primary\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\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 { TableColumn } from '@backstage/core-components';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport ExtensionIcon from '@material-ui/icons/Extension';\nimport ToggleButton from '@material-ui/lab/ToggleButton';\nimport React, { useState } from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { ApiDefinitionDialog } from '../ApiDefinitionDialog';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\nconst ApiDefinitionButton = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const [dialogOpen, setDialogOpen] = useState(false);\n return (\n <>\n <ToggleButton\n aria-label=\"Toggle API Definition Dialog\"\n onClick={() => setDialogOpen(!dialogOpen)}\n >\n <ExtensionIcon />\n </ToggleButton>\n <ApiDefinitionDialog\n entity={apiEntity}\n open={dialogOpen}\n onClose={() => setDialogOpen(false)}\n />\n </>\n );\n};\n\nfunction createApiDefinitionColumn(): TableColumn<ApiEntity> {\n return {\n title: 'API Definition',\n render: entity => <ApiDefinitionButton apiEntity={entity} />,\n };\n}\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 createApiDefinitionColumn(),\n];\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity, RELATION_CONSUMES_API } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ConsumedApisCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ApiEntity>[];\n}) => {\n const { variant = 'gridItem', columns = apiEntityColumns } = 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={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createSpecApiTypeColumn } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\nconst presetColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n\n/**\n * @public\n */\nexport const HasApisCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ApiEntity>[];\n}) => {\n const { variant = 'gridItem', columns = presetColumns } = props;\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_HAS_PART,\n kind: 'API',\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not contain any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity, RELATION_PROVIDES_API } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ProvidedApisCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ApiEntity>[];\n}) => {\n const { variant = 'gridItem', columns = apiEntityColumns } = 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={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,gBAAkB,EAAA;AAAA,IAChB,MAAQ,EAAA,mBAAA;AAAA,GACV;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,OAAS,EAAA,MAAA;AAAA,IACT,QAAU,EAAA,CAAA;AAAA,IACV,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,WAAa,EAAA,CAAA,UAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,OAAO,CAAA,CAAA;AAAA,IAC/C,UAAY,EAAA,CAAA;AAAA,GACd;AAAA,EACA,WAAa,EAAA;AAAA,IACX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AAA,IAAA,EAAM,GAAG,KAAK,CAAA,CAAA,EAAI,UAAS,MAAO,EAAA,CAAA;AAAA,OAAA;AAAA,KAE5D,CAAA,CAAA;AAAA,GAEJ;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,eAAA;AAAA,MACN,OAAA;AAAA,MACA,YACE,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,KAAA,EAAO,EAAE,SAAA,EAAW,QAAS,EAAA,EAAA,kBAC/B,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAA,EAAQ,SACpB,MAAO,CAAA,IAAA,CAAK,iBAAkB,CAAA,OAAO,CAAE,EAAA,6BAE/C,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,OAClB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,EAAA,EAAG,iGAAkG,EAAA,EAAA,2BAE3G,CACF,CACF,CAAA;AAAA,MAEF,OAAA;AAAA,MACA,QAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { RELATION_API_CONSUMED_BY, RELATION_API_PROVIDED_BY } from '@backstage/catalog-model';
2
- import { Typography } from '@material-ui/core';
2
+ import Typography from '@material-ui/core/Typography';
3
3
  import { useEntity, useRelatedEntities, EntityTable } from '@backstage/plugin-catalog-react';
4
4
  import React from 'react';
5
5
  import { InfoCard, Progress, WarningPanel, CodeSnippet, Link } from '@backstage/core-components';
@@ -67,4 +67,4 @@ const ProvidingComponentsCard = (props) => {
67
67
  };
68
68
 
69
69
  export { ConsumingComponentsCard as C, ProvidingComponentsCard as P };
70
- //# sourceMappingURL=ProvidingComponentsCard-5b679445.esm.js.map
70
+ //# sourceMappingURL=ProvidingComponentsCard-4722ca0e.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProvidingComponentsCard-4722ca0e.esm.js","sources":["../../src/components/ComponentsCards/ConsumingComponentsCard.tsx","../../src/components/ComponentsCards/ProvidingComponentsCard.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 ComponentEntity,\n RELATION_API_CONSUMED_BY,\n} from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ConsumingComponentsCard = (props: {\n variant?: InfoCardVariants;\n}) => {\n const { variant = 'gridItem' } = props;\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_CONSUMED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component consumes this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ComponentEntity,\n RELATION_API_PROVIDED_BY,\n} from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\n/** @public */\nexport const ProvidingComponentsCard = (props: {\n variant?: InfoCardVariants;\n}) => {\n const { 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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AA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,WAAA;AAAA,MACN,OAAA;AAAA,MACA,YAAA,kBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,KAAO,EAAA,EAAE,WAAW,QAAS,EAAA,EAAA,kBAC/B,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAA,EAAQ,iCAE5B,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,OAClB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAG,EAAA,iGAAA,EAAA,EAAkG,2BAE3G,CACF,CACF,CAAA;AAAA,MAEF,SAAS,WAAY,CAAA,sBAAA;AAAA,MACrB,QAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -1,7 +1,7 @@
1
- export { C as ConsumingComponentsCard, P as ProvidingComponentsCard } from './ProvidingComponentsCard-5b679445.esm.js';
1
+ export { C as ConsumingComponentsCard, P as ProvidingComponentsCard } from './ProvidingComponentsCard-4722ca0e.esm.js';
2
2
  import '@backstage/catalog-model';
3
- import '@material-ui/core';
3
+ import '@material-ui/core/Typography';
4
4
  import '@backstage/plugin-catalog-react';
5
5
  import 'react';
6
6
  import '@backstage/core-components';
7
- //# sourceMappingURL=index-c969ed3d.esm.js.map
7
+ //# sourceMappingURL=index-2ee1c1df.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-2ee1c1df.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,12 +1,12 @@
1
- export { A as ApiExplorerIndexPage, D as DefaultApiExplorerPage } from './ApiExplorerPage-ce544a95.esm.js';
1
+ export { A as ApiExplorerIndexPage, D as DefaultApiExplorerPage } from './ApiExplorerPage-93d899e2.esm.js';
2
2
  import 'react';
3
3
  import 'react-router-dom';
4
4
  import '@backstage/core-components';
5
5
  import '@backstage/core-plugin-api';
6
6
  import '@backstage/plugin-catalog';
7
7
  import '@backstage/plugin-catalog-react';
8
- import './ApiDefinitionWidget-798ee85f.esm.js';
8
+ import './ApiDefinitionWidget-90e56cf9.esm.js';
9
9
  import '@material-ui/core/styles';
10
10
  import '@backstage/plugin-permission-react';
11
11
  import '@backstage/plugin-catalog-common/alpha';
12
- //# sourceMappingURL=index-435dfc01.esm.js.map
12
+ //# sourceMappingURL=index-74538c23.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-74538c23.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,22 @@
1
+ export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './ProvidedApisCard-9d6d6f82.esm.js';
2
+ import '@backstage/catalog-model';
3
+ import '@material-ui/core/Typography';
4
+ import '@backstage/plugin-catalog-react';
5
+ import 'react';
6
+ import '@backstage/core-components';
7
+ import '@material-ui/icons/Extension';
8
+ import '@material-ui/lab/ToggleButton';
9
+ import '@material-ui/lab/Alert';
10
+ import './ApiDefinitionWidget-90e56cf9.esm.js';
11
+ import '@backstage/core-plugin-api';
12
+ import '@material-ui/core/styles';
13
+ import './ApiTypeTitle-af01a0df.esm.js';
14
+ import '@material-ui/core/Box';
15
+ import '@material-ui/core/Button';
16
+ import '@material-ui/core/Dialog';
17
+ import '@material-ui/core/DialogActions';
18
+ import '@material-ui/core/DialogContent';
19
+ import '@material-ui/core/DialogTitle';
20
+ import '@material-ui/core/Tab';
21
+ import '@material-ui/core/Tabs';
22
+ //# sourceMappingURL=index-7ee30e13.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-7ee30e13.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
- export { A as ApiDefinitionCard } from './ApiDefinitionCard-504c2432.esm.js';
2
- export { d as defaultDefinitionWidgets } from './ApiDefinitionWidget-798ee85f.esm.js';
3
- export { A as ApiTypeTitle } from './ApiTypeTitle-cc79a2f3.esm.js';
1
+ export { A as ApiDefinitionCard } from './ApiDefinitionCard-04c70017.esm.js';
2
+ export { d as defaultDefinitionWidgets } from './ApiDefinitionWidget-90e56cf9.esm.js';
3
+ export { A as ApiTypeTitle } from './ApiTypeTitle-af01a0df.esm.js';
4
4
  import '@backstage/plugin-catalog-react';
5
- import '@material-ui/lab';
5
+ import '@material-ui/lab/Alert';
6
6
  import 'react';
7
7
  import '@backstage/core-components';
8
8
  import '@backstage/core-plugin-api';
9
9
  import '@material-ui/core/styles';
10
10
  import '@material-ui/core/Typography';
11
- //# sourceMappingURL=index-6f21bd2e.esm.js.map
11
+ //# sourceMappingURL=index-8451fe54.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-8451fe54.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
package/dist/index.esm.js CHANGED
@@ -1,12 +1,12 @@
1
- export { A as ApiExplorerIndexPage, D as DefaultApiExplorerPage } from './esm/ApiExplorerPage-ce544a95.esm.js';
2
- export { A as ApiDefinitionCard } from './esm/ApiDefinitionCard-504c2432.esm.js';
3
- import { r as rootRoute, a as apiDocsConfigRef, b as registerComponentRouteRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-798ee85f.esm.js';
4
- export { A as AsyncApiDefinitionWidget, G as GraphQlDefinitionWidget, O as OpenApiDefinitionWidget, T as TrpcApiDefinitionWidget, a as apiDocsConfigRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-798ee85f.esm.js';
5
- export { A as ApiTypeTitle, P as PlainApiDefinitionWidget } from './esm/ApiTypeTitle-cc79a2f3.esm.js';
6
- export { A as ApiDefinitionDialog, C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './esm/ProvidedApisCard-e92fbd29.esm.js';
7
- export { C as ConsumingComponentsCard, P as ProvidingComponentsCard } from './esm/ProvidingComponentsCard-5b679445.esm.js';
1
+ export { A as ApiExplorerIndexPage, D as DefaultApiExplorerPage } from './esm/ApiExplorerPage-93d899e2.esm.js';
2
+ export { A as ApiDefinitionCard } from './esm/ApiDefinitionCard-04c70017.esm.js';
3
+ import { r as rootRoute, a as apiDocsConfigRef, b as registerComponentRouteRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-90e56cf9.esm.js';
4
+ export { A as AsyncApiDefinitionWidget, G as GraphQlDefinitionWidget, O as OpenApiDefinitionWidget, T as TrpcApiDefinitionWidget, a as apiDocsConfigRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-90e56cf9.esm.js';
5
+ export { A as ApiTypeTitle, P as PlainApiDefinitionWidget } from './esm/ApiTypeTitle-af01a0df.esm.js';
6
+ export { A as ApiDefinitionDialog, C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './esm/ProvidedApisCard-9d6d6f82.esm.js';
7
+ export { C as ConsumingComponentsCard, P as ProvidingComponentsCard } from './esm/ProvidingComponentsCard-4722ca0e.esm.js';
8
8
  import '@backstage/plugin-catalog-react';
9
- import '@material-ui/lab';
9
+ import '@material-ui/lab/Alert';
10
10
  import 'react';
11
11
  import '@backstage/core-components';
12
12
  import { createPlugin, createApiFactory, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
@@ -17,8 +17,16 @@ import '@backstage/plugin-permission-react';
17
17
  import '@backstage/plugin-catalog-common/alpha';
18
18
  import '@material-ui/core/styles';
19
19
  import '@backstage/catalog-model';
20
- import '@material-ui/core';
21
20
  import '@material-ui/icons/Extension';
21
+ import '@material-ui/lab/ToggleButton';
22
+ import '@material-ui/core/Box';
23
+ import '@material-ui/core/Button';
24
+ import '@material-ui/core/Dialog';
25
+ import '@material-ui/core/DialogActions';
26
+ import '@material-ui/core/DialogContent';
27
+ import '@material-ui/core/DialogTitle';
28
+ import '@material-ui/core/Tab';
29
+ import '@material-ui/core/Tabs';
22
30
 
23
31
  const apiDocsPlugin = createPlugin({
24
32
  id: "api-docs",
@@ -46,7 +54,7 @@ const apiDocsPlugin = createPlugin({
46
54
  const ApiExplorerPage = apiDocsPlugin.provide(
47
55
  createRoutableExtension({
48
56
  name: "ApiExplorerPage",
49
- component: () => import('./esm/index-435dfc01.esm.js').then((m) => m.ApiExplorerIndexPage),
57
+ component: () => import('./esm/index-74538c23.esm.js').then((m) => m.ApiExplorerIndexPage),
50
58
  mountPoint: rootRoute
51
59
  })
52
60
  );
@@ -54,7 +62,7 @@ const EntityApiDefinitionCard = apiDocsPlugin.provide(
54
62
  createComponentExtension({
55
63
  name: "EntityApiDefinitionCard",
56
64
  component: {
57
- lazy: () => import('./esm/index-6f21bd2e.esm.js').then((m) => m.ApiDefinitionCard)
65
+ lazy: () => import('./esm/index-8451fe54.esm.js').then((m) => m.ApiDefinitionCard)
58
66
  }
59
67
  })
60
68
  );
@@ -62,7 +70,7 @@ const EntityConsumedApisCard = apiDocsPlugin.provide(
62
70
  createComponentExtension({
63
71
  name: "EntityConsumedApisCard",
64
72
  component: {
65
- lazy: () => import('./esm/index-5f0727eb.esm.js').then((m) => m.ConsumedApisCard)
73
+ lazy: () => import('./esm/index-7ee30e13.esm.js').then((m) => m.ConsumedApisCard)
66
74
  }
67
75
  })
68
76
  );
@@ -70,7 +78,7 @@ const EntityConsumingComponentsCard = apiDocsPlugin.provide(
70
78
  createComponentExtension({
71
79
  name: "EntityConsumingComponentsCard",
72
80
  component: {
73
- lazy: () => import('./esm/index-c969ed3d.esm.js').then(
81
+ lazy: () => import('./esm/index-2ee1c1df.esm.js').then(
74
82
  (m) => m.ConsumingComponentsCard
75
83
  )
76
84
  }
@@ -80,7 +88,7 @@ const EntityProvidedApisCard = apiDocsPlugin.provide(
80
88
  createComponentExtension({
81
89
  name: "EntityProvidedApisCard",
82
90
  component: {
83
- lazy: () => import('./esm/index-5f0727eb.esm.js').then((m) => m.ProvidedApisCard)
91
+ lazy: () => import('./esm/index-7ee30e13.esm.js').then((m) => m.ProvidedApisCard)
84
92
  }
85
93
  })
86
94
  );
@@ -88,7 +96,7 @@ const EntityProvidingComponentsCard = apiDocsPlugin.provide(
88
96
  createComponentExtension({
89
97
  name: "EntityProvidingComponentsCard",
90
98
  component: {
91
- lazy: () => import('./esm/index-c969ed3d.esm.js').then(
99
+ lazy: () => import('./esm/index-2ee1c1df.esm.js').then(
92
100
  (m) => m.ProvidingComponentsCard
93
101
  )
94
102
  }
@@ -98,7 +106,7 @@ const EntityHasApisCard = apiDocsPlugin.provide(
98
106
  createComponentExtension({
99
107
  name: "EntityHasApisCard",
100
108
  component: {
101
- lazy: () => import('./esm/index-5f0727eb.esm.js').then((m) => m.HasApisCard)
109
+ lazy: () => import('./esm/index-7ee30e13.esm.js').then((m) => m.HasApisCard)
102
110
  }
103
111
  })
104
112
  );
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../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 { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { registerComponentRouteRef, rootRoute } from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const apiDocsPlugin = createPlugin({\n id: 'api-docs',\n routes: {\n root: rootRoute,\n },\n apis: [\n createApiFactory({\n api: apiDocsConfigRef,\n deps: {},\n factory: () => {\n const definitionWidgets = defaultDefinitionWidgets();\n return {\n getApiDefinitionWidget: (apiEntity: ApiEntity) => {\n return definitionWidgets.find(d => d.type === apiEntity.spec.type);\n },\n };\n },\n }),\n ],\n externalRoutes: {\n registerApi: registerComponentRouteRef,\n },\n});\n\n/** @public */\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerIndexPage),\n mountPoint: rootRoute,\n }),\n);\n\n/** @public */\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\n/** @public */\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\n/** @public */\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\n/** @public */\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\n/** @public */\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\n/** @public */\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":";;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,gBAAgB,YAAa,CAAA;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Content":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { registerComponentRouteRef, rootRoute } from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const apiDocsPlugin = createPlugin({\n id: 'api-docs',\n routes: {\n root: rootRoute,\n },\n apis: [\n createApiFactory({\n api: apiDocsConfigRef,\n deps: {},\n factory: () => {\n const definitionWidgets = defaultDefinitionWidgets();\n return {\n getApiDefinitionWidget: (apiEntity: ApiEntity) => {\n return definitionWidgets.find(d => d.type === apiEntity.spec.type);\n },\n };\n },\n }),\n ],\n externalRoutes: {\n registerApi: registerComponentRouteRef,\n },\n});\n\n/** @public */\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerIndexPage),\n mountPoint: rootRoute,\n }),\n);\n\n/** @public */\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\n/** @public */\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\n/** @public */\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\n/** @public */\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\n/** @public */\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\n/** @public */\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BO,MAAM,gBAAgB,YAAa,CAAA;AAAA,EACxC,EAAI,EAAA,UAAA;AAAA,EACJ,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,SAAA;AAAA,GACR;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,gBAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,SAAS,MAAM;AACb,QAAA,MAAM,oBAAoB,wBAAyB,EAAA,CAAA;AACnD,QAAO,OAAA;AAAA,UACL,sBAAA,EAAwB,CAAC,SAAyB,KAAA;AAChD,YAAA,OAAO,kBAAkB,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,IAAS,KAAA,SAAA,CAAU,KAAK,IAAI,CAAA,CAAA;AAAA,WACnE;AAAA,SACF,CAAA;AAAA,OACF;AAAA,KACD,CAAA;AAAA,GACH;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,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J,OAAO,6BAAwB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,gBAAgB,CAAA;AAAA,KACjE;AAAA,GACD,CAAA;AACH,EAAA;AAGO,MAAM,gCAAgC,aAAc,CAAA,OAAA;AAAA,EACzD,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,+BAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAM,EAAA,MACJ,OAAO,6BAA8B,CAAE,CAAA,IAAA;AAAA,QACrC,OAAK,CAAE,CAAA,uBAAA;AAAA,OACT;AAAA,KACJ;AAAA,GACD,CAAA;AACH,EAAA;AAGO,MAAM,oBAAoB,aAAc,CAAA,OAAA;AAAA,EAC7C,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,mBAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,IAAA,EAAM,MAAM,OAAO,6BAAwB,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,WAAW,CAAA;AAAA,KACtE;AAAA,GACD,CAAA;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.11.1-next.2",
3
+ "version": "0.11.1",
4
4
  "description": "A Backstage plugin that helps represent API entities in the frontend",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin"
@@ -49,21 +49,21 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@asyncapi/react-component": "1.3.1",
52
- "@backstage/catalog-model": "^1.4.5-next.0",
53
- "@backstage/core-compat-api": "^0.2.1-next.2",
54
- "@backstage/core-components": "^0.14.1-next.2",
55
- "@backstage/core-plugin-api": "^1.9.1-next.1",
56
- "@backstage/frontend-plugin-api": "^0.6.1-next.2",
57
- "@backstage/plugin-catalog": "^1.18.0-next.2",
58
- "@backstage/plugin-catalog-common": "^1.0.22-next.1",
59
- "@backstage/plugin-catalog-react": "^1.11.0-next.2",
60
- "@backstage/plugin-permission-react": "^0.4.21-next.1",
52
+ "@backstage/catalog-model": "^1.4.5",
53
+ "@backstage/core-compat-api": "^0.2.1",
54
+ "@backstage/core-components": "^0.14.1",
55
+ "@backstage/core-plugin-api": "^1.9.1",
56
+ "@backstage/frontend-plugin-api": "^0.6.1",
57
+ "@backstage/plugin-catalog": "^1.18.0",
58
+ "@backstage/plugin-catalog-common": "^1.0.22",
59
+ "@backstage/plugin-catalog-react": "^1.11.0",
60
+ "@backstage/plugin-permission-react": "^0.4.21",
61
61
  "@graphiql/react": "^0.20.0",
62
62
  "@material-ui/core": "^4.12.2",
63
63
  "@material-ui/icons": "^4.9.1",
64
64
  "@material-ui/lab": "4.0.0-alpha.61",
65
65
  "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
66
- "graphiql": "3.1.0",
66
+ "graphiql": "3.1.1",
67
67
  "graphql": "^16.0.0",
68
68
  "graphql-config": "^5.0.2",
69
69
  "graphql-ws": "^5.4.1",
@@ -71,10 +71,10 @@
71
71
  "swagger-ui-react": "^5.0.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@backstage/cli": "^0.25.3-next.2",
75
- "@backstage/core-app-api": "^1.12.1-next.1",
76
- "@backstage/dev-utils": "^1.0.28-next.2",
77
- "@backstage/test-utils": "^1.5.1-next.1",
74
+ "@backstage/cli": "^0.26.0",
75
+ "@backstage/core-app-api": "^1.12.1",
76
+ "@backstage/dev-utils": "^1.0.28",
77
+ "@backstage/test-utils": "^1.5.1",
78
78
  "@testing-library/dom": "^9.0.0",
79
79
  "@testing-library/jest-dom": "^6.0.0",
80
80
  "@testing-library/react": "^14.0.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiDefinitionCard-504c2432.esm.js","sources":["../../src/components/ApiDefinitionCard/ApiDefinitionCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } 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\n/** @public */\nexport const ApiDefinitionCard = () => {\n const { entity } = useEntity<ApiEntity>();\n const config = useApi(apiDocsConfigRef);\n const { getApiDefinitionWidget } = config;\n\n if (!entity) {\n return <Alert severity=\"error\">Could not fetch the API</Alert>;\n }\n\n const definitionWidget = getApiDefinitionWidget(entity);\n const entityTitle = entity.metadata.title ?? entity.metadata.name;\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entityTitle}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entityTitle}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA2BO,MAAM,oBAAoB,MAAM;AA3BvC,EAAA,IAAA,EAAA,CAAA;AA4BE,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAqB,EAAA,CAAA;AACxC,EAAM,MAAA,MAAA,GAAS,OAAO,gBAAgB,CAAA,CAAA;AACtC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A;AAAA,UAAA;AAAA,YACC,UAAA,EAAY,OAAO,IAAK,CAAA,UAAA;AAAA,YACxB,QAAA,EAAU,OAAO,IAAK,CAAA,IAAA;AAAA,WAAA;AAAA,SAE1B,CAAA;AAAA,OACF;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AsyncApiDefinition-ffed9c50.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 React from 'react';\nimport { useTheme } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\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 // override whatever may be in the theme's typography to ensure consistency with asyncapi\n textTransform: 'inherit',\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\nconst httpsFetchResolver = {\n schema: 'https',\n order: 1,\n canRead: true,\n async read(uri: any) {\n const response = await fetch(uri.toString());\n return response.text();\n },\n};\n\nconst httpFetchResolver = {\n schema: 'http',\n order: 1,\n canRead: true,\n async read(uri: any) {\n const response = await fetch(uri.toString());\n return response.text();\n },\n};\n\nconst config = {\n parserOptions: {\n __unstable: {\n resolver: {\n resolvers: [httpsFetchResolver, httpFetchResolver],\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} config={config} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAsBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,UAAY,EAAA,SAAA;AAAA,IACZ,aAAe,EAAA;AAAA,MACb,UAAY,EAAA,MAAA;AAAA,KACd;AAAA,IACA,aAAe,EAAA;AAAA,MACb,GAAG,MAAM,UAAW,CAAA,EAAA;AAAA,KACtB;AAAA,IACA,OAAS,EAAA;AAAA,MACP,GAAG,MAAM,UAAW,CAAA,EAAA;AAAA,KACtB;AAAA,IACA,WAAa,EAAA;AAAA,MACX,WAAa,EAAA,KAAA,CAAM,KAAM,CAAA,OAAA,CAAQ,QAAQ,GAAG,CAAA;AAAA,KAC9C;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,QAAU,EAAA,aAAA;AAAA,KACZ;AAAA,IACA,aAAe,EAAA;AAAA,MACb,OAAS,EAAA,MAAA;AAAA,KACX;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,MAAO,CAAA,EAAA;AAAA,KACxC;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,IAAA;AAAA,KACtC;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,eAAA,EAAiB,KAAM,CAAA,OAAA,C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AAM,KAAK,GAAU,EAAA;AACnB,IAAA,MAAM,QAAW,GAAA,MAAM,KAAM,CAAA,GAAA,CAAI,UAAU,CAAA,CAAA;AAC3C,IAAA,OAAO,SAAS,IAAK,EAAA,CAAA;AAAA,GACvB;AACF,CAAA,CAAA;AAEA,MAAM,MAAS,GAAA;AAAA,EACb,aAAe,EAAA;AAAA,IACb,UAAY,EAAA;AAAA,MACV,QAAU,EAAA;AAAA,QACR,SAAA,EAAW,CAAC,kBAAA,EAAoB,iBAAiB,CAAA;AAAA,OACnD;AAAA,KACF;AAAA,GACF;AACF,CAAA,CAAA;AAMO,MAAM,kBAAqB,GAAA,CAAC,EAAE,UAAA,EAAqC,KAAA;AACxE,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,EAAM,MAAA,UAAA,GAAa,CAAG,EAAA,OAAA,CAAQ,IAAI,CAAA,CAAA,EAChC,KAAM,CAAA,OAAA,CAAQ,IAAS,KAAA,MAAA,GAAS,OAAQ,CAAA,IAAA,GAAO,EACjD,CAAA,CAAA,CAAA;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,SAAI,SAAW,EAAA,UAAA,EAAA,sCACb,QAAS,EAAA,EAAA,MAAA,EAAQ,UAAY,EAAA,MAAA,EAAgB,CAChD,CAAA,CAAA;AAEJ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProvidedApisCard-e92fbd29.esm.js","sources":["../../src/components/ApiDefinitionDialog/ApiDefinitionDialog.tsx","../../src/components/ApisCards/presets.tsx","../../src/components/ApisCards/ConsumedApisCard.tsx","../../src/components/ApisCards/HasApisCard.tsx","../../src/components/ApisCards/ProvidedApisCard.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 { useApi } from '@backstage/core-plugin-api';\nimport {\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n makeStyles,\n Tab,\n Tabs,\n Typography,\n} from '@material-ui/core';\nimport React, { useEffect } from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';\n\nconst useStyles = makeStyles(theme => ({\n fullHeightDialog: {\n height: 'calc(100% - 64px)',\n },\n root: {\n display: 'flex',\n flexGrow: 1,\n width: '100%',\n height: '100%',\n },\n tabs: {\n borderRight: `1px solid ${theme.palette.divider}`,\n flexShrink: 0,\n },\n tabContents: {\n flexGrow: 1,\n overflowX: 'auto',\n },\n title: {\n color: theme.palette.text.primary,\n wordBreak: 'break-word',\n fontSize: theme.typography.h3.fontSize,\n marginBottom: 0,\n },\n type: {\n textTransform: 'uppercase',\n fontSize: 11,\n opacity: 0.8,\n marginBottom: theme.spacing(1),\n color: theme.palette.text.primary,\n },\n}));\n\nfunction TabPanel(props: {\n children?: React.ReactNode;\n index: number;\n value: number;\n}) {\n const { children, value, index, ...other } = props;\n const classes = useStyles();\n return (\n <div\n role=\"tabpanel\"\n hidden={value !== index}\n id={`vertical-tabpanel-${index}`}\n aria-labelledby={`vertical-tab-${index}`}\n className={classes.tabContents}\n {...other}\n >\n {value === index && (\n <Box pl={3} pr={3}>\n {children}\n </Box>\n )}\n </div>\n );\n}\n\nfunction a11yProps(index: number) {\n return {\n id: `vertical-tab-${index}`,\n 'aria-controls': `vertical-tabpanel-${index}`,\n };\n}\n\n/**\n * A dialog that lets users inspect the API definition.\n *\n * @public\n */\nexport function ApiDefinitionDialog(props: {\n open: boolean;\n entity: ApiEntity;\n onClose: () => void;\n}) {\n const { open, entity, onClose } = props;\n const [activeTab, setActiveTab] = React.useState(0);\n const classes = useStyles();\n\n useEffect(() => {\n setActiveTab(0);\n }, [open]);\n\n const config = useApi(apiDocsConfigRef);\n const definitionWidget = config.getApiDefinitionWidget(entity);\n\n let tabIndex = 0;\n let tabPanelIndex = 0;\n\n return (\n <Dialog\n fullWidth\n maxWidth=\"xl\"\n open={open}\n onClose={onClose}\n aria-labelledby=\"api-definition-dialog-title\"\n PaperProps={{ className: classes.fullHeightDialog }}\n >\n <DialogTitle id=\"api-definition-dialog-title\" disableTypography>\n <Typography className={classes.type}>\n API - {definitionWidget?.title ?? 'Raw'}\n </Typography>\n <Typography className={classes.title} variant=\"h1\">\n {entity.metadata.title ?? entity.metadata.name}\n </Typography>\n </DialogTitle>\n <DialogContent dividers className={classes.root}>\n <Tabs\n orientation=\"vertical\"\n variant=\"scrollable\"\n value={activeTab}\n onChange={(_, newValue) => setActiveTab(newValue)}\n aria-label=\"API definition options\"\n className={classes.tabs}\n >\n {definitionWidget ? (\n <Tab label={definitionWidget.title} {...a11yProps(tabIndex++)} />\n ) : null}\n <Tab label=\"Raw\" {...a11yProps(tabIndex++)} />\n </Tabs>\n\n {definitionWidget ? (\n <TabPanel value={activeTab} index={tabPanelIndex++}>\n {definitionWidget.component(entity.spec.definition)}\n </TabPanel>\n ) : null}\n <TabPanel value={activeTab} index={tabPanelIndex++}>\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget?.rawLanguage ?? entity.spec.type}\n />\n </TabPanel>\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose} color=\"primary\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\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 { TableColumn } from '@backstage/core-components';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport ExtensionIcon from '@material-ui/icons/Extension';\nimport { ToggleButton } from '@material-ui/lab';\nimport React, { useState } from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { ApiDefinitionDialog } from '../ApiDefinitionDialog';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\nconst ApiDefinitionButton = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const [dialogOpen, setDialogOpen] = useState(false);\n return (\n <>\n <ToggleButton\n aria-label=\"Toggle API Definition Dialog\"\n onClick={() => setDialogOpen(!dialogOpen)}\n >\n <ExtensionIcon />\n </ToggleButton>\n <ApiDefinitionDialog\n entity={apiEntity}\n open={dialogOpen}\n onClose={() => setDialogOpen(false)}\n />\n </>\n );\n};\n\nfunction createApiDefinitionColumn(): TableColumn<ApiEntity> {\n return {\n title: 'API Definition',\n render: entity => <ApiDefinitionButton apiEntity={entity} />,\n };\n}\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 createApiDefinitionColumn(),\n];\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity, RELATION_CONSUMES_API } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ConsumedApisCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ApiEntity>[];\n}) => {\n const { variant = 'gridItem', columns = apiEntityColumns } = 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={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity, RELATION_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 InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\nconst presetColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n\n/**\n * @public\n */\nexport const HasApisCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ApiEntity>[];\n}) => {\n const { variant = 'gridItem', columns = presetColumns } = props;\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_HAS_PART,\n kind: 'API',\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not contain any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity, RELATION_PROVIDES_API } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ProvidedApisCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ApiEntity>[];\n}) => {\n const { variant = 'gridItem', columns = apiEntityColumns } = 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={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,gBAAkB,EAAA;AAAA,IAChB,MAAQ,EAAA,mBAAA;AAAA,GACV;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,OAAS,EAAA,MAAA;AAAA,IACT,QAAU,EAAA,CAAA;AAAA,IACV,KAAO,EAAA,MAAA;AAAA,IACP,MAAQ,EAAA,MAAA;AAAA,GACV;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,WAAa,EAAA,CAAA,UAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,OAAO,CAAA,CAAA;AAAA,IAC/C,UAAY,EAAA,CAAA;AAAA,GACd;AAAA,EACA,WAAa,EAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,IACV,SAAW,EAAA,MAAA;AAAA,GACb;AAAA,EACA,KAAO,EAAA;AAAA,IACL,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,IAC1B,SAAW,EAAA,YAAA;AAAA,IACX,QAAA,EAAU,KAAM,CAAA,UAAA,CAAW,EAAG,CAAA,QAAA;AAAA,IAC9B,YAAc,EAAA,CAAA;AAAA,GAChB;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,aAAe,EAAA,WAAA;AAAA,IACf,QAAU,EAAA,EAAA;AAAA,IACV,OAAS,EAAA,GAAA;AAAA,IACT,YAAA,EAAc,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,IAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,GAC5B;AACF,CAAE,CAAA,CAAA,CAAA;AAEF,SAAS,SAAS,KAIf,EAAA;AACD,EAAA,MAAM,EA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AAA,EAAA,EAAA,EAAG,iGAAkG,EAAA,EAAA,2BAE3G,CACF,CACF,CAAA;AAAA,MAEF,OAAA;AAAA,MACA,QAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProvidingComponentsCard-5b679445.esm.js","sources":["../../src/components/ComponentsCards/ConsumingComponentsCard.tsx","../../src/components/ComponentsCards/ProvidingComponentsCard.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 ComponentEntity,\n RELATION_API_CONSUMED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ConsumingComponentsCard = (props: {\n variant?: InfoCardVariants;\n}) => {\n const { variant = 'gridItem' } = props;\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_CONSUMED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component consumes this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ComponentEntity,\n RELATION_API_PROVIDED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\n/** @public */\nexport const ProvidingComponentsCard = (props: {\n variant?: InfoCardVariants;\n}) => {\n const { 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"],"names":[],"mappings":";;;;;;AAuCa,MAAA,uBAAA,GAA0B,CAAC,KAElC,KAAA;AACJ,EAAM,MAAA,EAAE,OAAU,GAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACjC,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EAAA,MAAM,EAAE,QAAU,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,mBAAmB,MAAQ,EAAA;AAAA,IAC9D,IAAM,EAAA,wBAAA;AAAA,GACP,CAAA,CAAA;AAED,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2CACG,QAAS,EAAA,EAAA,OAAA,EAAkB,OAAM,WAChC,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAS,CACZ,CAAA,CAAA;AAAA,GAEJ;AAEA,EAAI,IAAA,KAAA,IAAS,CAAC,QAAU,EAAA;AACtB,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAkB,EAAA,KAAA,EAAM,WAChC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAS,EAAA,OAAA;AAAA,QACT,KAAM,EAAA,2BAAA;AAAA,QACN,OAAA,sCAAU,WAAY,EAAA,EAAA,IAAA,EAAM,GAAG,KAAK,CAAA,CAAA,EAAI,UAAS,MAAO,EAAA,CAAA;AAAA,OAAA;AAAA,KAE5D,CAAA,CAAA;AAAA,GAEJ;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,WAAA;AAAA,MACN,OAAA;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Y,EAAA,EAAA,IAAA,EAAM,GAAG,KAAK,CAAA,CAAA,EAAI,UAAS,MAAO,EAAA,CAAA;AAAA,OAAA;AAAA,KAE5D,CAAA,CAAA;AAAA,GAEJ;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,WAAA;AAAA,MACN,OAAA;AAAA,MACA,YAAA,kBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,KAAO,EAAA,EAAE,WAAW,QAAS,EAAA,EAAA,kBAC/B,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAA,EAAQ,iCAE5B,CACA,kBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,OAClB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,EAAG,EAAA,iGAAA,EAAA,EAAkG,2BAE3G,CACF,CACF,CAAA;AAAA,MAEF,SAAS,WAAY,CAAA,sBAAA;AAAA,MACrB,QAAA;AAAA,KAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-435dfc01.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1,14 +0,0 @@
1
- export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './ProvidedApisCard-e92fbd29.esm.js';
2
- import '@backstage/catalog-model';
3
- import '@material-ui/core';
4
- import '@backstage/plugin-catalog-react';
5
- import 'react';
6
- import '@backstage/core-components';
7
- import '@material-ui/icons/Extension';
8
- import '@material-ui/lab';
9
- import './ApiDefinitionWidget-798ee85f.esm.js';
10
- import '@backstage/core-plugin-api';
11
- import '@material-ui/core/styles';
12
- import './ApiTypeTitle-cc79a2f3.esm.js';
13
- import '@material-ui/core/Typography';
14
- //# sourceMappingURL=index-5f0727eb.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-5f0727eb.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-6f21bd2e.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-c969ed3d.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}