@backstage/plugin-catalog 1.11.1 → 1.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,102 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
- ## 1.11.1
3
+ ## 1.11.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 08f177b91084: Add link from Template entity to the scaffolder launch page for the template in the AboutCard.
8
+ - 2e036369d83b: Updated `alertApi` usages with severity of `info` or `success` to use `display: transient`
9
+ - 530b6f364c8c: Adding in type and kind entity details to catalog table title for user clarity
10
+ - 886055301abe: `CatalogIndexPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`,
11
+ exposing a new mode `<CatalogIndexPage ownerPickerMode="all" />` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog.
12
+ - 47b01e4c5315: Keyboard navigation to open EntityContextMenu now focus visible the first element.
13
+ - Updated dependencies
14
+ - @backstage/core-plugin-api@1.5.2
15
+ - @backstage/catalog-client@1.4.2
16
+ - @backstage/plugin-search-react@1.6.2
17
+ - @backstage/core-components@0.13.2
18
+ - @backstage/types@1.1.0
19
+ - @backstage/theme@0.4.0
20
+ - @backstage/plugin-catalog-react@1.7.0
21
+ - @backstage/catalog-model@1.4.0
22
+ - @backstage/errors@1.2.0
23
+ - @backstage/integration-react@1.1.14
24
+ - @backstage/plugin-catalog-common@1.0.14
25
+ - @backstage/plugin-scaffolder-common@1.3.1
26
+ - @backstage/plugin-search-common@1.2.4
27
+
28
+ ## 1.11.2-next.3
29
+
30
+ ### Patch Changes
31
+
32
+ - 530b6f364c8c: Adding in type and kind entity details to catalog table title for user clarity
33
+ - 886055301abe: `CatalogIndexPage` now accepts an optional `ownerPickerMode` for toggling the behavior of the `EntityOwnerPicker`,
34
+ exposing a new mode `<CatalogIndexPage ownerPickerMode="all" />` particularly suitable for larger catalogs. In this new mode, `EntityOwnerPicker` will display all the users and groups present in the catalog.
35
+ - Updated dependencies
36
+ - @backstage/plugin-search-react@1.6.2-next.3
37
+ - @backstage/core-components@0.13.2-next.3
38
+ - @backstage/catalog-model@1.4.0-next.1
39
+ - @backstage/catalog-client@1.4.2-next.2
40
+ - @backstage/core-plugin-api@1.5.2-next.0
41
+ - @backstage/errors@1.2.0-next.0
42
+ - @backstage/integration-react@1.1.14-next.3
43
+ - @backstage/theme@0.4.0-next.1
44
+ - @backstage/types@1.0.2
45
+ - @backstage/plugin-catalog-common@1.0.14-next.1
46
+ - @backstage/plugin-catalog-react@1.7.0-next.3
47
+ - @backstage/plugin-scaffolder-common@1.3.1-next.1
48
+ - @backstage/plugin-search-common@1.2.4-next.0
49
+
50
+ ## 1.11.1-next.2
51
+
52
+ ### Patch Changes
53
+
54
+ - 47b01e4c5315: Keyboard navigation to open EntityContextMenu now focus visible the first element.
55
+ - Updated dependencies
56
+ - @backstage/theme@0.4.0-next.1
57
+ - @backstage/plugin-catalog-react@1.7.0-next.2
58
+ - @backstage/core-components@0.13.2-next.2
59
+ - @backstage/integration-react@1.1.14-next.2
60
+ - @backstage/plugin-search-react@1.6.1-next.2
61
+ - @backstage/core-plugin-api@1.5.2-next.0
62
+
63
+ ## 1.11.1-next.1
4
64
 
5
65
  ### Patch Changes
6
66
 
67
+ - 08f177b91084: Add link from Template entity to the scaffolder launch page for the template in the AboutCard.
7
68
  - Updated dependencies
8
- - @backstage/plugin-search-react@1.6.1
69
+ - @backstage/errors@1.2.0-next.0
70
+ - @backstage/plugin-search-react@1.6.1-next.1
71
+ - @backstage/core-components@0.13.2-next.1
72
+ - @backstage/plugin-catalog-react@1.7.0-next.1
73
+ - @backstage/catalog-model@1.4.0-next.0
74
+ - @backstage/core-plugin-api@1.5.2-next.0
75
+ - @backstage/integration-react@1.1.14-next.1
76
+ - @backstage/catalog-client@1.4.2-next.1
77
+ - @backstage/plugin-catalog-common@1.0.14-next.0
78
+ - @backstage/plugin-scaffolder-common@1.3.1-next.0
79
+ - @backstage/theme@0.4.0-next.0
80
+ - @backstage/types@1.0.2
81
+ - @backstage/plugin-search-common@1.2.4-next.0
82
+
83
+ ## 1.11.1-next.0
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies
88
+ - @backstage/catalog-client@1.4.2-next.0
89
+ - @backstage/plugin-catalog-react@1.7.0-next.0
90
+ - @backstage/theme@0.4.0-next.0
91
+ - @backstage/core-components@0.13.2-next.0
92
+ - @backstage/core-plugin-api@1.5.1
93
+ - @backstage/integration-react@1.1.14-next.0
94
+ - @backstage/plugin-search-react@1.6.1-next.0
95
+ - @backstage/catalog-model@1.3.0
96
+ - @backstage/errors@1.1.5
97
+ - @backstage/types@1.0.2
98
+ - @backstage/plugin-catalog-common@1.0.13
99
+ - @backstage/plugin-search-common@1.2.3
9
100
 
10
101
  ## 1.11.0
11
102
 
@@ -1,4 +1,4 @@
1
- export { A as AboutCard, a as AboutContent, b as AboutField } from './index-06f6e8ce.esm.js';
1
+ export { A as AboutCard, a as AboutContent, b as AboutField } from './index-a2e41e34.esm.js';
2
2
  import 'zen-observable';
3
3
  import '@backstage/catalog-model';
4
4
  import 'lodash';
@@ -6,7 +6,9 @@ import '@backstage/core-components';
6
6
  import '@backstage/core-plugin-api';
7
7
  import '@backstage/integration-react';
8
8
  import '@backstage/plugin-catalog-react';
9
+ import '@backstage/plugin-scaffolder-common';
9
10
  import '@material-ui/core';
11
+ import '@material-ui/icons/AddCircleOutline';
10
12
  import '@material-ui/icons/Cached';
11
13
  import '@material-ui/icons/Description';
12
14
  import '@material-ui/icons/Edit';
@@ -29,4 +31,4 @@ import '@material-ui/icons/Cancel';
29
31
  import '@backstage/errors';
30
32
  import '@backstage/catalog-client';
31
33
  import '@backstage/plugin-search-react';
32
- //# sourceMappingURL=index-6391c20c.esm.js.map
34
+ //# sourceMappingURL=index-22222fef.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-22222fef.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,12 +3,14 @@ import LanguageIcon from '@material-ui/icons/Language';
3
3
  import React from 'react';
4
4
  import { makeStyles, Typography, Button } from '@material-ui/core';
5
5
  import { CodeSnippet, InfoCard } from '@backstage/core-components';
6
- import { L as LinksGridList } from './index-06f6e8ce.esm.js';
6
+ import { L as LinksGridList } from './index-a2e41e34.esm.js';
7
7
  import { useApp } from '@backstage/core-plugin-api';
8
8
  import 'zen-observable';
9
9
  import '@backstage/catalog-model';
10
10
  import 'lodash';
11
11
  import '@backstage/integration-react';
12
+ import '@backstage/plugin-scaffolder-common';
13
+ import '@material-ui/icons/AddCircleOutline';
12
14
  import '@material-ui/icons/Cached';
13
15
  import '@material-ui/icons/Description';
14
16
  import '@material-ui/icons/Edit';
@@ -93,4 +95,4 @@ const EntityLinksCard = (props) => {
93
95
  };
94
96
 
95
97
  export { EntityLinksCard };
96
- //# sourceMappingURL=index-1c47c3d8.esm.js.map
98
+ //# sourceMappingURL=index-84dbc0bc.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-1c47c3d8.esm.js","sources":["../../src/components/EntityLinksCard/EntityLinksEmptyState.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:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\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 { 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 const 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":["_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,WAAc,GAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAA,CAAA,CAAA;AAUpB,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,CAAA;AAAA,MACd,MAAQ,EAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA,CAAA,MAAA,CAAA;AAAA,MAC1B,UAAA,EACE,MAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA,KAAA,CAAM,QAAQ,MAAO,CAAA,KAAA;AAAA,KAClE;AAAA,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oCAAqC,EAAA;AAC/C,CAAA,CAAA;AAEO,SAAS,qBAAwB,GAAA;AACtC,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAE1B,EACE,uBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAA,EAAQ,oHAG5B,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,IACtB,E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A;AAEhC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,KAAM,EAAA,OAAA,EAAQ,OACrB,EAAA,EAAA,CAAC,KAAS,IAAA,KAAA,CAAM,MAAW,KAAA,CAAA,mBACzB,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,CAEvB,mBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,KAAA,EAAO,MAAM,GAAI,CAAA,CAAC,EAAE,GAAK,EAAA,KAAA,EAAO,MAAY,MAAA;AAAA,QAC1C,MAAM,KAAS,IAAA,IAAA,GAAA,KAAA,GAAA,GAAA;AAAA,QACf,IAAM,EAAA,GAAA;AAAA,QACN,IAAA,EAAM,aAAa,IAAI,CAAA;AAAA,OACvB,CAAA,CAAA;AAAA,KAAA;AAAA,GAGR,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"index-84dbc0bc.esm.js","sources":["../../src/components/EntityLinksCard/EntityLinksEmptyState.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:\n theme.palette.type === 'dark' ? '#444' : theme.palette.common.white,\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 { 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 const 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":["_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,WAAc,GAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAA,CAAA,CAAA;AAUpB,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAU,KAAA,MAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,YAAc,EAAA,CAAA;AAAA,MACd,MAAQ,EAAA,CAAA,EAAG,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA,CAAA,MAAA,CAAA;AAAA,MAC1B,UAAA,EACE,MAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA,KAAA,CAAM,QAAQ,MAAO,CAAA,KAAA;AAAA,KAClE;AAAA,GACF,CAAA;AAAA,EACA,EAAE,MAAM,oCAAqC,EAAA;AAC/C,CAAA,CAAA;AAEO,SAAS,qBAAwB,GAAA;AACtC,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAE1B,EACE,uBAAA,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAW,OAAQ,EAAA,OAAA,EAAA,EAAQ,oHAG5B,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,IACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACC,IAAM,EAAA,WAAA;AAAA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,EAAA,EAAA,CAAC,KAAS,IAAA,KAAA,CAAM,MAAW,KAAA,CAAA,mBACzB,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,CAEvB,mBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,KAAA,EAAO,MAAM,GAAI,CAAA,CAAC,EAAE,GAAK,EAAA,KAAA,EAAO,MAAY,MAAA;AAAA,QAC1C,MAAM,KAAS,IAAA,IAAA,GAAA,KAAA,GAAA,GAAA;AAAA,QACf,IAAM,EAAA,GAAA;AAAA,QACN,IAAA,EAAM,aAAa,IAAI,CAAA;AAAA,OACvB,CAAA,CAAA;AAAA,KAAA;AAAA,GAGR,CAAA,CAAA;AAEJ;;;;"}
@@ -2,10 +2,12 @@ import ObservableImpl from 'zen-observable';
2
2
  import { stringifyEntityRef, RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation, ANNOTATION_EDIT_URL, DEFAULT_NAMESPACE, ANNOTATION_LOCATION, ANNOTATION_VIEW_URL } from '@backstage/catalog-model';
3
3
  import { isArray, isString, capitalize } from 'lodash';
4
4
  import { Link, MarkdownContent, HeaderIconLinkRow, OverflowTooltip, WarningPanel, CodeSnippet, Table, Page, Header, Progress, RoutedTabs, Content, HeaderLabel, ResponseErrorPanel, InfoCard } from '@backstage/core-components';
5
- import { createExternalRouteRef, createRouteRef, useElementFilter, useApi, alertApiRef, errorApiRef, useRouteRef, attachComponentData, useRouteRefParams, useApiHolder, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
5
+ import { createExternalRouteRef, createRouteRef, useElementFilter, useApp, useApi, alertApiRef, errorApiRef, useRouteRef, attachComponentData, useRouteRefParams, useApiHolder, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
6
6
  import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
7
7
  import { getEntityRelations, EntityRefLinks, useEntity, catalogApiRef, getEntitySourceLocation as getEntitySourceLocation$1, useEntityList, EntityKindFilter, EntityRefLink, humanizeEntityRef, useStarredEntities, entityRouteRef, useAsyncEntity, UnregisterEntityDialog, InspectEntityDialog, FavoriteEntity, CatalogFilterLayout, starredEntitiesApiRef } from '@backstage/plugin-catalog-react';
8
+ import { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
8
9
  import { makeStyles, Typography, Grid, Box, useMediaQuery, ImageList, ImageListItem, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, Select, InputBase, MenuItem, ListItemIcon, ListItemText, Tooltip, Popover, MenuList, Dialog, DialogTitle, DialogActions, Button } from '@material-ui/core';
10
+ import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
9
11
  import CachedIcon from '@material-ui/icons/Cached';
10
12
  import DocsIcon from '@material-ui/icons/Description';
11
13
  import EditIcon from '@material-ui/icons/Edit';
@@ -103,6 +105,11 @@ const viewTechDocRouteRef = createExternalRouteRef({
103
105
  optional: true,
104
106
  params: ["namespace", "kind", "name"]
105
107
  });
108
+ const createFromTemplateRouteRef = createExternalRouteRef({
109
+ id: "create-from-template",
110
+ optional: true,
111
+ params: ["namespace", "templateName"]
112
+ });
106
113
  const rootRouteRef = createRouteRef({
107
114
  id: "catalog"
108
115
  });
@@ -344,8 +351,9 @@ const useStyles$4 = makeStyles({
344
351
  }
345
352
  });
346
353
  function AboutCard(props) {
347
- var _a, _b, _c;
354
+ var _a, _b, _c, _d;
348
355
  const { variant } = props;
356
+ const app = useApp();
349
357
  const classes = useStyles$4();
350
358
  const { entity } = useEntity();
351
359
  const scmIntegrationsApi = useApi(scmIntegrationsApiRef);
@@ -353,6 +361,7 @@ function AboutCard(props) {
353
361
  const alertApi = useApi(alertApiRef);
354
362
  const errorApi = useApi(errorApiRef);
355
363
  const viewTechdocLink = useRouteRef(viewTechDocRouteRef);
364
+ const templateRoute = useRouteRef(createFromTemplateRouteRef);
356
365
  const entitySourceLocation = getEntitySourceLocation$1(
357
366
  entity,
358
367
  scmIntegrationsApi
@@ -374,6 +383,20 @@ function AboutCard(props) {
374
383
  name: entity.metadata.name
375
384
  })
376
385
  };
386
+ const subHeaderLinks = [viewInSource, viewInTechDocs];
387
+ if (isTemplateEntityV1beta3(entity)) {
388
+ const Icon = (_c = app.getSystemIcon("scaffolder")) != null ? _c : CreateComponentIcon;
389
+ const launchTemplate = {
390
+ label: "Launch Template",
391
+ icon: /* @__PURE__ */ React.createElement(Icon, null),
392
+ disabled: !templateRoute,
393
+ href: templateRoute && templateRoute({
394
+ templateName: entity.metadata.name,
395
+ namespace: entity.metadata.namespace || DEFAULT_NAMESPACE
396
+ })
397
+ };
398
+ subHeaderLinks.push(launchTemplate);
399
+ }
377
400
  let cardClass = "";
378
401
  if (variant === "gridItem") {
379
402
  cardClass = classes.gridItemCard;
@@ -386,12 +409,16 @@ function AboutCard(props) {
386
409
  } else if (variant === "fullHeight") {
387
410
  cardContentClass = classes.fullHeightCardContent;
388
411
  }
389
- const entityLocation = (_c = entity.metadata.annotations) == null ? void 0 : _c[ANNOTATION_LOCATION];
412
+ const entityLocation = (_d = entity.metadata.annotations) == null ? void 0 : _d[ANNOTATION_LOCATION];
390
413
  const allowRefresh = (entityLocation == null ? void 0 : entityLocation.startsWith("url:")) || (entityLocation == null ? void 0 : entityLocation.startsWith("file:"));
391
414
  const refreshEntity = useCallback(async () => {
392
415
  try {
393
416
  await catalogApi.refreshEntity(stringifyEntityRef(entity));
394
- alertApi.post({ message: "Refresh scheduled", severity: "info" });
417
+ alertApi.post({
418
+ message: "Refresh scheduled",
419
+ severity: "info",
420
+ display: "transient"
421
+ });
395
422
  } catch (e) {
396
423
  errorApi.post(e);
397
424
  }
@@ -419,7 +446,7 @@ function AboutCard(props) {
419
446
  },
420
447
  /* @__PURE__ */ React.createElement(EditIcon, null)
421
448
  )),
422
- subheader: /* @__PURE__ */ React.createElement(HeaderIconLinkRow, { links: [viewInSource, viewInTechDocs] })
449
+ subheader: /* @__PURE__ */ React.createElement(HeaderIconLinkRow, { links: subHeaderLinks })
423
450
  }
424
451
  ), /* @__PURE__ */ React.createElement(Divider, null), /* @__PURE__ */ React.createElement(CardContent, { className: cardContentClass }, /* @__PURE__ */ React.createElement(AboutContent, { entity })));
425
452
  }
@@ -684,7 +711,7 @@ const refCompare = (a, b) => {
684
711
  return toRef(a).localeCompare(toRef(b));
685
712
  };
686
713
  const CatalogTable = (props) => {
687
- var _a, _b, _c;
714
+ var _a, _b, _c, _d, _e;
688
715
  const { columns, actions, tableOptions, subtitle, emptyContent } = props;
689
716
  const { isStarredEntity, toggleStarredEntity } = useStarredEntities();
690
717
  const { loading, error, entities, filters } = useEntityList();
@@ -807,6 +834,9 @@ const CatalogTable = (props) => {
807
834
  typeColumn.hidden = !showTypeColumn;
808
835
  }
809
836
  const showPagination = rows.length > 20;
837
+ const currentKind = ((_d = filters.kind) == null ? void 0 : _d.value) || "";
838
+ const currentType = ((_e = filters.type) == null ? void 0 : _e.value) || "";
839
+ const titleDisplay = [titlePreamble, currentType, pluralize(currentKind)].filter((s) => s).join(" ");
810
840
  return /* @__PURE__ */ React.createElement(
811
841
  Table,
812
842
  {
@@ -822,7 +852,7 @@ const CatalogTable = (props) => {
822
852
  pageSizeOptions: [20, 50, 100],
823
853
  ...tableOptions
824
854
  },
825
- title: `${titlePreamble} (${entities.length})`,
855
+ title: `${titleDisplay} (${entities.length})`,
826
856
  data: rows,
827
857
  actions: actions || defaultActions,
828
858
  subtitle,
@@ -938,7 +968,7 @@ function EntityContextMenu(props) {
938
968
  transformOrigin: { vertical: "top", horizontal: "right" },
939
969
  "aria-labelledby": "long-menu"
940
970
  },
941
- /* @__PURE__ */ React.createElement(MenuList, null, extraItems, /* @__PURE__ */ React.createElement(
971
+ /* @__PURE__ */ React.createElement(MenuList, { autoFocusItem: Boolean(anchorEl) }, extraItems, /* @__PURE__ */ React.createElement(
942
972
  UnregisterEntity,
943
973
  {
944
974
  unregisterEntityOptions: UNSTABLE_contextMenuOptions,
@@ -1441,7 +1471,8 @@ const catalogPlugin = createPlugin({
1441
1471
  },
1442
1472
  externalRoutes: {
1443
1473
  createComponent: createComponentRouteRef,
1444
- viewTechDoc: viewTechDocRouteRef
1474
+ viewTechDoc: viewTechDocRouteRef,
1475
+ createFromTemplate: createFromTemplateRouteRef
1445
1476
  },
1446
1477
  __experimentalConfigure(options) {
1447
1478
  const defaultOptions = {
@@ -1453,7 +1484,7 @@ const catalogPlugin = createPlugin({
1453
1484
  const CatalogIndexPage = catalogPlugin.provide(
1454
1485
  createRoutableExtension({
1455
1486
  name: "CatalogIndexPage",
1456
- component: () => import('./index-41f94bc9.esm.js').then((m) => m.CatalogPage),
1487
+ component: () => import('./index-a941a094.esm.js').then((m) => m.CatalogPage),
1457
1488
  mountPoint: rootRouteRef
1458
1489
  })
1459
1490
  );
@@ -1468,7 +1499,7 @@ const EntityAboutCard = catalogPlugin.provide(
1468
1499
  createComponentExtension({
1469
1500
  name: "EntityAboutCard",
1470
1501
  component: {
1471
- lazy: () => import('./index-6391c20c.esm.js').then((m) => m.AboutCard)
1502
+ lazy: () => import('./index-22222fef.esm.js').then((m) => m.AboutCard)
1472
1503
  }
1473
1504
  })
1474
1505
  );
@@ -1476,7 +1507,7 @@ const EntityLinksCard = catalogPlugin.provide(
1476
1507
  createComponentExtension({
1477
1508
  name: "EntityLinksCard",
1478
1509
  component: {
1479
- lazy: () => import('./index-1c47c3d8.esm.js').then((m) => m.EntityLinksCard)
1510
+ lazy: () => import('./index-84dbc0bc.esm.js').then((m) => m.EntityLinksCard)
1480
1511
  }
1481
1512
  })
1482
1513
  );
@@ -1484,7 +1515,7 @@ const EntityLabelsCard = catalogPlugin.provide(
1484
1515
  createComponentExtension({
1485
1516
  name: "EntityLabelsCard",
1486
1517
  component: {
1487
- lazy: () => import('./index-37b55325.esm.js').then((m) => m.EntityLabelsCard)
1518
+ lazy: () => import('./index-c18f1603.esm.js').then((m) => m.EntityLabelsCard)
1488
1519
  }
1489
1520
  })
1490
1521
  );
@@ -1573,4 +1604,4 @@ const CatalogSearchResultListItem = catalogPlugin.provide(
1573
1604
  );
1574
1605
 
1575
1606
  export { AboutCard as A, isNamespace as B, CatalogTable as C, DefaultStarredEntitiesApi as D, EntityLabelsCard$1 as E, isComponentType as F, isResourceType as G, isEntityWith as H, FilteredEntityLayout as I, FilterContainer as J, EntityListContainer as K, LinksGridList as L, RelatedEntitiesCard as R, AboutContent as a, AboutField as b, createComponentRouteRef as c, CatalogEntityPage as d, CatalogIndexPage as e, catalogPlugin as f, EntityAboutCard as g, hasLabels as h, EntityDependencyOfComponentsCard as i, EntityDependsOnComponentsCard as j, EntityDependsOnResourcesCard as k, EntityHasComponentsCard as l, EntityHasResourcesCard as m, EntityHasSubcomponentsCard as n, EntityHasSystemsCard as o, EntityLinksCard as p, EntityLabelsCard as q, CatalogSearchResultListItem as r, CatalogKindHeader as s, EntityLayout as t, EntityOrphanWarning as u, isOrphan as v, EntityProcessingErrorsPanel as w, hasCatalogProcessingErrors as x, EntitySwitch as y, isKind as z };
1576
- //# sourceMappingURL=index-06f6e8ce.esm.js.map
1607
+ //# sourceMappingURL=index-a2e41e34.esm.js.map