@backstage/plugin-catalog 1.6.1 → 1.6.2-next.1

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 (40) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/esm/{index-0b991da4.esm.js → index-031c6cd2.esm.js} +3 -2
  3. package/dist/esm/index-031c6cd2.esm.js.map +1 -0
  4. package/dist/esm/{index-cb20ec68.esm.js → index-159203c1.esm.js} +33 -29
  5. package/dist/esm/{index-cb20ec68.esm.js.map → index-159203c1.esm.js.map} +1 -1
  6. package/dist/esm/{index-d0312962.esm.js → index-426b309d.esm.js} +26 -25
  7. package/dist/esm/{index-d0312962.esm.js.map → index-426b309d.esm.js.map} +1 -1
  8. package/dist/esm/index-579c0e06.esm.js +26 -0
  9. package/dist/esm/{index-b3ad464b.esm.js.map → index-579c0e06.esm.js.map} +1 -1
  10. package/dist/esm/{index-c2914273.esm.js → index-60adddb8.esm.js} +2 -2
  11. package/dist/esm/index-60adddb8.esm.js.map +1 -0
  12. package/dist/esm/index-62df5b29.esm.js +26 -0
  13. package/dist/esm/{index-acb3cf04.esm.js.map → index-62df5b29.esm.js.map} +1 -1
  14. package/dist/esm/index-796cbb22.esm.js +26 -0
  15. package/dist/esm/{index-41ab53b6.esm.js.map → index-796cbb22.esm.js.map} +1 -1
  16. package/dist/esm/{index-46417657.esm.js → index-a04ec5f0.esm.js} +2 -4
  17. package/dist/esm/{index-46417657.esm.js.map → index-a04ec5f0.esm.js.map} +1 -1
  18. package/dist/esm/index-a6b7e5a0.esm.js +26 -0
  19. package/dist/esm/{index-3763491b.esm.js.map → index-a6b7e5a0.esm.js.map} +1 -1
  20. package/dist/esm/{index-84e3a83e.esm.js → index-d0e9bb6d.esm.js} +422 -429
  21. package/dist/esm/index-d0e9bb6d.esm.js.map +1 -0
  22. package/dist/esm/index-d2f7190c.esm.js +26 -0
  23. package/dist/esm/{index-d41abbff.esm.js.map → index-d2f7190c.esm.js.map} +1 -1
  24. package/dist/esm/{index-390fab14.esm.js → index-d32ca604.esm.js} +15 -12
  25. package/dist/esm/{index-390fab14.esm.js.map → index-d32ca604.esm.js.map} +1 -1
  26. package/dist/esm/{index-66fdb6ad.esm.js → index-e67de3b5.esm.js} +15 -12
  27. package/dist/esm/{index-66fdb6ad.esm.js.map → index-e67de3b5.esm.js.map} +1 -1
  28. package/dist/esm/{presets-13b889b9.esm.js → presets-8f6d8412.esm.js} +13 -26
  29. package/dist/esm/{presets-13b889b9.esm.js.map → presets-8f6d8412.esm.js.map} +1 -1
  30. package/dist/index.esm.js +2 -1
  31. package/dist/index.esm.js.map +1 -1
  32. package/package.json +19 -18
  33. package/dist/esm/index-0b991da4.esm.js.map +0 -1
  34. package/dist/esm/index-3763491b.esm.js +0 -23
  35. package/dist/esm/index-41ab53b6.esm.js +0 -23
  36. package/dist/esm/index-84e3a83e.esm.js.map +0 -1
  37. package/dist/esm/index-acb3cf04.esm.js +0 -23
  38. package/dist/esm/index-b3ad464b.esm.js +0 -23
  39. package/dist/esm/index-c2914273.esm.js.map +0 -1
  40. package/dist/esm/index-d41abbff.esm.js +0 -23
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.6.2-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - d3fea4ae0a: Internal fixes to avoid implicit usage of globals
8
+ - ca04d97b09: Handle refresh entity error in `AboutCard`.
9
+ - a19cffbeed: Update search links to only have header as linkable text
10
+ - c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`.
11
+ - Updated dependencies
12
+ - @backstage/core-components@0.12.1-next.1
13
+ - @backstage/plugin-search-react@1.2.2-next.1
14
+ - @backstage/core-plugin-api@1.1.1-next.1
15
+ - @backstage/types@1.0.2-next.1
16
+ - @backstage/plugin-catalog-react@1.2.2-next.1
17
+ - @backstage/integration-react@1.1.7-next.1
18
+ - @backstage/catalog-client@1.2.0-next.1
19
+ - @backstage/catalog-model@1.1.4-next.1
20
+ - @backstage/errors@1.1.4-next.1
21
+ - @backstage/theme@0.2.16
22
+ - @backstage/plugin-catalog-common@1.0.9-next.1
23
+ - @backstage/plugin-search-common@1.1.2-next.1
24
+
25
+ ## 1.6.2-next.0
26
+
27
+ ### Patch Changes
28
+
29
+ - 19356df560: Updated dependency `zen-observable` to `^0.9.0`.
30
+ - 387d1d5218: Fixed Entity kind pluralisation in the `CatalogKindHeader` component.
31
+ - Updated dependencies
32
+ - @backstage/catalog-client@1.2.0-next.0
33
+ - @backstage/core-components@0.12.1-next.0
34
+ - @backstage/core-plugin-api@1.1.1-next.0
35
+ - @backstage/integration-react@1.1.7-next.0
36
+ - @backstage/types@1.0.2-next.0
37
+ - @backstage/plugin-catalog-react@1.2.2-next.0
38
+ - @backstage/catalog-model@1.1.4-next.0
39
+ - @backstage/errors@1.1.4-next.0
40
+ - @backstage/theme@0.2.16
41
+ - @backstage/plugin-catalog-common@1.0.9-next.0
42
+ - @backstage/plugin-search-common@1.1.2-next.0
43
+ - @backstage/plugin-search-react@1.2.2-next.0
44
+
3
45
  ## 1.6.1
4
46
 
5
47
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- export { A as AboutCard, b as AboutContent, d as AboutField } from './index-84e3a83e.esm.js';
1
+ export { A as AboutCard, b as AboutContent, d as AboutField } from './index-d0e9bb6d.esm.js';
2
2
  import 'zen-observable';
3
3
  import '@backstage/catalog-model';
4
4
  import 'lodash';
@@ -13,6 +13,7 @@ import '@material-ui/icons/Edit';
13
13
  import 'react';
14
14
  import '@material-ui/icons/Language';
15
15
  import 'react-use/lib/useAsync';
16
+ import 'pluralize';
16
17
  import '@backstage/plugin-search-react';
17
18
  import '@material-ui/core/styles';
18
19
  import '@material-ui/icons/OpenInNew';
@@ -27,4 +28,4 @@ import '@backstage/plugin-catalog-common';
27
28
  import '@material-ui/icons/Cancel';
28
29
  import '@backstage/errors';
29
30
  import '@backstage/catalog-client';
30
- //# sourceMappingURL=index-0b991da4.esm.js.map
31
+ //# sourceMappingURL=index-031c6cd2.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-031c6cd2.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-84e3a83e.esm.js';
6
+ import { L as LinksGridList } from './index-d0e9bb6d.esm.js';
7
7
  import { useApp } from '@backstage/core-plugin-api';
8
8
  import 'zen-observable';
9
9
  import '@backstage/catalog-model';
@@ -13,6 +13,7 @@ import '@material-ui/icons/Cached';
13
13
  import '@material-ui/icons/Description';
14
14
  import '@material-ui/icons/Edit';
15
15
  import 'react-use/lib/useAsync';
16
+ import 'pluralize';
16
17
  import '@backstage/plugin-search-react';
17
18
  import '@material-ui/core/styles';
18
19
  import '@material-ui/icons/OpenInNew';
@@ -46,22 +47,25 @@ const useStyles = makeStyles(
46
47
  );
47
48
  function EntityLinksEmptyState() {
48
49
  const classes = useStyles();
49
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, {
50
- variant: "body1"
51
- }, "No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:"), /* @__PURE__ */ React.createElement("div", {
52
- className: classes.code
53
- }, /* @__PURE__ */ React.createElement(CodeSnippet, {
54
- text: ENTITY_YAML,
55
- language: "yaml",
56
- showLineNumbers: true,
57
- highlightedNumbers: [3, 4, 5, 6],
58
- customStyle: { background: "inherit", fontSize: "115%" }
59
- })), /* @__PURE__ */ React.createElement(Button, {
60
- variant: "contained",
61
- color: "primary",
62
- target: "_blank",
63
- href: "https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional"
64
- }, "Read more"));
50
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, { variant: "body1" }, "No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:"), /* @__PURE__ */ React.createElement("div", { className: classes.code }, /* @__PURE__ */ React.createElement(
51
+ CodeSnippet,
52
+ {
53
+ text: ENTITY_YAML,
54
+ language: "yaml",
55
+ showLineNumbers: true,
56
+ highlightedNumbers: [3, 4, 5, 6],
57
+ customStyle: { background: "inherit", fontSize: "115%" }
58
+ }
59
+ )), /* @__PURE__ */ React.createElement(
60
+ Button,
61
+ {
62
+ variant: "contained",
63
+ color: "primary",
64
+ target: "_blank",
65
+ href: "https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional"
66
+ },
67
+ "Read more"
68
+ ));
65
69
  }
66
70
 
67
71
  const EntityLinksCard = (props) => {
@@ -74,18 +78,18 @@ const EntityLinksCard = (props) => {
74
78
  return key ? (_a2 = app.getSystemIcon(key)) != null ? _a2 : LanguageIcon : LanguageIcon;
75
79
  };
76
80
  const links = (_a = entity == null ? void 0 : entity.metadata) == null ? void 0 : _a.links;
77
- return /* @__PURE__ */ React.createElement(InfoCard, {
78
- title: "Links",
79
- variant
80
- }, !links || links.length === 0 ? /* @__PURE__ */ React.createElement(EntityLinksEmptyState, null) : /* @__PURE__ */ React.createElement(LinksGridList, {
81
- cols,
82
- items: links.map(({ url, title, icon }) => ({
83
- text: title != null ? title : url,
84
- href: url,
85
- Icon: iconResolver(icon)
86
- }))
87
- }));
81
+ return /* @__PURE__ */ React.createElement(InfoCard, { title: "Links", variant }, !links || links.length === 0 ? /* @__PURE__ */ React.createElement(EntityLinksEmptyState, null) : /* @__PURE__ */ React.createElement(
82
+ LinksGridList,
83
+ {
84
+ cols,
85
+ items: links.map(({ url, title, icon }) => ({
86
+ text: title != null ? title : url,
87
+ href: url,
88
+ Icon: iconResolver(icon)
89
+ }))
90
+ }
91
+ ));
88
92
  };
89
93
 
90
94
  export { EntityLinksCard };
91
- //# sourceMappingURL=index-cb20ec68.esm.js.map
95
+ //# sourceMappingURL=index-159203c1.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-cb20ec68.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,CA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AAA;AAC7B,EAAA,MAAM,MAAM,MAAO,EAAA,CAAA;AAEnB,EAAM,MAAA,YAAA,GAAe,CAAC,GAA6B,KAAA;AApCrD,IAAAA,IAAAA,GAAAA,CAAAA;AAqCI,IAAA,OAAA,GAAA,GAAA,CAAMA,MAAA,GAAI,CAAA,aAAA,CAAc,GAAG,CAArB,KAAA,IAAA,GAAAA,MAA0B,YAAe,GAAA,YAAA,CAAA;AAAA,GAAA,CAAA;AAEjD,EAAM,MAAA,KAAA,GAAA,CAAQ,EAAQ,GAAA,MAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,CAAA,QAAA,KAAR,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAEhC,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,IAAS,KAAM,EAAA,OAAA;AAAA,IAAQ,OAAA;AAAA,GACrB,EAAA,CAAC,SAAS,KAAM,CAAA,MAAA,KAAW,oBACzB,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,IAAsB,oBAEtB,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IACC,IAAA;AAAA,IACA,KAAA,EAAO,MAAM,GAAI,CAAA,CAAC,EAAE,GAAK,EAAA,KAAA,EAAO,MAAY,MAAA;AAAA,MAC1C,MAAM,KAAS,IAAA,IAAA,GAAA,KAAA,GAAA,GAAA;AAAA,MACf,IAAM,EAAA,GAAA;AAAA,MACN,IAAA,EAAM,aAAa,IAAI,CAAA;AAAA,KACvB,CAAA,CAAA;AAAA,GACJ,CAEJ,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"index-159203c1.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,q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AA,GAAA,GAAA,CAAMA,MAAA,GAAI,CAAA,aAAA,CAAc,GAAG,CAArB,KAAA,IAAA,GAAAA,MAA0B,YAAe,GAAA,YAAA,CAAA;AAAA,GAAA,CAAA;AAEjD,EAAM,MAAA,KAAA,GAAA,CAAQ,EAAQ,GAAA,MAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,CAAA,QAAA,KAAR,IAAkB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;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;;;;"}
@@ -3,7 +3,7 @@ import { useOutlet } from 'react-router';
3
3
  import { PageWithHeader, Content, ContentHeader, CreateButton, SupportButton } from '@backstage/core-components';
4
4
  import { usePluginOptions, useApi, configApiRef, useRouteRef } from '@backstage/core-plugin-api';
5
5
  import { EntityListProvider, CatalogFilterLayout, EntityKindPicker, EntityTypePicker, UserListPicker, EntityOwnerPicker, EntityLifecyclePicker, EntityTagPicker, EntityProcessingStatusPicker } from '@backstage/plugin-catalog-react';
6
- import { c as createComponentRouteRef, C as CatalogKindHeader, a as CatalogTable } from './index-84e3a83e.esm.js';
6
+ import { c as createComponentRouteRef, C as CatalogKindHeader, a as CatalogTable } from './index-d0e9bb6d.esm.js';
7
7
  import 'zen-observable';
8
8
  import '@backstage/catalog-model';
9
9
  import 'lodash';
@@ -14,6 +14,7 @@ import '@material-ui/icons/Description';
14
14
  import '@material-ui/icons/Edit';
15
15
  import '@material-ui/icons/Language';
16
16
  import 'react-use/lib/useAsync';
17
+ import 'pluralize';
17
18
  import '@backstage/plugin-search-react';
18
19
  import '@material-ui/core/styles';
19
20
  import '@material-ui/icons/OpenInNew';
@@ -43,34 +44,34 @@ function DefaultCatalogPage(props) {
43
44
  const orgName = (_a = useApi(configApiRef).getOptionalString("organization.name")) != null ? _a : "Backstage";
44
45
  const createComponentLink = useRouteRef(createComponentRouteRef);
45
46
  const { createButtonTitle } = useCatalogPluginOptions();
46
- return /* @__PURE__ */ React.createElement(PageWithHeader, {
47
- title: `${orgName} Catalog`,
48
- themeId: "home"
49
- }, /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(ContentHeader, {
50
- titleComponent: /* @__PURE__ */ React.createElement(CatalogKindHeader, {
51
- initialFilter: initialKind
52
- })
53
- }, /* @__PURE__ */ React.createElement(CreateButton, {
54
- title: createButtonTitle,
55
- to: createComponentLink && createComponentLink()
56
- }), /* @__PURE__ */ React.createElement(SupportButton, null, "All your software catalog entities")), /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(EntityKindPicker, {
57
- initialFilter: initialKind
58
- }), /* @__PURE__ */ React.createElement(EntityTypePicker, null), /* @__PURE__ */ React.createElement(UserListPicker, {
59
- initialFilter: initiallySelectedFilter
60
- }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null), /* @__PURE__ */ React.createElement(EntityProcessingStatusPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(CatalogTable, {
61
- columns,
62
- actions,
63
- tableOptions,
64
- emptyContent
65
- }))))));
47
+ return /* @__PURE__ */ React.createElement(PageWithHeader, { title: `${orgName} Catalog`, themeId: "home" }, /* @__PURE__ */ React.createElement(EntityListProvider, null, /* @__PURE__ */ React.createElement(Content, null, /* @__PURE__ */ React.createElement(
48
+ ContentHeader,
49
+ {
50
+ titleComponent: /* @__PURE__ */ React.createElement(CatalogKindHeader, { initialFilter: initialKind })
51
+ },
52
+ /* @__PURE__ */ React.createElement(
53
+ CreateButton,
54
+ {
55
+ title: createButtonTitle,
56
+ to: createComponentLink && createComponentLink()
57
+ }
58
+ ),
59
+ /* @__PURE__ */ React.createElement(SupportButton, null, "All your software catalog entities")
60
+ ), /* @__PURE__ */ React.createElement(CatalogFilterLayout, null, /* @__PURE__ */ React.createElement(CatalogFilterLayout.Filters, null, /* @__PURE__ */ React.createElement(EntityKindPicker, { initialFilter: initialKind }), /* @__PURE__ */ React.createElement(EntityTypePicker, null), /* @__PURE__ */ React.createElement(UserListPicker, { initialFilter: initiallySelectedFilter }), /* @__PURE__ */ React.createElement(EntityOwnerPicker, null), /* @__PURE__ */ React.createElement(EntityLifecyclePicker, null), /* @__PURE__ */ React.createElement(EntityTagPicker, null), /* @__PURE__ */ React.createElement(EntityProcessingStatusPicker, null)), /* @__PURE__ */ React.createElement(CatalogFilterLayout.Content, null, /* @__PURE__ */ React.createElement(
61
+ CatalogTable,
62
+ {
63
+ columns,
64
+ actions,
65
+ tableOptions,
66
+ emptyContent
67
+ }
68
+ ))))));
66
69
  }
67
70
 
68
71
  function CatalogPage(props) {
69
72
  const outlet = useOutlet();
70
- return outlet || /* @__PURE__ */ React.createElement(DefaultCatalogPage, {
71
- ...props
72
- });
73
+ return outlet || /* @__PURE__ */ React.createElement(DefaultCatalogPage, { ...props });
73
74
  }
74
75
 
75
76
  export { CatalogPage, DefaultCatalogPage };
76
- //# sourceMappingURL=index-d0312962.esm.js.map
77
+ //# sourceMappingURL=index-426b309d.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-d0312962.esm.js","sources":["../../src/options.ts","../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.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 { usePluginOptions } from '@backstage/core-plugin-api';\n\nexport type CatalogPluginOptions = {\n createButtonTitle: string;\n};\n\n/** @ignore */\nexport type CatalogInputPluginOptions = {\n createButtonTitle: string;\n};\n\nexport const useCatalogPluginOptions = () =>\n usePluginOptions<CatalogPluginOptions>();\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityProcessingStatusPicker,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n EntityKindPicker,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\nimport { useCatalogPluginOptions } from '../../options';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n const { createButtonTitle } = useCatalogPluginOptions();\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <EntityListProvider>\n <Content>\n <ContentHeader\n titleComponent={<CatalogKindHeader initialFilter={initialKind} />}\n >\n <CreateButton\n title={createButtonTitle}\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter={initialKind} />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n <EntityProcessingStatusPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </Content>\n </EntityListProvider>\n </PageWithHeader>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Ba,MAAA,uBAAA,GAA0B,MACrC,gBAAuC,EAAA;;AC8BlC,SAAS,mBAAmB,KAAgC,EAAA;AA1DnE,EAAA,IAAA,EAAA,CAAA;AA2DE,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,OAAA;AAAA,IACA,uBAA0B,GAAA,OAAA;AAAA,IAC1B,WAAc,GAAA,WAAA;AAAA,IACd,eAAe,EAAC;AAAA,IAChB,YAAA;AAAA,GACE,GAAA,KAAA,CAAA;AACJ,EAAA,MAAM,WACJ,EAAO,GAAA,MAAA,CAAA,YAAY,EAAE,iBAAkB,CAAA,mBAAmB,MAA1D,IAA+D,GAAA,EAAA,GAAA,WAAA,CAAA;AACjE,EAAM,MAAA,mBAAA,GAAsB,YAAY,uBAAuB,CAAA,CAAA;AAE/D,EAAM,MAAA,EAAE,iBAAkB,EAAA,GAAI,uBAAwB,EAAA,CAAA;AAEtD,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,IAAe,OAAO,CAAG,EAAA,OAAA,CAAA,QAAA,CAAA;AAAA,IAAmB,OAAQ,EAAA,MAAA;AAAA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AEJ;;ACtFO,SAAS,YAAY,KAAgC,EAAA;AAC1D,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,OAAO,0BAAW,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA;AAAA,IAAoB,GAAG,KAAA;AAAA,GAAO,CAAA,CAAA;AAClD;;;;"}
1
+ {"version":3,"file":"index-426b309d.esm.js","sources":["../../src/options.ts","../../src/components/CatalogPage/DefaultCatalogPage.tsx","../../src/components/CatalogPage/CatalogPage.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 { usePluginOptions } from '@backstage/core-plugin-api';\n\nexport type CatalogPluginOptions = {\n createButtonTitle: string;\n};\n\n/** @ignore */\nexport type CatalogInputPluginOptions = {\n createButtonTitle: string;\n};\n\nexport const useCatalogPluginOptions = () =>\n usePluginOptions<CatalogPluginOptions>();\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Content,\n ContentHeader,\n CreateButton,\n PageWithHeader,\n SupportButton,\n TableColumn,\n TableProps,\n} from '@backstage/core-components';\nimport { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n CatalogFilterLayout,\n EntityLifecyclePicker,\n EntityListProvider,\n EntityProcessingStatusPicker,\n EntityOwnerPicker,\n EntityTagPicker,\n EntityTypePicker,\n UserListFilterKind,\n UserListPicker,\n EntityKindPicker,\n} from '@backstage/plugin-catalog-react';\nimport React, { ReactNode } from 'react';\nimport { createComponentRouteRef } from '../../routes';\nimport { CatalogTable, CatalogTableRow } from '../CatalogTable';\nimport { CatalogKindHeader } from '../CatalogKindHeader';\nimport { useCatalogPluginOptions } from '../../options';\n\n/**\n * Props for root catalog pages.\n *\n * @public\n */\nexport interface DefaultCatalogPageProps {\n initiallySelectedFilter?: UserListFilterKind;\n columns?: TableColumn<CatalogTableRow>[];\n actions?: TableProps<CatalogTableRow>['actions'];\n initialKind?: string;\n tableOptions?: TableProps<CatalogTableRow>['options'];\n emptyContent?: ReactNode;\n}\n\nexport function DefaultCatalogPage(props: DefaultCatalogPageProps) {\n const {\n columns,\n actions,\n initiallySelectedFilter = 'owned',\n initialKind = 'component',\n tableOptions = {},\n emptyContent,\n } = props;\n const orgName =\n useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';\n const createComponentLink = useRouteRef(createComponentRouteRef);\n\n const { createButtonTitle } = useCatalogPluginOptions();\n\n return (\n <PageWithHeader title={`${orgName} Catalog`} themeId=\"home\">\n <EntityListProvider>\n <Content>\n <ContentHeader\n titleComponent={<CatalogKindHeader initialFilter={initialKind} />}\n >\n <CreateButton\n title={createButtonTitle}\n to={createComponentLink && createComponentLink()}\n />\n <SupportButton>All your software catalog entities</SupportButton>\n </ContentHeader>\n <CatalogFilterLayout>\n <CatalogFilterLayout.Filters>\n <EntityKindPicker initialFilter={initialKind} />\n <EntityTypePicker />\n <UserListPicker initialFilter={initiallySelectedFilter} />\n <EntityOwnerPicker />\n <EntityLifecyclePicker />\n <EntityTagPicker />\n <EntityProcessingStatusPicker />\n </CatalogFilterLayout.Filters>\n <CatalogFilterLayout.Content>\n <CatalogTable\n columns={columns}\n actions={actions}\n tableOptions={tableOptions}\n emptyContent={emptyContent}\n />\n </CatalogFilterLayout.Content>\n </CatalogFilterLayout>\n </Content>\n </EntityListProvider>\n </PageWithHeader>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router';\nimport {\n DefaultCatalogPage,\n DefaultCatalogPageProps,\n} from './DefaultCatalogPage';\n\nexport function CatalogPage(props: DefaultCatalogPageProps) {\n const outlet = useOutlet();\n\n return outlet || <DefaultCatalogPage {...props} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Ba,MAAA,uBAAA,GAA0B,MACrC,gBAAuC,EAAA;;AC8BlC,SAAS,mBAAmB,KAAgC,EAAA;AA1DnE,EAAA,IAAA,EAAA,CAAA;AA2DE,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,OAAA;AAAA,IACA,uBAA0B,GAAA,OAAA;AAAA,IAC1B,WAAc,GAAA,WAAA;AAAA,IACd,eAAe,EAAC;AAAA,IAChB,YAAA;AAAA,GACE,GAAA,KAAA,CAAA;AACJ,EAAA,MAAM,WACJ,EAAO,GAAA,MAAA,CAAA,YAAY,EAAE,iBAAkB,CAAA,mBAAmB,MAA1D,IAA+D,GAAA,EAAA,GAAA,WAAA,CAAA;AACjE,EAAM,MAAA,mBAAA,GAAsB,YAAY,uBAAuB,CAAA,CAAA;AAE/D,EAAM,MAAA,EAAE,iBAAkB,EAAA,GAAI,uBAAwB,EAAA,CAAA;AAEtD,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,c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AA;AAAA,MACA,YAAA;AAAA,KAAA;AAAA,GAEJ,CACF,CACF,CACF,CACF,CAAA,CAAA;AAEJ;;ACtFO,SAAS,YAAY,KAAgC,EAAA;AAC1D,EAAA,MAAM,SAAS,SAAU,EAAA,CAAA;AAEzB,EAAA,OAAO,MAAU,oBAAA,KAAA,CAAA,aAAA,CAAC,kBAAoB,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA,CAAA;AAClD;;;;"}
@@ -0,0 +1,26 @@
1
+ import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
+ import React from 'react';
3
+ import { R as RelatedEntitiesCard, r as resourceEntityColumns, f as asResourceEntities, g as resourceEntityHelpLink } from './presets-8f6d8412.esm.js';
4
+ import '@material-ui/core';
5
+ import '@backstage/plugin-catalog-react';
6
+ import '@backstage/core-components';
7
+
8
+ function HasResourcesCard(props) {
9
+ const { variant = "gridItem" } = props;
10
+ return /* @__PURE__ */ React.createElement(
11
+ RelatedEntitiesCard,
12
+ {
13
+ variant,
14
+ title: "Has resources",
15
+ entityKind: "Resource",
16
+ relationType: RELATION_HAS_PART,
17
+ columns: resourceEntityColumns,
18
+ asRenderableEntities: asResourceEntities,
19
+ emptyMessage: "No resource is part of this system",
20
+ emptyHelpLink: resourceEntityHelpLink
21
+ }
22
+ );
23
+ }
24
+
25
+ export { HasResourcesCard };
26
+ //# sourceMappingURL=index-579c0e06.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-b3ad464b.esm.js","sources":["../../src/components/HasResourcesCard/HasResourcesCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { 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,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAM,EAAA,eAAA;AAAA,IACN,UAAW,EAAA,UAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,qBAAA;AAAA,IACT,oBAAsB,EAAA,kBAAA;AAAA,IACtB,YAAa,EAAA,oCAAA;AAAA,IACb,aAAe,EAAA,sBAAA;AAAA,GACjB,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"index-579c0e06.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;;;;"}
@@ -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-13b889b9.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-8f6d8412.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-c2914273.esm.js.map
6
+ //# sourceMappingURL=index-60adddb8.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-60adddb8.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,26 @@
1
+ import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
+ import React from 'react';
3
+ import { R as RelatedEntitiesCard, c as componentEntityColumns, d as componentEntityHelpLink, e as asComponentEntities } from './presets-8f6d8412.esm.js';
4
+ import '@material-ui/core';
5
+ import '@backstage/plugin-catalog-react';
6
+ import '@backstage/core-components';
7
+
8
+ function HasComponentsCard(props) {
9
+ const { variant = "gridItem" } = props;
10
+ return /* @__PURE__ */ React.createElement(
11
+ RelatedEntitiesCard,
12
+ {
13
+ variant,
14
+ title: "Has components",
15
+ entityKind: "Component",
16
+ relationType: RELATION_HAS_PART,
17
+ columns: componentEntityColumns,
18
+ emptyMessage: "No component is part of this system",
19
+ emptyHelpLink: componentEntityHelpLink,
20
+ asRenderableEntities: asComponentEntities
21
+ }
22
+ );
23
+ }
24
+
25
+ export { HasComponentsCard };
26
+ //# sourceMappingURL=index-62df5b29.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-acb3cf04.esm.js","sources":["../../src/components/HasComponentsCard/HasComponentsCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { 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,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAM,EAAA,gBAAA;AAAA,IACN,UAAW,EAAA,WAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,sBAAA;AAAA,IACT,YAAa,EAAA,qCAAA;AAAA,IACb,aAAe,EAAA,uBAAA;AAAA,IACf,oBAAsB,EAAA,mBAAA;AAAA,GACxB,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"index-62df5b29.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;;;;"}
@@ -0,0 +1,26 @@
1
+ import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
+ import React from 'react';
3
+ import { R as RelatedEntitiesCard, c as componentEntityColumns, e as asComponentEntities } from './presets-8f6d8412.esm.js';
4
+ import '@material-ui/core';
5
+ import '@backstage/plugin-catalog-react';
6
+ import '@backstage/core-components';
7
+
8
+ function HasSubcomponentsCard(props) {
9
+ const { variant = "gridItem" } = props;
10
+ return /* @__PURE__ */ React.createElement(
11
+ RelatedEntitiesCard,
12
+ {
13
+ variant,
14
+ title: "Has subcomponents",
15
+ entityKind: "Component",
16
+ relationType: RELATION_HAS_PART,
17
+ columns: componentEntityColumns,
18
+ asRenderableEntities: asComponentEntities,
19
+ emptyMessage: "No subcomponent is part of this component",
20
+ emptyHelpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#specsubcomponentof-optional"
21
+ }
22
+ );
23
+ }
24
+
25
+ export { HasSubcomponentsCard };
26
+ //# sourceMappingURL=index-796cbb22.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-41ab53b6.esm.js","sources":["../../src/components/HasSubcomponentsCard/HasSubcomponentsCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { 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,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAM,EAAA,mBAAA;AAAA,IACN,UAAW,EAAA,WAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,sBAAA;AAAA,IACT,oBAAsB,EAAA,mBAAA;AAAA,IACtB,YAAa,EAAA,2CAAA;AAAA,IACb,aAAc,EAAA,mGAAA;AAAA,GAChB,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"index-796cbb22.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;;;;"}
@@ -28,10 +28,8 @@ const useEntityFromUrl = () => {
28
28
  };
29
29
 
30
30
  function CatalogEntityPage() {
31
- return /* @__PURE__ */ React.createElement(AsyncEntityProvider, {
32
- ...useEntityFromUrl()
33
- }, /* @__PURE__ */ React.createElement(Outlet, null));
31
+ return /* @__PURE__ */ React.createElement(AsyncEntityProvider, { ...useEntityFromUrl() }, /* @__PURE__ */ React.createElement(Outlet, null));
34
32
  }
35
33
 
36
34
  export { CatalogEntityPage };
37
- //# sourceMappingURL=index-46417657.esm.js.map
35
+ //# sourceMappingURL=index-a04ec5f0.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-46417657.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';\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';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n <Asy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AA;AAEJ;;;;"}
1
+ {"version":3,"file":"index-a04ec5f0.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';\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';\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;;;;"}
@@ -0,0 +1,26 @@
1
+ import { RELATION_HAS_PART } from '@backstage/catalog-model';
2
+ import React from 'react';
3
+ import { R as RelatedEntitiesCard, s as systemEntityColumns, a as asSystemEntities, b as systemEntityHelpLink } from './presets-8f6d8412.esm.js';
4
+ import '@material-ui/core';
5
+ import '@backstage/plugin-catalog-react';
6
+ import '@backstage/core-components';
7
+
8
+ function HasSystemsCard(props) {
9
+ const { variant = "gridItem" } = props;
10
+ return /* @__PURE__ */ React.createElement(
11
+ RelatedEntitiesCard,
12
+ {
13
+ variant,
14
+ title: "Has systems",
15
+ entityKind: "System",
16
+ relationType: RELATION_HAS_PART,
17
+ columns: systemEntityColumns,
18
+ asRenderableEntities: asSystemEntities,
19
+ emptyMessage: "No system is part of this domain",
20
+ emptyHelpLink: systemEntityHelpLink
21
+ }
22
+ );
23
+ }
24
+
25
+ export { HasSystemsCard };
26
+ //# sourceMappingURL=index-a6b7e5a0.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-3763491b.esm.js","sources":["../../src/components/HasSystemsCard/HasSystemsCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport { 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,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,mBAAA,EAAA;AAAA,IACC,OAAA;AAAA,IACA,KAAM,EAAA,aAAA;AAAA,IACN,UAAW,EAAA,QAAA;AAAA,IACX,YAAc,EAAA,iBAAA;AAAA,IACd,OAAS,EAAA,mBAAA;AAAA,IACT,oBAAsB,EAAA,gBAAA;AAAA,IACtB,YAAa,EAAA,kCAAA;AAAA,IACb,aAAe,EAAA,oBAAA;AAAA,GACjB,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"index-a6b7e5a0.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;;;;"}