@backstage/plugin-catalog 1.7.3-next.0 → 1.8.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 CHANGED
@@ -1,5 +1,50 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.8.0-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 66e2aab4c4: `ListItem` wrapper component moved to `SearchResultListItemExtension` for all `*SearchResultListItems` that are exported as extensions. This is to make sure the list only contains list elements.
8
+
9
+ Note: If you have implemented a custom result list item, we recommend you to remove the list item wrapper to avoid nested `<li>` elements.
10
+
11
+ - Updated dependencies
12
+ - @backstage/catalog-model@1.2.0-next.1
13
+ - @backstage/plugin-search-react@1.5.0-next.1
14
+ - @backstage/core-components@0.12.4-next.1
15
+ - @backstage/catalog-client@1.3.1-next.1
16
+ - @backstage/core-plugin-api@1.3.0
17
+ - @backstage/errors@1.1.4
18
+ - @backstage/integration-react@1.1.10-next.1
19
+ - @backstage/theme@0.2.16
20
+ - @backstage/types@1.0.2
21
+ - @backstage/plugin-catalog-common@1.0.11-next.1
22
+ - @backstage/plugin-catalog-react@1.3.0-next.2
23
+ - @backstage/plugin-search-common@1.2.1
24
+
25
+ ## 1.8.0-next.1
26
+
27
+ ### Minor Changes
28
+
29
+ - 0c1fc3986c: Added Markdown support in the `AboutCard` description section
30
+ - 0eaa579f89: The `CatalogSearchResultListItem` component is now a search result extension. This means that when rendered as a child of components that render search extensions, the `result`, `rank`, and `highlight` properties are optional. See the [documentation](https://backstage.io/docs/features/search/how-to-guides#how-to-render-search-results-using-extensions) for more details.
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies
35
+ - @backstage/core-components@0.12.4-next.0
36
+ - @backstage/plugin-search-react@1.5.0-next.0
37
+ - @backstage/plugin-catalog-react@1.3.0-next.1
38
+ - @backstage/catalog-client@1.3.1-next.0
39
+ - @backstage/catalog-model@1.1.6-next.0
40
+ - @backstage/core-plugin-api@1.3.0
41
+ - @backstage/errors@1.1.4
42
+ - @backstage/integration-react@1.1.10-next.0
43
+ - @backstage/theme@0.2.16
44
+ - @backstage/types@1.0.2
45
+ - @backstage/plugin-catalog-common@1.0.11-next.0
46
+ - @backstage/plugin-search-common@1.2.1
47
+
3
48
  ## 1.7.3-next.0
4
49
 
5
50
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- export { A as AboutCard, a as AboutContent, b as AboutField } from './index-05290c15.esm.js';
1
+ export { A as AboutCard, a as AboutContent, b as AboutField } from './index-c5aa1904.esm.js';
2
2
  import 'zen-observable';
3
3
  import '@backstage/catalog-model';
4
4
  import 'lodash';
@@ -14,7 +14,6 @@ import 'react';
14
14
  import '@material-ui/icons/Language';
15
15
  import 'pluralize';
16
16
  import 'react-use/lib/useAsync';
17
- import '@backstage/plugin-search-react';
18
17
  import '@material-ui/core/styles';
19
18
  import '@material-ui/icons/OpenInNew';
20
19
  import '@material-ui/icons/Star';
@@ -28,4 +27,5 @@ import '@backstage/plugin-catalog-common';
28
27
  import '@material-ui/icons/Cancel';
29
28
  import '@backstage/errors';
30
29
  import '@backstage/catalog-client';
31
- //# sourceMappingURL=index-2c3b0303.esm.js.map
30
+ import '@backstage/plugin-search-react';
31
+ //# sourceMappingURL=index-857fb923.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-857fb923.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ 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-05290c15.esm.js';
6
+ import { L as LinksGridList } from './index-c5aa1904.esm.js';
7
7
  import { useApp } from '@backstage/core-plugin-api';
8
8
  import 'zen-observable';
9
9
  import '@backstage/catalog-model';
@@ -14,7 +14,6 @@ import '@material-ui/icons/Description';
14
14
  import '@material-ui/icons/Edit';
15
15
  import 'pluralize';
16
16
  import 'react-use/lib/useAsync';
17
- import '@backstage/plugin-search-react';
18
17
  import '@material-ui/core/styles';
19
18
  import '@material-ui/icons/OpenInNew';
20
19
  import '@material-ui/icons/Star';
@@ -28,6 +27,7 @@ import '@backstage/plugin-catalog-common';
28
27
  import '@material-ui/icons/Cancel';
29
28
  import '@backstage/errors';
30
29
  import '@backstage/catalog-client';
30
+ import '@backstage/plugin-search-react';
31
31
 
32
32
  const ENTITY_YAML = `metadata:
33
33
  name: example
@@ -92,4 +92,4 @@ const EntityLinksCard = (props) => {
92
92
  };
93
93
 
94
94
  export { EntityLinksCard };
95
- //# sourceMappingURL=index-07f33109.esm.js.map
95
+ //# sourceMappingURL=index-8a7df8bb.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-07f33109.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: 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 { 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,UAAY,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,KAAS,SAAS,MAAS,GAAA,MAAA;AAAA,KACvD;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,MACN,QAAS,EAAA,MAAA;AAAA,MACT,eAAe,EAAA,IAAA;AAAA,MACf,kBAAoB,EAAA,CAAC,CAAG,EAAA,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AA,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-8a7df8bb.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: 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 { 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,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,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,11 +1,11 @@
1
1
  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
- import { Link, 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, useAnalytics, attachComponentData, useRouteRefParams, useApiHolder, createPlugin, createApiFactory, discoveryApiRef, fetchApiRef, storageApiRef, createRoutableExtension, createComponentExtension } from '@backstage/core-plugin-api';
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';
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, useEntityPermission, entityRouteRef, useAsyncEntity, UnregisterEntityDialog, InspectEntityDialog, FavoriteEntity, CatalogFilterLayout, starredEntitiesApiRef } from '@backstage/plugin-catalog-react';
8
- import { makeStyles, Typography, Grid, Box, useMediaQuery, ImageList, ImageListItem, Chip, Card, CardHeader, IconButton, Divider, CardContent, createStyles, Select, InputBase, MenuItem, ListItem, ListItemIcon, ListItemText, Tooltip, Popover, MenuList, Dialog, DialogTitle, DialogActions, Button } from '@material-ui/core';
8
+ 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';
9
9
  import CachedIcon from '@material-ui/icons/Cached';
10
10
  import DocsIcon from '@material-ui/icons/Description';
11
11
  import EditIcon from '@material-ui/icons/Edit';
@@ -13,7 +13,6 @@ import React, { useCallback, useMemo, useState, useEffect } from 'react';
13
13
  import LanguageIcon from '@material-ui/icons/Language';
14
14
  import pluralize from 'pluralize';
15
15
  import useAsync from 'react-use/lib/useAsync';
16
- import { HighlightedSearchResultText } from '@backstage/plugin-search-react';
17
16
  import { withStyles, makeStyles as makeStyles$1 } from '@material-ui/core/styles';
18
17
  import OpenInNew from '@material-ui/icons/OpenInNew';
19
18
  import Star from '@material-ui/icons/Star';
@@ -27,6 +26,7 @@ import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common'
27
26
  import CancelIcon from '@material-ui/icons/Cancel';
28
27
  import { assertError } from '@backstage/errors';
29
28
  import { ENTITY_STATUS_CATALOG_PROCESSING_TYPE, CatalogClient } from '@backstage/catalog-client';
29
+ import { createSearchResultListItemExtension } from '@backstage/plugin-search-react';
30
30
 
31
31
  async function performMigrationToTheNewBucket({
32
32
  storageApi
@@ -106,7 +106,7 @@ const rootRouteRef = createRouteRef({
106
106
  id: "catalog"
107
107
  });
108
108
 
109
- const useStyles$8 = makeStyles((theme) => ({
109
+ const useStyles$7 = makeStyles((theme) => ({
110
110
  value: {
111
111
  fontWeight: "bold",
112
112
  overflow: "hidden",
@@ -125,13 +125,13 @@ const useStyles$8 = makeStyles((theme) => ({
125
125
  }));
126
126
  function AboutField(props) {
127
127
  const { label, value, gridSizes, children } = props;
128
- const classes = useStyles$8();
128
+ const classes = useStyles$7();
129
129
  const childElements = useElementFilter(children, (c) => c.getElements());
130
130
  const content = childElements.length > 0 ? childElements : /* @__PURE__ */ React.createElement(Typography, { variant: "body2", className: classes.value }, value || `unknown`);
131
131
  return /* @__PURE__ */ React.createElement(Grid, { item: true, ...gridSizes }, /* @__PURE__ */ React.createElement(Typography, { variant: "h2", className: classes.label }, label), content);
132
132
  }
133
133
 
134
- const useStyles$7 = makeStyles({
134
+ const useStyles$6 = makeStyles({
135
135
  svgIcon: {
136
136
  display: "inline-block",
137
137
  "& svg": {
@@ -143,7 +143,7 @@ const useStyles$7 = makeStyles({
143
143
  });
144
144
  function IconLink(props) {
145
145
  const { href, text, Icon } = props;
146
- const classes = useStyles$7();
146
+ const classes = useStyles$6();
147
147
  return /* @__PURE__ */ React.createElement(Box, { display: "flex" }, /* @__PURE__ */ React.createElement(Box, { mr: 1, className: classes.svgIcon }, /* @__PURE__ */ React.createElement(Typography, { component: "div" }, Icon ? /* @__PURE__ */ React.createElement(Icon, null) : /* @__PURE__ */ React.createElement(LanguageIcon, null))), /* @__PURE__ */ React.createElement(Box, { flexGrow: "1" }, /* @__PURE__ */ React.createElement(Link, { to: href, target: "_blank", rel: "noopener" }, text || href)));
148
148
  }
149
149
 
@@ -179,7 +179,7 @@ function LinksGridList(props) {
179
179
  return /* @__PURE__ */ React.createElement(ImageList, { rowHeight: "auto", cols: numOfCols }, items.map(({ text, href, Icon }, i) => /* @__PURE__ */ React.createElement(ImageListItem, { key: i }, /* @__PURE__ */ React.createElement(IconLink, { href, text: text != null ? text : href, Icon }))));
180
180
  }
181
181
 
182
- const useStyles$6 = makeStyles({
182
+ const useStyles$5 = makeStyles({
183
183
  description: {
184
184
  wordBreak: "break-word"
185
185
  }
@@ -197,7 +197,7 @@ function getLocationTargetHref(target, type, entitySourceLocation) {
197
197
  function AboutContent(props) {
198
198
  var _a, _b, _c, _d, _e, _f, _g, _h;
199
199
  const { entity } = props;
200
- const classes = useStyles$6();
200
+ const classes = useStyles$5();
201
201
  const isSystem = entity.kind.toLocaleLowerCase("en-US") === "system";
202
202
  const isResource = entity.kind.toLocaleLowerCase("en-US") === "resource";
203
203
  const isComponent = entity.kind.toLocaleLowerCase("en-US") === "component";
@@ -225,7 +225,13 @@ function AboutContent(props) {
225
225
  } catch (e) {
226
226
  entitySourceLocation = void 0;
227
227
  }
228
- return /* @__PURE__ */ React.createElement(Grid, { container: true }, /* @__PURE__ */ React.createElement(AboutField, { label: "Description", gridSizes: { xs: 12 } }, /* @__PURE__ */ React.createElement(Typography, { variant: "body2", paragraph: true, className: classes.description }, ((_a = entity == null ? void 0 : entity.metadata) == null ? void 0 : _a.description) || "No description")), /* @__PURE__ */ React.createElement(
228
+ return /* @__PURE__ */ React.createElement(Grid, { container: true }, /* @__PURE__ */ React.createElement(AboutField, { label: "Description", gridSizes: { xs: 12 } }, /* @__PURE__ */ React.createElement(
229
+ MarkdownContent,
230
+ {
231
+ className: classes.description,
232
+ content: ((_a = entity == null ? void 0 : entity.metadata) == null ? void 0 : _a.description) || "No description"
233
+ }
234
+ )), /* @__PURE__ */ React.createElement(
229
235
  AboutField,
230
236
  {
231
237
  label: "Owner",
@@ -316,7 +322,7 @@ function AboutContent(props) {
316
322
  )));
317
323
  }
318
324
 
319
- const useStyles$5 = makeStyles({
325
+ const useStyles$4 = makeStyles({
320
326
  gridItemCard: {
321
327
  display: "flex",
322
328
  flexDirection: "column",
@@ -339,7 +345,7 @@ const useStyles$5 = makeStyles({
339
345
  function AboutCard(props) {
340
346
  var _a, _b, _c;
341
347
  const { variant } = props;
342
- const classes = useStyles$5();
348
+ const classes = useStyles$4();
343
349
  const { entity } = useEntity();
344
350
  const scmIntegrationsApi = useApi(scmIntegrationsApiRef);
345
351
  const catalogApi = useApi(catalogApiRef);
@@ -453,7 +459,7 @@ function filterKinds(allKinds, allowedKinds, forcedKinds) {
453
459
  return kindsMap;
454
460
  }
455
461
 
456
- const useStyles$4 = makeStyles(
462
+ const useStyles$3 = makeStyles(
457
463
  (theme) => createStyles({
458
464
  root: {
459
465
  ...theme.typography.h4
@@ -463,7 +469,7 @@ const useStyles$4 = makeStyles(
463
469
  function CatalogKindHeader(props) {
464
470
  var _a, _b;
465
471
  const { initialFilter = "component", allowedKinds } = props;
466
- const classes = useStyles$4();
472
+ const classes = useStyles$3();
467
473
  const { allKinds } = useAllKinds();
468
474
  const {
469
475
  filters,
@@ -506,52 +512,6 @@ function CatalogKindHeader(props) {
506
512
  );
507
513
  }
508
514
 
509
- const useStyles$3 = makeStyles({
510
- flexContainer: {
511
- flexWrap: "wrap"
512
- },
513
- itemText: {
514
- width: "100%",
515
- wordBreak: "break-all",
516
- marginBottom: "1rem"
517
- }
518
- });
519
- function CatalogSearchResultListItem(props) {
520
- const result = props.result;
521
- const highlight = props.highlight;
522
- const classes = useStyles$3();
523
- const analytics = useAnalytics();
524
- const handleClick = () => {
525
- analytics.captureEvent("discover", result.title, {
526
- attributes: { to: result.location },
527
- value: props.rank
528
- });
529
- };
530
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ListItem, { alignItems: "flex-start" }, props.icon && /* @__PURE__ */ React.createElement(ListItemIcon, null, props.icon), /* @__PURE__ */ React.createElement("div", { className: classes.flexContainer }, /* @__PURE__ */ React.createElement(
531
- ListItemText,
532
- {
533
- className: classes.itemText,
534
- primaryTypographyProps: { variant: "h6" },
535
- primary: /* @__PURE__ */ React.createElement(Link, { noTrack: true, to: result.location, onClick: handleClick }, (highlight == null ? void 0 : highlight.fields.title) ? /* @__PURE__ */ React.createElement(
536
- HighlightedSearchResultText,
537
- {
538
- text: highlight.fields.title,
539
- preTag: highlight.preTag,
540
- postTag: highlight.postTag
541
- }
542
- ) : result.title),
543
- secondary: (highlight == null ? void 0 : highlight.fields.text) ? /* @__PURE__ */ React.createElement(
544
- HighlightedSearchResultText,
545
- {
546
- text: highlight.fields.text,
547
- preTag: highlight.preTag,
548
- postTag: highlight.postTag
549
- }
550
- ) : result.text
551
- }
552
- ), /* @__PURE__ */ React.createElement(Box, null, result.kind && /* @__PURE__ */ React.createElement(Chip, { label: `Kind: ${result.kind}`, size: "small" }), result.lifecycle && /* @__PURE__ */ React.createElement(Chip, { label: `Lifecycle: ${result.lifecycle}`, size: "small" })))), /* @__PURE__ */ React.createElement(Divider, { component: "li" }));
553
- }
554
-
555
515
  const columnFactories = Object.freeze({
556
516
  createNameColumn(options) {
557
517
  function formatContent(entity) {
@@ -1435,7 +1395,7 @@ const catalogPlugin = createPlugin({
1435
1395
  const CatalogIndexPage = catalogPlugin.provide(
1436
1396
  createRoutableExtension({
1437
1397
  name: "CatalogIndexPage",
1438
- component: () => import('./index-eb346a82.esm.js').then((m) => m.CatalogPage),
1398
+ component: () => import('./index-c9ed9504.esm.js').then((m) => m.CatalogPage),
1439
1399
  mountPoint: rootRouteRef
1440
1400
  })
1441
1401
  );
@@ -1450,7 +1410,7 @@ const EntityAboutCard = catalogPlugin.provide(
1450
1410
  createComponentExtension({
1451
1411
  name: "EntityAboutCard",
1452
1412
  component: {
1453
- lazy: () => import('./index-2c3b0303.esm.js').then((m) => m.AboutCard)
1413
+ lazy: () => import('./index-857fb923.esm.js').then((m) => m.AboutCard)
1454
1414
  }
1455
1415
  })
1456
1416
  );
@@ -1458,7 +1418,7 @@ const EntityLinksCard = catalogPlugin.provide(
1458
1418
  createComponentExtension({
1459
1419
  name: "EntityLinksCard",
1460
1420
  component: {
1461
- lazy: () => import('./index-07f33109.esm.js').then((m) => m.EntityLinksCard)
1421
+ lazy: () => import('./index-8a7df8bb.esm.js').then((m) => m.EntityLinksCard)
1462
1422
  }
1463
1423
  })
1464
1424
  );
@@ -1466,7 +1426,7 @@ const EntityLabelsCard = catalogPlugin.provide(
1466
1426
  createComponentExtension({
1467
1427
  name: "EntityLabelsCard",
1468
1428
  component: {
1469
- lazy: () => import('./index-75a7574f.esm.js').then((m) => m.EntityLabelsCard)
1429
+ lazy: () => import('./index-db0d7381.esm.js').then((m) => m.EntityLabelsCard)
1470
1430
  }
1471
1431
  })
1472
1432
  );
@@ -1544,6 +1504,15 @@ const RelatedEntitiesCard = catalogPlugin.provide(
1544
1504
  }
1545
1505
  })
1546
1506
  );
1507
+ const CatalogSearchResultListItem = catalogPlugin.provide(
1508
+ createSearchResultListItemExtension({
1509
+ name: "CatalogSearchResultListItem",
1510
+ component: () => import('./index-d04365de.esm.js').then(
1511
+ (m) => m.CatalogSearchResultListItem
1512
+ ),
1513
+ predicate: (result) => result.type === "software-catalog"
1514
+ })
1515
+ );
1547
1516
 
1548
- export { AboutCard as A, isNamespace as B, CatalogTable as C, DefaultStarredEntitiesApi as D, EntityLabelsCard$1 as E, isComponentType as F, FilteredEntityLayout as G, FilterContainer as H, EntityListContainer as I, 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, CatalogKindHeader as r, CatalogSearchResultListItem as s, EntityLayout as t, EntityOrphanWarning as u, isOrphan as v, EntityProcessingErrorsPanel as w, hasCatalogProcessingErrors as x, EntitySwitch as y, isKind as z };
1549
- //# sourceMappingURL=index-05290c15.esm.js.map
1517
+ export { AboutCard as A, isNamespace as B, CatalogTable as C, DefaultStarredEntitiesApi as D, EntityLabelsCard$1 as E, isComponentType as F, FilteredEntityLayout as G, FilterContainer as H, EntityListContainer as I, 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 };
1518
+ //# sourceMappingURL=index-c5aa1904.esm.js.map