@backstage/plugin-api-docs 0.6.11 → 0.6.15

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-1c6bc90a.esm.js","sources":["../../src/config.ts","../../src/components/PlainApiDefinitionWidget/PlainApiDefinitionWidget.tsx","../../src/components/ApiDefinitionCard/ApiDefinitionCard.tsx","../../src/components/AsyncApiDefinitionWidget/AsyncApiDefinitionWidget.tsx","../../src/components/GraphQlDefinitionWidget/GraphQlDefinitionWidget.tsx","../../src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx","../../src/components/ApiDefinitionCard/ApiDefinitionWidget.tsx","../../src/components/ApiDefinitionCard/ApiTypeTitle.tsx","../../src/components/ApisCards/presets.tsx","../../src/components/ApisCards/ConsumedApisCard.tsx","../../src/components/ApisCards/HasApisCard.tsx","../../src/components/ApisCards/ProvidedApisCard.tsx","../../src/components/ComponentsCards/ConsumingComponentsCard.tsx","../../src/components/ComponentsCards/ProvidingComponentsCard.tsx","../../src/routes.ts","../../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { ApiDefinitionWidget } from './components/ApiDefinitionCard/ApiDefinitionWidget';\nimport { createApiRef } from '@backstage/core-plugin-api';\n\nexport const apiDocsConfigRef = createApiRef<ApiDocsConfig>({\n id: 'plugin.api-docs.config',\n description: 'Used to configure api-docs widgets',\n});\n\nexport interface ApiDocsConfig {\n getApiDefinitionWidget: (\n apiEntity: ApiEntity,\n ) => ApiDefinitionWidget | undefined;\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\ntype Props = {\n definition: any;\n language: string;\n};\n\nexport const PlainApiDefinitionWidget = ({ definition, language }: Props) => {\n return (\n <CodeSnippet text={definition} language={language} showCopyCodeButton />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { Alert } from '@material-ui/lab';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { PlainApiDefinitionWidget } from '../PlainApiDefinitionWidget';\n\nimport { CardTab, TabbedCard } from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n apiEntity?: ApiEntity;\n};\n\nexport const ApiDefinitionCard = (_: Props) => {\n const { entity } = useEntity<ApiEntity>();\n const config = useApi(apiDocsConfigRef);\n const { getApiDefinitionWidget } = config;\n\n if (!entity) {\n return <Alert severity=\"error\">Could not fetch the API</Alert>;\n }\n\n const definitionWidget = getApiDefinitionWidget(entity);\n\n if (definitionWidget) {\n return (\n <TabbedCard title={entity.metadata.name}>\n <CardTab label={definitionWidget.title} key=\"widget\">\n {definitionWidget.component(entity.spec.definition)}\n </CardTab>\n <CardTab label=\"Raw\" key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={definitionWidget.rawLanguage || entity.spec.type}\n />\n </CardTab>\n </TabbedCard>\n );\n }\n\n return (\n <TabbedCard\n title={entity.metadata.name}\n children={[\n // Has to be an array, otherwise typescript doesn't like that this has only a single child\n <CardTab label={entity.spec.type} key=\"raw\">\n <PlainApiDefinitionWidget\n definition={entity.spec.definition}\n language={entity.spec.type}\n />\n </CardTab>,\n ]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport AsyncApi from '@asyncapi/react-component';\nimport '@asyncapi/react-component/lib/styles/fiori.css';\nimport { fade, makeStyles } from '@material-ui/core/styles';\nimport React from 'react';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .asyncapi': {\n 'font-family': 'inherit',\n background: 'none',\n },\n '& h2': {\n ...theme.typography.h6,\n },\n '& .text-teal': {\n color: theme.palette.primary.main,\n },\n '& button': {\n ...theme.typography.button,\n background: 'none',\n boxSizing: 'border-box',\n minWidth: 64,\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(\n ['background-color', 'box-shadow', 'border'],\n {\n duration: theme.transitions.duration.short,\n },\n ),\n padding: '5px 15px',\n color: theme.palette.primary.main,\n border: `1px solid ${fade(theme.palette.primary.main, 0.5)}`,\n '&:hover': {\n textDecoration: 'none',\n '&.Mui-disabled': {\n backgroundColor: 'transparent',\n },\n border: `1px solid ${theme.palette.primary.main}`,\n backgroundColor: fade(\n theme.palette.primary.main,\n theme.palette.action.hoverOpacity,\n ),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent',\n },\n },\n '&.Mui-disabled': {\n color: theme.palette.action.disabled,\n },\n },\n '& .asyncapi__collapse-button:hover': {\n color: theme.palette.primary.main,\n },\n '& button.asyncapi__toggle-button': {\n 'min-width': 'inherit',\n },\n '& .asyncapi__info-list li': {\n 'border-color': theme.palette.primary.main,\n '&:hover': {\n color: theme.palette.text.primary,\n 'border-color': theme.palette.primary.main,\n 'background-color': theme.palette.primary.main,\n },\n },\n '& .asyncapi__info-list li a': {\n color: theme.palette.primary.main,\n '&:hover': {\n color: theme.palette.getContrastText(theme.palette.primary.main),\n },\n },\n '& .asyncapi__enum': {\n color: theme.palette.secondary.main,\n },\n '& .asyncapi__info, .asyncapi__channel, .asyncapi__channels > div, .asyncapi__schema, .asyncapi__channel-operations-list .asyncapi__messages-list-item .asyncapi__message, .asyncapi__message, .asyncapi__server, .asyncapi__servers > div, .asyncapi__messages > div, .asyncapi__schemas > div':\n {\n 'background-color': 'inherit',\n },\n '& .asyncapi__channel-parameters-header, .asyncapi__channel-operations-header, .asyncapi__channel-operation-oneOf-subscribe-header, .asyncapi__channel-operation-oneOf-publish-header, .asyncapi__channel-operation-message-header, .asyncapi__message-header, .asyncapi__message-header-title, .asyncapi__message-header-title > h3, .asyncapi__bindings, .asyncapi__bindings-header, .asyncapi__bindings-header > h4':\n {\n 'background-color': 'inherit',\n color: theme.palette.text.primary,\n },\n '& .asyncapi__additional-properties-notice': {\n color: theme.palette.text.hint,\n },\n '& .asyncapi__code, .asyncapi__code-pre': {\n background: theme.palette.background.default,\n },\n '& .asyncapi__schema-example-header-title': {\n color: theme.palette.text.secondary,\n },\n '& .asyncapi__message-headers-header, .asyncapi__message-payload-header, .asyncapi__server-variables-header, .asyncapi__server-security-header':\n {\n 'background-color': 'inherit',\n color: theme.palette.text.secondary,\n },\n '& .asyncapi__table-header': {\n background: theme.palette.background.default,\n },\n '& .asyncapi__table-body': {\n color: theme.palette.text.primary,\n },\n '& .asyncapi__server-security-flow': {\n background: theme.palette.background.default,\n border: 'none',\n },\n '& .asyncapi__server-security-flows-list a': {\n color: theme.palette.primary.main,\n },\n '& .asyncapi__table-row--nested': {\n color: theme.palette.text.secondary,\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const AsyncApiDefinitionWidget = ({ definition }: Props) => {\n const classes = useStyles();\n\n return (\n <div className={classes.root}>\n <AsyncApi schema={definition} />\n </div>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstageTheme } from '@backstage/theme';\nimport { makeStyles } from '@material-ui/core/styles';\nimport 'graphiql/graphiql.css';\nimport { buildSchema } from 'graphql';\nimport React, { Suspense } from 'react';\nimport { Progress } from '@backstage/core-components';\n\nconst GraphiQL = React.lazy(() => import('graphiql'));\n\nconst useStyles = makeStyles<BackstageTheme>(() => ({\n root: {\n height: '100%',\n display: 'flex',\n flexFlow: 'column nowrap',\n },\n graphiQlWrapper: {\n flex: 1,\n '@global': {\n '.graphiql-container': {\n boxSizing: 'initial',\n height: '100%',\n minHeight: '600px',\n flex: '1 1 auto',\n },\n },\n },\n}));\n\ntype Props = {\n definition: any;\n};\n\nexport const GraphQlDefinitionWidget = ({ definition }: Props) => {\n const classes = useStyles();\n const schema = buildSchema(definition);\n\n return (\n <Suspense fallback={<Progress />}>\n <div className={classes.root}>\n <div className={classes.graphiQlWrapper}>\n <GraphiQL\n fetcher={() => Promise.resolve(null) as any}\n schema={schema}\n docExplorerOpen\n defaultSecondaryEditorOpen={false}\n />\n </div>\n </div>\n </Suspense>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { useEffect, useState } from 'react';\nimport SwaggerUI from 'swagger-ui-react';\nimport 'swagger-ui-react/swagger-ui.css';\n\n// TODO: Schemas\n\nconst useStyles = makeStyles(theme => ({\n root: {\n '& .swagger-ui, .info h1, .info h2, .info h3, .info h4, .info h': {\n 'font-family': 'inherit',\n color: theme.palette.text.primary,\n },\n '& .scheme-container': {\n 'background-color': theme.palette.background.default,\n },\n '& .opblock-tag, .opblock-tag small, table thead tr td, table thead tr th':\n {\n color: theme.palette.text.primary,\n 'border-color': theme.palette.divider,\n },\n '& section.models, section.models.is-open h4': {\n 'border-color': theme.palette.divider,\n },\n '& .opblock .opblock-summary-description, .parameter__type, table.headers td, .model-title, .model .property.primitive, section h3':\n {\n color: theme.palette.text.secondary,\n },\n '& .opblock .opblock-summary-operation-id, .opblock .opblock-summary-path, .opblock .opblock-summary-path__deprecated, .opblock .opblock-section-header h4, .parameter__name, .response-col_status, .response-col_links, .responses-inner h4, .swagger-ui .responses-inner h5, .opblock-section-header .btn, .tab li, .info li, .info p, .info table, section.models h4, .info .title, table.model tr.description, .property-row':\n {\n color: theme.palette.text.primary,\n },\n '& .opblock .opblock-section-header, .model-box, section.models .model-container':\n {\n background: theme.palette.background.default,\n },\n '& .prop-format, .parameter__in': {\n color: theme.palette.text.disabled,\n },\n '& ': {\n color: theme.palette.text.primary,\n 'border-color': theme.palette.divider,\n },\n '& .opblock-description-wrapper p, .opblock-external-docs-wrapper p, .opblock-title_normal p, .response-control-media-type__accept-message, .opblock .opblock-section-header>label, .scheme-container .schemes>label, .info .base-url, .model':\n {\n color: theme.palette.text.hint,\n },\n '& .parameter__name.required:after': {\n color: theme.palette.warning.dark,\n },\n '& .prop-type': {\n color: theme.palette.primary.main,\n },\n },\n}));\n\ntype Props = {\n definition: string;\n};\n\nexport const OpenApiDefinitionWidget = ({ definition }: Props) => {\n const classes = useStyles();\n\n // Due to a bug in the swagger-ui-react component, the component needs\n // to be created without content first.\n const [def, setDef] = useState('');\n\n useEffect(() => {\n const timer = setTimeout(() => setDef(definition), 0);\n return () => clearTimeout(timer);\n }, [definition, setDef]);\n\n return (\n <div className={classes.root}>\n <SwaggerUI spec={def} deepLinking />\n </div>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';\nimport { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';\nimport { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';\n\nexport type ApiDefinitionWidget = {\n type: string;\n title: string;\n component: (definition: string) => React.ReactElement;\n rawLanguage?: string;\n};\n\nexport function defaultDefinitionWidgets(): ApiDefinitionWidget[] {\n return [\n {\n type: 'openapi',\n title: 'OpenAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <OpenApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'asyncapi',\n title: 'AsyncAPI',\n rawLanguage: 'yaml',\n component: definition => (\n <AsyncApiDefinitionWidget definition={definition} />\n ),\n },\n {\n type: 'graphql',\n title: 'GraphQL',\n rawLanguage: 'graphql',\n component: definition => (\n <GraphQlDefinitionWidget definition={definition} />\n ),\n },\n ];\n}\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport React from 'react';\nimport { apiDocsConfigRef } from '../../config';\nimport { useApi } from '@backstage/core-plugin-api';\n\nexport const ApiTypeTitle = ({ apiEntity }: { apiEntity: ApiEntity }) => {\n const config = useApi(apiDocsConfigRef);\n const definition = config.getApiDefinitionWidget(apiEntity);\n const type = definition ? definition.title : apiEntity.spec.type;\n\n return <span>{type}</span>;\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { ApiTypeTitle } from '../ApiDefinitionCard';\nimport { TableColumn } from '@backstage/core-components';\n\nexport function createSpecApiTypeColumn(): TableColumn<ApiEntity> {\n return {\n title: 'Type',\n field: 'spec.type',\n render: entity => <ApiTypeTitle apiEntity={entity} />,\n };\n}\n\n// TODO: This could be moved to plugin-catalog-react if we wouldn't have a\n// special createSpecApiTypeColumn. But this is required to use ApiTypeTitle to\n// resolve the display name of an entity. Is the display name really worth it?\n\nexport const apiEntityColumns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createSystemColumn(),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ApiEntity,\n Entity,\n RELATION_CONSUMES_API,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ConsumedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_CONSUMES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumed APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumed APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not consume any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity, RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createSpecApiTypeColumn } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n TableColumn,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n variant?: 'gridItem';\n};\n\nconst columns: TableColumn<ApiEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'API' }),\n EntityTable.columns.createOwnerColumn(),\n createSpecApiTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\n\nexport const HasApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_HAS_PART,\n kind: 'API',\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not contain any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ApiEntity,\n Entity,\n RELATION_PROVIDES_API,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { apiEntityColumns } from './presets';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ProvidedApisCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_PROVIDES_API,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Provided APIs\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load APIs\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Provided APIs\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n This {entity.kind.toLocaleLowerCase('en-US')} does not provide any\n APIs.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={apiEntityColumns}\n entities={entities as ApiEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ComponentEntity,\n Entity,\n RELATION_API_CONSUMED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ConsumingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_CONSUMED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Consumers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Consumers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component consumes this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specconsumesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ComponentEntity,\n Entity,\n RELATION_API_PROVIDED_BY,\n} from '@backstage/catalog-model';\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n CodeSnippet,\n InfoCard,\n Link,\n Progress,\n WarningPanel,\n} from '@backstage/core-components';\n\ntype Props = {\n /** @deprecated The entity is now grabbed from context instead */\n entity?: Entity;\n variant?: 'gridItem';\n};\n\nexport const ProvidingComponentsCard = ({ variant = 'gridItem' }: Props) => {\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: RELATION_API_PROVIDED_BY,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <Progress />\n </InfoCard>\n );\n }\n\n if (error || !entities) {\n return (\n <InfoCard variant={variant} title=\"Providers\">\n <WarningPanel\n severity=\"error\"\n title=\"Could not load components\"\n message={<CodeSnippet text={`${error}`} language=\"text\" />}\n />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title=\"Providers\"\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">\n No component provides this API.\n </Typography>\n <Typography variant=\"body2\">\n <Link to=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specprovidesapis-optional\">\n Learn how to change this.\n </Link>\n </Typography>\n </div>\n }\n columns={EntityTable.componentEntityColumns}\n entities={entities as ComponentEntity[]}\n />\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n createExternalRouteRef,\n createRouteRef,\n} from '@backstage/core-plugin-api';\n\nconst NoIcon = () => null;\n\nexport const rootRoute = createRouteRef({\n icon: NoIcon,\n path: '/api-docs',\n title: 'APIs',\n});\n\nexport const createComponentRouteRef = createExternalRouteRef({\n id: 'create-component',\n optional: true,\n});\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ApiEntity } from '@backstage/catalog-model';\nimport { defaultDefinitionWidgets } from './components/ApiDefinitionCard';\nimport { apiDocsConfigRef } from './config';\nimport { createComponentRouteRef, rootRoute } from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n} from '@backstage/core-plugin-api';\n\nexport const apiDocsPlugin = createPlugin({\n id: 'api-docs',\n routes: {\n root: rootRoute,\n },\n apis: [\n createApiFactory({\n api: apiDocsConfigRef,\n deps: {},\n factory: () => {\n const definitionWidgets = defaultDefinitionWidgets();\n return {\n getApiDefinitionWidget: (apiEntity: ApiEntity) => {\n return definitionWidgets.find(d => d.type === apiEntity.spec.type);\n },\n };\n },\n }),\n ],\n externalRoutes: {\n createComponent: createComponentRouteRef,\n },\n});\n\nexport const ApiExplorerPage = apiDocsPlugin.provide(\n createRoutableExtension({\n name: 'ApiExplorerPage',\n component: () =>\n import('./components/ApiExplorerPage').then(m => m.ApiExplorerPage),\n mountPoint: rootRoute,\n }),\n);\n\nexport const EntityApiDefinitionCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityApiDefinitionCard',\n component: {\n lazy: () =>\n import('./components/ApiDefinitionCard').then(m => m.ApiDefinitionCard),\n },\n }),\n);\n\nexport const EntityConsumedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ConsumedApisCard),\n },\n }),\n);\n\nexport const EntityConsumingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityConsumingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ConsumingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityProvidedApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidedApisCard',\n component: {\n lazy: () =>\n import('./components/ApisCards').then(m => m.ProvidedApisCard),\n },\n }),\n);\n\nexport const EntityProvidingComponentsCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityProvidingComponentsCard',\n component: {\n lazy: () =>\n import('./components/ComponentsCards').then(\n m => m.ProvidingComponentsCard,\n ),\n },\n }),\n);\n\nexport const EntityHasApisCard = apiDocsPlugin.provide(\n createComponentExtension({\n name: 'EntityHasApisCard',\n component: {\n lazy: () => import('./components/ApisCards').then(m => m.HasApisCard),\n },\n }),\n);\n"],"names":["useStyles"],"mappings":";;;;;;;;;;;;;;;MAoBa,mBAAmB,aAA4B;AAAA,EAC1D,IAAI;AAAA,EACJ,aAAa;AAAA;;MCEF,2BAA2B,CAAC,CAAE,YAAY,cAAsB;AAC3E,6CACG,aAAD;AAAA,IAAa,MAAM;AAAA,IAAY;AAAA,IAAoB,oBAAkB;AAAA;AAAA;;MCK5D,oBAAoB,CAAC,MAAa;AAC7C,QAAM,CAAE,UAAW;AACnB,QAAM,SAAS,OAAO;AACtB,QAAM,CAAE,0BAA2B;AAEnC,MAAI,CAAC,QAAQ;AACX,+CAAQ,OAAD;AAAA,MAAO,UAAS;AAAA,OAAQ;AAAA;AAGjC,QAAM,mBAAmB,uBAAuB;AAEhD,MAAI,kBAAkB;AACpB,+CACG,YAAD;AAAA,MAAY,OAAO,OAAO,SAAS;AAAA,2CAChC,SAAD;AAAA,MAAS,OAAO,iBAAiB;AAAA,MAAO,KAAI;AAAA,OACzC,iBAAiB,UAAU,OAAO,KAAK,kDAEzC,SAAD;AAAA,MAAS,OAAM;AAAA,MAAM,KAAI;AAAA,2CACtB,0BAAD;AAAA,MACE,YAAY,OAAO,KAAK;AAAA,MACxB,UAAU,iBAAiB,eAAe,OAAO,KAAK;AAAA;AAAA;AAOhE,6CACG,YAAD;AAAA,IACE,OAAO,OAAO,SAAS;AAAA,IACvB,UAAU;AAAA,0CAEP,SAAD;AAA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D,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAAkC,KAAK,OAAK,EAAE;AAAA;AAAA;MAKhD,yBAAyB,cAAc,QAClD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;MAKxC,gCAAgC,cAAc,QACzD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,yBAAyB,cAAc,QAClD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;MAKxC,gCAAgC,cAAc,QACzD,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MACG,kCAAgC,KACrC,OAAK,EAAE;AAAA;AAAA;MAMJ,oBAAoB,cAAc,QAC7C,yBAAyB;AAAA,EACvB,MAAM;AAAA,EACN,WAAW;AAAA,IACT,MAAM,MAAa,kCAA0B,KAAK,OAAK,EAAE;AAAA;AAAA;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-380a11ec.esm.js","sources":["../../src/components/ApiExplorerPage/ApiExplorerPage.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogTable,\n CatalogTableRow,\n FilteredEntityLayout,\n EntityListContainer,\n FilterContainer,\n} from '@backstage/plugin-catalog';\nimport {\n EntityKindPicker,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport { createComponentRouteRef } from '../../routes';\n\nconst defaultColumns: TableColumn<CatalogTableRow>[] = [\n CatalogTable.columns.createNameColumn({ defaultKind: 'API' }),\n CatalogTable.columns.createSystemColumn(),\n CatalogTable.columns.createOwnerColumn(),\n CatalogTable.columns.createSpecTypeColumn(),\n CatalogTable.columns.createSpecLifecycleColumn(),\n CatalogTable.columns.createMetadataDescriptionColumn(),\n CatalogTable.columns.createTagsColumn(),\n];\n\ntype ApiExplorerPageProps = {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n};\n\nexport const ApiExplorerPage = ({\n initiallySelectedFilter = 'all',\n columns,\n}: ApiExplorerPageProps) => {\n const configApi = useApi(configApiRef);\n const generatedSubtitle = `${\n configApi.getOptionalString('organization.name') ?? 'Backstage'\n } API Explorer`;\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n return (\n <PageWithHeader\n themeId=\"apis\"\n title=\"APIs\"\n subtitle={generatedSubtitle}\n pageTitleOverride=\"APIs\"\n >\n <Content>\n <ContentHeader title=\"\">\n <CreateButton\n title=\"Register Existing API\"\n to={createComponentLink?.()}\n />\n <SupportButton>All your APIs</SupportButton>\n </ContentHeader>\n <EntityListProvider>\n <FilteredEntityLayout>\n <FilterContainer>\n <EntityKindPicker initialFilter=\"api\" hidden />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </FilterContainer>\n <EntityListContainer>\n <CatalogTable columns={columns || defaultColumns} />\n </EntityListContainer>\n </FilteredEntityLayout>\n </EntityListProvider>\n </Content>\n </PageWithHeader>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA6CA,MAAM,iBAAiD;AAAA,EACrD,aAAa,QAAQ,iBAAiB,CAAE,aAAa;AAAA,EACrD,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA,EACrB,aAAa,QAAQ;AAAA;MAQV,kBAAkB,CAAC;AAAA,EAC9B,0BAA0B;AAAA,EAC1B;AAAA,MAC0B;AA/D5B;AAgEE,QAAM,YAAY,OAAO;AACzB,QAAM,oBAAoB,GACxB,gBAAU,kBAAkB,yBAA5B,YAAoD;AAEtD,QAAM,sBAAsB,YAAY;AAExC,6CACG,gBAAD;AAAA,IACE,SAAQ;AAAA,IACR,OAAM;AAAA,IACN,UAAU;AAAA,IACV,mBAAkB;AAAA,yCAEjB,SAAD,0CACG,eAAD;AAAA,IAAe,OAAM;AAAA,yCAClB,cAAD;AAAA,IACE,OAAM;AAAA,IACN,IAAI;AAAA,0CAEL,eAAD,MAAe,uDAEhB,oBAAD,0CACG,sBAAD,0CACG,iBAAD,0CACG,kBAAD;AAAA,IAAkB,eAAc;AAAA,IAAM,QAAM;AAAA,0CAC3C,kBAAD,2CACC,gBAAD;AAAA,IAAgB,eAAe;AAAA,0CAC9B,mBAAD,2CACC,uBAAD,2CACC,iBAAD,4CAED,qBAAD,0CACG,cAAD;AAAA,IAAc,SAAS,WAAW;AAAA;AAAA;;;;"}
@@ -1,16 +0,0 @@
1
- export { b as ConsumingComponentsCard, e as ProvidingComponentsCard } from './index-1c6bc90a.esm.js';
2
- import '@backstage/plugin-catalog-react';
3
- import '@material-ui/lab';
4
- import 'react';
5
- import '@backstage/core-plugin-api';
6
- import '@backstage/core-components';
7
- import '@asyncapi/react-component';
8
- import '@asyncapi/react-component/lib/styles/fiori.css';
9
- import '@material-ui/core/styles';
10
- import 'graphiql/graphiql.css';
11
- import 'graphql';
12
- import 'swagger-ui-react';
13
- import 'swagger-ui-react/swagger-ui.css';
14
- import '@backstage/catalog-model';
15
- import '@material-ui/core';
16
- //# sourceMappingURL=index-54f5d5e5.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-54f5d5e5.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,16 +0,0 @@
1
- export { A as ApiDefinitionCard, a as ApiTypeTitle, d as defaultDefinitionWidgets } from './index-1c6bc90a.esm.js';
2
- import '@backstage/plugin-catalog-react';
3
- import '@material-ui/lab';
4
- import 'react';
5
- import '@backstage/core-plugin-api';
6
- import '@backstage/core-components';
7
- import '@asyncapi/react-component';
8
- import '@asyncapi/react-component/lib/styles/fiori.css';
9
- import '@material-ui/core/styles';
10
- import 'graphiql/graphiql.css';
11
- import 'graphql';
12
- import 'swagger-ui-react';
13
- import 'swagger-ui-react/swagger-ui.css';
14
- import '@backstage/catalog-model';
15
- import '@material-ui/core';
16
- //# sourceMappingURL=index-8622051e.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-8622051e.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,16 +0,0 @@
1
- export { C as ConsumedApisCard, H as HasApisCard, P as ProvidedApisCard } from './index-1c6bc90a.esm.js';
2
- import '@backstage/plugin-catalog-react';
3
- import '@material-ui/lab';
4
- import 'react';
5
- import '@backstage/core-plugin-api';
6
- import '@backstage/core-components';
7
- import '@asyncapi/react-component';
8
- import '@asyncapi/react-component/lib/styles/fiori.css';
9
- import '@material-ui/core/styles';
10
- import 'graphiql/graphiql.css';
11
- import 'graphql';
12
- import 'swagger-ui-react';
13
- import 'swagger-ui-react/swagger-ui.css';
14
- import '@backstage/catalog-model';
15
- import '@material-ui/core';
16
- //# sourceMappingURL=index-ce4321da.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-ce4321da.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}