@backstage/plugin-api-docs 0.12.6-next.0 → 0.12.6-next.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 (49) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/alpha.d.ts +10 -10
  3. package/dist/alpha.esm.js +14 -11
  4. package/dist/alpha.esm.js.map +1 -1
  5. package/dist/components/ApiDefinitionCard/ApiDefinitionCard.esm.js +15 -12
  6. package/dist/components/ApiDefinitionCard/ApiDefinitionCard.esm.js.map +1 -1
  7. package/dist/components/ApiDefinitionCard/ApiDefinitionWidget.esm.js +6 -6
  8. package/dist/components/ApiDefinitionCard/ApiDefinitionWidget.esm.js.map +1 -1
  9. package/dist/components/ApiDefinitionCard/ApiTypeTitle.esm.js +2 -2
  10. package/dist/components/ApiDefinitionCard/ApiTypeTitle.esm.js.map +1 -1
  11. package/dist/components/ApiDefinitionDialog/ApiDefinitionDialog.esm.js +45 -30
  12. package/dist/components/ApiDefinitionDialog/ApiDefinitionDialog.esm.js.map +1 -1
  13. package/dist/components/ApiExplorerPage/ApiExplorerPage.esm.js +2 -2
  14. package/dist/components/ApiExplorerPage/ApiExplorerPage.esm.js.map +1 -1
  15. package/dist/components/ApiExplorerPage/DefaultApiExplorerPage.esm.js +33 -17
  16. package/dist/components/ApiExplorerPage/DefaultApiExplorerPage.esm.js.map +1 -1
  17. package/dist/components/ApisCards/ConsumedApisCard.esm.js +21 -14
  18. package/dist/components/ApisCards/ConsumedApisCard.esm.js.map +1 -1
  19. package/dist/components/ApisCards/HasApisCard.esm.js +14 -7
  20. package/dist/components/ApisCards/HasApisCard.esm.js.map +1 -1
  21. package/dist/components/ApisCards/ProvidedApisCard.esm.js +21 -14
  22. package/dist/components/ApisCards/ProvidedApisCard.esm.js.map +1 -1
  23. package/dist/components/ApisCards/presets.esm.js +23 -19
  24. package/dist/components/ApisCards/presets.esm.js.map +1 -1
  25. package/dist/components/AsyncApiDefinitionWidget/AsyncApiDefinition.esm.js +2 -2
  26. package/dist/components/AsyncApiDefinitionWidget/AsyncApiDefinition.esm.js.map +1 -1
  27. package/dist/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.esm.js +4 -3
  28. package/dist/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.esm.js.map +1 -1
  29. package/dist/components/ComponentsCards/ConsumingComponentsCard.esm.js +10 -7
  30. package/dist/components/ComponentsCards/ConsumingComponentsCard.esm.js.map +1 -1
  31. package/dist/components/ComponentsCards/ProvidingComponentsCard.esm.js +10 -7
  32. package/dist/components/ComponentsCards/ProvidingComponentsCard.esm.js.map +1 -1
  33. package/dist/components/GraphQlDefinitionWidget/GraphQlDefinition.esm.js +6 -6
  34. package/dist/components/GraphQlDefinitionWidget/GraphQlDefinition.esm.js.map +1 -1
  35. package/dist/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.esm.js +4 -3
  36. package/dist/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.esm.js.map +1 -1
  37. package/dist/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.esm.js +2 -2
  38. package/dist/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.esm.js.map +1 -1
  39. package/dist/components/OpenApiDefinitionWidget/OpenApiDefinition.esm.js +4 -3
  40. package/dist/components/OpenApiDefinitionWidget/OpenApiDefinition.esm.js.map +1 -1
  41. package/dist/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.esm.js +5 -4
  42. package/dist/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.esm.js.map +1 -1
  43. package/dist/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.esm.js +2 -2
  44. package/dist/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.esm.js.map +1 -1
  45. package/dist/components/TrpcDefinitionWidget/TrpcApiDefinitionWidget.esm.js +2 -2
  46. package/dist/components/TrpcDefinitionWidget/TrpcApiDefinitionWidget.esm.js.map +1 -1
  47. package/dist/index.d.ts +25 -25
  48. package/dist/plugin.esm.js +1 -1
  49. package/package.json +15 -15
@@ -1,13 +1,14 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { Progress } from '@backstage/core-components';
2
- import React, { Suspense } from 'react';
3
+ import { lazy, Suspense } from 'react';
3
4
 
4
- const LazyAsyncApiDefinition = React.lazy(
5
+ const LazyAsyncApiDefinition = lazy(
5
6
  () => import('./AsyncApiDefinition.esm.js').then((m) => ({
6
7
  default: m.AsyncApiDefinition
7
8
  }))
8
9
  );
9
10
  const AsyncApiDefinitionWidget = (props) => {
10
- return /* @__PURE__ */ React.createElement(Suspense, { fallback: /* @__PURE__ */ React.createElement(Progress, null) }, /* @__PURE__ */ React.createElement(LazyAsyncApiDefinition, { ...props }));
11
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Progress, {}), children: /* @__PURE__ */ jsx(LazyAsyncApiDefinition, { ...props }) });
11
12
  };
12
13
 
13
14
  export { AsyncApiDefinitionWidget };
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncApiDefinitionWidget.esm.js","sources":["../../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.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 { Progress } from '@backstage/core-components';\nimport React, { Suspense } from 'react';\nimport { AsyncApiResolver } from './AsyncApiDefinition';\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 resolvers?: AsyncApiResolver[];\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"],"names":[],"mappings":";;;AAsBA,MAAM,yBAAyB,KAAM,CAAA,IAAA;AAAA,EAAK,MACxC,OAAO,6BAAsB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,IACxC,SAAS,CAAE,CAAA;AAAA,GACX,CAAA;AACJ,CAAA;AASa,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;AAEJ;;;;"}
1
+ {"version":3,"file":"AsyncApiDefinitionWidget.esm.js","sources":["../../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.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 { Progress } from '@backstage/core-components';\nimport { lazy, Suspense } from 'react';\nimport { AsyncApiResolver } from './AsyncApiDefinition';\n\n// The asyncapi component and related CSS has a significant size, only load it\n// if the element is actually used.\nconst LazyAsyncApiDefinition = lazy(() =>\n import('./AsyncApiDefinition').then(m => ({\n default: m.AsyncApiDefinition,\n })),\n);\n\n/** @public */\nexport type AsyncApiDefinitionWidgetProps = {\n definition: string;\n resolvers?: AsyncApiResolver[];\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"],"names":[],"mappings":";;;;AAsBA,MAAM,sBAAyB,GAAA,IAAA;AAAA,EAAK,MAClC,OAAO,6BAAsB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,IACxC,SAAS,CAAE,CAAA;AAAA,GACX,CAAA;AACJ,CAAA;AASa,MAAA,wBAAA,GAA2B,CACtC,KACG,KAAA;AACH,EACE,uBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,QAAA,kBAAW,GAAA,CAAA,QAAA,EAAA,EAAS,GAC5B,QAAC,kBAAA,GAAA,CAAA,sBAAA,EAAA,EAAwB,GAAG,KAAA,EAAO,CACrC,EAAA,CAAA;AAEJ;;;;"}
@@ -1,7 +1,7 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import { RELATION_API_CONSUMED_BY } from '@backstage/catalog-model';
2
3
  import Typography from '@material-ui/core/Typography';
3
4
  import { EntityTable, useEntity, useRelatedEntities } from '@backstage/plugin-catalog-react';
4
- import React from 'react';
5
5
  import { InfoCard, Progress, WarningPanel, CodeSnippet, Link } from '@backstage/core-components';
6
6
 
7
7
  const ConsumingComponentsCard = (props) => {
@@ -11,24 +11,27 @@ const ConsumingComponentsCard = (props) => {
11
11
  type: RELATION_API_CONSUMED_BY
12
12
  });
13
13
  if (loading) {
14
- return /* @__PURE__ */ React.createElement(InfoCard, { variant, title: "Consumers" }, /* @__PURE__ */ React.createElement(Progress, null));
14
+ return /* @__PURE__ */ jsx(InfoCard, { variant, title: "Consumers", children: /* @__PURE__ */ jsx(Progress, {}) });
15
15
  }
16
16
  if (error || !entities) {
17
- return /* @__PURE__ */ React.createElement(InfoCard, { variant, title: "Consumers" }, /* @__PURE__ */ React.createElement(
17
+ return /* @__PURE__ */ jsx(InfoCard, { variant, title: "Consumers", children: /* @__PURE__ */ jsx(
18
18
  WarningPanel,
19
19
  {
20
20
  severity: "error",
21
21
  title: "Could not load components",
22
- message: /* @__PURE__ */ React.createElement(CodeSnippet, { text: `${error}`, language: "text" })
22
+ message: /* @__PURE__ */ jsx(CodeSnippet, { text: `${error}`, language: "text" })
23
23
  }
24
- ));
24
+ ) });
25
25
  }
26
- return /* @__PURE__ */ React.createElement(
26
+ return /* @__PURE__ */ jsx(
27
27
  EntityTable,
28
28
  {
29
29
  title: "Consumers",
30
30
  variant,
31
- emptyContent: /* @__PURE__ */ React.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "No component consumes this API."), /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, /* @__PURE__ */ React.createElement(Link, { to: "https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional" }, "Learn how to change this."))),
31
+ emptyContent: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
32
+ /* @__PURE__ */ jsx(Typography, { variant: "body1", children: "No component consumes this API." }),
33
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { to: "https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional", children: "Learn how to change this." }) })
34
+ ] }),
32
35
  columns,
33
36
  entities
34
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConsumingComponentsCard.esm.js","sources":["../../../src/components/ComponentsCards/ConsumingComponentsCard.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 TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\n/**\n * @public\n */\nexport const ConsumingComponentsCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ComponentEntity>[];\n}) => {\n const { variant = 'gridItem', columns = EntityTable.componentEntityColumns } =\n 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={columns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAwCa,MAAA,uBAAA,GAA0B,CAAC,KAGlC,KAAA;AACJ,EAAA,MAAM,EAAE,OAAU,GAAA,UAAA,EAAY,OAAU,GAAA,WAAA,CAAY,wBAClD,GAAA,KAAA;AACF,EAAM,MAAA,EAAE,M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ACF;AAEJ;;;;"}
1
+ {"version":3,"file":"ConsumingComponentsCard.esm.js","sources":["../../../src/components/ComponentsCards/ConsumingComponentsCard.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 {\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 ConsumingComponentsCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ComponentEntity>[];\n}) => {\n const { variant = 'gridItem', columns = EntityTable.componentEntityColumns } =\n 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={columns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAuCa,MAAA,uBAAA,GAA0B,CAAC,KAGlC,KAAA;AACJ,EAAA,MAAM,EAAE,OAAU,GAAA,UAAA,EAAY,OAAU,GAAA,WAAA,CAAY,wBAClD,GAAA,KAAA;AACF,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAA,MAAM,EAAE,QAAU,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,mBAAmB,MAAQ,EAAA;AAAA,IAC9D,IAAM,EAAA;AAAA,GACP,CAAA;AAED,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2BACG,QAAS,EAAA,EAAA,OAAA,EAAkB,OAAM,WAChC,EAAA,QAAA,kBAAA,GAAA,CAAC,YAAS,CACZ,EAAA,CAAA;AAAA;AAIJ,EAAI,IAAA,KAAA,IAAS,CAAC,QAAU,EAAA;AACtB,IAAA,uBACG,GAAA,CAAA,QAAA,EAAA,EAAS,OAAkB,EAAA,KAAA,EAAM,WAChC,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAS,EAAA,OAAA;AAAA,QACT,KAAM,EAAA,2BAAA;AAAA,QACN,OAAA,sBAAU,WAAY,EAAA,EAAA,IAAA,EAAM,GAAG,KAAK,CAAA,CAAA,EAAI,UAAS,MAAO,EAAA;AAAA;AAAA,KAE5D,EAAA,CAAA;AAAA;AAIJ,EACE,uBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,WAAA;AAAA,MACN,OAAA;AAAA,MACA,8BACG,IAAA,CAAA,KAAA,EAAA,EAAI,OAAO,EAAE,SAAA,EAAW,UACvB,EAAA,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAQ,QAE5B,EAAA,iCAAA,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,cAAW,OAAQ,EAAA,OAAA,EAClB,8BAAC,IAAK,EAAA,EAAA,EAAA,EAAG,iGAAkG,EAAA,QAAA,EAAA,2BAAA,EAE3G,CACF,EAAA;AAAA,OACF,EAAA,CAAA;AAAA,MAEF,OAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1,7 +1,7 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import { RELATION_API_PROVIDED_BY } from '@backstage/catalog-model';
2
3
  import Typography from '@material-ui/core/Typography';
3
4
  import { EntityTable, useEntity, useRelatedEntities } from '@backstage/plugin-catalog-react';
4
- import React from 'react';
5
5
  import { InfoCard, Progress, WarningPanel, CodeSnippet, Link } from '@backstage/core-components';
6
6
 
7
7
  const ProvidingComponentsCard = (props) => {
@@ -11,24 +11,27 @@ const ProvidingComponentsCard = (props) => {
11
11
  type: RELATION_API_PROVIDED_BY
12
12
  });
13
13
  if (loading) {
14
- return /* @__PURE__ */ React.createElement(InfoCard, { variant, title: "Providers" }, /* @__PURE__ */ React.createElement(Progress, null));
14
+ return /* @__PURE__ */ jsx(InfoCard, { variant, title: "Providers", children: /* @__PURE__ */ jsx(Progress, {}) });
15
15
  }
16
16
  if (error || !entities) {
17
- return /* @__PURE__ */ React.createElement(InfoCard, { variant, title: "Providers" }, /* @__PURE__ */ React.createElement(
17
+ return /* @__PURE__ */ jsx(InfoCard, { variant, title: "Providers", children: /* @__PURE__ */ jsx(
18
18
  WarningPanel,
19
19
  {
20
20
  severity: "error",
21
21
  title: "Could not load components",
22
- message: /* @__PURE__ */ React.createElement(CodeSnippet, { text: `${error}`, language: "text" })
22
+ message: /* @__PURE__ */ jsx(CodeSnippet, { text: `${error}`, language: "text" })
23
23
  }
24
- ));
24
+ ) });
25
25
  }
26
- return /* @__PURE__ */ React.createElement(
26
+ return /* @__PURE__ */ jsx(
27
27
  EntityTable,
28
28
  {
29
29
  title: "Providers",
30
30
  variant,
31
- emptyContent: /* @__PURE__ */ React.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "No component provides this API."), /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, /* @__PURE__ */ React.createElement(Link, { to: "https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional" }, "Learn how to change this."))),
31
+ emptyContent: /* @__PURE__ */ jsxs("div", { style: { textAlign: "center" }, children: [
32
+ /* @__PURE__ */ jsx(Typography, { variant: "body1", children: "No component provides this API." }),
33
+ /* @__PURE__ */ jsx(Typography, { variant: "body2", children: /* @__PURE__ */ jsx(Link, { to: "https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional", children: "Learn how to change this." }) })
34
+ ] }),
32
35
  columns,
33
36
  entities
34
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ProvidingComponentsCard.esm.js","sources":["../../../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_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 TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\n/** @public */\nexport const ProvidingComponentsCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ComponentEntity>[];\n}) => {\n const { variant = 'gridItem', columns = EntityTable.componentEntityColumns } =\n 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={columns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAsCa,MAAA,uBAAA,GAA0B,CAAC,KAGlC,KAAA;AACJ,EAAA,MAAM,EAAE,OAAU,GAAA,UAAA,EAAY,OAAU,GAAA,WAAA,CAAY,wBAClD,GAAA,KAAA;AACF,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAA,MAAM,EAAE,QAAU,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,mBAAmB,MAAQ,EAAA;AAAA,IAC9D,IAAM,EAAA;AAAA,GACP,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;AAAA;AAIJ,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;AAAA;AAAA,KAE5D,CAAA;AAAA;AAIJ,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,OAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"ProvidingComponentsCard.esm.js","sources":["../../../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_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 {\n CodeSnippet,\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\n/** @public */\nexport const ProvidingComponentsCard = (props: {\n variant?: InfoCardVariants;\n columns?: TableColumn<ComponentEntity>[];\n}) => {\n const { variant = 'gridItem', columns = EntityTable.componentEntityColumns } =\n 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={columns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;AAqCa,MAAA,uBAAA,GAA0B,CAAC,KAGlC,KAAA;AACJ,EAAA,MAAM,EAAE,OAAU,GAAA,UAAA,EAAY,OAAU,GAAA,WAAA,CAAY,wBAClD,GAAA,KAAA;AACF,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAA,MAAM,EAAE,QAAU,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,mBAAmB,MAAQ,EAAA;AAAA,IAC9D,IAAM,EAAA;AAAA,GACP,CAAA;AAED,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,2BACG,QAAS,EAAA,EAAA,OAAA,EAAkB,OAAM,WAChC,EAAA,QAAA,kBAAA,GAAA,CAAC,YAAS,CACZ,EAAA,CAAA;AAAA;AAIJ,EAAI,IAAA,KAAA,IAAS,CAAC,QAAU,EAAA;AACtB,IAAA,uBACG,GAAA,CAAA,QAAA,EAAA,EAAS,OAAkB,EAAA,KAAA,EAAM,WAChC,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,QAAS,EAAA,OAAA;AAAA,QACT,KAAM,EAAA,2BAAA;AAAA,QACN,OAAA,sBAAU,WAAY,EAAA,EAAA,IAAA,EAAM,GAAG,KAAK,CAAA,CAAA,EAAI,UAAS,MAAO,EAAA;AAAA;AAAA,KAE5D,EAAA,CAAA;AAAA;AAIJ,EACE,uBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,KAAM,EAAA,WAAA;AAAA,MACN,OAAA;AAAA,MACA,8BACG,IAAA,CAAA,KAAA,EAAA,EAAI,OAAO,EAAE,SAAA,EAAW,UACvB,EAAA,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAQ,QAE5B,EAAA,iCAAA,EAAA,CAAA;AAAA,wBACA,GAAA,CAAC,cAAW,OAAQ,EAAA,OAAA,EAClB,8BAAC,IAAK,EAAA,EAAA,EAAA,EAAG,iGAAkG,EAAA,QAAA,EAAA,2BAAA,EAE3G,CACF,EAAA;AAAA,OACF,EAAA,CAAA;AAAA,MAEF,OAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1,8 +1,8 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { makeStyles } from '@material-ui/core/styles';
2
3
  import { EditorContextProvider, SchemaContextProvider, ExplorerContextProvider, DocExplorer } from '@graphiql/react';
3
4
  import 'graphiql/graphiql.css';
4
5
  import { buildSchema } from 'graphql';
5
- import React from 'react';
6
6
 
7
7
  const useStyles = makeStyles({
8
8
  root: {
@@ -28,14 +28,14 @@ const useStyles = makeStyles({
28
28
  const GraphQlDefinition = ({ definition }) => {
29
29
  const classes = useStyles();
30
30
  const schema = buildSchema(definition);
31
- return /* @__PURE__ */ React.createElement("div", { className: classes.root }, /* @__PURE__ */ React.createElement("div", { className: classes.graphiQlWrapper }, /* @__PURE__ */ React.createElement(EditorContextProvider, null, /* @__PURE__ */ React.createElement(
31
+ return /* @__PURE__ */ jsx("div", { className: classes.root, children: /* @__PURE__ */ jsx("div", { className: classes.graphiQlWrapper, children: /* @__PURE__ */ jsx(EditorContextProvider, { children: /* @__PURE__ */ jsx(
32
32
  SchemaContextProvider,
33
33
  {
34
34
  schema,
35
- fetcher: () => Promise.resolve(null)
36
- },
37
- /* @__PURE__ */ React.createElement("div", { className: "graphiql-container" }, /* @__PURE__ */ React.createElement("div", { className: "graphiql-sidebar" }, /* @__PURE__ */ React.createElement("div", { className: "graphiql-sidebar-section" }, /* @__PURE__ */ React.createElement(ExplorerContextProvider, null, /* @__PURE__ */ React.createElement(DocExplorer, null)))))
38
- ))));
35
+ fetcher: () => Promise.resolve(null),
36
+ children: /* @__PURE__ */ jsx("div", { className: "graphiql-container", children: /* @__PURE__ */ jsx("div", { className: "graphiql-sidebar", children: /* @__PURE__ */ jsx("div", { className: "graphiql-sidebar-section", children: /* @__PURE__ */ jsx(ExplorerContextProvider, { children: /* @__PURE__ */ jsx(DocExplorer, {}) }) }) }) })
37
+ }
38
+ ) }) }) });
39
39
  };
40
40
 
41
41
  export { GraphQlDefinition };
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQlDefinition.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;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;AAAA,OACR;AAAA,MACA,mBAAqB,EAAA;AAAA,QACnB,KAAO,EAAA;AAAA;AACT;AACF;AAEJ,CAAC,CAAA;AAMM,MAAM,iBAAoB,GAAA,CAAC,EAAE,UAAA,EAAwB,KAAA;AAC1D,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,MAAA,GAAS,YAAY,UAAU,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;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;AAAA,GAEJ,CACF,CACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GraphQlDefinition.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';\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":";;;;;;AA0BA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,IAAM,EAAA;AAAA,IACJ,MAAQ,EAAA,MAAA;AAAA,IACR,OAAS,EAAA,MAAA;AAAA,IACT,QAAU,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;AAAA,OACR;AAAA,MACA,mBAAqB,EAAA;AAAA,QACnB,KAAO,EAAA;AAAA;AACT;AACF;AAEJ,CAAC,CAAA;AAMM,MAAM,iBAAoB,GAAA,CAAC,EAAE,UAAA,EAAwB,KAAA;AAC1D,EAAA,MAAM,UAAU,SAAU,EAAA;AAC1B,EAAM,MAAA,MAAA,GAAS,YAAY,UAAU,CAAA;AAErC,EACE,uBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,OAAQ,CAAA,IAAA,EACtB,QAAC,kBAAA,GAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,eACtB,EAAA,QAAA,kBAAA,GAAA,CAAC,qBACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,qBAAA;AAAA,IAAA;AAAA,MACC,MAAA;AAAA,MACA,OAAS,EAAA,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAI,CAAA;AAAA,MAEnC,8BAAC,KAAI,EAAA,EAAA,SAAA,EAAU,sBACb,QAAC,kBAAA,GAAA,CAAA,KAAA,EAAA,EAAI,WAAU,kBACb,EAAA,QAAA,kBAAA,GAAA,CAAC,SAAI,SAAU,EAAA,0BAAA,EACb,8BAAC,uBACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,eAAY,CACf,EAAA,CAAA,EACF,GACF,CACF,EAAA;AAAA;AAAA,GACF,EACF,GACF,CACF,EAAA,CAAA;AAEJ;;;;"}
@@ -1,13 +1,14 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { Progress } from '@backstage/core-components';
2
- import React, { Suspense } from 'react';
3
+ import { lazy, Suspense } from 'react';
3
4
 
4
- const LazyGraphQlDefinition = React.lazy(
5
+ const LazyGraphQlDefinition = lazy(
5
6
  () => import('./GraphQlDefinition.esm.js').then((m) => ({
6
7
  default: m.GraphQlDefinition
7
8
  }))
8
9
  );
9
10
  const GraphQlDefinitionWidget = (props) => {
10
- return /* @__PURE__ */ React.createElement(Suspense, { fallback: /* @__PURE__ */ React.createElement(Progress, null) }, /* @__PURE__ */ React.createElement(LazyGraphQlDefinition, { ...props }));
11
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Progress, {}), children: /* @__PURE__ */ jsx(LazyGraphQlDefinition, { ...props }) });
11
12
  };
12
13
 
13
14
  export { GraphQlDefinitionWidget };
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQlDefinitionWidget.esm.js","sources":["../../../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.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 { 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"],"names":[],"mappings":";;;AAqBA,MAAM,wBAAwB,KAAM,CAAA,IAAA;AAAA,EAAK,MACvC,OAAO,4BAAqB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,IACvC,SAAS,CAAE,CAAA;AAAA,GACX,CAAA;AACJ,CAAA;AAQa,MAAA,uBAAA,GAA0B,CACrC,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,qBAAA,EAAA,EAAuB,GAAG,KAAA,EAAO,CACpC,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"GraphQlDefinitionWidget.esm.js","sources":["../../../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.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 { Progress } from '@backstage/core-components';\nimport { lazy, 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 = 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"],"names":[],"mappings":";;;;AAqBA,MAAM,qBAAwB,GAAA,IAAA;AAAA,EAAK,MACjC,OAAO,4BAAqB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,IACvC,SAAS,CAAE,CAAA;AAAA,GACX,CAAA;AACJ,CAAA;AAQa,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EACE,uBAAA,GAAA,CAAC,QAAS,EAAA,EAAA,QAAA,kBAAW,GAAA,CAAA,QAAA,EAAA,EAAS,GAC5B,QAAC,kBAAA,GAAA,CAAA,qBAAA,EAAA,EAAuB,GAAG,KAAA,EAAO,CACpC,EAAA,CAAA;AAEJ;;;;"}
@@ -1,10 +1,10 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { CodeSnippet } from '@backstage/core-components';
3
3
  import { useTheme } from '@material-ui/core/styles';
4
4
 
5
5
  const GrpcApiDefinitionWidget = (props) => {
6
6
  const theme = useTheme();
7
- return /* @__PURE__ */ React.createElement(
7
+ return /* @__PURE__ */ jsx(
8
8
  CodeSnippet,
9
9
  {
10
10
  customStyle: { backgroundColor: theme.palette.background.default },
@@ -1 +1 @@
1
- {"version":3,"file":"GrpcApiDefinitionWidget.esm.js","sources":["../../../src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.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';\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"],"names":[],"mappings":";;;;AA0Ba,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,aAAa,EAAE,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,WAAW,OAAQ,EAAA;AAAA,MACjE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,QAAS,EAAA,UAAA;AAAA,MACT,kBAAkB,EAAA;AAAA;AAAA,GACpB;AAEJ;;;;"}
1
+ {"version":3,"file":"GrpcApiDefinitionWidget.esm.js","sources":["../../../src/components/GrpcApiDefinitionWidget/GrpcApiDefinitionWidget.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 { 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"],"names":[],"mappings":";;;;AAyBa,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EACE,uBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,aAAa,EAAE,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,WAAW,OAAQ,EAAA;AAAA,MACjE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,QAAS,EAAA,UAAA;AAAA,MACT,kBAAkB,EAAA;AAAA;AAAA,GACpB;AAEJ;;;;"}
@@ -1,5 +1,6 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { makeStyles } from '@material-ui/core/styles';
2
- import React, { useState, useEffect } from 'react';
3
+ import { useState, useEffect } from 'react';
3
4
  import SwaggerUI from 'swagger-ui-react';
4
5
  import 'swagger-ui-react/swagger-ui.css';
5
6
 
@@ -168,7 +169,7 @@ const OpenApiDefinition = ({
168
169
  const timer = setTimeout(() => setDef(definition), 0);
169
170
  return () => clearTimeout(timer);
170
171
  }, [definition, setDef]);
171
- return /* @__PURE__ */ React.createElement("div", { className: classes.root }, /* @__PURE__ */ React.createElement(
172
+ return /* @__PURE__ */ jsx("div", { className: classes.root, children: /* @__PURE__ */ jsx(
172
173
  SwaggerUI,
173
174
  {
174
175
  spec: def,
@@ -177,7 +178,7 @@ const OpenApiDefinition = ({
177
178
  oauth2RedirectUrl: `${window.location.protocol}//${window.location.host}/oauth2-redirect.html`,
178
179
  ...swaggerUiProps
179
180
  }
180
- ));
181
+ ) });
181
182
  };
182
183
 
183
184
  export { OpenApiDefinition };
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiDefinition.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 table tbody tr td,\n table tbody 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 .parameter__name.required span`]: {\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 [`& .opblock-control-arrow svg, .authorization__btn .unlocked`]: {\n fill: theme.palette.text.primary,\n },\n [`& .json-schema-2020-12__title,\n .json-schema-2020-12-keyword__name,\n .json-schema-2020-12-property .json-schema-2020-12__title,\n .json-schema-2020-12-keyword--description`]: {\n color: theme.palette.text.primary,\n },\n [`.json-schema-2020-12-accordion__icon svg`]: {\n fill: theme.palette.text.primary,\n },\n [`& .json-schema-2020-12-accordion,\n .json-schema-2020-12-expand-deep-button`]: {\n background: 'none',\n appearance: 'none',\n },\n [`& .json-schema-2020-12-expand-deep-button,\n .json-schema-2020-12-keyword__name--secondary,\n .json-schema-2020-12-keyword__value--secondary,\n .json-schema-2020-12__attribute--muted,\n .json-schema-2020-12-keyword__value--const,\n .json-schema-2020-12-keyword__value--warning`]: {\n color: theme.palette.text.secondary,\n },\n [`& .json-schema-2020-12-body,\n .json-schema-2020-12-keyword__value--const,\n .json-schema-2020-12-keyword__value--warning`]: {\n borderColor: theme.palette.text.secondary,\n },\n [`.json-schema-2020-12__constraint--string`]: {\n backgroundColor: theme.palette.primary.main,\n },\n [`& .json-schema-2020-12__attribute--primary`]: {\n color: theme.palette.primary.main,\n },\n [`& .json-schema-2020-12-property--required>.json-schema-2020-12:first-of-type>.json-schema-2020-12-head .json-schema-2020-12__title:after`]:\n {\n color: theme.palette.warning.dark,\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;AAAA,OAC5B;AAAA,MACA,CAAC,qBAAqB,GAAG;AAAA,QACvB,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA;AAAA,OAC5C;AAAA,MACA,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAA,CAKqB,GAAG;AAAA,QACvB,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,QAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;A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;AACpD,IAAO,OAAA,MAAM,aAAa,KAAK,CAAA;AAAA,GAC9B,EAAA,CAAC,UAAY,EAAA,MAAM,CAAC,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;AAAA;AAAA,GAER,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"OpenApiDefinition.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 { 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 table tbody tr td,\n table tbody 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 .parameter__name.required span`]: {\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 [`& .opblock-control-arrow svg, .authorization__btn .unlocked`]: {\n fill: theme.palette.text.primary,\n },\n [`& .json-schema-2020-12__title,\n .json-schema-2020-12-keyword__name,\n .json-schema-2020-12-property .json-schema-2020-12__title,\n .json-schema-2020-12-keyword--description`]: {\n color: theme.palette.text.primary,\n },\n [`.json-schema-2020-12-accordion__icon svg`]: {\n fill: theme.palette.text.primary,\n },\n [`& .json-schema-2020-12-accordion,\n .json-schema-2020-12-expand-deep-button`]: {\n background: 'none',\n appearance: 'none',\n },\n [`& .json-schema-2020-12-expand-deep-button,\n .json-schema-2020-12-keyword__name--secondary,\n .json-schema-2020-12-keyword__value--secondary,\n .json-schema-2020-12__attribute--muted,\n .json-schema-2020-12-keyword__value--const,\n .json-schema-2020-12-keyword__value--warning`]: {\n color: theme.palette.text.secondary,\n },\n [`& .json-schema-2020-12-body,\n .json-schema-2020-12-keyword__value--const,\n .json-schema-2020-12-keyword__value--warning`]: {\n borderColor: theme.palette.text.secondary,\n },\n [`.json-schema-2020-12__constraint--string`]: {\n backgroundColor: theme.palette.primary.main,\n },\n [`& .json-schema-2020-12__attribute--primary`]: {\n color: theme.palette.primary.main,\n },\n [`& .json-schema-2020-12-property--required>.json-schema-2020-12:first-of-type>.json-schema-2020-12-head .json-schema-2020-12__title:after`]:\n {\n color: theme.palette.warning.dark,\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;AAAA,OAC5B;AAAA,MACA,CAAC,qBAAqB,GAAG;AAAA,QACvB,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,UAAW,CAAA;AAAA,OAC5C;AAAA,MACA,CAAC,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAA,CAKqB,GAAG;AAAA,QACvB,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,QAC7B,KAAA,EAAO,KAAM,CAAA,OAAA,CAAQ,IAAK,CAAA,OAAA;AAAA,QAC1B,WAAA,EAAa,MAAM,OAAQ,CAAA;AAAA,OAC7B;AAAA,MACA,CAAC,CAAA;AAAA,mCAAA,CAC6B,GAAG;AAAA,QAC/B,WAAA,EAAa,MAAM,OAAQ,CAAA;AAAA,OAC7B;AAAA,MACA,CAAC,CAAA;AAAA;AAAA,6BAAA,CAEuB,GAAG;AAAA,QACzB,UAAA,EAAY,MAAM,UAAW,CAAA,UAAA;AAAA,QAC7B,UAAA,EAAY,MAAM,UAAW,CAAA;AAAA,OAC/B;AAAA,MACA,CAAC,CAAA;A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GAAG,MAAO,CAAA,QAAA,CAAS,QAAQ,CAAK,EAAA,EAAA,MAAA,CAAO,SAAS,IAAI,CAAA,qBAAA,CAAA;AAAA,MACtE,GAAG;AAAA;AAAA,GAER,EAAA,CAAA;AAEJ;;;;"}
@@ -1,7 +1,8 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { Progress } from '@backstage/core-components';
2
- import React, { Suspense } from 'react';
3
+ import { lazy, Suspense } from 'react';
3
4
 
4
- const LazyOpenApiDefinition = React.lazy(
5
+ const LazyOpenApiDefinition = lazy(
5
6
  () => import('./OpenApiDefinition.esm.js').then((m) => ({
6
7
  default: m.OpenApiDefinition
7
8
  }))
@@ -10,13 +11,13 @@ const OpenApiDefinitionWidget = (props) => {
10
11
  const validSubmitMethods = props.supportedSubmitMethods?.map(
11
12
  (method) => method.toLocaleLowerCase()
12
13
  );
13
- return /* @__PURE__ */ React.createElement(Suspense, { fallback: /* @__PURE__ */ React.createElement(Progress, null) }, /* @__PURE__ */ React.createElement(
14
+ return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Progress, {}), children: /* @__PURE__ */ jsx(
14
15
  LazyOpenApiDefinition,
15
16
  {
16
17
  ...props,
17
18
  supportedSubmitMethods: validSubmitMethods
18
19
  }
19
- ));
20
+ ) });
20
21
  };
21
22
 
22
23
  export { OpenApiDefinitionWidget };
@@ -1 +1 @@
1
- {"version":3,"file":"OpenApiDefinitionWidget.esm.js","sources":["../../../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.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 { 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"],"names":[],"mappings":";;;AAqBA,MAAM,wBAAwB,KAAM,CAAA,IAAA;AAAA,EAAK,MACvC,OAAO,4BAAqB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,IACvC,SAAS,CAAE,CAAA;AAAA,GACX,CAAA;AACJ,CAAA;AAUa,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EAAM,MAAA,kBAAA,GAAqB,MAAM,sBAAwB,EAAA,GAAA;AAAA,IAAI,CAAA,MAAA,KAC3D,OAAO,iBAAkB;AAAA,GAC3B;AACA,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,QAAU,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAS,CAC5B,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,qBAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,sBAAwB,EAAA;AAAA;AAAA,GAE5B,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"OpenApiDefinitionWidget.esm.js","sources":["../../../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.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 { Progress } from '@backstage/core-components';\nimport { lazy, 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 = 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"],"names":[],"mappings":";;;;AAqBA,MAAM,qBAAwB,GAAA,IAAA;AAAA,EAAK,MACjC,OAAO,4BAAqB,CAAA,CAAE,KAAK,CAAM,CAAA,MAAA;AAAA,IACvC,SAAS,CAAE,CAAA;AAAA,GACX,CAAA;AACJ,CAAA;AAUa,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EAAM,MAAA,kBAAA,GAAqB,MAAM,sBAAwB,EAAA,GAAA;AAAA,IAAI,CAAA,MAAA,KAC3D,OAAO,iBAAkB;AAAA,GAC3B;AACA,EAAA,uBACG,GAAA,CAAA,QAAA,EAAA,EAAS,QAAU,kBAAA,GAAA,CAAC,YAAS,CAC5B,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,qBAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,sBAAwB,EAAA;AAAA;AAAA,GAE5B,EAAA,CAAA;AAEJ;;;;"}
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { CodeSnippet } from '@backstage/core-components';
3
3
 
4
4
  const PlainApiDefinitionWidget = (props) => {
5
- return /* @__PURE__ */ React.createElement(
5
+ return /* @__PURE__ */ jsx(
6
6
  CodeSnippet,
7
7
  {
8
8
  text: props.definition,
@@ -1 +1 @@
1
- {"version":3,"file":"PlainApiDefinitionWidget.esm.js","sources":["../../../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.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"],"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;AAAA;AAAA,GACpB;AAEJ;;;;"}
1
+ {"version":3,"file":"PlainApiDefinitionWidget.esm.js","sources":["../../../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.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 { 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"],"names":[],"mappings":";;;AAyBa,MAAA,wBAAA,GAA2B,CACtC,KACG,KAAA;AACH,EACE,uBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,UAAU,KAAM,CAAA,QAAA;AAAA,MAChB,kBAAkB,EAAA;AAAA;AAAA,GACpB;AAEJ;;;;"}
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { CodeSnippet } from '@backstage/core-components';
3
3
  import { useTheme } from '@material-ui/core/styles';
4
4
 
5
5
  const TrpcApiDefinitionWidget = (props) => {
6
6
  const { definition } = props;
7
7
  const theme = useTheme();
8
- return /* @__PURE__ */ React.createElement(
8
+ return /* @__PURE__ */ jsx(
9
9
  CodeSnippet,
10
10
  {
11
11
  customStyle: { backgroundColor: theme.palette.background.default },
@@ -1 +1 @@
1
- {"version":3,"file":"TrpcApiDefinitionWidget.esm.js","sources":["../../../src/components/TrpcDefinitionWidget/TrpcApiDefinitionWidget.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 */\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"],"names":[],"mappings":";;;;AAyBa,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EAAM,MAAA,EAAE,YAAe,GAAA,KAAA;AACvB,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,aAAa,EAAE,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,WAAW,OAAQ,EAAA;AAAA,MACjE,IAAM,EAAA,UAAA;AAAA,MACN,QAAS,EAAA,YAAA;AAAA,MACT,kBAAkB,EAAA;AAAA;AAAA,GACpB;AAEJ;;;;"}
1
+ {"version":3,"file":"TrpcApiDefinitionWidget.esm.js","sources":["../../../src/components/TrpcDefinitionWidget/TrpcApiDefinitionWidget.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 */\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"],"names":[],"mappings":";;;;AAwBa,MAAA,uBAAA,GAA0B,CACrC,KACG,KAAA;AACH,EAAM,MAAA,EAAE,YAAe,GAAA,KAAA;AACvB,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EACE,uBAAA,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,aAAa,EAAE,eAAA,EAAiB,KAAM,CAAA,OAAA,CAAQ,WAAW,OAAQ,EAAA;AAAA,MACjE,IAAM,EAAA,UAAA;AAAA,MACN,QAAS,EAAA,YAAA;AAAA,MACT,kBAAkB,EAAA;AAAA;AAAA,GACpB;AAEJ;;;;"}