@backstage/plugin-catalog 1.1.0 → 1.2.0-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.
- package/CHANGELOG.md +41 -0
- package/dist/esm/index-3763491b.esm.js.map +1 -1
- package/dist/esm/index-390fab14.esm.js.map +1 -1
- package/dist/esm/index-41ab53b6.esm.js.map +1 -1
- package/dist/esm/{index-c7950e13.esm.js → index-4fbf5412.esm.js} +3 -2
- package/dist/esm/{index-c7950e13.esm.js.map → index-4fbf5412.esm.js.map} +1 -1
- package/dist/esm/index-66fdb6ad.esm.js.map +1 -1
- package/dist/esm/index-896aeac9.esm.js.map +1 -1
- package/dist/esm/{index-e5ffee47.esm.js → index-aca91d7d.esm.js} +3 -2
- package/dist/esm/index-aca91d7d.esm.js.map +1 -0
- package/dist/esm/index-acb3cf04.esm.js.map +1 -1
- package/dist/esm/index-b3ad464b.esm.js.map +1 -1
- package/dist/esm/index-d41abbff.esm.js.map +1 -1
- package/dist/esm/{index-8dd5bf41.esm.js → index-f7e86ae7.esm.js} +25 -10
- package/dist/esm/index-f7e86ae7.esm.js.map +1 -0
- package/dist/esm/presets-13b889b9.esm.js.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -15
- package/dist/esm/index-8dd5bf41.esm.js.map +0 -1
- package/dist/esm/index-e5ffee47.esm.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.2.0-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2bcb0a0e2b: Sidebar NAV now includes aria-label. Component AboutField now uses h2 variant instead of subtitle2 (font properties unchanged)
|
|
8
|
+
- 3a74e203a8: Updated search result components to support rendering content with highlighted matched terms
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @backstage/core-components@0.9.4-next.1
|
|
11
|
+
- @backstage/plugin-search-react@0.2.0-next.2
|
|
12
|
+
- @backstage/plugin-search-common@0.3.4-next.0
|
|
13
|
+
- @backstage/plugin-catalog-react@1.1.0-next.2
|
|
14
|
+
- @backstage/catalog-model@1.0.2-next.0
|
|
15
|
+
- @backstage/core-plugin-api@1.0.2-next.1
|
|
16
|
+
- @backstage/integration-react@1.1.0-next.2
|
|
17
|
+
- @backstage/catalog-client@1.0.2-next.0
|
|
18
|
+
- @backstage/plugin-catalog-common@1.0.2-next.0
|
|
19
|
+
|
|
20
|
+
## 1.2.0-next.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 051fc60258: Lighthouse was reporting this button as having invalid aria- values, as the popover doesn't exist until clicked. This adds additional labels to the button to make it valid aria
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
- @backstage/core-components@0.9.4-next.0
|
|
27
|
+
- @backstage/core-plugin-api@1.0.2-next.0
|
|
28
|
+
- @backstage/plugin-catalog-react@1.1.0-next.1
|
|
29
|
+
- @backstage/integration-react@1.1.0-next.1
|
|
30
|
+
|
|
31
|
+
## 1.2.0-next.0
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- 4274844a8c: Use InfoCardVariants on custom cards variant attribute
|
|
36
|
+
- ceca63d149: Added the prop `NotFoundComponent` to `EntityLayout` which can be used to include a custom component when an entity is not found in the catalog
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies
|
|
41
|
+
- @backstage/plugin-catalog-react@1.1.0-next.0
|
|
42
|
+
- @backstage/integration-react@1.1.0-next.0
|
|
43
|
+
|
|
3
44
|
## 1.1.0
|
|
4
45
|
|
|
5
46
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-3763491b.esm.js","sources":["../../src/components/HasSystemsCard/HasSystemsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?:
|
|
1
|
+
{"version":3,"file":"index-3763491b.esm.js","sources":["../../src/components/HasSystemsCard/HasSystemsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSystemsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSystemsCard(props: HasSystemsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has systems\"\n entityKind=\"System\"\n relationType={RELATION_HAS_PART}\n columns={systemEntityColumns}\n asRenderableEntities={asSystemEntities}\n emptyMessage=\"No system is part of this domain\"\n emptyHelpLink={systemEntityHelpLink}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAQO,SAAS,cAAc,CAAC,KAAK,EAAE;AACtC,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;AACzC,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE;AAClE,IAAI,OAAO;AACX,IAAI,KAAK,EAAE,aAAa;AACxB,IAAI,UAAU,EAAE,QAAQ;AACxB,IAAI,YAAY,EAAE,iBAAiB;AACnC,IAAI,OAAO,EAAE,mBAAmB;AAChC,IAAI,oBAAoB,EAAE,gBAAgB;AAC1C,IAAI,YAAY,EAAE,kCAAkC;AACpD,IAAI,aAAa,EAAE,oBAAoB;AACvC,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-390fab14.esm.js","sources":["../../src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.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 { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?:
|
|
1
|
+
{"version":3,"file":"index-390fab14.esm.js","sources":["../../src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.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 { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={componentEntityColumns}\n emptyMessage=\"No component depends on this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAQO,SAAS,0BAA0B,CAAC,KAAK,EAAE;AAClD,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,EAAE,KAAK,GAAG,0BAA0B,EAAE,GAAG,KAAK,CAAC;AAC7E,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE;AAClE,IAAI,OAAO;AACX,IAAI,KAAK;AACT,IAAI,UAAU,EAAE,WAAW;AAC3B,IAAI,YAAY,EAAE,sBAAsB;AACxC,IAAI,OAAO,EAAE,sBAAsB;AACnC,IAAI,YAAY,EAAE,wCAAwC;AAC1D,IAAI,aAAa,EAAE,uBAAuB;AAC1C,IAAI,oBAAoB,EAAE,mBAAmB;AAC7C,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-41ab53b6.esm.js","sources":["../../src/components/HasSubcomponentsCard/HasSubcomponentsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?:
|
|
1
|
+
{"version":3,"file":"index-41ab53b6.esm.js","sources":["../../src/components/HasSubcomponentsCard/HasSubcomponentsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasSubcomponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasSubcomponentsCard(props: HasSubcomponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has subcomponents\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n asRenderableEntities={asComponentEntities}\n emptyMessage=\"No subcomponent is part of this component\"\n emptyHelpLink=\"https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional\"\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAOO,SAAS,oBAAoB,CAAC,KAAK,EAAE;AAC5C,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;AACzC,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE;AAClE,IAAI,OAAO;AACX,IAAI,KAAK,EAAE,mBAAmB;AAC9B,IAAI,UAAU,EAAE,WAAW;AAC3B,IAAI,YAAY,EAAE,iBAAiB;AACnC,IAAI,OAAO,EAAE,sBAAsB;AACnC,IAAI,oBAAoB,EAAE,mBAAmB;AAC7C,IAAI,YAAY,EAAE,2CAA2C;AAC7D,IAAI,aAAa,EAAE,mGAAmG;AACtH,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -3,7 +3,7 @@ import { useOutlet } from 'react-router';
|
|
|
3
3
|
import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton } from '@backstage/core-components';
|
|
4
4
|
import { useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
5
5
|
import { EntityListProvider, CatalogFilterLayout, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker } from '@backstage/plugin-catalog-react';
|
|
6
|
-
import { c as createComponentRouteRef, C as CatalogKindHeader, a as CatalogTable } from './index-
|
|
6
|
+
import { c as createComponentRouteRef, C as CatalogKindHeader, a as CatalogTable } from './index-f7e86ae7.esm.js';
|
|
7
7
|
import 'zen-observable';
|
|
8
8
|
import '@backstage/catalog-model';
|
|
9
9
|
import 'lodash';
|
|
@@ -13,6 +13,7 @@ import '@material-ui/icons/Cached';
|
|
|
13
13
|
import '@material-ui/icons/Description';
|
|
14
14
|
import '@material-ui/icons/Edit';
|
|
15
15
|
import 'react-use/lib/useAsync';
|
|
16
|
+
import '@backstage/plugin-search-react';
|
|
16
17
|
import '@material-ui/icons/OpenInNew';
|
|
17
18
|
import '@material-ui/icons/StarBorder';
|
|
18
19
|
import '@material-ui/core/styles';
|
|
@@ -63,4 +64,4 @@ function CatalogPage(props) {
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
export { CatalogPage, DefaultCatalogPage };
|
|
66
|
-
//# sourceMappingURL=index-
|
|
67
|
+
//# sourceMappingURL=index-4fbf5412.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-4fbf5412.esm.js","sources":["../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\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';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <EntityListProvider>\n <Content>\n <ContentHeader\n titleComponent={<CatalogKindHeader initialFilter={initialKind} />}\n >\n <CreateButton\n title=\"Create Component\"\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </Content>\n </EntityListProvider>\n </PageWithHeader>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,SAAS,kBAAkB,CAAC,KAAK,EAAE;AAC1C,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,MAAM;AACR,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,uBAAuB,GAAG,OAAO;AACrC,IAAI,WAAW,GAAG,WAAW;AAC7B,IAAI,YAAY,GAAG,EAAE;AACrB,GAAG,GAAG,KAAK,CAAC;AACZ,EAAE,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC;AAChH,EAAE,MAAM,mBAAmB,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;AACnE,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE;AAC7D,IAAI,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,kBAAkB,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE;AACzK,IAAI,cAAc,kBAAkB,KAAK,CAAC,aAAa,CAAC,iBAAiB,EAAE;AAC3E,MAAM,aAAa,EAAE,WAAW;AAChC,KAAK,CAAC;AACN,GAAG,kBAAkB,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE;AACvD,IAAI,KAAK,EAAE,kBAAkB;AAC7B,IAAI,EAAE,EAAE,mBAAmB,IAAI,mBAAmB,EAAE;AACpD,GAAG,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,oCAAoC,CAAC,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,gBAAgB,EAAE,IAAI,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE;AAC9V,IAAI,aAAa,EAAE,uBAAuB;AAC1C,GAAG,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE,IAAI,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE;AAC5T,IAAI,OAAO;AACX,IAAI,OAAO;AACX,IAAI,YAAY;AAChB,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACV;;AC5CO,SAAS,WAAW,CAAC,KAAK,EAAE;AACnC,EAAE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;AAC7B,EAAE,OAAO,MAAM,oBAAoB,KAAK,CAAC,aAAa,CAAC,kBAAkB,EAAE;AAC3E,IAAI,GAAG,KAAK;AACZ,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-66fdb6ad.esm.js","sources":["../../src/components/DependsOnComponentsCard/DependsOnComponentsCard.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 { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnComponentsCardProps {\n variant?:
|
|
1
|
+
{"version":3,"file":"index-66fdb6ad.esm.js","sources":["../../src/components/DependsOnComponentsCard/DependsOnComponentsCard.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 { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nexport function DependsOnComponentsCard(props: DependsOnComponentsCardProps) {\n const { variant = 'gridItem', title = 'Depends on components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDS_ON}\n columns={componentEntityColumns}\n emptyMessage=\"No component is a dependency of this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAQO,SAAS,uBAAuB,CAAC,KAAK,EAAE;AAC/C,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,EAAE,KAAK,GAAG,uBAAuB,EAAE,GAAG,KAAK,CAAC;AAC1E,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE;AAClE,IAAI,OAAO;AACX,IAAI,KAAK;AACT,IAAI,UAAU,EAAE,WAAW;AAC3B,IAAI,YAAY,EAAE,mBAAmB;AACrC,IAAI,OAAO,EAAE,sBAAsB;AACnC,IAAI,YAAY,EAAE,gDAAgD;AAClE,IAAI,aAAa,EAAE,uBAAuB;AAC1C,IAAI,oBAAoB,EAAE,mBAAmB;AAC7C,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-896aeac9.esm.js","sources":["../../src/components/EntityLinksCard/EntityLinksEmptyState.tsx","../../src/components/EntityLinksCard/IconLink.tsx","../../src/components/EntityLinksCard/useDynamicColumns.tsx","../../src/components/EntityLinksCard/LinksGridList.tsx","../../src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstageTheme } from '@backstage/theme';\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n <>\n <Typography variant=\"body1\">\n No links defined for this entity. You can add links to your entity YAML\n as shown in the highlighted example below:\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n Read more\n </Button>\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 { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\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 { Theme, useMediaQuery } from '@material-ui/core';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\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 { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\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 { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: 'gridItem';\n}\n\nexport function EntityLinksCard(props: EntityLinksCardProps) {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title=\"Links\" variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n}\n"],"names":["useStyles"],"mappings":";;;;;;;AAGA,MAAM,WAAW,GAAG,CAAC;AACrB;AACA;AACA;AACA;AACA,qBAAqB,CAAC,CAAC;AACvB,MAAMA,WAAS,GAAG,UAAU,CAAC,CAAC,KAAK,MAAM;AACzC,EAAE,IAAI,EAAE;AACR,IAAI,YAAY,EAAE,CAAC;AACnB,IAAI,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACvC,IAAI,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM;AAC/D,GAAG;AACH,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,oCAAoC,EAAE,CAAC,CAAC;AAC7C,SAAS,qBAAqB,GAAG;AACxC,EAAE,MAAM,OAAO,GAAGA,WAAS,EAAE,CAAC;AAC9B,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,kBAAkB,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE;AACnH,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG,EAAE,oHAAoH,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACvK,IAAI,SAAS,EAAE,OAAO,CAAC,IAAI;AAC3B,GAAG,kBAAkB,KAAK,CAAC,a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C,MAAM,IAAI,EAAE,GAAG;AACf,MAAM,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC;AAC9B,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
|
|
1
|
+
{"version":3,"file":"index-896aeac9.esm.js","sources":["../../src/components/EntityLinksCard/EntityLinksEmptyState.tsx","../../src/components/EntityLinksCard/IconLink.tsx","../../src/components/EntityLinksCard/useDynamicColumns.tsx","../../src/components/EntityLinksCard/LinksGridList.tsx","../../src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { BackstageTheme } from '@backstage/theme';\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\nexport type EntityLinksEmptyStateClassKey = 'code';\n\nconst useStyles = makeStyles<BackstageTheme>(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport function EntityLinksEmptyState() {\n const classes = useStyles();\n\n return (\n <>\n <Typography variant=\"body1\">\n No links defined for this entity. You can add links to your entity YAML\n as shown in the highlighted example below:\n </Typography>\n <div className={classes.code}>\n <CodeSnippet\n text={ENTITY_YAML}\n language=\"yaml\"\n showLineNumbers\n highlightedNumbers={[3, 4, 5, 6]}\n customStyle={{ background: 'inherit', fontSize: '115%' }}\n />\n </div>\n <Button\n variant=\"contained\"\n color=\"primary\"\n target=\"_blank\"\n href=\"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\"\n >\n Read more\n </Button>\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 { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { Link } from '@backstage/core-components';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport function IconLink(props: {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}) {\n const { href, text, Icon } = props;\n const classes = useStyles();\n\n return (\n <Box display=\"flex\">\n <Box mr={1} className={classes.svgIcon}>\n <Typography component=\"div\">\n {Icon ? <Icon /> : <LanguageIcon />}\n </Typography>\n </Box>\n <Box flexGrow=\"1\">\n <Link to={href} target=\"_blank\" rel=\"noopener\">\n {text || href}\n </Link>\n </Box>\n </Box>\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 { Theme, useMediaQuery } from '@material-ui/core';\nimport { Breakpoint, ColumnBreakpoints } from './types';\n\nconst colDefaults: ColumnBreakpoints = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols: ColumnBreakpoints | number | undefined,\n): number {\n const matches: (Breakpoint | null)[] = [\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme: Theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\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 { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\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 { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: InfoCardVariants;\n}\n\nexport function EntityLinksCard(props: EntityLinksCardProps) {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title=\"Links\" variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n}\n"],"names":["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Y,GAAG,CAAC,GAAG,KAAK;AAChC,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,GAAG,GAAG,YAAY,GAAG,YAAY,CAAC;AAC5F,GAAG,CAAC;AACJ,EAAE,MAAM,KAAK,GAAG,CAAC,EAAE,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAC7F,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,QAAQ,EAAE;AACvD,IAAI,KAAK,EAAE,OAAO;AAClB,IAAI,OAAO;AACX,GAAG,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,mBAAmB,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE,IAAI,CAAC,mBAAmB,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE;AAC1J,IAAI,IAAI;AACR,IAAI,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM;AAChD,MAAM,IAAI,EAAE,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,GAAG;AACvC,MAAM,IAAI,EAAE,GAAG;AACf,MAAM,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC;AAC9B,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AboutCard, b as AboutContent, d as AboutField } from './index-
|
|
1
|
+
export { A as AboutCard, b as AboutContent, d as AboutField } from './index-f7e86ae7.esm.js';
|
|
2
2
|
import 'zen-observable';
|
|
3
3
|
import '@backstage/catalog-model';
|
|
4
4
|
import 'lodash';
|
|
@@ -12,6 +12,7 @@ import '@material-ui/icons/Description';
|
|
|
12
12
|
import '@material-ui/icons/Edit';
|
|
13
13
|
import 'react';
|
|
14
14
|
import 'react-use/lib/useAsync';
|
|
15
|
+
import '@backstage/plugin-search-react';
|
|
15
16
|
import '@material-ui/icons/OpenInNew';
|
|
16
17
|
import '@material-ui/icons/StarBorder';
|
|
17
18
|
import '@material-ui/core/styles';
|
|
@@ -24,4 +25,4 @@ import '@material-ui/icons/MoreVert';
|
|
|
24
25
|
import '@backstage/plugin-catalog-common';
|
|
25
26
|
import '@backstage/errors';
|
|
26
27
|
import '@backstage/catalog-client';
|
|
27
|
-
//# sourceMappingURL=index-
|
|
28
|
+
//# sourceMappingURL=index-aca91d7d.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-aca91d7d.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-acb3cf04.esm.js","sources":["../../src/components/HasComponentsCard/HasComponentsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?:
|
|
1
|
+
{"version":3,"file":"index-acb3cf04.esm.js","sources":["../../src/components/HasComponentsCard/HasComponentsCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasComponentsCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasComponentsCard(props: HasComponentsCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has components\"\n entityKind=\"Component\"\n relationType={RELATION_HAS_PART}\n columns={componentEntityColumns}\n emptyMessage=\"No component is part of this system\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAQO,SAAS,iBAAiB,CAAC,KAAK,EAAE;AACzC,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;AACzC,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE;AAClE,IAAI,OAAO;AACX,IAAI,KAAK,EAAE,gBAAgB;AAC3B,IAAI,UAAU,EAAE,WAAW;AAC3B,IAAI,YAAY,EAAE,iBAAiB;AACnC,IAAI,OAAO,EAAE,sBAAsB;AACnC,IAAI,YAAY,EAAE,qCAAqC;AACvD,IAAI,aAAa,EAAE,uBAAuB;AAC1C,IAAI,oBAAoB,EAAE,mBAAmB;AAC7C,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-b3ad464b.esm.js","sources":["../../src/components/HasResourcesCard/HasResourcesCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasResourcesCardProps {\n variant?:
|
|
1
|
+
{"version":3,"file":"index-b3ad464b.esm.js","sources":["../../src/components/HasResourcesCard/HasResourcesCard.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface HasResourcesCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function HasResourcesCard(props: HasResourcesCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Has resources\"\n entityKind=\"Resource\"\n relationType={RELATION_HAS_PART}\n columns={resourceEntityColumns}\n asRenderableEntities={asResourceEntities}\n emptyMessage=\"No resource is part of this system\"\n emptyHelpLink={resourceEntityHelpLink}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAQO,SAAS,gBAAgB,CAAC,KAAK,EAAE;AACxC,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;AACzC,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE;AAClE,IAAI,OAAO;AACX,IAAI,KAAK,EAAE,eAAe;AAC1B,IAAI,UAAU,EAAE,UAAU;AAC1B,IAAI,YAAY,EAAE,iBAAiB;AACnC,IAAI,OAAO,EAAE,qBAAqB;AAClC,IAAI,oBAAoB,EAAE,kBAAkB;AAC5C,IAAI,YAAY,EAAE,oCAAoC;AACtD,IAAI,aAAa,EAAE,sBAAsB;AACzC,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-d41abbff.esm.js","sources":["../../src/components/DependsOnResourcesCard/DependsOnResourcesCard.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 { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asResourceEntities,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n resourceEntityColumns,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnResourcesCardProps {\n variant?:
|
|
1
|
+
{"version":3,"file":"index-d41abbff.esm.js","sources":["../../src/components/DependsOnResourcesCard/DependsOnResourcesCard.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 { RELATION_DEPENDS_ON } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asResourceEntities,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n resourceEntityColumns,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependsOnResourcesCardProps {\n variant?: InfoCardVariants;\n}\n\nexport function DependsOnResourcesCard(props: DependsOnResourcesCardProps) {\n const { variant = 'gridItem' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title=\"Depends on resources\"\n entityKind=\"Resource\"\n relationType={RELATION_DEPENDS_ON}\n columns={resourceEntityColumns}\n emptyMessage=\"No resource is a dependency of this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asResourceEntities}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;;AAQO,SAAS,sBAAsB,CAAC,KAAK,EAAE;AAC9C,EAAE,MAAM,EAAE,OAAO,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;AACzC,EAAE,uBAAuB,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE;AAClE,IAAI,OAAO;AACX,IAAI,KAAK,EAAE,sBAAsB;AACjC,IAAI,UAAU,EAAE,UAAU;AAC1B,IAAI,YAAY,EAAE,mBAAmB;AACrC,IAAI,OAAO,EAAE,qBAAqB;AAClC,IAAI,YAAY,EAAE,+CAA+C;AACjE,IAAI,aAAa,EAAE,uBAAuB;AAC1C,IAAI,oBAAoB,EAAE,kBAAkB;AAC5C,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -11,6 +11,7 @@ import DocsIcon from '@material-ui/icons/Description';
|
|
|
11
11
|
import EditIcon from '@material-ui/icons/Edit';
|
|
12
12
|
import React, { useCallback, useMemo, useState, useEffect } from 'react';
|
|
13
13
|
import useAsync from 'react-use/lib/useAsync';
|
|
14
|
+
import { HighlightedSearchResultText } from '@backstage/plugin-search-react';
|
|
14
15
|
import OpenInNew from '@material-ui/icons/OpenInNew';
|
|
15
16
|
import StarBorder from '@material-ui/icons/StarBorder';
|
|
16
17
|
import { withStyles, makeStyles as makeStyles$1 } from '@material-ui/core/styles';
|
|
@@ -122,7 +123,7 @@ function AboutField(props) {
|
|
|
122
123
|
item: true,
|
|
123
124
|
...gridSizes
|
|
124
125
|
}, /* @__PURE__ */ React.createElement(Typography, {
|
|
125
|
-
variant: "
|
|
126
|
+
variant: "h2",
|
|
126
127
|
className: classes.label
|
|
127
128
|
}, label), content);
|
|
128
129
|
}
|
|
@@ -364,6 +365,7 @@ const useStyles$1 = makeStyles({
|
|
|
364
365
|
}
|
|
365
366
|
});
|
|
366
367
|
function CatalogSearchResultListItem(props) {
|
|
368
|
+
var _a, _b;
|
|
367
369
|
const result = props.result;
|
|
368
370
|
const classes = useStyles$1();
|
|
369
371
|
return /* @__PURE__ */ React.createElement(Link, {
|
|
@@ -374,8 +376,16 @@ function CatalogSearchResultListItem(props) {
|
|
|
374
376
|
}, /* @__PURE__ */ React.createElement(ListItemText, {
|
|
375
377
|
className: classes.itemText,
|
|
376
378
|
primaryTypographyProps: { variant: "h6" },
|
|
377
|
-
primary:
|
|
378
|
-
|
|
379
|
+
primary: ((_a = props.highlight) == null ? void 0 : _a.fields.title) ? /* @__PURE__ */ React.createElement(HighlightedSearchResultText, {
|
|
380
|
+
text: props.highlight.fields.title,
|
|
381
|
+
preTag: props.highlight.preTag,
|
|
382
|
+
postTag: props.highlight.postTag
|
|
383
|
+
}) : result.title,
|
|
384
|
+
secondary: ((_b = props.highlight) == null ? void 0 : _b.fields.text) ? /* @__PURE__ */ React.createElement(HighlightedSearchResultText, {
|
|
385
|
+
text: props.highlight.fields.text,
|
|
386
|
+
preTag: props.highlight.preTag,
|
|
387
|
+
postTag: props.highlight.postTag
|
|
388
|
+
}) : result.text
|
|
379
389
|
}), /* @__PURE__ */ React.createElement(Box, null, result.kind && /* @__PURE__ */ React.createElement(Chip, {
|
|
380
390
|
label: `Kind: ${result.kind}`,
|
|
381
391
|
size: "small"
|
|
@@ -658,15 +668,19 @@ function EntityContextMenu(props) {
|
|
|
658
668
|
"aria-label": "more",
|
|
659
669
|
"aria-controls": "long-menu",
|
|
660
670
|
"aria-haspopup": "true",
|
|
671
|
+
"aria-expanded": !!anchorEl,
|
|
672
|
+
role: "button",
|
|
661
673
|
onClick: onOpen,
|
|
662
674
|
"data-testid": "menu-button",
|
|
663
|
-
className: classes.button
|
|
675
|
+
className: classes.button,
|
|
676
|
+
id: "long-menu"
|
|
664
677
|
}, /* @__PURE__ */ React.createElement(MoreVert, null)), /* @__PURE__ */ React.createElement(Popover, {
|
|
665
678
|
open: Boolean(anchorEl),
|
|
666
679
|
onClose,
|
|
667
680
|
anchorEl,
|
|
668
681
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
669
|
-
transformOrigin: { vertical: "top", horizontal: "right" }
|
|
682
|
+
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
683
|
+
"aria-labelledby": "long-menu"
|
|
670
684
|
}, /* @__PURE__ */ React.createElement(MenuList, null, extraItems, /* @__PURE__ */ React.createElement(MenuItem, {
|
|
671
685
|
onClick: () => {
|
|
672
686
|
onClose();
|
|
@@ -747,7 +761,8 @@ const EntityLayout = (props) => {
|
|
|
747
761
|
const {
|
|
748
762
|
UNSTABLE_extraContextMenuItems,
|
|
749
763
|
UNSTABLE_contextMenuOptions,
|
|
750
|
-
children
|
|
764
|
+
children,
|
|
765
|
+
NotFoundComponent
|
|
751
766
|
} = props;
|
|
752
767
|
const { kind, namespace, name } = useRouteRefParams(entityRouteRef);
|
|
753
768
|
const { entity, loading, error } = useAsyncEntity();
|
|
@@ -803,7 +818,7 @@ const EntityLayout = (props) => {
|
|
|
803
818
|
routes
|
|
804
819
|
}), error && /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(Alert, {
|
|
805
820
|
severity: "error"
|
|
806
|
-
}, error.toString())), !loading && !error && !entity && /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(WarningPanel, {
|
|
821
|
+
}, error.toString())), !loading && !error && !entity && /* @__PURE__ */ React.createElement(Content, null, NotFoundComponent ? NotFoundComponent : /* @__PURE__ */ React.createElement(WarningPanel, {
|
|
807
822
|
title: "Entity not found"
|
|
808
823
|
}, "There is no ", kind, " with the requested", " ", /* @__PURE__ */ React.createElement(Link, {
|
|
809
824
|
to: "https://backstage.io/docs/features/software-catalog/references"
|
|
@@ -1041,7 +1056,7 @@ const catalogPlugin = createPlugin({
|
|
|
1041
1056
|
});
|
|
1042
1057
|
const CatalogIndexPage = catalogPlugin.provide(createRoutableExtension({
|
|
1043
1058
|
name: "CatalogIndexPage",
|
|
1044
|
-
component: () => import('./index-
|
|
1059
|
+
component: () => import('./index-4fbf5412.esm.js').then((m) => m.CatalogPage),
|
|
1045
1060
|
mountPoint: rootRouteRef
|
|
1046
1061
|
}));
|
|
1047
1062
|
const CatalogEntityPage = catalogPlugin.provide(createRoutableExtension({
|
|
@@ -1052,7 +1067,7 @@ const CatalogEntityPage = catalogPlugin.provide(createRoutableExtension({
|
|
|
1052
1067
|
const EntityAboutCard = catalogPlugin.provide(createComponentExtension({
|
|
1053
1068
|
name: "EntityAboutCard",
|
|
1054
1069
|
component: {
|
|
1055
|
-
lazy: () => import('./index-
|
|
1070
|
+
lazy: () => import('./index-aca91d7d.esm.js').then((m) => m.AboutCard)
|
|
1056
1071
|
}
|
|
1057
1072
|
}));
|
|
1058
1073
|
const EntityLinksCard = catalogPlugin.provide(createComponentExtension({
|
|
@@ -1111,4 +1126,4 @@ const RelatedEntitiesCard = catalogPlugin.provide(createComponentExtension({
|
|
|
1111
1126
|
}));
|
|
1112
1127
|
|
|
1113
1128
|
export { AboutCard as A, EntityListContainer as B, CatalogKindHeader as C, DefaultStarredEntitiesApi as D, EntityAboutCard as E, FilteredEntityLayout as F, RelatedEntitiesCard as R, CatalogTable as a, AboutContent as b, createComponentRouteRef as c, AboutField as d, CatalogEntityPage as e, CatalogIndexPage as f, catalogPlugin as g, EntityDependencyOfComponentsCard as h, EntityDependsOnComponentsCard as i, EntityDependsOnResourcesCard as j, EntityHasComponentsCard as k, EntityHasResourcesCard as l, EntityHasSubcomponentsCard as m, EntityHasSystemsCard as n, EntityLinksCard as o, CatalogSearchResultListItem as p, EntityLayout as q, EntityOrphanWarning as r, isOrphan as s, EntityProcessingErrorsPanel as t, hasCatalogProcessingErrors as u, EntitySwitch as v, isKind as w, isNamespace as x, isComponentType as y, FilterContainer as z };
|
|
1114
|
-
//# sourceMappingURL=index-
|
|
1129
|
+
//# sourceMappingURL=index-f7e86ae7.esm.js.map
|