@backstage/plugin-api-docs 0.11.1 → 0.11.2

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 (36) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/alpha/package.json +1 -1
  3. package/dist/alpha.esm.js +10 -10
  4. package/dist/esm/{ApiDefinitionCard-04c70017.esm.js → ApiDefinitionCard-B-gBxw4Y.esm.js} +3 -3
  5. package/dist/esm/{ApiDefinitionCard-04c70017.esm.js.map → ApiDefinitionCard-B-gBxw4Y.esm.js.map} +1 -1
  6. package/dist/esm/{ApiDefinitionWidget-90e56cf9.esm.js → ApiDefinitionWidget-B2Z_EBYd.esm.js} +4 -4
  7. package/dist/esm/{ApiDefinitionWidget-90e56cf9.esm.js.map → ApiDefinitionWidget-B2Z_EBYd.esm.js.map} +1 -1
  8. package/dist/esm/{ApiExplorerPage-93d899e2.esm.js → ApiExplorerPage-DN8sGDDe.esm.js} +2 -2
  9. package/dist/esm/{ApiExplorerPage-93d899e2.esm.js.map → ApiExplorerPage-DN8sGDDe.esm.js.map} +1 -1
  10. package/dist/esm/{ApiTypeTitle-af01a0df.esm.js → ApiTypeTitle-Q7DWBnfV.esm.js} +2 -2
  11. package/dist/esm/{ApiTypeTitle-af01a0df.esm.js.map → ApiTypeTitle-Q7DWBnfV.esm.js.map} +1 -1
  12. package/dist/esm/{AsyncApiDefinition-b9802a28.esm.js → AsyncApiDefinition-BS46mwIR.esm.js} +1 -1
  13. package/dist/esm/{AsyncApiDefinition-b9802a28.esm.js.map → AsyncApiDefinition-BS46mwIR.esm.js.map} +1 -1
  14. package/dist/esm/{GraphQlDefinition-49cc2c3b.esm.js → GraphQlDefinition-D3sN0srb.esm.js} +1 -1
  15. package/dist/esm/{GraphQlDefinition-49cc2c3b.esm.js.map → GraphQlDefinition-D3sN0srb.esm.js.map} +1 -1
  16. package/dist/esm/{OpenApiDefinition-20ae2e8c.esm.js → OpenApiDefinition-P9gI3GDo.esm.js} +1 -1
  17. package/dist/esm/{OpenApiDefinition-20ae2e8c.esm.js.map → OpenApiDefinition-P9gI3GDo.esm.js.map} +1 -1
  18. package/dist/esm/{ProvidedApisCard-9d6d6f82.esm.js → ProvidedApisCard-DYM2U8N2.esm.js} +3 -3
  19. package/dist/esm/{ProvidedApisCard-9d6d6f82.esm.js.map → ProvidedApisCard-DYM2U8N2.esm.js.map} +1 -1
  20. package/dist/esm/{ProvidingComponentsCard-4722ca0e.esm.js → ProvidingComponentsCard-DleuYPKR.esm.js} +1 -1
  21. package/dist/esm/{ProvidingComponentsCard-4722ca0e.esm.js.map → ProvidingComponentsCard-DleuYPKR.esm.js.map} +1 -1
  22. package/dist/esm/{index-7ee30e13.esm.js → index-BREvzWXp.esm.js} +4 -4
  23. package/dist/esm/index-BREvzWXp.esm.js.map +1 -0
  24. package/dist/esm/{index-8451fe54.esm.js → index-BnvGScty.esm.js} +4 -4
  25. package/dist/esm/index-BnvGScty.esm.js.map +1 -0
  26. package/dist/esm/{index-2ee1c1df.esm.js → index-CEoQtSjl.esm.js} +2 -2
  27. package/dist/esm/index-CEoQtSjl.esm.js.map +1 -0
  28. package/dist/esm/{index-74538c23.esm.js → index-DDxb-GVK.esm.js} +3 -3
  29. package/dist/esm/index-DDxb-GVK.esm.js.map +1 -0
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.esm.js +15 -15
  32. package/package.json +10 -10
  33. package/dist/esm/index-2ee1c1df.esm.js.map +0 -1
  34. package/dist/esm/index-74538c23.esm.js.map +0 -1
  35. package/dist/esm/index-7ee30e13.esm.js.map +0 -1
  36. package/dist/esm/index-8451fe54.esm.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @backstage/plugin-api-docs
2
2
 
3
+ ## 0.11.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/core-components@0.14.2
9
+ - @backstage/plugin-catalog-react@1.11.1
10
+ - @backstage/plugin-catalog@1.18.1
11
+ - @backstage/frontend-plugin-api@0.6.2
12
+ - @backstage/core-compat-api@0.2.2
13
+ - @backstage/core-plugin-api@1.9.1
14
+ - @backstage/catalog-model@1.4.5
15
+ - @backstage/plugin-catalog-common@1.0.22
16
+ - @backstage/plugin-permission-react@0.4.21
17
+
3
18
  ## 0.11.1
4
19
 
5
20
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
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
@@ -6,7 +6,7 @@ import { createEntityCardExtension, createEntityContentExtension } from '@backst
6
6
  import { RELATION_HAS_PART, parseEntityRef } from '@backstage/catalog-model';
7
7
  import '@backstage/plugin-catalog-react';
8
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';
9
+ import { r as rootRoute, a as apiDocsConfigRef, b as registerComponentRouteRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-B2Z_EBYd.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-74538c23.esm.js').then(
45
+ loader: ({ config }) => import('./esm/index-DDxb-GVK.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-7ee30e13.esm.js').then(
67
+ loader: () => import('./esm/index-BREvzWXp.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-8451fe54.esm.js').then(
74
+ loader: () => import('./esm/index-BnvGScty.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-7ee30e13.esm.js').then(
84
+ loader: () => import('./esm/index-BREvzWXp.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-7ee30e13.esm.js').then(
94
+ loader: () => import('./esm/index-BREvzWXp.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-2ee1c1df.esm.js').then(
104
+ loader: () => import('./esm/index-CEoQtSjl.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-2ee1c1df.esm.js').then(
114
+ loader: () => import('./esm/index-CEoQtSjl.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-8451fe54.esm.js').then(
123
+ loader: async () => import('./esm/index-BnvGScty.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-7ee30e13.esm.js').then(
134
+ loader: async () => import('./esm/index-BREvzWXp.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,8 +1,8 @@
1
1
  import { useEntity } from '@backstage/plugin-catalog-react';
2
2
  import Alert from '@material-ui/lab/Alert';
3
3
  import React from 'react';
4
- import { a as apiDocsConfigRef } from './ApiDefinitionWidget-90e56cf9.esm.js';
5
- import { P as PlainApiDefinitionWidget } from './ApiTypeTitle-af01a0df.esm.js';
4
+ import { a as apiDocsConfigRef } from './ApiDefinitionWidget-B2Z_EBYd.esm.js';
5
+ import { P as PlainApiDefinitionWidget } from './ApiTypeTitle-Q7DWBnfV.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-04c70017.esm.js.map
47
+ //# sourceMappingURL=ApiDefinitionCard-B-gBxw4Y.esm.js.map
@@ -1 +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;;;;"}
1
+ {"version":3,"file":"ApiDefinitionCard-B-gBxw4Y.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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A,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-b9802a28.esm.js').then((m) => ({
19
+ () => import('./AsyncApiDefinition-BS46mwIR.esm.js').then((m) => ({
20
20
  default: m.AsyncApiDefinition
21
21
  }))
22
22
  );
@@ -25,7 +25,7 @@ const AsyncApiDefinitionWidget = (props) => {
25
25
  };
26
26
 
27
27
  const LazyGraphQlDefinition = React.lazy(
28
- () => import('./GraphQlDefinition-49cc2c3b.esm.js').then((m) => ({
28
+ () => import('./GraphQlDefinition-D3sN0srb.esm.js').then((m) => ({
29
29
  default: m.GraphQlDefinition
30
30
  }))
31
31
  );
@@ -34,7 +34,7 @@ const GraphQlDefinitionWidget = (props) => {
34
34
  };
35
35
 
36
36
  const LazyOpenApiDefinition = React.lazy(
37
- () => import('./OpenApiDefinition-20ae2e8c.esm.js').then((m) => ({
37
+ () => import('./OpenApiDefinition-P9gI3GDo.esm.js').then((m) => ({
38
38
  default: m.OpenApiDefinition
39
39
  }))
40
40
  );
@@ -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-90e56cf9.esm.js.map
116
+ //# sourceMappingURL=ApiDefinitionWidget-B2Z_EBYd.esm.js.map
@@ -1 +1 @@
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,C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AwB,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-B2Z_EBYd.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,CAAA,aAAA,CAAC,QAAS,EAAA,EAAA,QAAA,kBAAW,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,IAAS,qBAC3B,KAAA,CAAA,aAAA,CAAA,sBAAA,EAAA,EAAwB,GAAG,KAAA,EAAO,CACrC,CAAA,CAAA;AAEJ;;ACpBA,MAAM,wBAAwB,KAA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AAA,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-90e56cf9.esm.js';
7
+ import { b as registerComponentRouteRef } from './ApiDefinitionWidget-B2Z_EBYd.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-93d899e2.esm.js.map
60
+ //# sourceMappingURL=ApiExplorerPage-DN8sGDDe.esm.js.map
@@ -1 +1 @@
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,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,WACtD,CAAA,aAAA,CAAA,CAAA;AACA,EAAM,MAAA,qBAAA,GAAwB,YAAY,yBAAyB,CAAA,CAAA;AACnE,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,aAAc,CAAA;AAAA,IAChC,UAAY,EAAA,6BAAA;AAAA,GACb,CAAA,CAAA;AAED,EAC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,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-DN8sGDDe.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,WACtD,CAAA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A,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-90e56cf9.esm.js';
4
+ import { a as apiDocsConfigRef } from './ApiDefinitionWidget-B2Z_EBYd.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-af01a0df.esm.js.map
27
+ //# sourceMappingURL=ApiTypeTitle-Q7DWBnfV.esm.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"ApiTypeTitle-Q7DWBnfV.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;;;;"}
@@ -160,4 +160,4 @@ const AsyncApiDefinition = ({ definition }) => {
160
160
  };
161
161
 
162
162
  export { AsyncApiDefinition };
163
- //# sourceMappingURL=AsyncApiDefinition-b9802a28.esm.js.map
163
+ //# sourceMappingURL=AsyncApiDefinition-BS46mwIR.esm.js.map
@@ -1 +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,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,CAAQ,IAAK,CAAA,KAAA;AAAA,KACtC;AAAA,IACA,kBAAoB,EAAA;AAAA,MAClB,eAAA,EAAiB,KAAM,C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,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
+ {"version":3,"file":"AsyncApiDefinition-BS46mwIR.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,GAA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AO,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;;;;"}
@@ -39,4 +39,4 @@ const GraphQlDefinition = ({ definition }) => {
39
39
  };
40
40
 
41
41
  export { GraphQlDefinition };
42
- //# sourceMappingURL=GraphQlDefinition-49cc2c3b.esm.js.map
42
+ //# sourceMappingURL=GraphQlDefinition-D3sN0srb.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQlDefinition-49cc2c3b.esm.js","sources":["../../src/components/GraphQlDefinitionWidget/GraphQlDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n DocExplorer,\n EditorContextProvider,\n ExplorerContextProvider,\n SchemaContextProvider,\n} from '@graphiql/react';\nimport 'graphiql/graphiql.css';\nimport { buildSchema } from 'graphql';\nimport React from 'react';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n graphiQlWrapper: {\n flex: 1,\n '@global': {\n '.graphiql-container': {\n boxSizing: 'initial',\n height: '100%',\n minHeight: '600px',\n flex: '1 1 auto',\n },\n '.graphiql-sidebar': {\n width: '100%',\n },\n },\n },\n});\n\ntype Props = {\n definition: string;\n};\n\nexport const GraphQlDefinition = ({ definition }: Props) => {\n const classes = useStyles();\n const schema = buildSchema(definition);\n\n return (\n <div className={classes.root}>\n <div className={classes.graphiQlWrapper}>\n <EditorContextProvider>\n <SchemaContextProvider\n schema={schema}\n fetcher={() => Promise.resolve(null) as any}\n >\n <div className=\"graphiql-container\">\n <div className=\"graphiql-sidebar\">\n <div className=\"graphiql-sidebar-section\">\n <ExplorerContextProvider>\n <DocExplorer />\n </ExplorerContextProvider>\n </div>\n </div>\n </div>\n </SchemaContextProvider>\n </EditorContextProvider>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AA2BA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,GACZ;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,CAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,qBAAuB,EAAA;AAAA,QACrB,SAAW,EAAA,SAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,SAAW,EAAA,OAAA;AAAA,QACX,IAAM,EAAA,UAAA;AAAA,OACR;AAAA,MACA,mBAAqB,EAAA;AAAA,QACnB,KAAO,EAAA,MAAA;AAAA,OACT;AAAA,KACF;AAAA,GACF;AACF,CAAC,CAAA,CAAA;AAMM,MAAM,iBAAoB,GAAA,CAAC,EAAE,UAAA,EAAwB,KAAA;AAC1D,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAM,MAAA,MAAA,GAAS,YAAY,UAAU,CAAA,CAAA;AAErC,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,OAAQ,CAAA,IAAA,EAAA,kBACrB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,eACtB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,qBACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,qBAAA;AAAA,IAAA;AAAA,MACC,MAAA;AAAA,MACA,OAAS,EAAA,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,KAAA;AAAA,wCAElC,KAAI,EAAA,EAAA,SAAA,EAAU,wCACZ,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,WAAU,kBACb,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAI,SAAU,EAAA,0BAAA,EAAA,sCACZ,uBACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,iBAAY,CACf,CACF,CACF,CACF,CAAA;AAAA,GAEJ,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GraphQlDefinition-D3sN0srb.esm.js","sources":["../../src/components/GraphQlDefinitionWidget/GraphQlDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n DocExplorer,\n EditorContextProvider,\n ExplorerContextProvider,\n SchemaContextProvider,\n} from '@graphiql/react';\nimport 'graphiql/graphiql.css';\nimport { buildSchema } from 'graphql';\nimport React from 'react';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n graphiQlWrapper: {\n flex: 1,\n '@global': {\n '.graphiql-container': {\n boxSizing: 'initial',\n height: '100%',\n minHeight: '600px',\n flex: '1 1 auto',\n },\n '.graphiql-sidebar': {\n width: '100%',\n },\n },\n },\n});\n\ntype Props = {\n definition: string;\n};\n\nexport const GraphQlDefinition = ({ definition }: Props) => {\n const classes = useStyles();\n const schema = buildSchema(definition);\n\n return (\n <div className={classes.root}>\n <div className={classes.graphiQlWrapper}>\n <EditorContextProvider>\n <SchemaContextProvider\n schema={schema}\n fetcher={() => Promise.resolve(null) as any}\n >\n <div className=\"graphiql-container\">\n <div className=\"graphiql-sidebar\">\n <div className=\"graphiql-sidebar-section\">\n <ExplorerContextProvider>\n <DocExplorer />\n </ExplorerContextProvider>\n </div>\n </div>\n </div>\n </SchemaContextProvider>\n </EditorContextProvider>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AA2BA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,GACZ;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,CAAA;AAAA,IACN,SAAW,EAAA;AAAA,MACT,qBAAuB,EAAA;AAAA,QACrB,SAAW,EAAA,SAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,SAAW,EAAA,OAAA;AAAA,QACX,IAAM,EAAA,UAAA;AAAA,OACR;AAAA,MACA,mBAAqB,EAAA;AAAA,QACnB,KAAO,EAAA,MAAA;AAAA,OACT;AAAA,KACF;AAAA,GACF;AACF,CAAC,CAAA,CAAA;AAMM,MAAM,iBAAoB,GAAA,CAAC,EAAE,UAAA,EAAwB,KAAA;AAC1D,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAC1B,EAAM,MAAA,MAAA,GAAS,YAAY,UAAU,CAAA,CAAA;AAErC,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,OAAQ,CAAA,IAAA,EAAA,kBACrB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,eACtB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,qBACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,qBAAA;AAAA,IAAA;AAAA,MACC,MAAA;AAAA,MACA,OAAS,EAAA,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,KAAA;AAAA,wCAElC,KAAI,EAAA,EAAA,SAAA,EAAU,wCACZ,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,WAAU,kBACb,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAI,SAAU,EAAA,0BAAA,EAAA,sCACZ,uBACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,iBAAY,CACf,CACF,CACF,CACF,CAAA;AAAA,GAEJ,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
@@ -139,4 +139,4 @@ const OpenApiDefinition = ({
139
139
  };
140
140
 
141
141
  export { OpenApiDefinition };
142
- //# sourceMappingURL=OpenApiDefinition-20ae2e8c.esm.js.map
142
+ //# sourceMappingURL=OpenApiDefinition-P9gI3GDo.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiDefinition-20ae2e8c.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI, { SwaggerUIProps } from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n ['& .btn-clear']: {\n color: theme.palette.text.primary,\n },\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-description-wrapper,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header,\n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model,\n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model,\n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.secondary,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method,\n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n} & Omit<SwaggerUIProps, 'spec'>;\n\nexport const OpenApiDefinition = ({\n definition,\n ...swaggerUiProps\n}: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI\n spec={def}\n url=\"\"\n deepLinking\n oauth2RedirectUrl={`${window.location.protocol}//${window.location.host}/oauth2-redirect.html`}\n {...swaggerUiProps}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAAA,EACrC,IAAM,EAAA;AAAA,IACJ,eAAiB,EAAA;AAAA,MACf,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,MAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,MAE1B,CAAC,cAAc,GAAG;AAAA,QAChB,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,OAC5B;AAAA,MACA,CAAC,qBAAqB,GAAG;AAAA,QACvB,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,UAAW,C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,OAAA;AAAA,OAC5B;AAAA,MACA,CAAC,kBAAkB,GAAG;AAAA,QACpB,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,OAAQ,CAAA,KAAA;AAAA,OAC/B;AAAA,KACF;AAAA,GACF;AACF,CAAE,CAAA,CAAA,CAAA;AAMK,MAAM,oBAAoB,CAAC;AAAA,EAChC,UAAA;AAAA,EACA,GAAG,cAAA;AACL,CAA8B,KAAA;AAC5B,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAI1B,EAAA,MAAM,CAAC,GAAA,EAAK,MAAM,CAAA,GAAI,SAAS,EAAE,CAAA,CAAA;AAEjC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,QAAQ,UAAW,CAAA,MAAM,MAAO,CAAA,UAAU,GAAG,CAAC,CAAA,CAAA;AACpD,IAAO,OAAA,MAAM,aAAa,KAAK,CAAA,CAAA;AAAA,GAC9B,EAAA,CAAC,UAAY,EAAA,MAAM,CAAC,CAAA,CAAA;AAEvB,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,IACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,IAAM,EAAA,GAAA;AAAA,MACN,GAAI,EAAA,EAAA;AAAA,MACJ,WAAW,EAAA,IAAA;AAAA,MACX,iBAAA,EAAmB,GAAG,MAAO,CAAA,QAAA,CAAS,QAAQ,CAAK,EAAA,EAAA,MAAA,CAAO,SAAS,IAAI,CAAA,qBAAA,CAAA;AAAA,MACtE,GAAG,cAAA;AAAA,KAAA;AAAA,GAER,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"OpenApiDefinition-P9gI3GDo.esm.js","sources":["../../src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI, { SwaggerUIProps } from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui': {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n\n ['& .btn-clear']: {\n color: theme.palette.text.primary,\n },\n [`& .scheme-container`]: {\n backgroundColor: theme.palette.background.default,\n },\n [`& .opblock-tag,\n .opblock-tag small,\n table thead tr td,\n table thead tr th`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n borderColor: theme.palette.divider,\n },\n [`& section.models,\n section.models.is-open h4`]: {\n borderColor: theme.palette.divider,\n },\n [`& .model-title,\n .model .renderedMarkdown,\n .model .description`]: {\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& h1, h2, h3, h4, h5, h6,\n .errors h4, .error h4, .opblock h4, section.models h4,\n .response-control-media-type__accept-message,\n .opblock-summary-description,\n .opblock-summary-operation-id,\n .opblock-summary-path,\n .opblock-summary-path__deprecated,\n .opblock-description-wrapper,\n .opblock-external-docs-wrapper,\n .opblock-section-header .btn,\n .opblock-section-header>label,\n .scheme-container .schemes>label,a.nostyle,\n .parameter__name,\n .response-col_status,\n .response-col_links,\n .error .btn,\n .info .title,\n .info .base-url`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n [`& .opblock .opblock-section-header,\n .model-box,\n section.models .model-container`]: {\n background: theme.palette.background.default,\n },\n [`& .prop-format,\n .parameter__in`]: {\n color: theme.palette.text.disabled,\n },\n [`& table.model,\n .parameter__type,\n .model.model-title,\n .model-title,\n .model span,\n .model .brace-open,\n .model .brace-close,\n .model .property.primitive,\n .model .renderedMarkdown,\n .model .description,\n .errors small`]: {\n color: theme.palette.text.secondary,\n },\n [`& .parameter__name.required:after`]: {\n color: theme.palette.warning.dark,\n },\n [`& table.model,\n table.model .model,\n .opblock-external-docs-wrapper`]: {\n fontSize: theme.typography.fontSize,\n },\n [`& table.headers td`]: {\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightRegular,\n },\n [`& .model-hint`]: {\n color: theme.palette.text.secondary,\n backgroundColor: theme.palette.background.paper,\n },\n [`& .opblock-summary-method,\n .info a`]: {\n fontFamily: theme.typography.fontFamily,\n },\n [`& .info, .opblock, .tab`]: {\n [`& li, p`]: {\n fontFamily: theme.typography.fontFamily,\n color: theme.palette.text.primary,\n },\n },\n [`& a`]: {\n color: theme.palette.primary.main,\n },\n [`& .renderedMarkdown code`]: {\n color: theme.palette.secondary.light,\n },\n [`& .property-row td:first-child`]: {\n color: theme.palette.text.primary,\n },\n [`& span.prop-type`]: {\n color: theme.palette.success.light,\n },\n },\n },\n}));\n\nexport type OpenApiDefinitionProps = {\n definition: string;\n} & Omit<SwaggerUIProps, 'spec'>;\n\nexport const OpenApiDefinition = ({\n definition,\n ...swaggerUiProps\n}: OpenApiDefinitionProps) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI\n spec={def}\n url=\"\"\n deepLinking\n oauth2RedirectUrl={`${window.location.protocol}//${window.location.host}/oauth2-redirect.html`}\n {...swaggerUiProps}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,SAAA,GAAY,WAAW,CAAU,KAAA,MAAA;AAA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iBAAA,EAAmB,GAAG,MAAO,CAAA,QAAA,CAAS,QAAQ,CAAK,EAAA,EAAA,MAAA,CAAO,SAAS,IAAI,CAAA,qBAAA,CAAA;AAAA,MACtE,GAAG,cAAA;AAAA,KAAA;AAAA,GAER,CAAA,CAAA;AAEJ;;;;"}
@@ -6,10 +6,10 @@ import { InfoCard, Progress, WarningPanel, CodeSnippet, Link } from '@backstage/
6
6
  import ExtensionIcon from '@material-ui/icons/Extension';
7
7
  import ToggleButton from '@material-ui/lab/ToggleButton';
8
8
  import '@material-ui/lab/Alert';
9
- import { a as apiDocsConfigRef } from './ApiDefinitionWidget-90e56cf9.esm.js';
9
+ import { a as apiDocsConfigRef } from './ApiDefinitionWidget-B2Z_EBYd.esm.js';
10
10
  import { useApi } from '@backstage/core-plugin-api';
11
11
  import { makeStyles } from '@material-ui/core/styles';
12
- import { P as PlainApiDefinitionWidget, A as ApiTypeTitle } from './ApiTypeTitle-af01a0df.esm.js';
12
+ import { P as PlainApiDefinitionWidget, A as ApiTypeTitle } from './ApiTypeTitle-Q7DWBnfV.esm.js';
13
13
  import Box from '@material-ui/core/Box';
14
14
  import Button from '@material-ui/core/Button';
15
15
  import Dialog from '@material-ui/core/Dialog';
@@ -262,4 +262,4 @@ const ProvidedApisCard = (props) => {
262
262
  };
263
263
 
264
264
  export { ApiDefinitionDialog as A, ConsumedApisCard as C, HasApisCard as H, ProvidedApisCard as P };
265
- //# sourceMappingURL=ProvidedApisCard-9d6d6f82.esm.js.map
265
+ //# sourceMappingURL=ProvidedApisCard-DYM2U8N2.esm.js.map
@@ -1 +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,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,I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AAA,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
+ {"version":3,"file":"ProvidedApisCard-DYM2U8N2.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;AA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sCard as P };
70
- //# sourceMappingURL=ProvidingComponentsCard-4722ca0e.esm.js.map
70
+ //# sourceMappingURL=ProvidingComponentsCard-DleuYPKR.esm.js.map
@@ -1 +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={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;AAAA,MACA,YAAA,kBACG,KAAA,CAAA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AAK,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
+ {"version":3,"file":"ProvidingComponentsCard-DleuYPKR.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={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;AAE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;;;;"}
@@ -1,4 +1,4 @@
1
- export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './ProvidedApisCard-9d6d6f82.esm.js';
1
+ export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './ProvidedApisCard-DYM2U8N2.esm.js';
2
2
  import '@backstage/catalog-model';
3
3
  import '@material-ui/core/Typography';
4
4
  import '@backstage/plugin-catalog-react';
@@ -7,10 +7,10 @@ import '@backstage/core-components';
7
7
  import '@material-ui/icons/Extension';
8
8
  import '@material-ui/lab/ToggleButton';
9
9
  import '@material-ui/lab/Alert';
10
- import './ApiDefinitionWidget-90e56cf9.esm.js';
10
+ import './ApiDefinitionWidget-B2Z_EBYd.esm.js';
11
11
  import '@backstage/core-plugin-api';
12
12
  import '@material-ui/core/styles';
13
- import './ApiTypeTitle-af01a0df.esm.js';
13
+ import './ApiTypeTitle-Q7DWBnfV.esm.js';
14
14
  import '@material-ui/core/Box';
15
15
  import '@material-ui/core/Button';
16
16
  import '@material-ui/core/Dialog';
@@ -19,4 +19,4 @@ import '@material-ui/core/DialogContent';
19
19
  import '@material-ui/core/DialogTitle';
20
20
  import '@material-ui/core/Tab';
21
21
  import '@material-ui/core/Tabs';
22
- //# sourceMappingURL=index-7ee30e13.esm.js.map
22
+ //# sourceMappingURL=index-BREvzWXp.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BREvzWXp.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
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';
1
+ export { A as ApiDefinitionCard } from './ApiDefinitionCard-B-gBxw4Y.esm.js';
2
+ export { d as defaultDefinitionWidgets } from './ApiDefinitionWidget-B2Z_EBYd.esm.js';
3
+ export { A as ApiTypeTitle } from './ApiTypeTitle-Q7DWBnfV.esm.js';
4
4
  import '@backstage/plugin-catalog-react';
5
5
  import '@material-ui/lab/Alert';
6
6
  import 'react';
@@ -8,4 +8,4 @@ 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-8451fe54.esm.js.map
11
+ //# sourceMappingURL=index-BnvGScty.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BnvGScty.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1,7 +1,7 @@
1
- export { C as ConsumingComponentsCard, P as ProvidingComponentsCard } from './ProvidingComponentsCard-4722ca0e.esm.js';
1
+ export { C as ConsumingComponentsCard, P as ProvidingComponentsCard } from './ProvidingComponentsCard-DleuYPKR.esm.js';
2
2
  import '@backstage/catalog-model';
3
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-2ee1c1df.esm.js.map
7
+ //# sourceMappingURL=index-CEoQtSjl.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-CEoQtSjl.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,12 +1,12 @@
1
- export { A as ApiExplorerIndexPage, D as DefaultApiExplorerPage } from './ApiExplorerPage-93d899e2.esm.js';
1
+ export { A as ApiExplorerIndexPage, D as DefaultApiExplorerPage } from './ApiExplorerPage-DN8sGDDe.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-90e56cf9.esm.js';
8
+ import './ApiDefinitionWidget-B2Z_EBYd.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-74538c23.esm.js.map
12
+ //# sourceMappingURL=index-DDxb-GVK.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-DDxb-GVK.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -175,4 +175,4 @@ declare const EntityHasApisCard: (props: {
175
175
  columns?: _backstage_core_components.TableColumn<ApiEntity>[] | undefined;
176
176
  }) => React.JSX.Element;
177
177
 
178
- export { ApiDefinitionCard, ApiDefinitionDialog, ApiDefinitionWidget, ApiDocsConfig, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, AsyncApiDefinitionWidgetProps, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, DefaultApiExplorerPageProps, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, GraphQlDefinitionWidget, GraphQlDefinitionWidgetProps, HasApisCard, OpenApiDefinitionWidget, OpenApiDefinitionWidgetProps, PlainApiDefinitionWidget, PlainApiDefinitionWidgetProps, ProvidedApisCard, ProvidingComponentsCard, TrpcApiDefinitionWidget, TrpcApiDefinitionWidgetProps, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
178
+ export { ApiDefinitionCard, ApiDefinitionDialog, type ApiDefinitionWidget, type ApiDocsConfig, ApiExplorerPage$1 as ApiExplorerIndexPage, ApiExplorerPage, ApiTypeTitle, AsyncApiDefinitionWidget, type AsyncApiDefinitionWidgetProps, ConsumedApisCard, ConsumingComponentsCard, DefaultApiExplorerPage, type DefaultApiExplorerPageProps, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, GraphQlDefinitionWidget, type GraphQlDefinitionWidgetProps, HasApisCard, OpenApiDefinitionWidget, type OpenApiDefinitionWidgetProps, PlainApiDefinitionWidget, type PlainApiDefinitionWidgetProps, ProvidedApisCard, ProvidingComponentsCard, TrpcApiDefinitionWidget, type TrpcApiDefinitionWidgetProps, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
package/dist/index.esm.js CHANGED
@@ -1,10 +1,10 @@
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';
1
+ export { A as ApiExplorerIndexPage, D as DefaultApiExplorerPage } from './esm/ApiExplorerPage-DN8sGDDe.esm.js';
2
+ export { A as ApiDefinitionCard } from './esm/ApiDefinitionCard-B-gBxw4Y.esm.js';
3
+ import { r as rootRoute, a as apiDocsConfigRef, b as registerComponentRouteRef, d as defaultDefinitionWidgets } from './esm/ApiDefinitionWidget-B2Z_EBYd.esm.js';
4
+ export { A as AsyncApiDefinitionWidget, G as GraphQlDefinitionWidget, O as OpenApiDefinitionWidget, T as TrpcApiDefinitionWidget } from './esm/ApiDefinitionWidget-B2Z_EBYd.esm.js';
5
+ export { A as ApiTypeTitle, P as PlainApiDefinitionWidget } from './esm/ApiTypeTitle-Q7DWBnfV.esm.js';
6
+ export { A as ApiDefinitionDialog, C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './esm/ProvidedApisCard-DYM2U8N2.esm.js';
7
+ export { C as ConsumingComponentsCard, P as ProvidingComponentsCard } from './esm/ProvidingComponentsCard-DleuYPKR.esm.js';
8
8
  import '@backstage/plugin-catalog-react';
9
9
  import '@material-ui/lab/Alert';
10
10
  import 'react';
@@ -54,7 +54,7 @@ const apiDocsPlugin = createPlugin({
54
54
  const ApiExplorerPage = apiDocsPlugin.provide(
55
55
  createRoutableExtension({
56
56
  name: "ApiExplorerPage",
57
- component: () => import('./esm/index-74538c23.esm.js').then((m) => m.ApiExplorerIndexPage),
57
+ component: () => import('./esm/index-DDxb-GVK.esm.js').then((m) => m.ApiExplorerIndexPage),
58
58
  mountPoint: rootRoute
59
59
  })
60
60
  );
@@ -62,7 +62,7 @@ const EntityApiDefinitionCard = apiDocsPlugin.provide(
62
62
  createComponentExtension({
63
63
  name: "EntityApiDefinitionCard",
64
64
  component: {
65
- lazy: () => import('./esm/index-8451fe54.esm.js').then((m) => m.ApiDefinitionCard)
65
+ lazy: () => import('./esm/index-BnvGScty.esm.js').then((m) => m.ApiDefinitionCard)
66
66
  }
67
67
  })
68
68
  );
@@ -70,7 +70,7 @@ const EntityConsumedApisCard = apiDocsPlugin.provide(
70
70
  createComponentExtension({
71
71
  name: "EntityConsumedApisCard",
72
72
  component: {
73
- lazy: () => import('./esm/index-7ee30e13.esm.js').then((m) => m.ConsumedApisCard)
73
+ lazy: () => import('./esm/index-BREvzWXp.esm.js').then((m) => m.ConsumedApisCard)
74
74
  }
75
75
  })
76
76
  );
@@ -78,7 +78,7 @@ const EntityConsumingComponentsCard = apiDocsPlugin.provide(
78
78
  createComponentExtension({
79
79
  name: "EntityConsumingComponentsCard",
80
80
  component: {
81
- lazy: () => import('./esm/index-2ee1c1df.esm.js').then(
81
+ lazy: () => import('./esm/index-CEoQtSjl.esm.js').then(
82
82
  (m) => m.ConsumingComponentsCard
83
83
  )
84
84
  }
@@ -88,7 +88,7 @@ const EntityProvidedApisCard = apiDocsPlugin.provide(
88
88
  createComponentExtension({
89
89
  name: "EntityProvidedApisCard",
90
90
  component: {
91
- lazy: () => import('./esm/index-7ee30e13.esm.js').then((m) => m.ProvidedApisCard)
91
+ lazy: () => import('./esm/index-BREvzWXp.esm.js').then((m) => m.ProvidedApisCard)
92
92
  }
93
93
  })
94
94
  );
@@ -96,7 +96,7 @@ const EntityProvidingComponentsCard = apiDocsPlugin.provide(
96
96
  createComponentExtension({
97
97
  name: "EntityProvidingComponentsCard",
98
98
  component: {
99
- lazy: () => import('./esm/index-2ee1c1df.esm.js').then(
99
+ lazy: () => import('./esm/index-CEoQtSjl.esm.js').then(
100
100
  (m) => m.ProvidingComponentsCard
101
101
  )
102
102
  }
@@ -106,10 +106,10 @@ const EntityHasApisCard = apiDocsPlugin.provide(
106
106
  createComponentExtension({
107
107
  name: "EntityHasApisCard",
108
108
  component: {
109
- lazy: () => import('./esm/index-7ee30e13.esm.js').then((m) => m.HasApisCard)
109
+ lazy: () => import('./esm/index-BREvzWXp.esm.js').then((m) => m.HasApisCard)
110
110
  }
111
111
  })
112
112
  );
113
113
 
114
- export { ApiExplorerPage, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, apiDocsPlugin, apiDocsPlugin as plugin };
114
+ export { ApiExplorerPage, EntityApiDefinitionCard, EntityConsumedApisCard, EntityConsumingComponentsCard, EntityHasApisCard, EntityProvidedApisCard, EntityProvidingComponentsCard, apiDocsConfigRef, apiDocsPlugin, defaultDefinitionWidgets, apiDocsPlugin as plugin };
115
115
  //# sourceMappingURL=index.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "A Backstage plugin that helps represent API entities in the frontend",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin"
@@ -50,13 +50,13 @@
50
50
  "dependencies": {
51
51
  "@asyncapi/react-component": "1.3.1",
52
52
  "@backstage/catalog-model": "^1.4.5",
53
- "@backstage/core-compat-api": "^0.2.1",
54
- "@backstage/core-components": "^0.14.1",
53
+ "@backstage/core-compat-api": "^0.2.2",
54
+ "@backstage/core-components": "^0.14.2",
55
55
  "@backstage/core-plugin-api": "^1.9.1",
56
- "@backstage/frontend-plugin-api": "^0.6.1",
57
- "@backstage/plugin-catalog": "^1.18.0",
56
+ "@backstage/frontend-plugin-api": "^0.6.2",
57
+ "@backstage/plugin-catalog": "^1.18.1",
58
58
  "@backstage/plugin-catalog-common": "^1.0.22",
59
- "@backstage/plugin-catalog-react": "^1.11.0",
59
+ "@backstage/plugin-catalog-react": "^1.11.1",
60
60
  "@backstage/plugin-permission-react": "^0.4.21",
61
61
  "@graphiql/react": "^0.20.0",
62
62
  "@material-ui/core": "^4.12.2",
@@ -71,10 +71,10 @@
71
71
  "swagger-ui-react": "^5.0.0"
72
72
  },
73
73
  "devDependencies": {
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",
74
+ "@backstage/cli": "^0.26.1",
75
+ "@backstage/core-app-api": "^1.12.2",
76
+ "@backstage/dev-utils": "^1.0.29",
77
+ "@backstage/test-utils": "^1.5.2",
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":"index-2ee1c1df.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-74538c23.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-7ee30e13.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-8451fe54.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}