@backstage/plugin-catalog 1.8.0 → 1.9.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/esm/{index-53c299e2.esm.js → index/index-0ccf0c80.esm.js} +2 -2
  3. package/dist/esm/index/index-0ccf0c80.esm.js.map +1 -0
  4. package/dist/esm/{index-796cbb22.esm.js → index/index-1f414093.esm.js} +2 -2
  5. package/dist/esm/index/index-1f414093.esm.js.map +1 -0
  6. package/dist/esm/{index-14dc2ec0.esm.js → index/index-1fe32bf9.esm.js} +4 -3
  7. package/dist/esm/index/index-1fe32bf9.esm.js.map +1 -0
  8. package/dist/esm/{index-e67de3b5.esm.js → index/index-418d558b.esm.js} +2 -2
  9. package/dist/esm/index/index-418d558b.esm.js.map +1 -0
  10. package/dist/esm/{index-a6b7e5a0.esm.js → index/index-623874b5.esm.js} +2 -2
  11. package/dist/esm/index/index-623874b5.esm.js.map +1 -0
  12. package/dist/esm/{index-f0e32dd1.esm.js → index/index-83561c1f.esm.js} +1 -1
  13. package/dist/esm/index/index-83561c1f.esm.js.map +1 -0
  14. package/dist/esm/{index-38d039d7.esm.js → index/index-beb40544.esm.js} +4 -3
  15. package/dist/esm/index/index-beb40544.esm.js.map +1 -0
  16. package/dist/esm/{index-1b0bb9d9.esm.js → index/index-c15f6a86.esm.js} +4 -3
  17. package/dist/esm/index/index-c15f6a86.esm.js.map +1 -0
  18. package/dist/esm/{index-62df5b29.esm.js → index/index-c4df4a0a.esm.js} +2 -2
  19. package/dist/esm/index/index-c4df4a0a.esm.js.map +1 -0
  20. package/dist/esm/{index-d32ca604.esm.js → index/index-deb6f173.esm.js} +2 -2
  21. package/dist/esm/index/index-deb6f173.esm.js.map +1 -0
  22. package/dist/esm/{index-60adddb8.esm.js → index/index-e2ea81b3.esm.js} +2 -2
  23. package/dist/esm/index/index-e2ea81b3.esm.js.map +1 -0
  24. package/dist/esm/{index-579c0e06.esm.js → index/index-e33a5495.esm.js} +2 -2
  25. package/dist/esm/index/index-e33a5495.esm.js.map +1 -0
  26. package/dist/esm/{index-2fdd24e0.esm.js → index/index-ec7d6301.esm.js} +18 -17
  27. package/dist/esm/index/index-ec7d6301.esm.js.map +1 -0
  28. package/dist/esm/{index-d2f7190c.esm.js → index/index-f175ded7.esm.js} +2 -2
  29. package/dist/esm/index/index-f175ded7.esm.js.map +1 -0
  30. package/dist/esm/{index-03d036bb.esm.js → index/index-f1cc0d2c.esm.js} +6 -4
  31. package/dist/esm/index/index-f1cc0d2c.esm.js.map +1 -0
  32. package/dist/esm/{presets-8f6d8412.esm.js → index/presets-1d9f313a.esm.js} +1 -1
  33. package/dist/esm/index/presets-1d9f313a.esm.js.map +1 -0
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.esm.js +3 -2
  36. package/dist/index.esm.js.map +1 -1
  37. package/package.json +16 -15
  38. package/dist/esm/index-03d036bb.esm.js.map +0 -1
  39. package/dist/esm/index-14dc2ec0.esm.js.map +0 -1
  40. package/dist/esm/index-1b0bb9d9.esm.js.map +0 -1
  41. package/dist/esm/index-2fdd24e0.esm.js.map +0 -1
  42. package/dist/esm/index-38d039d7.esm.js.map +0 -1
  43. package/dist/esm/index-53c299e2.esm.js.map +0 -1
  44. package/dist/esm/index-579c0e06.esm.js.map +0 -1
  45. package/dist/esm/index-60adddb8.esm.js.map +0 -1
  46. package/dist/esm/index-62df5b29.esm.js.map +0 -1
  47. package/dist/esm/index-796cbb22.esm.js.map +0 -1
  48. package/dist/esm/index-a6b7e5a0.esm.js.map +0 -1
  49. package/dist/esm/index-d2f7190c.esm.js.map +0 -1
  50. package/dist/esm/index-d32ca604.esm.js.map +0 -1
  51. package/dist/esm/index-e67de3b5.esm.js.map +0 -1
  52. package/dist/esm/index-f0e32dd1.esm.js.map +0 -1
  53. package/dist/esm/presets-8f6d8412.esm.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.9.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3f75b7607c: Add ability to pass icon as function to have ability to customize it by search item
8
+
9
+ ### Patch Changes
10
+
11
+ - 928a12a9b3: Internal refactor of `/alpha` exports.
12
+ - Updated dependencies
13
+ - @backstage/catalog-client@1.4.0-next.0
14
+ - @backstage/plugin-catalog-react@1.4.0-next.0
15
+ - @backstage/core-plugin-api@1.4.1-next.0
16
+ - @backstage/catalog-model@1.2.1-next.0
17
+ - @backstage/plugin-catalog-common@1.0.12-next.0
18
+ - @backstage/core-components@0.12.5-next.0
19
+ - @backstage/errors@1.1.4
20
+ - @backstage/integration-react@1.1.11-next.0
21
+ - @backstage/theme@0.2.17
22
+ - @backstage/types@1.0.2
23
+ - @backstage/plugin-search-common@1.2.1
24
+ - @backstage/plugin-search-react@1.5.1-next.0
25
+
3
26
  ## 1.8.0
4
27
 
5
28
  ### Minor Changes
@@ -23,7 +23,7 @@ function CatalogSearchResultListItem(props) {
23
23
  const classes = useStyles();
24
24
  if (!result)
25
25
  return null;
26
- return /* @__PURE__ */ React.createElement("div", { className: classes.item }, props.icon && /* @__PURE__ */ React.createElement(ListItemIcon, null, props.icon), /* @__PURE__ */ React.createElement("div", { className: classes.flexContainer }, /* @__PURE__ */ React.createElement(
26
+ return /* @__PURE__ */ React.createElement("div", { className: classes.item }, props.icon && /* @__PURE__ */ React.createElement(ListItemIcon, null, typeof props.icon === "function" ? props.icon(result) : props.icon), /* @__PURE__ */ React.createElement("div", { className: classes.flexContainer }, /* @__PURE__ */ React.createElement(
27
27
  ListItemText,
28
28
  {
29
29
  className: classes.itemText,
@@ -49,4 +49,4 @@ function CatalogSearchResultListItem(props) {
49
49
  }
50
50
 
51
51
  export { CatalogSearchResultListItem };
52
- //# sourceMappingURL=index-53c299e2.esm.js.map
52
+ //# sourceMappingURL=index-0ccf0c80.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-0ccf0c80.esm.js","sources":["../../../src/components/CatalogSearchResultListItem/CatalogSearchResultListItem.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 React, { ReactNode } from 'react';\nimport {\n Box,\n Chip,\n ListItemIcon,\n ListItemText,\n makeStyles,\n} from '@material-ui/core';\nimport { Link } from '@backstage/core-components';\nimport {\n IndexableDocument,\n ResultHighlight,\n} from '@backstage/plugin-search-common';\nimport { HighlightedSearchResultText } from '@backstage/plugin-search-react';\n\nconst useStyles = makeStyles(\n {\n item: {},\n flexContainer: {\n flexWrap: 'wrap',\n },\n itemText: {\n width: '100%',\n wordBreak: 'break-all',\n marginBottom: '1rem',\n },\n },\n { name: 'CatalogSearchResultListItem' },\n);\n\n/**\n * Props for {@link CatalogSearchResultListItem}.\n *\n * @public\n */\nexport interface CatalogSearchResultListItemProps {\n icon?: ReactNode | ((result: IndexableDocument) => ReactNode);\n result?: IndexableDocument;\n highlight?: ResultHighlight;\n rank?: number;\n}\n\n/** @public */\nexport function CatalogSearchResultListItem(\n props: CatalogSearchResultListItemProps,\n) {\n const result = props.result as any;\n const highlight = props.highlight as ResultHighlight;\n\n const classes = useStyles();\n\n if (!result) return null;\n\n return (\n <div className={classes.item}>\n {props.icon && (\n <ListItemIcon>\n {typeof props.icon === 'function' ? props.icon(result) : props.icon}\n </ListItemIcon>\n )}\n <div className={classes.flexContainer}>\n <ListItemText\n className={classes.itemText}\n primaryTypographyProps={{ variant: 'h6' }}\n primary={\n <Link noTrack to={result.location}>\n {highlight?.fields.title ? (\n <HighlightedSearchResultText\n text={highlight.fields.title}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.title\n )}\n </Link>\n }\n secondary={\n highlight?.fields.text ? (\n <HighlightedSearchResultText\n text={highlight.fields.text}\n preTag={highlight.preTag}\n postTag={highlight.postTag}\n />\n ) : (\n result.text\n )\n }\n />\n <Box>\n {result.kind && <Chip label={`Kind: ${result.kind}`} size=\"small\" />}\n {result.lifecycle && (\n <Chip label={`Lifecycle: ${result.lifecycle}`} size=\"small\" />\n )}\n </Box>\n </div>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;AA+BA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB;AAAA,IACE,MAAM,EAAC;AAAA,IACP,aAAe,EAAA;AAAA,MACb,QAAU,EAAA,MAAA;AAAA,KACZ;AAAA,IACA,QAAU,EAAA;AAAA,MACR,KAAO,EAAA,MAAA;AAAA,MACP,SAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,MAAA;AAAA,KAChB;AAAA,GACF;AAAA,EACA,EAAE,MAAM,6BAA8B,EAAA;AACxC,CAAA,CAAA;AAeO,SAAS,4BACd,KACA,EAAA;AACA,EAAA,MAAM,SAAS,KAAM,CAAA,MAAA,CAAA;AACrB,EAAA,MAAM,YAAY,KAAM,CAAA,SAAA,CAAA;AAExB,EAAA,MAAM,UAAU,SAAU,EAAA,CAAA;AAE1B,EAAA,IAAI,CAAC,MAAA;AAAQ,IAAO,OAAA,IAAA,CAAA;AAEpB,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,OAAQ,CAAA,IAAA,EAAA,EACrB,MAAM,IACL,oBAAA,KAAA,CAAA,aAAA,CAAC,YACE,EAAA,IAAA,EAAA,OAAO,KAAM,CAAA,IAAA,KAAS,aAAa,KAAM,CAAA,IAAA,CAAK,MAAM,CAAA,GAAI,KAAM,CAAA,IACjE,mBAED,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAI,SAAW,EAAA,OAAA,CAAQ,aACtB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,YAAA;AAAA,IAAA;AAAA,MACC,WAAW,OAAQ,CAAA,QAAA;AAAA,MACnB,sBAAA,EAAwB,EAAE,OAAA,EAAS,IAAK,EAAA;AAAA,MACxC,OAAA,kBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,OAAO,EAAA,IAAA,EAAC,IAAI,MAAO,CAAA,QAAA,EAAA,EAAA,CACtB,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,MAAA,CAAO,KACjB,oBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,2BAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,UAAU,MAAO,CAAA,KAAA;AAAA,UACvB,QAAQ,SAAU,CAAA,MAAA;AAAA,UAClB,SAAS,SAAU,CAAA,OAAA;AAAA,SAAA;AAAA,OACrB,GAEA,OAAO,KAEX,CAAA;AAAA,MAEF,SAAA,EAAA,CACE,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,MAAA,CAAO,IAChB,oBAAA,KAAA,CAAA,aAAA;AAAA,QAAC,2BAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,UAAU,MAAO,CAAA,IAAA;AAAA,UACvB,QAAQ,SAAU,CAAA,MAAA;AAAA,UAClB,SAAS,SAAU,CAAA,OAAA;AAAA,SAAA;AAAA,UAGrB,MAAO,CAAA,IAAA;AAAA,KAAA;AAAA,GAGb,kBACC,KAAA,CAAA,aAAA,CAAA,GAAA,EAAA,IAAA,EACE,MAAO,CAAA,IAAA,oBAAS,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,CAAA,MAAA,EAAS,MAAO,CAAA,IAAA,CAAA,CAAA,EAAQ,IAAK,EAAA,OAAA,EAAQ,GACjE,MAAO,CAAA,SAAA,oBACL,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,KAAO,EAAA,CAAA,WAAA,EAAc,MAAO,CAAA,SAAA,CAAA,CAAA,EAAa,IAAK,EAAA,OAAA,EAAQ,CAEhE,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
2
  import React from 'react';
3
- import { R as RelatedEntitiesCard, c as componentEntityColumns, e as asComponentEntities } from './presets-8f6d8412.esm.js';
3
+ import { R as RelatedEntitiesCard, c as componentEntityColumns, e as asComponentEntities } from './presets-1d9f313a.esm.js';
4
4
  import '@material-ui/core';
5
5
  import '@backstage/plugin-catalog-react';
6
6
  import '@backstage/core-components';
@@ -23,4 +23,4 @@ function HasSubcomponentsCard(props) {
23
23
  }
24
24
 
25
25
  export { HasSubcomponentsCard };
26
- //# sourceMappingURL=index-796cbb22.esm.js.map
26
+ //# sourceMappingURL=index-1f414093.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-1f414093.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":";;;;;;;AA8BO,SAAS,qBAAqB,KAAkC,EAAA;AACrE,EAAM,MAAA,EAAE,OAAU,GAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACjC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAM,EAAA,mBAAA;AAAA,MACN,UAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAS,EAAA,sBAAA;AAAA,MACT,oBAAsB,EAAA,mBAAA;AAAA,MACtB,YAAa,EAAA,2CAAA;AAAA,MACb,aAAc,EAAA,mGAAA;AAAA,KAAA;AAAA,GAChB,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- export { A as AboutCard, a as AboutContent, b as AboutField } from './index-2fdd24e0.esm.js';
1
+ export { A as AboutCard, a as AboutContent, b as AboutField } from './index-ec7d6301.esm.js';
2
2
  import 'zen-observable';
3
3
  import '@backstage/catalog-model';
4
4
  import 'lodash';
@@ -23,9 +23,10 @@ import 'react-router-dom';
23
23
  import '@material-ui/icons/BugReport';
24
24
  import '@material-ui/icons/MoreVert';
25
25
  import '@material-ui/icons/FileCopyTwoTone';
26
- import '@backstage/plugin-catalog-common';
26
+ import '@backstage/plugin-catalog-react/alpha';
27
+ import '@backstage/plugin-catalog-common/alpha';
27
28
  import '@material-ui/icons/Cancel';
28
29
  import '@backstage/errors';
29
30
  import '@backstage/catalog-client';
30
31
  import '@backstage/plugin-search-react';
31
- //# sourceMappingURL=index-14dc2ec0.esm.js.map
32
+ //# sourceMappingURL=index-1fe32bf9.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-1fe32bf9.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { RELATION_DEPENDS_ON } from '@backstage/catalog-model';
2
2
  import React from 'react';
3
- import { R as RelatedEntitiesCard, c as componentEntityColumns, d as componentEntityHelpLink, e as asComponentEntities } from './presets-8f6d8412.esm.js';
3
+ import { R as RelatedEntitiesCard, c as componentEntityColumns, d as componentEntityHelpLink, e as asComponentEntities } from './presets-1d9f313a.esm.js';
4
4
  import '@material-ui/core';
5
5
  import '@backstage/plugin-catalog-react';
6
6
  import '@backstage/core-components';
@@ -23,4 +23,4 @@ function DependsOnComponentsCard(props) {
23
23
  }
24
24
 
25
25
  export { DependsOnComponentsCard };
26
- //# sourceMappingURL=index-e67de3b5.esm.js.map
26
+ //# sourceMappingURL=index-418d558b.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-418d558b.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":";;;;;;;AAgCO,SAAS,wBAAwB,KAAqC,EAAA;AAC3E,EAAA,MAAM,EAAE,OAAA,GAAU,UAAY,EAAA,KAAA,GAAQ,yBAA4B,GAAA,KAAA,CAAA;AAClE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,mBAAA;AAAA,MACd,OAAS,EAAA,sBAAA;AAAA,MACT,YAAa,EAAA,gDAAA;AAAA,MACb,aAAe,EAAA,uBAAA;AAAA,MACf,oBAAsB,EAAA,mBAAA;AAAA,KAAA;AAAA,GACxB,CAAA;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
2
  import React from 'react';
3
- import { R as RelatedEntitiesCard, s as systemEntityColumns, a as asSystemEntities, b as systemEntityHelpLink } from './presets-8f6d8412.esm.js';
3
+ import { R as RelatedEntitiesCard, s as systemEntityColumns, a as asSystemEntities, b as systemEntityHelpLink } from './presets-1d9f313a.esm.js';
4
4
  import '@material-ui/core';
5
5
  import '@backstage/plugin-catalog-react';
6
6
  import '@backstage/core-components';
@@ -23,4 +23,4 @@ function HasSystemsCard(props) {
23
23
  }
24
24
 
25
25
  export { HasSystemsCard };
26
- //# sourceMappingURL=index-a6b7e5a0.esm.js.map
26
+ //# sourceMappingURL=index-623874b5.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-623874b5.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":";;;;;;;AA+BO,SAAS,eAAe,KAA4B,EAAA;AACzD,EAAM,MAAA,EAAE,OAAU,GAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACjC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAM,EAAA,aAAA;AAAA,MACN,UAAW,EAAA,QAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAS,EAAA,mBAAA;AAAA,MACT,oBAAsB,EAAA,gBAAA;AAAA,MACtB,YAAa,EAAA,kCAAA;AAAA,MACb,aAAe,EAAA,oBAAA;AAAA,KAAA;AAAA,GACjB,CAAA;AAEJ;;;;"}
@@ -32,4 +32,4 @@ function CatalogEntityPage() {
32
32
  }
33
33
 
34
34
  export { CatalogEntityPage };
35
- //# sourceMappingURL=index-f0e32dd1.esm.js.map
35
+ //# sourceMappingURL=index-83561c1f.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-83561c1f.esm.js","sources":["../../../src/components/CatalogEntityPage/useEntityFromUrl.ts","../../../src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"sourcesContent":["/*\n * Copyright 2022 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 errorApiRef,\n useApi,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n EntityLoadingStatus,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = (): EntityLoadingStatus => {\n const { kind, namespace, name } = useRouteRefParams(entityRouteRef);\n const navigate = useNavigate();\n const errorApi = useApi(errorApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entity,\n error,\n loading,\n retry: refresh,\n } = useAsyncRetry(\n () => catalogApi.getEntityByRef({ kind, namespace, name }),\n [catalogApi, kind, namespace, name],\n );\n\n useEffect(() => {\n if (!name) {\n errorApi.post(new Error('No name provided!'));\n navigate('/');\n }\n }, [errorApi, navigate, error, loading, entity, name]);\n\n return { entity, loading, error, refresh };\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Outlet } from 'react-router-dom';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n <AsyncEntityProvider {...useEntityFromUrl()}>\n <Outlet />\n </AsyncEntityProvider>\n );\n}\n"],"names":[],"mappings":";;;;;;AA8BO,MAAM,mBAAmB,MAA2B;AACzD,EAAA,MAAM,EAAE,IAAM,EAAA,SAAA,EAAW,IAAK,EAAA,GAAI,kBAAkB,cAAc,CAAA,CAAA;AAClE,EAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA,CAAA;AACnC,EAAM,MAAA,UAAA,GAAa,OAAO,aAAa,CAAA,CAAA;AAEvC,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,MAAA;AAAA,IACP,KAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAO,EAAA,OAAA;AAAA,GACL,GAAA,aAAA;AAAA,IACF,MAAM,UAAW,CAAA,cAAA,CAAe,EAAE,IAAM,EAAA,SAAA,EAAW,MAAM,CAAA;AAAA,IACzD,CAAC,UAAA,EAAY,IAAM,EAAA,SAAA,EAAW,IAAI,CAAA;AAAA,GACpC,CAAA;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,IAAM,EAAA;AACT,MAAA,QAAA,CAAS,IAAK,CAAA,IAAI,KAAM,CAAA,mBAAmB,CAAC,CAAA,CAAA;AAC5C,MAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AAAA,KACd;AAAA,GACF,EAAG,CAAC,QAAU,EAAA,QAAA,EAAU,OAAO,OAAS,EAAA,MAAA,EAAQ,IAAI,CAAC,CAAA,CAAA;AAErD,EAAA,OAAO,EAAE,MAAA,EAAQ,OAAS,EAAA,KAAA,EAAO,OAAQ,EAAA,CAAA;AAC3C,CAAA;;AChCO,SAAS,iBAAoB,GAAA;AAClC,EAAA,2CACG,mBAAqB,EAAA,EAAA,GAAG,kBACvB,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,YAAO,CACV,CAAA,CAAA;AAEJ;;;;"}
@@ -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-2fdd24e0.esm.js';
6
+ import { L as LinksGridList } from './index-ec7d6301.esm.js';
7
7
  import { useApp } from '@backstage/core-plugin-api';
8
8
  import 'zen-observable';
9
9
  import '@backstage/catalog-model';
@@ -23,7 +23,8 @@ import 'react-router-dom';
23
23
  import '@material-ui/icons/BugReport';
24
24
  import '@material-ui/icons/MoreVert';
25
25
  import '@material-ui/icons/FileCopyTwoTone';
26
- import '@backstage/plugin-catalog-common';
26
+ import '@backstage/plugin-catalog-react/alpha';
27
+ import '@backstage/plugin-catalog-common/alpha';
27
28
  import '@material-ui/icons/Cancel';
28
29
  import '@backstage/errors';
29
30
  import '@backstage/catalog-client';
@@ -92,4 +93,4 @@ const EntityLinksCard = (props) => {
92
93
  };
93
94
 
94
95
  export { EntityLinksCard };
95
- //# sourceMappingURL=index-38d039d7.esm.js.map
96
+ //# sourceMappingURL=index-beb40544.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-beb40544.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":"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"}
@@ -1,4 +1,4 @@
1
- export { E as EntityLabelsCard, h as hasLabels } from './index-2fdd24e0.esm.js';
1
+ export { E as EntityLabelsCard, h as hasLabels } from './index-ec7d6301.esm.js';
2
2
  import 'zen-observable';
3
3
  import '@backstage/catalog-model';
4
4
  import 'lodash';
@@ -23,9 +23,10 @@ import 'react-router-dom';
23
23
  import '@material-ui/icons/BugReport';
24
24
  import '@material-ui/icons/MoreVert';
25
25
  import '@material-ui/icons/FileCopyTwoTone';
26
- import '@backstage/plugin-catalog-common';
26
+ import '@backstage/plugin-catalog-react/alpha';
27
+ import '@backstage/plugin-catalog-common/alpha';
27
28
  import '@material-ui/icons/Cancel';
28
29
  import '@backstage/errors';
29
30
  import '@backstage/catalog-client';
30
31
  import '@backstage/plugin-search-react';
31
- //# sourceMappingURL=index-1b0bb9d9.esm.js.map
32
+ //# sourceMappingURL=index-c15f6a86.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-c15f6a86.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
2
  import React from 'react';
3
- import { R as RelatedEntitiesCard, c as componentEntityColumns, d as componentEntityHelpLink, e as asComponentEntities } from './presets-8f6d8412.esm.js';
3
+ import { R as RelatedEntitiesCard, c as componentEntityColumns, d as componentEntityHelpLink, e as asComponentEntities } from './presets-1d9f313a.esm.js';
4
4
  import '@material-ui/core';
5
5
  import '@backstage/plugin-catalog-react';
6
6
  import '@backstage/core-components';
@@ -23,4 +23,4 @@ function HasComponentsCard(props) {
23
23
  }
24
24
 
25
25
  export { HasComponentsCard };
26
- //# sourceMappingURL=index-62df5b29.esm.js.map
26
+ //# sourceMappingURL=index-c4df4a0a.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-c4df4a0a.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":";;;;;;;AA+BO,SAAS,kBAAkB,KAA+B,EAAA;AAC/D,EAAM,MAAA,EAAE,OAAU,GAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACjC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAM,EAAA,gBAAA;AAAA,MACN,UAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAS,EAAA,sBAAA;AAAA,MACT,YAAa,EAAA,qCAAA;AAAA,MACb,aAAe,EAAA,uBAAA;AAAA,MACf,oBAAsB,EAAA,mBAAA;AAAA,KAAA;AAAA,GACxB,CAAA;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';
2
2
  import React from 'react';
3
- import { R as RelatedEntitiesCard, c as componentEntityColumns, d as componentEntityHelpLink, e as asComponentEntities } from './presets-8f6d8412.esm.js';
3
+ import { R as RelatedEntitiesCard, c as componentEntityColumns, d as componentEntityHelpLink, e as asComponentEntities } from './presets-1d9f313a.esm.js';
4
4
  import '@material-ui/core';
5
5
  import '@backstage/plugin-catalog-react';
6
6
  import '@backstage/core-components';
@@ -23,4 +23,4 @@ function DependencyOfComponentsCard(props) {
23
23
  }
24
24
 
25
25
  export { DependencyOfComponentsCard };
26
- //# sourceMappingURL=index-d32ca604.esm.js.map
26
+ //# sourceMappingURL=index-deb6f173.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-deb6f173.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":";;;;;;;AAgCO,SAAS,2BACd,KACA,EAAA;AACA,EAAA,MAAM,EAAE,OAAA,GAAU,UAAY,EAAA,KAAA,GAAQ,4BAA+B,GAAA,KAAA,CAAA;AACrE,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAW,EAAA,WAAA;AAAA,MACX,YAAc,EAAA,sBAAA;AAAA,MACd,OAAS,EAAA,sBAAA;AAAA,MACT,YAAa,EAAA,wCAAA;AAAA,MACb,aAAe,EAAA,uBAAA;AAAA,MACf,oBAAsB,EAAA,mBAAA;AAAA,KAAA;AAAA,GACxB,CAAA;AAEJ;;;;"}
@@ -1,6 +1,6 @@
1
- export { R as RelatedEntitiesCard, e as asComponentEntities, f as asResourceEntities, a as asSystemEntities, c as componentEntityColumns, d as componentEntityHelpLink, r as resourceEntityColumns, g as resourceEntityHelpLink, s as systemEntityColumns, b as systemEntityHelpLink } from './presets-8f6d8412.esm.js';
1
+ export { R as RelatedEntitiesCard, e as asComponentEntities, f as asResourceEntities, a as asSystemEntities, c as componentEntityColumns, d as componentEntityHelpLink, r as resourceEntityColumns, g as resourceEntityHelpLink, s as systemEntityColumns, b as systemEntityHelpLink } from './presets-1d9f313a.esm.js';
2
2
  import '@material-ui/core';
3
3
  import '@backstage/plugin-catalog-react';
4
4
  import 'react';
5
5
  import '@backstage/core-components';
6
- //# sourceMappingURL=index-60adddb8.esm.js.map
6
+ //# sourceMappingURL=index-e2ea81b3.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-e2ea81b3.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,6 +1,6 @@
1
1
  import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
2
  import React from 'react';
3
- import { R as RelatedEntitiesCard, r as resourceEntityColumns, f as asResourceEntities, g as resourceEntityHelpLink } from './presets-8f6d8412.esm.js';
3
+ import { R as RelatedEntitiesCard, r as resourceEntityColumns, f as asResourceEntities, g as resourceEntityHelpLink } from './presets-1d9f313a.esm.js';
4
4
  import '@material-ui/core';
5
5
  import '@backstage/plugin-catalog-react';
6
6
  import '@backstage/core-components';
@@ -23,4 +23,4 @@ function HasResourcesCard(props) {
23
23
  }
24
24
 
25
25
  export { HasResourcesCard };
26
- //# sourceMappingURL=index-579c0e06.esm.js.map
26
+ //# sourceMappingURL=index-e33a5495.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-e33a5495.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":";;;;;;;AA+BO,SAAS,iBAAiB,KAA8B,EAAA;AAC7D,EAAM,MAAA,EAAE,OAAU,GAAA,UAAA,EAAe,GAAA,KAAA,CAAA;AACjC,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,KAAM,EAAA,eAAA;AAAA,MACN,UAAW,EAAA,UAAA;AAAA,MACX,YAAc,EAAA,iBAAA;AAAA,MACd,OAAS,EAAA,qBAAA;AAAA,MACT,oBAAsB,EAAA,kBAAA;AAAA,MACtB,YAAa,EAAA,oCAAA;AAAA,MACb,aAAe,EAAA,sBAAA;AAAA,KAAA;AAAA,GACjB,CAAA;AAEJ;;;;"}
@@ -4,7 +4,7 @@ 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
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
- 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';
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
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';
@@ -22,7 +22,8 @@ import { useLocation, useNavigate } from 'react-router-dom';
22
22
  import BugReportIcon from '@material-ui/icons/BugReport';
23
23
  import MoreVert from '@material-ui/icons/MoreVert';
24
24
  import FileCopyTwoToneIcon from '@material-ui/icons/FileCopyTwoTone';
25
- import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common';
25
+ import { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';
26
+ import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha';
26
27
  import CancelIcon from '@material-ui/icons/Cancel';
27
28
  import { assertError } from '@backstage/errors';
28
29
  import { ENTITY_STATUS_CATALOG_PROCESSING_TYPE, CatalogClient } from '@backstage/catalog-client';
@@ -1401,14 +1402,14 @@ const catalogPlugin = createPlugin({
1401
1402
  const CatalogIndexPage = catalogPlugin.provide(
1402
1403
  createRoutableExtension({
1403
1404
  name: "CatalogIndexPage",
1404
- component: () => import('./index-03d036bb.esm.js').then((m) => m.CatalogPage),
1405
+ component: () => import('./index-f1cc0d2c.esm.js').then((m) => m.CatalogPage),
1405
1406
  mountPoint: rootRouteRef
1406
1407
  })
1407
1408
  );
1408
1409
  const CatalogEntityPage = catalogPlugin.provide(
1409
1410
  createRoutableExtension({
1410
1411
  name: "CatalogEntityPage",
1411
- component: () => import('./index-f0e32dd1.esm.js').then((m) => m.CatalogEntityPage),
1412
+ component: () => import('./index-83561c1f.esm.js').then((m) => m.CatalogEntityPage),
1412
1413
  mountPoint: entityRouteRef
1413
1414
  })
1414
1415
  );
@@ -1416,7 +1417,7 @@ const EntityAboutCard = catalogPlugin.provide(
1416
1417
  createComponentExtension({
1417
1418
  name: "EntityAboutCard",
1418
1419
  component: {
1419
- lazy: () => import('./index-14dc2ec0.esm.js').then((m) => m.AboutCard)
1420
+ lazy: () => import('./index-1fe32bf9.esm.js').then((m) => m.AboutCard)
1420
1421
  }
1421
1422
  })
1422
1423
  );
@@ -1424,7 +1425,7 @@ const EntityLinksCard = catalogPlugin.provide(
1424
1425
  createComponentExtension({
1425
1426
  name: "EntityLinksCard",
1426
1427
  component: {
1427
- lazy: () => import('./index-38d039d7.esm.js').then((m) => m.EntityLinksCard)
1428
+ lazy: () => import('./index-beb40544.esm.js').then((m) => m.EntityLinksCard)
1428
1429
  }
1429
1430
  })
1430
1431
  );
@@ -1432,7 +1433,7 @@ const EntityLabelsCard = catalogPlugin.provide(
1432
1433
  createComponentExtension({
1433
1434
  name: "EntityLabelsCard",
1434
1435
  component: {
1435
- lazy: () => import('./index-1b0bb9d9.esm.js').then((m) => m.EntityLabelsCard)
1436
+ lazy: () => import('./index-c15f6a86.esm.js').then((m) => m.EntityLabelsCard)
1436
1437
  }
1437
1438
  })
1438
1439
  );
@@ -1440,7 +1441,7 @@ const EntityHasSystemsCard = catalogPlugin.provide(
1440
1441
  createComponentExtension({
1441
1442
  name: "EntityHasSystemsCard",
1442
1443
  component: {
1443
- lazy: () => import('./index-a6b7e5a0.esm.js').then((m) => m.HasSystemsCard)
1444
+ lazy: () => import('./index-623874b5.esm.js').then((m) => m.HasSystemsCard)
1444
1445
  }
1445
1446
  })
1446
1447
  );
@@ -1448,7 +1449,7 @@ const EntityHasComponentsCard = catalogPlugin.provide(
1448
1449
  createComponentExtension({
1449
1450
  name: "EntityHasComponentsCard",
1450
1451
  component: {
1451
- lazy: () => import('./index-62df5b29.esm.js').then((m) => m.HasComponentsCard)
1452
+ lazy: () => import('./index-c4df4a0a.esm.js').then((m) => m.HasComponentsCard)
1452
1453
  }
1453
1454
  })
1454
1455
  );
@@ -1456,7 +1457,7 @@ const EntityHasSubcomponentsCard = catalogPlugin.provide(
1456
1457
  createComponentExtension({
1457
1458
  name: "EntityHasSubcomponentsCard",
1458
1459
  component: {
1459
- lazy: () => import('./index-796cbb22.esm.js').then(
1460
+ lazy: () => import('./index-1f414093.esm.js').then(
1460
1461
  (m) => m.HasSubcomponentsCard
1461
1462
  )
1462
1463
  }
@@ -1466,7 +1467,7 @@ const EntityHasResourcesCard = catalogPlugin.provide(
1466
1467
  createComponentExtension({
1467
1468
  name: "EntityHasResourcesCard",
1468
1469
  component: {
1469
- lazy: () => import('./index-579c0e06.esm.js').then((m) => m.HasResourcesCard)
1470
+ lazy: () => import('./index-e33a5495.esm.js').then((m) => m.HasResourcesCard)
1470
1471
  }
1471
1472
  })
1472
1473
  );
@@ -1474,7 +1475,7 @@ const EntityDependsOnComponentsCard = catalogPlugin.provide(
1474
1475
  createComponentExtension({
1475
1476
  name: "EntityDependsOnComponentsCard",
1476
1477
  component: {
1477
- lazy: () => import('./index-e67de3b5.esm.js').then(
1478
+ lazy: () => import('./index-418d558b.esm.js').then(
1478
1479
  (m) => m.DependsOnComponentsCard
1479
1480
  )
1480
1481
  }
@@ -1484,7 +1485,7 @@ const EntityDependencyOfComponentsCard = catalogPlugin.provide(
1484
1485
  createComponentExtension({
1485
1486
  name: "EntityDependencyOfComponentsCard",
1486
1487
  component: {
1487
- lazy: () => import('./index-d32ca604.esm.js').then(
1488
+ lazy: () => import('./index-deb6f173.esm.js').then(
1488
1489
  (m) => m.DependencyOfComponentsCard
1489
1490
  )
1490
1491
  }
@@ -1494,7 +1495,7 @@ const EntityDependsOnResourcesCard = catalogPlugin.provide(
1494
1495
  createComponentExtension({
1495
1496
  name: "EntityDependsOnResourcesCard",
1496
1497
  component: {
1497
- lazy: () => import('./index-d2f7190c.esm.js').then(
1498
+ lazy: () => import('./index-f175ded7.esm.js').then(
1498
1499
  (m) => m.DependsOnResourcesCard
1499
1500
  )
1500
1501
  }
@@ -1504,7 +1505,7 @@ const RelatedEntitiesCard = catalogPlugin.provide(
1504
1505
  createComponentExtension({
1505
1506
  name: "RelatedEntitiesCard",
1506
1507
  component: {
1507
- lazy: () => import('./index-60adddb8.esm.js').then(
1508
+ lazy: () => import('./index-e2ea81b3.esm.js').then(
1508
1509
  (m) => m.RelatedEntitiesCard
1509
1510
  )
1510
1511
  }
@@ -1513,7 +1514,7 @@ const RelatedEntitiesCard = catalogPlugin.provide(
1513
1514
  const CatalogSearchResultListItem = catalogPlugin.provide(
1514
1515
  createSearchResultListItemExtension({
1515
1516
  name: "CatalogSearchResultListItem",
1516
- component: () => import('./index-53c299e2.esm.js').then(
1517
+ component: () => import('./index-0ccf0c80.esm.js').then(
1517
1518
  (m) => m.CatalogSearchResultListItem
1518
1519
  ),
1519
1520
  predicate: (result) => result.type === "software-catalog"
@@ -1521,4 +1522,4 @@ const CatalogSearchResultListItem = catalogPlugin.provide(
1521
1522
  );
1522
1523
 
1523
1524
  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 };
1524
- //# sourceMappingURL=index-2fdd24e0.esm.js.map
1525
+ //# sourceMappingURL=index-ec7d6301.esm.js.map