@backstage/plugin-catalog 1.32.0 → 1.32.1-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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 1.32.1-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f3f84f1: Minor extension type updates after frontend API bump
8
+ - 91f5ed8: Fixed `catalogAboutEntityCard` to filter icon links before calling useProps(), preventing side effects from hooks in filtered-out links
9
+ - Updated dependencies
10
+ - @backstage/frontend-plugin-api@0.13.2-next.1
11
+ - @backstage/plugin-catalog-react@1.21.4-next.2
12
+ - @backstage/core-components@0.18.4-next.2
13
+ - @backstage/catalog-client@1.12.1
14
+ - @backstage/catalog-model@1.7.6
15
+ - @backstage/core-compat-api@0.5.5-next.0
16
+ - @backstage/core-plugin-api@1.12.1-next.0
17
+ - @backstage/errors@1.2.7
18
+ - @backstage/integration-react@1.2.13-next.0
19
+ - @backstage/types@1.2.2
20
+ - @backstage/version-bridge@1.0.11
21
+ - @backstage/plugin-catalog-common@1.1.7
22
+ - @backstage/plugin-permission-react@0.4.39-next.0
23
+ - @backstage/plugin-scaffolder-common@1.7.4-next.0
24
+ - @backstage/plugin-search-common@1.2.21
25
+ - @backstage/plugin-search-react@1.10.1-next.0
26
+ - @backstage/plugin-techdocs-common@0.1.1
27
+ - @backstage/plugin-techdocs-react@1.3.6-next.0
28
+
29
+ ## 1.32.1-next.0
30
+
31
+ ### Patch Changes
32
+
33
+ - d02db50: Remove unnecessary use of `compatWrapper` and `convertLegacyRouteRef`(s) for the new frontend system.
34
+ - Updated dependencies
35
+ - @backstage/frontend-plugin-api@0.13.2-next.0
36
+ - @backstage/core-plugin-api@1.12.1-next.0
37
+ - @backstage/plugin-catalog-react@1.21.4-next.0
38
+ - @backstage/core-compat-api@0.5.5-next.0
39
+ - @backstage/plugin-search-react@1.10.1-next.0
40
+ - @backstage/plugin-techdocs-react@1.3.6-next.0
41
+ - @backstage/integration-react@1.2.13-next.0
42
+ - @backstage/plugin-scaffolder-common@1.7.4-next.0
43
+ - @backstage/core-components@0.18.4-next.0
44
+ - @backstage/plugin-permission-react@0.4.39-next.0
45
+ - @backstage/catalog-client@1.12.1
46
+ - @backstage/catalog-model@1.7.6
47
+ - @backstage/errors@1.2.7
48
+ - @backstage/types@1.2.2
49
+ - @backstage/version-bridge@1.0.11
50
+ - @backstage/plugin-catalog-common@1.1.7
51
+ - @backstage/plugin-search-common@1.2.21
52
+ - @backstage/plugin-techdocs-common@0.1.1
53
+
3
54
  ## 1.32.0
4
55
 
5
56
  ### Minor Changes
@@ -12,7 +12,6 @@ import { useEntity, UnregisterEntityDialog } from '@backstage/plugin-catalog-rea
12
12
  import { rootRouteRef, unregisterRedirectRouteRef } from '../routes.esm.js';
13
13
  import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha';
14
14
  import { useEffect } from 'react';
15
- import { compatWrapper } from '@backstage/core-compat-api';
16
15
 
17
16
  const copyEntityUrlContextMenuItem = EntityContextMenuItemBlueprint.make(
18
17
  {
@@ -78,24 +77,20 @@ const unregisterEntityContextMenuItem = EntityContextMenuItemBlueprint.make({
78
77
  title: t("entityContextMenu.unregisterMenuTitle"),
79
78
  disabled: !unregisterPermission.allowed,
80
79
  onClick: async () => {
81
- dialogApi.showModal(
82
- ({ dialog }) => compatWrapper(
83
- /* @__PURE__ */ jsx(
84
- UnregisterEntityDialog,
85
- {
86
- open: true,
87
- entity,
88
- onClose: () => dialog.close(),
89
- onConfirm: () => {
90
- dialog.close();
91
- navigate(
92
- unregisterRedirectRoute ? unregisterRedirectRoute() : catalogRoute()
93
- );
94
- }
95
- }
96
- )
97
- )
98
- );
80
+ dialogApi.showModal(({ dialog }) => /* @__PURE__ */ jsx(
81
+ UnregisterEntityDialog,
82
+ {
83
+ open: true,
84
+ entity,
85
+ onClose: () => dialog.close(),
86
+ onConfirm: () => {
87
+ dialog.close();
88
+ navigate(
89
+ unregisterRedirectRoute ? unregisterRedirectRoute() : catalogRoute()
90
+ );
91
+ }
92
+ }
93
+ ));
99
94
  }
100
95
  };
101
96
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contextMenuItems.esm.js","sources":["../../src/alpha/contextMenuItems.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 EntityContextMenuItemBlueprint,\n useEntityPermission,\n} from '@backstage/plugin-catalog-react/alpha';\nimport FileCopyTwoToneIcon from '@material-ui/icons/FileCopyTwoTone';\nimport BugReportIcon from '@material-ui/icons/BugReport';\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport useCopyToClipboard from 'react-use/esm/useCopyToClipboard';\nimport { alertApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n dialogApiRef,\n useTranslationRef,\n type DialogApiDialog,\n} from '@backstage/frontend-plugin-api';\nimport { catalogTranslationRef } from './translation';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport {\n UnregisterEntityDialog,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { rootRouteRef, unregisterRedirectRouteRef } from '../routes';\nimport { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha';\nimport { useEffect } from 'react';\nimport { compatWrapper } from '@backstage/core-compat-api';\n\nexport const copyEntityUrlContextMenuItem = EntityContextMenuItemBlueprint.make(\n {\n name: 'copy-entity-url',\n params: {\n icon: <FileCopyTwoToneIcon fontSize=\"small\" />,\n useProps: () => {\n const [copyState, copyToClipboard] = useCopyToClipboard();\n const alertApi = useApi(alertApiRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n\n useEffect(() => {\n if (!copyState.error && copyState.value) {\n alertApi.post({\n message: t('entityContextMenu.copiedMessage'),\n severity: 'info',\n display: 'transient',\n });\n }\n }, [copyState, alertApi, t]);\n\n return {\n title: t('entityContextMenu.copyURLMenuTitle'),\n onClick: async () => {\n copyToClipboard(window.location.toString());\n },\n };\n },\n },\n },\n);\n\nexport const inspectEntityContextMenuItem = EntityContextMenuItemBlueprint.make(\n {\n name: 'inspect-entity',\n params: {\n icon: <BugReportIcon fontSize=\"small\" />,\n useProps: () => {\n const [_, setSearchParams] = useSearchParams();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n return {\n title: t('entityContextMenu.inspectMenuTitle'),\n onClick: async () => {\n setSearchParams('inspect');\n },\n };\n },\n },\n },\n);\n\nexport const unregisterEntityContextMenuItem =\n EntityContextMenuItemBlueprint.make({\n name: 'unregister-entity',\n params: {\n icon: <CancelIcon fontSize=\"small\" />,\n useProps: () => {\n const { entity } = useEntity();\n const dialogApi = useApi(dialogApiRef);\n const navigate = useNavigate();\n const catalogRoute = useRouteRef(rootRouteRef);\n\n const { t } = useTranslationRef(catalogTranslationRef);\n const unregisterRedirectRoute = useRouteRef(unregisterRedirectRouteRef);\n const unregisterPermission = useEntityPermission(\n catalogEntityDeletePermission,\n );\n\n return {\n title: t('entityContextMenu.unregisterMenuTitle'),\n disabled: !unregisterPermission.allowed,\n onClick: async () => {\n dialogApi.showModal(({ dialog }: { dialog: DialogApiDialog }) =>\n compatWrapper(\n <UnregisterEntityDialog\n open\n entity={entity}\n onClose={() => dialog.close()}\n onConfirm={() => {\n dialog.close();\n navigate(\n unregisterRedirectRoute\n ? unregisterRedirectRoute()\n : catalogRoute(),\n );\n }}\n />,\n ),\n );\n },\n };\n },\n },\n });\n\nexport default [\n unregisterEntityContextMenuItem,\n inspectEntityContextMenuItem,\n copyEntityUrlContextMenuItem,\n];\n"],"names":[],"mappings":";;;;;;;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WAAW,MAAM;AACf,oBAAA,MAAA,CAAO,KAAA,EAAM;AACb,oBAAA,QAAA;AAAA,sBACE,uBAAA,GACI,uBAAA,EAAwB,GACxB,YAAA;AAAa,qBACnB;AAAA,kBACF;AAAA;AAAA;AACF;AACF,WACF;AAAA,QACF;AAAA,OACF;AAAA,IACF;AAAA;AAEJ,CAAC;AAEH,uBAAe;AAAA,EACb,+BAAA;AAAA,EACA,4BAAA;AAAA,EACA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"contextMenuItems.esm.js","sources":["../../src/alpha/contextMenuItems.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 EntityContextMenuItemBlueprint,\n useEntityPermission,\n} from '@backstage/plugin-catalog-react/alpha';\nimport FileCopyTwoToneIcon from '@material-ui/icons/FileCopyTwoTone';\nimport BugReportIcon from '@material-ui/icons/BugReport';\nimport CancelIcon from '@material-ui/icons/Cancel';\nimport useCopyToClipboard from 'react-use/esm/useCopyToClipboard';\nimport { alertApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api';\nimport {\n dialogApiRef,\n useTranslationRef,\n type DialogApiDialog,\n} from '@backstage/frontend-plugin-api';\nimport { catalogTranslationRef } from './translation';\nimport { useNavigate, useSearchParams } from 'react-router-dom';\nimport {\n UnregisterEntityDialog,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { rootRouteRef, unregisterRedirectRouteRef } from '../routes';\nimport { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha';\nimport { useEffect } from 'react';\n\nexport const copyEntityUrlContextMenuItem = EntityContextMenuItemBlueprint.make(\n {\n name: 'copy-entity-url',\n params: {\n icon: <FileCopyTwoToneIcon fontSize=\"small\" />,\n useProps: () => {\n const [copyState, copyToClipboard] = useCopyToClipboard();\n const alertApi = useApi(alertApiRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n\n useEffect(() => {\n if (!copyState.error && copyState.value) {\n alertApi.post({\n message: t('entityContextMenu.copiedMessage'),\n severity: 'info',\n display: 'transient',\n });\n }\n }, [copyState, alertApi, t]);\n\n return {\n title: t('entityContextMenu.copyURLMenuTitle'),\n onClick: async () => {\n copyToClipboard(window.location.toString());\n },\n };\n },\n },\n },\n);\n\nexport const inspectEntityContextMenuItem = EntityContextMenuItemBlueprint.make(\n {\n name: 'inspect-entity',\n params: {\n icon: <BugReportIcon fontSize=\"small\" />,\n useProps: () => {\n const [_, setSearchParams] = useSearchParams();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n return {\n title: t('entityContextMenu.inspectMenuTitle'),\n onClick: async () => {\n setSearchParams('inspect');\n },\n };\n },\n },\n },\n);\n\nexport const unregisterEntityContextMenuItem =\n EntityContextMenuItemBlueprint.make({\n name: 'unregister-entity',\n params: {\n icon: <CancelIcon fontSize=\"small\" />,\n useProps: () => {\n const { entity } = useEntity();\n const dialogApi = useApi(dialogApiRef);\n const navigate = useNavigate();\n const catalogRoute = useRouteRef(rootRouteRef);\n\n const { t } = useTranslationRef(catalogTranslationRef);\n const unregisterRedirectRoute = useRouteRef(unregisterRedirectRouteRef);\n const unregisterPermission = useEntityPermission(\n catalogEntityDeletePermission,\n );\n\n return {\n title: t('entityContextMenu.unregisterMenuTitle'),\n disabled: !unregisterPermission.allowed,\n onClick: async () => {\n dialogApi.showModal(({ dialog }: { dialog: DialogApiDialog }) => (\n <UnregisterEntityDialog\n open\n entity={entity}\n onClose={() => dialog.close()}\n onConfirm={() => {\n dialog.close();\n navigate(\n unregisterRedirectRoute\n ? unregisterRedirectRoute()\n : catalogRoute(),\n );\n }}\n />\n ));\n },\n };\n },\n },\n });\n\nexport default [\n unregisterEntityContextMenuItem,\n inspectEntityContextMenuItem,\n copyEntityUrlContextMenuItem,\n];\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwCO,MAAM,+BAA+B,8BAAA,CAA+B,IAAA;AAAA,EACzE;AAAA,IACE,IAAA,EAAM,iBAAA;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,IAAA,kBAAM,GAAA,CAAC,mBAAA,EAAA,EAAoB,QAAA,EAAS,OAAA,EAAQ,CAAA;AAAA,MAC5C,UAAU,MAAM;AACd,QAAA,MAAM,CAAC,SAAA,EAAW,eAAe,CAAA,GAAI,kBAAA,EAAmB;AACxD,QAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AACnC,QAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,QAAA,SAAA,CAAU,MAAM;AACd,UAAA,IAAI,CAAC,SAAA,CAAU,KAAA,IAAS,SAAA,CAAU,KAAA,EAAO;AACvC,YAAA,QAAA,CAAS,IAAA,CAAK;AAAA,cACZ,OAAA,EAAS,EAAE,iCAAiC,CAAA;AAAA,cAC5C,QAAA,EAAU,MAAA;AAAA,cACV,OAAA,EAAS;AAAA,aACV,CAAA;AAAA,UACH;AAAA,QACF,CAAA,EAAG,CAAC,SAAA,EAAW,QAAA,EAAU,CAAC,CAAC,CAAA;AAE3B,QAAA,OAAO;AAAA,UACL,KAAA,EAAO,EAAE,oCAAoC,CAAA;AAAA,UAC7C,SAAS,YAAY;AACnB,YAAA,eAAA,CAAgB,MAAA,CAAO,QAAA,CAAS,QAAA,EAAU,CAAA;AAAA,UAC5C;AAAA,SACF;AAAA,MACF;AAAA;AACF;AAEJ;AAEO,MAAM,+BAA+B,8BAAA,CAA+B,IAAA;AAAA,EACzE;AAAA,IACE,IAAA,EAAM,gBAAA;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,IAAA,kBAAM,GAAA,CAAC,aAAA,E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IAAA;AAAA,cACJ,MAAA;AAAA,cACA,OAAA,EAAS,MAAM,MAAA,CAAO,KAAA,EAAM;AAAA,cAC5B,WAAW,MAAM;AACf,gBAAA,MAAA,CAAO,KAAA,EAAM;AACb,gBAAA,QAAA;AAAA,kBACE,uBAAA,GACI,uBAAA,EAAwB,GACxB,YAAA;AAAa,iBACnB;AAAA,cACF;AAAA;AAAA,WAEH,CAAA;AAAA,QACH;AAAA,OACF;AAAA,IACF;AAAA;AAEJ,CAAC;AAEH,uBAAe;AAAA,EACb,+BAAA;AAAA,EACA,4BAAA;AAAA,EACA;AACF,CAAA;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { EntityCardBlueprint, EntityIconLinkBlueprint } from '@backstage/plugin-catalog-react/alpha';
3
- import { compatWrapper } from '@backstage/core-compat-api';
4
3
  import { createExtensionInput } from '@backstage/frontend-plugin-api';
5
4
  import { HeaderIconLinkRow } from '@backstage/core-components';
6
5
  import { useEntity } from '@backstage/plugin-catalog-react';
@@ -19,12 +18,14 @@ const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({
19
18
  function Subheader() {
20
19
  const { entity } = useEntity();
21
20
  const links = inputs.iconLinks.reduce((rest, iconLink) => {
22
- const props = iconLink.get(EntityIconLinkBlueprint.dataRefs.useProps)();
23
21
  const filter = buildFilterFn(
24
22
  iconLink.get(EntityIconLinkBlueprint.dataRefs.filterFunction),
25
23
  iconLink.get(EntityIconLinkBlueprint.dataRefs.filterExpression)
26
24
  );
27
25
  if (filter(entity)) {
26
+ const props = iconLink.get(
27
+ EntityIconLinkBlueprint.dataRefs.useProps
28
+ )();
28
29
  return [...rest, props];
29
30
  }
30
31
  return rest;
@@ -40,9 +41,7 @@ const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({
40
41
  },
41
42
  async loader() {
42
43
  const { InternalAboutCard } = await import('../components/AboutCard/AboutCard.esm.js');
43
- return compatWrapper(
44
- /* @__PURE__ */ jsx(InternalAboutCard, { variant: "gridItem", subheader: /* @__PURE__ */ jsx(Subheader, {}) })
45
- );
44
+ return /* @__PURE__ */ jsx(InternalAboutCard, { variant: "gridItem", subheader: /* @__PURE__ */ jsx(Subheader, {}) });
46
45
  }
47
46
  });
48
47
  }
@@ -52,9 +51,7 @@ const catalogLinksEntityCard = EntityCardBlueprint.make({
52
51
  params: {
53
52
  type: "info",
54
53
  filter: { "metadata.links": { $exists: true } },
55
- loader: async () => import('../components/EntityLinksCard/index.esm.js').then(
56
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.EntityLinksCard, { variant: "gridItem" }))
57
- )
54
+ loader: async () => import('../components/EntityLinksCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.EntityLinksCard, { variant: "gridItem" }))
58
55
  }
59
56
  });
60
57
  const catalogLabelsEntityCard = EntityCardBlueprint.make({
@@ -62,72 +59,56 @@ const catalogLabelsEntityCard = EntityCardBlueprint.make({
62
59
  params: {
63
60
  type: "info",
64
61
  filter: { "metadata.labels": { $exists: true } },
65
- loader: async () => import('../components/EntityLabelsCard/index.esm.js').then(
66
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.EntityLabelsCard, { variant: "gridItem" }))
67
- )
62
+ loader: async () => import('../components/EntityLabelsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.EntityLabelsCard, { variant: "gridItem" }))
68
63
  }
69
64
  });
70
65
  const catalogDependsOnComponentsEntityCard = EntityCardBlueprint.make({
71
66
  name: "depends-on-components",
72
67
  params: {
73
68
  filter: { kind: "component" },
74
- loader: async () => import('../components/DependsOnComponentsCard/index.esm.js').then(
75
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.DependsOnComponentsCard, { variant: "gridItem" }))
76
- )
69
+ loader: async () => import('../components/DependsOnComponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.DependsOnComponentsCard, { variant: "gridItem" }))
77
70
  }
78
71
  });
79
72
  const catalogDependsOnResourcesEntityCard = EntityCardBlueprint.make({
80
73
  name: "depends-on-resources",
81
74
  params: {
82
75
  filter: { kind: "component" },
83
- loader: async () => import('../components/DependsOnResourcesCard/index.esm.js').then(
84
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.DependsOnResourcesCard, { variant: "gridItem" }))
85
- )
76
+ loader: async () => import('../components/DependsOnResourcesCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.DependsOnResourcesCard, { variant: "gridItem" }))
86
77
  }
87
78
  });
88
79
  const catalogHasComponentsEntityCard = EntityCardBlueprint.make({
89
80
  name: "has-components",
90
81
  params: {
91
82
  filter: { kind: "system" },
92
- loader: async () => import('../components/HasComponentsCard/index.esm.js').then(
93
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.HasComponentsCard, { variant: "gridItem" }))
94
- )
83
+ loader: async () => import('../components/HasComponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasComponentsCard, { variant: "gridItem" }))
95
84
  }
96
85
  });
97
86
  const catalogHasResourcesEntityCard = EntityCardBlueprint.make({
98
87
  name: "has-resources",
99
88
  params: {
100
89
  filter: { kind: "system" },
101
- loader: async () => import('../components/HasResourcesCard/index.esm.js').then(
102
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.HasResourcesCard, { variant: "gridItem" }))
103
- )
90
+ loader: async () => import('../components/HasResourcesCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasResourcesCard, { variant: "gridItem" }))
104
91
  }
105
92
  });
106
93
  const catalogHasSubcomponentsEntityCard = EntityCardBlueprint.make({
107
94
  name: "has-subcomponents",
108
95
  params: {
109
96
  filter: { kind: "component" },
110
- loader: async () => import('../components/HasSubcomponentsCard/index.esm.js').then(
111
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.HasSubcomponentsCard, { variant: "gridItem" }))
112
- )
97
+ loader: async () => import('../components/HasSubcomponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSubcomponentsCard, { variant: "gridItem" }))
113
98
  }
114
99
  });
115
100
  const catalogHasSubdomainsEntityCard = EntityCardBlueprint.make({
116
101
  name: "has-subdomains",
117
102
  params: {
118
103
  filter: { kind: "domain" },
119
- loader: async () => import('../components/HasSubdomainsCard/index.esm.js').then(
120
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.HasSubdomainsCard, { variant: "gridItem" }))
121
- )
104
+ loader: async () => import('../components/HasSubdomainsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSubdomainsCard, { variant: "gridItem" }))
122
105
  }
123
106
  });
124
107
  const catalogHasSystemsEntityCard = EntityCardBlueprint.make({
125
108
  name: "has-systems",
126
109
  params: {
127
110
  filter: { kind: "domain" },
128
- loader: async () => import('../components/HasSystemsCard/index.esm.js').then(
129
- (m) => compatWrapper(/* @__PURE__ */ jsx(m.HasSystemsCard, { variant: "gridItem" }))
130
- )
111
+ loader: async () => import('../components/HasSystemsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSystemsCard, { variant: "gridItem" }))
131
112
  }
132
113
  });
133
114
  var entityCards = [
@@ -1 +1 @@
1
- {"version":3,"file":"entityCards.esm.js","sources":["../../src/alpha/entityCards.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 EntityIconLinkBlueprint,\n EntityCardBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { compatWrapper } from '@backstage/core-compat-api';\nimport { createExtensionInput } from '@backstage/frontend-plugin-api';\nimport {\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n} from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { buildFilterFn } from './filter/FilterWrapper';\n\nexport const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({\n name: 'about',\n inputs: {\n iconLinks: createExtensionInput([\n EntityIconLinkBlueprint.dataRefs.filterFunction.optional(),\n EntityIconLinkBlueprint.dataRefs.filterExpression.optional(),\n EntityIconLinkBlueprint.dataRefs.useProps,\n ]),\n },\n factory(originalFactory, { inputs }) {\n function Subheader() {\n const { entity } = useEntity();\n // The \"useProps\" functions may be calling other hooks, so we need to\n // call them in a component function to avoid breaking the rules of hooks.\n const links = inputs.iconLinks.reduce((rest, iconLink) => {\n const props = iconLink.get(EntityIconLinkBlueprint.dataRefs.useProps)();\n const filter = buildFilterFn(\n iconLink.get(EntityIconLinkBlueprint.dataRefs.filterFunction),\n iconLink.get(EntityIconLinkBlueprint.dataRefs.filterExpression),\n );\n if (filter(entity)) {\n return [...rest, props];\n }\n return rest;\n }, new Array<IconLinkVerticalProps>());\n return links.length ? <HeaderIconLinkRow links={links} /> : null;\n }\n return originalFactory({\n type: 'info',\n filter: {\n $not: {\n kind: { $in: ['user', 'group'] },\n },\n },\n async loader() {\n const { InternalAboutCard } = await import(\n '../components/AboutCard/AboutCard'\n );\n return compatWrapper(\n <InternalAboutCard variant=\"gridItem\" subheader={<Subheader />} />,\n );\n },\n });\n },\n});\n\nexport const catalogLinksEntityCard = EntityCardBlueprint.make({\n name: 'links',\n params: {\n type: 'info',\n filter: { 'metadata.links': { $exists: true } },\n loader: async () =>\n import('../components/EntityLinksCard').then(m =>\n compatWrapper(<m.EntityLinksCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogLabelsEntityCard = EntityCardBlueprint.make({\n name: 'labels',\n params: {\n type: 'info',\n filter: { 'metadata.labels': { $exists: true } },\n loader: async () =>\n import('../components/EntityLabelsCard').then(m =>\n compatWrapper(<m.EntityLabelsCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogDependsOnComponentsEntityCard = EntityCardBlueprint.make({\n name: 'depends-on-components',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/DependsOnComponentsCard').then(m =>\n compatWrapper(<m.DependsOnComponentsCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogDependsOnResourcesEntityCard = EntityCardBlueprint.make({\n name: 'depends-on-resources',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/DependsOnResourcesCard').then(m =>\n compatWrapper(<m.DependsOnResourcesCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogHasComponentsEntityCard = EntityCardBlueprint.make({\n name: 'has-components',\n params: {\n filter: { kind: 'system' },\n loader: async () =>\n import('../components/HasComponentsCard').then(m =>\n compatWrapper(<m.HasComponentsCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogHasResourcesEntityCard = EntityCardBlueprint.make({\n name: 'has-resources',\n params: {\n filter: { kind: 'system' },\n loader: async () =>\n import('../components/HasResourcesCard').then(m =>\n compatWrapper(<m.HasResourcesCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogHasSubcomponentsEntityCard = EntityCardBlueprint.make({\n name: 'has-subcomponents',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/HasSubcomponentsCard').then(m =>\n compatWrapper(<m.HasSubcomponentsCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogHasSubdomainsEntityCard = EntityCardBlueprint.make({\n name: 'has-subdomains',\n params: {\n filter: { kind: 'domain' },\n loader: async () =>\n import('../components/HasSubdomainsCard').then(m =>\n compatWrapper(<m.HasSubdomainsCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport const catalogHasSystemsEntityCard = EntityCardBlueprint.make({\n name: 'has-systems',\n params: {\n filter: { kind: 'domain' },\n loader: async () =>\n import('../components/HasSystemsCard').then(m =>\n compatWrapper(<m.HasSystemsCard variant=\"gridItem\" />),\n ),\n },\n});\n\nexport default [\n catalogAboutEntityCard,\n catalogLinksEntityCard,\n catalogLabelsEntityCard,\n catalogDependsOnComponentsEntityCard,\n catalogDependsOnResourcesEntityCard,\n catalogHasComponentsEntityCard,\n catalogHasResourcesEntityCard,\n catalogHasSubcomponentsEntityCard,\n catalogHasSubdomainsEntityCard,\n catalogHasSystemsEntityCard,\n];\n"],"names":[],"mappings":";;;;;;;;AA6BO,MAAM,sBAAA,GAAyB,oBAAoB,iBAAA,CAAkB;AAAA,EAC1E,IAAA,EAAM,OAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,WAAW,oBAAA,CAAqB;AAAA,MAC9B,uBAAA,CAAwB,QAAA,CAAS,cAAA,CAAe,QAAA,EAAS;AAAA,MACzD,uBAAA,CAAwB,QAAA,CAAS,gBAAA,CAAiB,QAAA,EAAS;AAAA,MAC3D,wBAAwB,QAAA,CAAS;AAAA,KAClC;AAAA,GACH;AAAA,EACA,OAAA,CAAQ,eAAA,EAAiB,EAAE,MAAA,EAAO,EAAG;AACnC,IAAA,SAAS,SAAA,GAAY;AACnB,MAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAG7B,MAAA,MAAM,QAAQ,MAAA,CAAO,SAAA,CAAU,MAAA,CAAO,CAAC,MAAM,QAAA,KAAa;AACxD,QAAA,MAAM,QAAQ,QAAA,CAAS,GAAA,CAAI,uBAAA,CAAwB,QAAA,CAAS,QAAQ,CAAA,EAAE;AACtE,QAAA,MAAM,MAAA,GAAS,aAAA;AAAA,UACb,QAAA,CAAS,GAAA,CAAI,uBAAA,CAAwB,QAAA,CAAS,cAAc,CAAA;AAAA,UAC5D,QAAA,CAAS,GAAA,CAAI,uBAAA,CAAwB,QAAA,CAAS,gBAAgB;AAAA,SAChE;AACA,QAAA,IAAI,MAAA,CAAO,MAAM,CAAA,EAAG;AAClB,UAAA,OAAO,CAAC,GAAG,IAAA,EAAM,KAAK,CAAA;AAAA,QACxB;AACA,QAAA,OAAO,IAAA;AAAA,MACT,CAAA,EAAG,IAAI,KAAA,EAA8B,CAAA;AACrC,MAAA,OAAO,KA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E,gBAAF,EAAiB,OAAA,EAAQ,YAAW,CAAE;AAAA;AACvD;AAEN,CAAC;AAED,kBAAe;AAAA,EACb,sBAAA;AAAA,EACA,sBAAA;AAAA,EACA,uBAAA;AAAA,EACA,oCAAA;AAAA,EACA,mCAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,iCAAA;AAAA,EACA,8BAAA;AAAA,EACA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"entityCards.esm.js","sources":["../../src/alpha/entityCards.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 EntityIconLinkBlueprint,\n EntityCardBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { createExtensionInput } from '@backstage/frontend-plugin-api';\nimport {\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n} from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { buildFilterFn } from './filter/FilterWrapper';\n\nexport const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({\n name: 'about',\n inputs: {\n iconLinks: createExtensionInput([\n EntityIconLinkBlueprint.dataRefs.filterFunction.optional(),\n EntityIconLinkBlueprint.dataRefs.filterExpression.optional(),\n EntityIconLinkBlueprint.dataRefs.useProps,\n ]),\n },\n factory(originalFactory, { inputs }) {\n function Subheader() {\n const { entity } = useEntity();\n // The \"useProps\" functions may be calling other hooks, so we need to\n // call them in a component function to avoid breaking the rules of hooks.\n const links = inputs.iconLinks.reduce((rest, iconLink) => {\n const filter = buildFilterFn(\n iconLink.get(EntityIconLinkBlueprint.dataRefs.filterFunction),\n iconLink.get(EntityIconLinkBlueprint.dataRefs.filterExpression),\n );\n if (filter(entity)) {\n const props = iconLink.get(\n EntityIconLinkBlueprint.dataRefs.useProps,\n )();\n return [...rest, props];\n }\n return rest;\n }, new Array<IconLinkVerticalProps>());\n return links.length ? <HeaderIconLinkRow links={links} /> : null;\n }\n return originalFactory({\n type: 'info',\n filter: {\n $not: {\n kind: { $in: ['user', 'group'] },\n },\n },\n async loader() {\n const { InternalAboutCard } = await import(\n '../components/AboutCard/AboutCard'\n );\n return (\n <InternalAboutCard variant=\"gridItem\" subheader={<Subheader />} />\n );\n },\n });\n },\n});\n\nexport const catalogLinksEntityCard = EntityCardBlueprint.make({\n name: 'links',\n params: {\n type: 'info',\n filter: { 'metadata.links': { $exists: true } },\n loader: async () =>\n import('../components/EntityLinksCard').then(m => (\n <m.EntityLinksCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogLabelsEntityCard = EntityCardBlueprint.make({\n name: 'labels',\n params: {\n type: 'info',\n filter: { 'metadata.labels': { $exists: true } },\n loader: async () =>\n import('../components/EntityLabelsCard').then(m => (\n <m.EntityLabelsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogDependsOnComponentsEntityCard = EntityCardBlueprint.make({\n name: 'depends-on-components',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/DependsOnComponentsCard').then(m => (\n <m.DependsOnComponentsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogDependsOnResourcesEntityCard = EntityCardBlueprint.make({\n name: 'depends-on-resources',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/DependsOnResourcesCard').then(m => (\n <m.DependsOnResourcesCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasComponentsEntityCard = EntityCardBlueprint.make({\n name: 'has-components',\n params: {\n filter: { kind: 'system' },\n loader: async () =>\n import('../components/HasComponentsCard').then(m => (\n <m.HasComponentsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasResourcesEntityCard = EntityCardBlueprint.make({\n name: 'has-resources',\n params: {\n filter: { kind: 'system' },\n loader: async () =>\n import('../components/HasResourcesCard').then(m => (\n <m.HasResourcesCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasSubcomponentsEntityCard = EntityCardBlueprint.make({\n name: 'has-subcomponents',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/HasSubcomponentsCard').then(m => (\n <m.HasSubcomponentsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasSubdomainsEntityCard = EntityCardBlueprint.make({\n name: 'has-subdomains',\n params: {\n filter: { kind: 'domain' },\n loader: async () =>\n import('../components/HasSubdomainsCard').then(m => (\n <m.HasSubdomainsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasSystemsEntityCard = EntityCardBlueprint.make({\n name: 'has-systems',\n params: {\n filter: { kind: 'domain' },\n loader: async () =>\n import('../components/HasSystemsCard').then(m => (\n <m.HasSystemsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport default [\n catalogAboutEntityCard,\n catalogLinksEntityCard,\n catalogLabelsEntityCard,\n catalogDependsOnComponentsEntityCard,\n catalogDependsOnResourcesEntityCard,\n catalogHasComponentsEntityCard,\n catalogHasResourcesEntityCard,\n catalogHasSubcomponentsEntityCard,\n catalogHasSubdomainsEntityCard,\n catalogHasSystemsEntityCard,\n];\n"],"names":[],"mappings":";;;;;;;AA4BO,MAAM,sBAAA,GAAyB,oBAAoB,iBAAA,CAAkB;AAAA,EAC1E,IAAA,EAAM,OAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,WAAW,oBAAA,CAAqB;AAAA,MAC9B,uBAAA,CAAwB,QAAA,CAAS,cAAA,CAAe,QAAA,EAAS;AAAA,MACzD,uBAAA,CAAwB,QAAA,CAAS,gBAAA,CAAiB,QAAA,EAAS;AAAA,MAC3D,wBAAwB,QAAA,CAAS;AAAA,KAClC;AAAA,GACH;AAA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BAAA,GAAiC,oBAAoB,IAAA,CAAK;AAAA,EACrE,IAAA,EAAM,gBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,IACzB,MAAA,EAAQ,YACN,OAAO,8CAAiC,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC7C,GAAA,CAAC,CAAA,CAAE,iBAAA,EAAF,EAAoB,OAAA,EAAQ,YAAW,CACzC;AAAA;AAEP,CAAC;AAEM,MAAM,2BAAA,GAA8B,oBAAoB,IAAA,CAAK;AAAA,EAClE,IAAA,EAAM,aAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,IACzB,MAAA,EAAQ,YACN,OAAO,2CAA8B,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC1C,GAAA,CAAC,CAAA,CAAE,cAAA,EAAF,EAAiB,OAAA,EAAQ,YAAW,CACtC;AAAA;AAEP,CAAC;AAED,kBAAe;AAAA,EACb,sBAAA;AAAA,EACA,sBAAA;AAAA,EACA,uBAAA;AAAA,EACA,oCAAA;AAAA,EACA,mCAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,iCAAA;AAAA,EACA,8BAAA;AAAA,EACA;AACF,CAAA;;;;"}
@@ -1,11 +1,10 @@
1
1
  import HomeIcon from '@material-ui/icons/Home';
2
- import { convertLegacyRouteRef } from '@backstage/core-compat-api';
3
2
  import { NavItemBlueprint } from '@backstage/frontend-plugin-api';
4
3
  import { rootRouteRef } from '../routes.esm.js';
5
4
 
6
5
  const catalogNavItem = NavItemBlueprint.make({
7
6
  params: {
8
- routeRef: convertLegacyRouteRef(rootRouteRef),
7
+ routeRef: rootRouteRef,
9
8
  title: "Catalog",
10
9
  icon: HomeIcon
11
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navItems.esm.js","sources":["../../src/alpha/navItems.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 HomeIcon from '@material-ui/icons/Home';\nimport { convertLegacyRouteRef } from '@backstage/core-compat-api';\nimport { NavItemBlueprint } from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from '../routes';\n\nexport const catalogNavItem = NavItemBlueprint.make({\n params: {\n routeRef: convertLegacyRouteRef(rootRouteRef),\n title: 'Catalog',\n icon: HomeIcon,\n },\n});\n\nexport default [catalogNavItem];\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,cAAA,GAAiB,iBAAiB,IAAA,CAAK;AAAA,EAClD,MAAA,EAAQ;AAAA,IACN,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,IAC5C,KAAA,EAAO,SAAA;AAAA,IACP,IAAA,EAAM;AAAA;AAEV,CAAC;AAED,eAAe,CAAC,cAAc,CAAA;;;;"}
1
+ {"version":3,"file":"navItems.esm.js","sources":["../../src/alpha/navItems.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 HomeIcon from '@material-ui/icons/Home';\nimport { NavItemBlueprint } from '@backstage/frontend-plugin-api';\nimport { rootRouteRef } from '../routes';\n\nexport const catalogNavItem = NavItemBlueprint.make({\n params: {\n routeRef: rootRouteRef,\n title: 'Catalog',\n icon: HomeIcon,\n },\n});\n\nexport default [catalogNavItem];\n"],"names":[],"mappings":";;;;AAoBO,MAAM,cAAA,GAAiB,iBAAiB,IAAA,CAAK;AAAA,EAClD,MAAA,EAAQ;AAAA,IACN,QAAA,EAAU,YAAA;AAAA,IACV,KAAA,EAAO,SAAA;AAAA,IACP,IAAA,EAAM;AAAA;AAEV,CAAC;AAED,eAAe,CAAC,cAAc,CAAA;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx, Fragment } from 'react/jsx-runtime';
2
- import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
2
+ import { convertLegacyRouteRef } from '@backstage/core-compat-api';
3
3
  import { PageBlueprint, createExtensionInput, coreExtensionData } from '@backstage/frontend-plugin-api';
4
4
  import { entityRouteRef, AsyncEntityProvider } from '@backstage/plugin-catalog-react';
5
5
  import { EntityContextMenuItemBlueprint, EntityHeaderBlueprint, defaultEntityContentGroups, EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
@@ -26,20 +26,18 @@ const catalogPage = PageBlueprint.makeWithOverrides({
26
26
  factory(originalFactory, { inputs, config }) {
27
27
  return originalFactory({
28
28
  path: "/catalog",
29
- routeRef: convertLegacyRouteRef(rootRouteRef),
29
+ routeRef: rootRouteRef,
30
30
  loader: async () => {
31
31
  const { BaseCatalogPage } = await import('../components/CatalogPage/index.esm.js');
32
32
  const filters = inputs.filters.map(
33
33
  (filter) => filter.get(coreExtensionData.reactElement)
34
34
  );
35
- return compatWrapper(
36
- /* @__PURE__ */ jsx(
37
- BaseCatalogPage,
38
- {
39
- filters: /* @__PURE__ */ jsx(Fragment, { children: filters }),
40
- pagination: config.pagination
41
- }
42
- )
35
+ return /* @__PURE__ */ jsx(
36
+ BaseCatalogPage,
37
+ {
38
+ filters: /* @__PURE__ */ jsx(Fragment, { children: filters }),
39
+ pagination: config.pagination
40
+ }
43
41
  );
44
42
  }
45
43
  });
@@ -161,7 +159,7 @@ const catalogEntityPage = PageBlueprint.makeWithOverrides({
161
159
  }
162
160
  ) });
163
161
  };
164
- return compatWrapper(/* @__PURE__ */ jsx(Component, {}));
162
+ return /* @__PURE__ */ jsx(Component, {});
165
163
  }
166
164
  });
167
165
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pages.esm.js","sources":["../../src/alpha/pages.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport {\n coreExtensionData,\n createExtensionInput,\n PageBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n AsyncEntityProvider,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n EntityHeaderBlueprint,\n EntityContentBlueprint,\n defaultEntityContentGroups,\n EntityContextMenuItemBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { rootRouteRef } from '../routes';\nimport { useEntityFromUrl } from '../components/CatalogEntityPage/useEntityFromUrl';\nimport { buildFilterFn } from './filter/FilterWrapper';\n\nexport const catalogPage = PageBlueprint.makeWithOverrides({\n inputs: {\n filters: createExtensionInput([coreExtensionData.reactElement]),\n },\n config: {\n schema: {\n pagination: z =>\n z\n .union([\n z.boolean(),\n z.object({\n mode: z.enum(['cursor', 'offset']),\n limit: z.number().optional(),\n offset: z.number().optional(),\n }),\n ])\n .default(true),\n },\n },\n factory(originalFactory, { inputs, config }) {\n return originalFactory({\n path: '/catalog',\n routeRef: convertLegacyRouteRef(rootRouteRef),\n loader: async () => {\n const { BaseCatalogPage } = await import('../components/CatalogPage');\n const filters = inputs.filters.map(filter =>\n filter.get(coreExtensionData.reactElement),\n );\n return compatWrapper(\n <BaseCatalogPage\n filters={<>{filters}</>}\n pagination={config.pagination}\n />,\n );\n },\n });\n },\n});\n\nexport const catalogEntityPage = PageBlueprint.makeWithOverrides({\n name: 'entity',\n inputs: {\n headers: createExtensionInput([\n EntityHeaderBlueprint.dataRefs.element.optional(),\n EntityHeaderBlueprint.dataRefs.filterFunction.optional(),\n ]),\n contents: createExtensionInput([\n coreExtensionData.reactElement,\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n EntityContentBlueprint.dataRefs.title,\n EntityContentBlueprint.dataRefs.filterFunction.optional(),\n EntityContentBlueprint.dataRefs.filterExpression.optional(),\n EntityContentBlueprint.dataRefs.group.optional(),\n ]),\n contextMenuItems: createExtensionInput([\n coreExtensionData.reactElement,\n EntityContextMenuItemBlueprint.dataRefs.filterFunction.optional(),\n ]),\n },\n config: {\n schema: {\n groups: z =>\n z\n .array(z.record(z.string(), z.object({ title: z.string() })))\n .optional(),\n },\n },\n factory(originalFactory, { config, inputs }) {\n return originalFactory({\n path: '/catalog/:namespace/:kind/:name',\n // NOTE: The `convertLegacyRouteRef` call here ensures that this route ref\n // is mutated to support the new frontend system. Removing this conversion\n // is a potentially breaking change since this is a singleton and the\n // route refs from `core-plugin-api` used to not support the new format.\n // This shouldn't be removed until we completely deprecate the\n // `core-compat-api` package.\n routeRef: convertLegacyRouteRef(entityRouteRef), // READ THE ABOVE\n loader: async () => {\n const { EntityLayout } = await import('./components/EntityLayout');\n\n const menuItems = inputs.contextMenuItems.map(item => ({\n element: item.get(coreExtensionData.reactElement),\n filter:\n item.get(EntityContextMenuItemBlueprint.dataRefs.filterFunction) ??\n (() => true),\n }));\n\n type Groups = Record<\n string,\n { title: string; items: Array<(typeof inputs.contents)[0]> }\n >;\n\n // Get available headers, sorted by if they have a filter function or not.\n // TODO(blam): we should really have priority or some specificity here which can be used to sort the headers.\n // That can be done with embedding the priority in the dataRef alongside the filter function.\n const headers = inputs.headers\n .map(header => ({\n element: header.get(EntityHeaderBlueprint.dataRefs.element),\n filter: header.get(EntityHeaderBlueprint.dataRefs.filterFunction),\n }))\n .sort((a, b) => {\n if (a.filter && !b.filter) return -1;\n if (!a.filter && b.filter) return 1;\n return 0;\n });\n\n let groups = Object.entries(defaultEntityContentGroups).reduce<Groups>(\n (rest, group) => {\n const [groupId, groupValue] = group;\n return {\n ...rest,\n [groupId]: { title: groupValue, items: [] },\n };\n },\n {},\n );\n\n // config groups override default groups\n if (config.groups) {\n groups = config.groups.reduce<Groups>((rest, group) => {\n const [groupId, groupValue] = Object.entries(group)[0];\n return {\n ...rest,\n [groupId]: { title: groupValue.title, items: [] },\n };\n }, {});\n }\n\n for (const output of inputs.contents) {\n const itemId = output.node.spec.id;\n const itemTitle = output.get(EntityContentBlueprint.dataRefs.title);\n const itemGroup = output.get(EntityContentBlueprint.dataRefs.group);\n const group = itemGroup && groups[itemGroup];\n if (!group) {\n groups[itemId] = { title: itemTitle, items: [output] };\n continue;\n }\n group.items.push(output);\n }\n\n const Component = () => {\n const entityFromUrl = useEntityFromUrl();\n const { entity } = entityFromUrl;\n const filteredMenuItems = entity\n ? menuItems.filter(i => i.filter(entity)).map(i => i.element)\n : [];\n\n const header = headers.find(\n h => !h.filter || h.filter(entity!),\n )?.element;\n\n return (\n <AsyncEntityProvider {...entityFromUrl}>\n <EntityLayout\n header={header}\n contextMenuItems={filteredMenuItems}\n >\n {Object.values(groups).flatMap(({ title, items }) =>\n items.map(output => (\n <EntityLayout.Route\n group={title}\n key={output.get(coreExtensionData.routePath)}\n path={output.get(coreExtensionData.routePath)}\n title={output.get(EntityContentBlueprint.dataRefs.title)}\n if={buildFilterFn(\n output.get(\n EntityContentBlueprint.dataRefs.filterFunction,\n ),\n output.get(\n EntityContentBlueprint.dataRefs.filterExpression,\n ),\n )}\n >\n {output.get(coreExtensionData.reactElement)}\n </EntityLayout.Route>\n )),\n )}\n </EntityLayout>\n </AsyncEntityProvider>\n );\n };\n\n return compatWrapper(<Component />);\n },\n });\n },\n});\n\nexport default [catalogPage, catalogEntityPage];\n"],"names":[],"mappings":";;;;;;;;;AAuCO,MAAM,WAAA,GAAc,cAAc,iBAAA,CAAkB;AAAA,EACzD,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAC;AAAA,GAChE;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,UAAA,EAAY,CAAA,CAAA,KACV,CAAA,CACG,KAAA,CAAM;AAAA,QACL,EAAE,OAAA,EAAQ;AAAA,QACV,EAAE,MAAA,CAAO;AAAA,UACP,MAAM,CAAA,CAAE,IAAA,CAAK,CAAC,QAAA,EAAU,QAAQ,CAAC,CAAA;AAAA,UACjC,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,UAC3B,MAAA,EAAQ,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,SAC7B;AAAA,OACF,CAAA,CACA,OAAA,CAAQ,IAAI;AAAA;AACnB,GACF;AAAA,EACA,OAAA,CAAQ,eAAA,EAAiB,EAAE,MAAA,EAAQ,QAAO,EAAG;AAC3C,IAAA,OAAO,eAAA,CAAgB;AAAA,MACrB,IAAA,EAAM,UAAA;AAAA,MACN,QAAA,EAAU,sBAAsB,YAAY,CAAA;AAAA,MAC5C,QAAQ,YAAY;AAClB,QAAA,MAAM,EAAE,eAAA,EAAgB,GAAI,MAAM,OAAO,wCAA2B,CAAA;AACpE,QAAA,MAAM,OAAA,GAAU,OAAO,OAAA,CAAQ,GAAA;AAAA,UAAI,CAAA,MAAA,KACjC,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,YAAY;AAAA,SAC3C;AACA,QAAA,OAAO,aAAA;AAAA,0BACL,GAAA;AAAA,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C,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,SAAS;AAAA,iBAc9C;AAAA;AACH;AAAA,WACF,EACF,CAAA;AAAA,QAEJ,CAAA;AAEA,QAAA,OAAO,aAAA,iBAAc,GAAA,CAAC,SAAA,EAAA,EAAU,CAAE,CAAA;AAAA,MACpC;AAAA,KACD,CAAA;AAAA,EACH;AACF,CAAC;AAED,YAAe,CAAC,aAAa,iBAAiB,CAAA;;;;"}
1
+ {"version":3,"file":"pages.esm.js","sources":["../../src/alpha/pages.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 { convertLegacyRouteRef } from '@backstage/core-compat-api';\nimport {\n coreExtensionData,\n createExtensionInput,\n PageBlueprint,\n} from '@backstage/frontend-plugin-api';\nimport {\n AsyncEntityProvider,\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n EntityHeaderBlueprint,\n EntityContentBlueprint,\n defaultEntityContentGroups,\n EntityContextMenuItemBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { rootRouteRef } from '../routes';\nimport { useEntityFromUrl } from '../components/CatalogEntityPage/useEntityFromUrl';\nimport { buildFilterFn } from './filter/FilterWrapper';\n\nexport const catalogPage = PageBlueprint.makeWithOverrides({\n inputs: {\n filters: createExtensionInput([coreExtensionData.reactElement]),\n },\n config: {\n schema: {\n pagination: z =>\n z\n .union([\n z.boolean(),\n z.object({\n mode: z.enum(['cursor', 'offset']),\n limit: z.number().optional(),\n offset: z.number().optional(),\n }),\n ])\n .default(true),\n },\n },\n factory(originalFactory, { inputs, config }) {\n return originalFactory({\n path: '/catalog',\n routeRef: rootRouteRef,\n loader: async () => {\n const { BaseCatalogPage } = await import('../components/CatalogPage');\n const filters = inputs.filters.map(filter =>\n filter.get(coreExtensionData.reactElement),\n );\n return (\n <BaseCatalogPage\n filters={<>{filters}</>}\n pagination={config.pagination}\n />\n );\n },\n });\n },\n});\n\nexport const catalogEntityPage = PageBlueprint.makeWithOverrides({\n name: 'entity',\n inputs: {\n headers: createExtensionInput([\n EntityHeaderBlueprint.dataRefs.element.optional(),\n EntityHeaderBlueprint.dataRefs.filterFunction.optional(),\n ]),\n contents: createExtensionInput([\n coreExtensionData.reactElement,\n coreExtensionData.routePath,\n coreExtensionData.routeRef.optional(),\n EntityContentBlueprint.dataRefs.title,\n EntityContentBlueprint.dataRefs.filterFunction.optional(),\n EntityContentBlueprint.dataRefs.filterExpression.optional(),\n EntityContentBlueprint.dataRefs.group.optional(),\n ]),\n contextMenuItems: createExtensionInput([\n coreExtensionData.reactElement,\n EntityContextMenuItemBlueprint.dataRefs.filterFunction.optional(),\n ]),\n },\n config: {\n schema: {\n groups: z =>\n z\n .array(z.record(z.string(), z.object({ title: z.string() })))\n .optional(),\n },\n },\n factory(originalFactory, { config, inputs }) {\n return originalFactory({\n path: '/catalog/:namespace/:kind/:name',\n // NOTE: The `convertLegacyRouteRef` call here ensures that this route ref\n // is mutated to support the new frontend system. Removing this conversion\n // is a potentially breaking change since this is a singleton and the\n // route refs from `core-plugin-api` used to not support the new format.\n // This shouldn't be removed until we completely deprecate the\n // `core-compat-api` package.\n routeRef: convertLegacyRouteRef(entityRouteRef), // READ THE ABOVE\n loader: async () => {\n const { EntityLayout } = await import('./components/EntityLayout');\n\n const menuItems = inputs.contextMenuItems.map(item => ({\n element: item.get(coreExtensionData.reactElement),\n filter:\n item.get(EntityContextMenuItemBlueprint.dataRefs.filterFunction) ??\n (() => true),\n }));\n\n type Groups = Record<\n string,\n { title: string; items: Array<(typeof inputs.contents)[0]> }\n >;\n\n // Get available headers, sorted by if they have a filter function or not.\n // TODO(blam): we should really have priority or some specificity here which can be used to sort the headers.\n // That can be done with embedding the priority in the dataRef alongside the filter function.\n const headers = inputs.headers\n .map(header => ({\n element: header.get(EntityHeaderBlueprint.dataRefs.element),\n filter: header.get(EntityHeaderBlueprint.dataRefs.filterFunction),\n }))\n .sort((a, b) => {\n if (a.filter && !b.filter) return -1;\n if (!a.filter && b.filter) return 1;\n return 0;\n });\n\n let groups = Object.entries(defaultEntityContentGroups).reduce<Groups>(\n (rest, group) => {\n const [groupId, groupValue] = group;\n return {\n ...rest,\n [groupId]: { title: groupValue, items: [] },\n };\n },\n {},\n );\n\n // config groups override default groups\n if (config.groups) {\n groups = config.groups.reduce<Groups>((rest, group) => {\n const [groupId, groupValue] = Object.entries(group)[0];\n return {\n ...rest,\n [groupId]: { title: groupValue.title, items: [] },\n };\n }, {});\n }\n\n for (const output of inputs.contents) {\n const itemId = output.node.spec.id;\n const itemTitle = output.get(EntityContentBlueprint.dataRefs.title);\n const itemGroup = output.get(EntityContentBlueprint.dataRefs.group);\n const group = itemGroup && groups[itemGroup];\n if (!group) {\n groups[itemId] = { title: itemTitle, items: [output] };\n continue;\n }\n group.items.push(output);\n }\n\n const Component = () => {\n const entityFromUrl = useEntityFromUrl();\n const { entity } = entityFromUrl;\n const filteredMenuItems = entity\n ? menuItems.filter(i => i.filter(entity)).map(i => i.element)\n : [];\n\n const header = headers.find(\n h => !h.filter || h.filter(entity!),\n )?.element;\n\n return (\n <AsyncEntityProvider {...entityFromUrl}>\n <EntityLayout\n header={header}\n contextMenuItems={filteredMenuItems}\n >\n {Object.values(groups).flatMap(({ title, items }) =>\n items.map(output => (\n <EntityLayout.Route\n group={title}\n key={output.get(coreExtensionData.routePath)}\n path={output.get(coreExtensionData.routePath)}\n title={output.get(EntityContentBlueprint.dataRefs.title)}\n if={buildFilterFn(\n output.get(\n EntityContentBlueprint.dataRefs.filterFunction,\n ),\n output.get(\n EntityContentBlueprint.dataRefs.filterExpression,\n ),\n )}\n >\n {output.get(coreExtensionData.reactElement)}\n </EntityLayout.Route>\n )),\n )}\n </EntityLayout>\n </AsyncEntityProvider>\n );\n };\n\n return <Component />;\n },\n });\n },\n});\n\nexport default [catalogPage, catalogEntityPage];\n"],"names":[],"mappings":";;;;;;;;;AAoCO,MAAM,WAAA,GAAc,cAAc,iBAAA,CAAkB;AAAA,EACzD,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,oBAAA,CAAqB,CAAC,iBAAA,CAAkB,YAAY,CAAC;AAAA,GAChE;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,UAAA,EAAY,CAAA,CAAA,KACV,CAAA,CACG,KAAA,CAAM;AAAA,QACL,EAAE,OAAA,EAAQ;AAAA,QACV,EAAE,MAAA,CAAO;AAAA,UACP,MAAM,CAAA,CAAE,IAAA,CAAK,CAAC,QAAA,EAAU,QAAQ,CAAC,CAAA;AAAA,UACjC,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,UAC3B,MAAA,EAAQ,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAAS,SAC7B;AAAA,OACF,CAAA,CACA,OAAA,CAAQ,IAAI;AAAA;AACnB,GACF;AAAA,EACA,OAAA,CAAQ,eAAA,EAAiB,EAAE,MAAA,EAAQ,QAAO,EAAG;AAC3C,IAAA,OAAO,eAAA,CAAgB;AAAA,MACrB,IAAA,EAAM,UAAA;AAAA,MACN,QAAA,EAAU,YAAA;AAAA,MACV,QAAQ,YAAY;AAClB,QAAA,MAAM,EAAE,eAAA,EAAgB,GAAI,MAAM,OAAO,wCAA2B,CAAA;AACpE,QAAA,MAAM,OAAA,GAAU,OAAO,OAAA,CAAQ,GAAA;AAAA,UAAI,CAAA,MAAA,KACjC,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,YAAY;AAAA,SAC3C;AACA,QAAA,uBACE,GAAA;AAAA,UAAC,eAAA;AAAA,UAAA;A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BAAA,CAAkB,SAAS;AAAA,iBAc9C;AAAA;AACH;AAAA,WACF,EACF,CAAA;AAAA,QAEJ,CAAA;AAEA,QAAA,2BAAQ,SAAA,EAAA,EAAU,CAAA;AAAA,MACpB;AAAA,KACD,CAAA;AAAA,EACH;AACF,CAAC;AAED,YAAe,CAAC,aAAa,iBAAiB,CAAA;;;;"}
@@ -1,4 +1,3 @@
1
- import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
2
1
  import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
2
  import { entityRouteRef } from '@backstage/plugin-catalog-react';
4
3
  import { unregisterRedirectRouteRef, createFromTemplateRouteRef, createComponentRouteRef, viewTechDocRouteRef, rootRouteRef } from '../routes.esm.js';
@@ -15,16 +14,16 @@ import contextMenuItems from './contextMenuItems.esm.js';
15
14
  var plugin = createFrontendPlugin({
16
15
  pluginId: "catalog",
17
16
  info: { packageJson: () => import('../package.json.esm.js') },
18
- routes: convertLegacyRouteRefs({
17
+ routes: {
19
18
  catalogIndex: rootRouteRef,
20
19
  catalogEntity: entityRouteRef
21
- }),
22
- externalRoutes: convertLegacyRouteRefs({
20
+ },
21
+ externalRoutes: {
23
22
  viewTechDoc: viewTechDocRouteRef,
24
23
  createComponent: createComponentRouteRef,
25
24
  createFromTemplate: createFromTemplateRouteRef,
26
25
  unregisterRedirect: unregisterRedirectRouteRef
27
- }),
26
+ },
28
27
  extensions: [
29
28
  ...apis,
30
29
  ...pages,
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\n\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\n\nimport {\n createComponentRouteRef,\n createFromTemplateRouteRef,\n rootRouteRef,\n unregisterRedirectRouteRef,\n viewTechDocRouteRef,\n} from '../routes';\n\nimport apis from './apis';\nimport pages from './pages';\nimport filters from './filters';\nimport navItems from './navItems';\nimport entityCards from './entityCards';\nimport entityContents from './entityContents';\nimport entityIconLinks from './entityIconLinks';\nimport searchResultItems from './searchResultItems';\nimport contextMenuItems from './contextMenuItems';\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'catalog',\n info: { packageJson: () => import('../../package.json') },\n routes: convertLegacyRouteRefs({\n catalogIndex: rootRouteRef,\n catalogEntity: entityRouteRef,\n }),\n externalRoutes: convertLegacyRouteRefs({\n viewTechDoc: viewTechDocRouteRef,\n createComponent: createComponentRouteRef,\n createFromTemplate: createFromTemplateRouteRef,\n unregisterRedirect: unregisterRedirectRouteRef,\n }),\n extensions: [\n ...apis,\n ...pages,\n ...filters,\n ...navItems,\n ...entityCards,\n ...entityContents,\n ...entityIconLinks,\n ...contextMenuItems,\n ...searchResultItems,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAwCA,aAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,SAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,wBAAoB,CAAA,EAAE;AAAA,EACxD,QAAQ,sBAAA,CAAuB;AAAA,IAC7B,YAAA,EAAc,YAAA;AAAA,IACd,aAAA,EAAe;AAAA,GAChB,CAAA;AAAA,EACD,gBAAgB,sBAAA,CAAuB;AAAA,IACrC,WAAA,EAAa,mBAAA;AAAA,IACb,eAAA,EAAiB,uBAAA;AAAA,IACjB,kBAAA,EAAoB,0BAAA;AAAA,IACpB,kBAAA,EAAoB;AAAA,GACrB,CAAA;AAAA,EACD,UAAA,EAAY;AAAA,IACV,GAAG,IAAA;AAAA,IACH,GAAG,KAAA;AAAA,IACH,GAAG,OAAA;AAAA,IACH,GAAG,QAAA;AAAA,IACH,GAAG,WAAA;AAAA,IACH,GAAG,cAAA;AAAA,IACH,GAAG,eAAA;AAAA,IACH,GAAG,gBAAA;AAAA,IACH,GAAG;AAAA;AAEP,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 { createFrontendPlugin } from '@backstage/frontend-plugin-api';\n\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\n\nimport {\n createComponentRouteRef,\n createFromTemplateRouteRef,\n rootRouteRef,\n unregisterRedirectRouteRef,\n viewTechDocRouteRef,\n} from '../routes';\n\nimport apis from './apis';\nimport pages from './pages';\nimport filters from './filters';\nimport navItems from './navItems';\nimport entityCards from './entityCards';\nimport entityContents from './entityContents';\nimport entityIconLinks from './entityIconLinks';\nimport searchResultItems from './searchResultItems';\nimport contextMenuItems from './contextMenuItems';\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'catalog',\n info: { packageJson: () => import('../../package.json') },\n routes: {\n catalogIndex: rootRouteRef,\n catalogEntity: entityRouteRef,\n },\n externalRoutes: {\n viewTechDoc: viewTechDocRouteRef,\n createComponent: createComponentRouteRef,\n createFromTemplate: createFromTemplateRouteRef,\n unregisterRedirect: unregisterRedirectRouteRef,\n },\n extensions: [\n ...apis,\n ...pages,\n ...filters,\n ...navItems,\n ...entityCards,\n ...entityContents,\n ...entityIconLinks,\n ...contextMenuItems,\n ...searchResultItems,\n ],\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuCA,aAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,SAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,wBAAoB,CAAA,EAAE;AAAA,EACxD,MAAA,EAAQ;AAAA,IACN,YAAA,EAAc,YAAA;AAAA,IACd,aAAA,EAAe;AAAA,GACjB;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,WAAA,EAAa,mBAAA;AAAA,IACb,eAAA,EAAiB,uBAAA;AAAA,IACjB,kBAAA,EAAoB,0BAAA;AAAA,IACpB,kBAAA,EAAoB;AAAA,GACtB;AAAA,EACA,UAAA,EAAY;AAAA,IACV,GAAG,IAAA;AAAA,IACH,GAAG,KAAA;AAAA,IACH,GAAG,OAAA;AAAA,IACH,GAAG,QAAA;AAAA,IACH,GAAG,WAAA;AAAA,IACH,GAAG,cAAA;AAAA,IACH,GAAG,eAAA;AAAA,IACH,GAAG,gBAAA;AAAA,IACH,GAAG;AAAA;AAEP,CAAC,CAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,32 +1,31 @@
1
1
  import * as _backstage_plugin_search_react_alpha from '@backstage/plugin-search-react/alpha';
2
- import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
2
  import * as _backstage_core_components from '@backstage/core-components';
4
3
  import * as _backstage_catalog_model from '@backstage/catalog-model';
5
4
  import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
6
5
  import * as react from 'react';
7
6
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
8
- import * as _backstage_core_plugin_api_alpha from '@backstage/core-plugin-api/alpha';
7
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
9
8
 
10
9
  /** @alpha */
11
10
  declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{
12
- catalogIndex: _backstage_frontend_plugin_api.RouteRef<undefined>;
13
- catalogEntity: _backstage_frontend_plugin_api.RouteRef<{
11
+ catalogIndex: _backstage_core_plugin_api.RouteRef<undefined>;
12
+ catalogEntity: _backstage_core_plugin_api.RouteRef<{
14
13
  name: string;
15
14
  kind: string;
16
15
  namespace: string;
17
16
  }>;
18
17
  }, {
19
- viewTechDoc: _backstage_frontend_plugin_api.ExternalRouteRef<{
18
+ viewTechDoc: _backstage_core_plugin_api.ExternalRouteRef<{
20
19
  name: string;
21
20
  kind: string;
22
21
  namespace: string;
23
- }>;
24
- createComponent: _backstage_frontend_plugin_api.ExternalRouteRef<undefined>;
25
- createFromTemplate: _backstage_frontend_plugin_api.ExternalRouteRef<{
22
+ }, true>;
23
+ createComponent: _backstage_core_plugin_api.ExternalRouteRef<undefined, true>;
24
+ createFromTemplate: _backstage_core_plugin_api.ExternalRouteRef<{
26
25
  namespace: string;
27
26
  templateName: string;
28
- }>;
29
- unregisterRedirect: _backstage_frontend_plugin_api.ExternalRouteRef<undefined>;
27
+ }, true>;
28
+ unregisterRedirect: _backstage_core_plugin_api.ExternalRouteRef<undefined, true>;
30
29
  }, {
31
30
  "api:catalog": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
32
31
  kind: "api";
@@ -63,12 +62,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
63
62
  initialFilter?: string | undefined;
64
63
  };
65
64
  output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}>;
66
- inputs: {
67
- [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ExtensionDataRef, {
68
- singleton: boolean;
69
- optional: boolean;
70
- }>;
71
- };
65
+ inputs: {};
72
66
  kind: "catalog-filter";
73
67
  name: "kind";
74
68
  params: {
@@ -94,12 +88,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
94
88
  initialFilter?: "all" | "owned" | "starred" | undefined;
95
89
  };
96
90
  output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}>;
97
- inputs: {
98
- [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ExtensionDataRef, {
99
- singleton: boolean;
100
- optional: boolean;
101
- }>;
102
- };
91
+ inputs: {};
103
92
  kind: "catalog-filter";
104
93
  name: "list";
105
94
  params: {
@@ -114,12 +103,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
114
103
  mode?: "all" | "owners-only" | undefined;
115
104
  };
116
105
  output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}>;
117
- inputs: {
118
- [x: string]: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ExtensionDataRef, {
119
- singleton: boolean;
120
- optional: boolean;
121
- }>;
122
- };
106
+ inputs: {};
123
107
  kind: "catalog-filter";
124
108
  name: "mode";
125
109
  params: {
@@ -561,13 +545,13 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
561
545
  configInput: {};
562
546
  output: _backstage_frontend_plugin_api.ExtensionDataRef<{
563
547
  title: string;
564
- icon: _backstage_core_plugin_api.IconComponent;
548
+ icon: _backstage_frontend_plugin_api.IconComponent;
565
549
  routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
566
550
  }, "core.nav-item.target", {}>;
567
551
  inputs: {};
568
552
  params: {
569
553
  title: string;
570
- icon: _backstage_core_plugin_api.IconComponent;
554
+ icon: _backstage_frontend_plugin_api.IconComponent;
571
555
  routeRef: _backstage_frontend_plugin_api.RouteRef<undefined>;
572
556
  };
573
557
  }>;
@@ -578,7 +562,6 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
578
562
  offset?: number | undefined;
579
563
  limit?: number | undefined;
580
564
  };
581
- } & {
582
565
  path: string | undefined;
583
566
  };
584
567
  configInput: {
@@ -587,7 +570,6 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
587
570
  offset?: number | undefined;
588
571
  limit?: number | undefined;
589
572
  } | undefined;
590
- } & {
591
573
  path?: string | undefined;
592
574
  };
593
575
  output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
@@ -613,14 +595,12 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
613
595
  groups: Record<string, {
614
596
  title: string;
615
597
  }>[] | undefined;
616
- } & {
617
598
  path: string | undefined;
618
599
  };
619
600
  configInput: {
620
601
  groups?: Record<string, {
621
602
  title: string;
622
603
  }>[] | undefined;
623
- } & {
624
604
  path?: string | undefined;
625
605
  };
626
606
  output: _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
@@ -683,7 +663,7 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
683
663
  }>;
684
664
 
685
665
  /** @alpha */
686
- declare const catalogTranslationRef: _backstage_core_plugin_api_alpha.TranslationRef<"catalog", {
666
+ declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"catalog", {
687
667
  readonly "deleteEntity.description": "This entity is not referenced by any location and is therefore not receiving updates. Click here to delete.";
688
668
  readonly "deleteEntity.cancelButtonTitle": "Cancel";
689
669
  readonly "deleteEntity.deleteButtonTitle": "Delete";
package/dist/index.d.ts CHANGED
@@ -707,4 +707,5 @@ declare const RelatedEntitiesCard: <T extends Entity>(props: RelatedEntitiesCard
707
707
  /** @public */
708
708
  declare const CatalogSearchResultListItem: (props: SearchResultListItemExtensionProps<CatalogSearchResultListItemProps>) => JSX.Element | null;
709
709
 
710
- export { type AboutCardProps, AboutContent, type AboutContentProps, AboutField, type AboutFieldProps, type BackstageOverrides, type Breakpoint, CatalogEntityPage, CatalogIndexPage, CatalogKindHeader, type CatalogKindHeaderProps, CatalogSearchResultListItem, type CatalogSearchResultListItemClassKey, type CatalogSearchResultListItemProps, CatalogTable, type CatalogTableColumnsFunc, type CatalogTableProps, type CatalogTableRow, type CatalogTableToolbarClassKey, type ColumnBreakpoints, type DefaultCatalogPageProps, DefaultEntityPresentationApi, type DefaultEntityPresentationApiOptions, type DefaultEntityPresentationApiRenderer, DefaultStarredEntitiesApi, type DependencyOfComponentsCardProps, type DependsOnComponentsCardProps, type DependsOnResourcesCardProps, EntityAboutCard, type EntityContextMenuClassKey, EntityDependencyOfComponentsCard, EntityDependsOnComponentsCard, EntityDependsOnResourcesCard, EntityHasComponentsCard, EntityHasResourcesCard, EntityHasSubcomponentsCard, EntityHasSubdomainsCard, EntityHasSystemsCard, EntityLabelsCard, type EntityLabelsCardProps, type EntityLabelsEmptyStateClassKey, EntityLayout, type EntityLayoutProps, type EntityLayoutRouteProps, EntityLinksCard, type EntityLinksCardProps, type EntityLinksEmptyStateClassKey, EntityListContainer, EntityOrphanWarning, type EntityPredicates, EntityProcessingErrorsPanel, EntityRelationWarning, EntitySwitch, type EntitySwitchCaseProps, type EntitySwitchProps, FilterContainer, FilteredEntityLayout, type HasComponentsCardProps, type HasResourcesCardProps, type HasSubcomponentsCardProps, type HasSubdomainsCardProps, type HasSystemsCardProps, type PluginCatalogComponentsNameToClassKey, RelatedEntitiesCard, type RelatedEntitiesCardProps, type SystemDiagramCardClassKey, catalogPlugin, hasCatalogProcessingErrors, hasLabels, hasRelationWarnings, isApiType, isComponentType, isEntityWith, isKind, isNamespace, isOrphan, isResourceType };
710
+ export { AboutContent, AboutField, CatalogEntityPage, CatalogIndexPage, CatalogKindHeader, CatalogSearchResultListItem, CatalogTable, DefaultEntityPresentationApi, DefaultStarredEntitiesApi, EntityAboutCard, EntityDependencyOfComponentsCard, EntityDependsOnComponentsCard, EntityDependsOnResourcesCard, EntityHasComponentsCard, EntityHasResourcesCard, EntityHasSubcomponentsCard, EntityHasSubdomainsCard, EntityHasSystemsCard, EntityLabelsCard, EntityLayout, EntityLinksCard, EntityListContainer, EntityOrphanWarning, EntityProcessingErrorsPanel, EntityRelationWarning, EntitySwitch, FilterContainer, FilteredEntityLayout, RelatedEntitiesCard, catalogPlugin, hasCatalogProcessingErrors, hasLabels, hasRelationWarnings, isApiType, isComponentType, isEntityWith, isKind, isNamespace, isOrphan, isResourceType };
711
+ export type { AboutCardProps, AboutContentProps, AboutFieldProps, BackstageOverrides, Breakpoint, CatalogKindHeaderProps, CatalogSearchResultListItemClassKey, CatalogSearchResultListItemProps, CatalogTableColumnsFunc, CatalogTableProps, CatalogTableRow, CatalogTableToolbarClassKey, ColumnBreakpoints, DefaultCatalogPageProps, DefaultEntityPresentationApiOptions, DefaultEntityPresentationApiRenderer, DependencyOfComponentsCardProps, DependsOnComponentsCardProps, DependsOnResourcesCardProps, EntityContextMenuClassKey, EntityLabelsCardProps, EntityLabelsEmptyStateClassKey, EntityLayoutProps, EntityLayoutRouteProps, EntityLinksCardProps, EntityLinksEmptyStateClassKey, EntityPredicates, EntitySwitchCaseProps, EntitySwitchProps, HasComponentsCardProps, HasResourcesCardProps, HasSubcomponentsCardProps, HasSubdomainsCardProps, HasSystemsCardProps, PluginCatalogComponentsNameToClassKey, RelatedEntitiesCardProps, SystemDiagramCardClassKey };
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-catalog";
2
- var version = "1.32.0";
2
+ var version = "1.32.1-next.1";
3
3
  var description = "The Backstage plugin for browsing the Backstage catalog";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
@@ -26,7 +26,7 @@ var repository = {
26
26
  };
27
27
  var license = "Apache-2.0";
28
28
  var sideEffects = false;
29
- var exports = {
29
+ var exports$1 = {
30
30
  ".": "./src/index.ts",
31
31
  "./alpha": "./src/alpha/index.ts",
32
32
  "./package.json": "./package.json"
@@ -129,7 +129,7 @@ var _package = {
129
129
  repository: repository,
130
130
  license: license,
131
131
  sideEffects: sideEffects,
132
- exports: exports,
132
+ exports: exports$1,
133
133
  main: main,
134
134
  types: types,
135
135
  typesVersions: typesVersions,
@@ -142,5 +142,5 @@ var _package = {
142
142
  configSchema: configSchema
143
143
  };
144
144
 
145
- export { backstage, configSchema, _package as default, dependencies, description, devDependencies, exports, files, homepage, keywords, license, main, name, peerDependencies, peerDependenciesMeta, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
145
+ export { backstage, configSchema, _package as default, dependencies, description, devDependencies, exports$1 as exports, files, homepage, keywords, license, main, name, peerDependencies, peerDependenciesMeta, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
146
146
  //# sourceMappingURL=package.json.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog",
3
- "version": "1.32.0",
3
+ "version": "1.32.1-next.1",
4
4
  "description": "The Backstage plugin for browsing the Backstage catalog",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -70,24 +70,24 @@
70
70
  "test": "backstage-cli package test"
71
71
  },
72
72
  "dependencies": {
73
- "@backstage/catalog-client": "^1.12.1",
74
- "@backstage/catalog-model": "^1.7.6",
75
- "@backstage/core-compat-api": "^0.5.4",
76
- "@backstage/core-components": "^0.18.3",
77
- "@backstage/core-plugin-api": "^1.12.0",
78
- "@backstage/errors": "^1.2.7",
79
- "@backstage/frontend-plugin-api": "^0.13.0",
80
- "@backstage/integration-react": "^1.2.12",
81
- "@backstage/plugin-catalog-common": "^1.1.7",
82
- "@backstage/plugin-catalog-react": "^1.21.3",
83
- "@backstage/plugin-permission-react": "^0.4.38",
84
- "@backstage/plugin-scaffolder-common": "^1.7.3",
85
- "@backstage/plugin-search-common": "^1.2.21",
86
- "@backstage/plugin-search-react": "^1.10.0",
87
- "@backstage/plugin-techdocs-common": "^0.1.1",
88
- "@backstage/plugin-techdocs-react": "^1.3.5",
89
- "@backstage/types": "^1.2.2",
90
- "@backstage/version-bridge": "^1.0.11",
73
+ "@backstage/catalog-client": "1.12.1",
74
+ "@backstage/catalog-model": "1.7.6",
75
+ "@backstage/core-compat-api": "0.5.5-next.0",
76
+ "@backstage/core-components": "0.18.4-next.2",
77
+ "@backstage/core-plugin-api": "1.12.1-next.0",
78
+ "@backstage/errors": "1.2.7",
79
+ "@backstage/frontend-plugin-api": "0.13.2-next.1",
80
+ "@backstage/integration-react": "1.2.13-next.0",
81
+ "@backstage/plugin-catalog-common": "1.1.7",
82
+ "@backstage/plugin-catalog-react": "1.21.4-next.2",
83
+ "@backstage/plugin-permission-react": "0.4.39-next.0",
84
+ "@backstage/plugin-scaffolder-common": "1.7.4-next.0",
85
+ "@backstage/plugin-search-common": "1.2.21",
86
+ "@backstage/plugin-search-react": "1.10.1-next.0",
87
+ "@backstage/plugin-techdocs-common": "0.1.1",
88
+ "@backstage/plugin-techdocs-react": "1.3.6-next.0",
89
+ "@backstage/types": "1.2.2",
90
+ "@backstage/version-bridge": "1.0.11",
91
91
  "@material-ui/core": "^4.12.2",
92
92
  "@material-ui/icons": "^4.9.1",
93
93
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -102,12 +102,12 @@
102
102
  "zen-observable": "^0.10.0"
103
103
  },
104
104
  "devDependencies": {
105
- "@backstage/cli": "^0.34.5",
106
- "@backstage/core-app-api": "^1.19.2",
107
- "@backstage/dev-utils": "^1.1.17",
108
- "@backstage/frontend-test-utils": "^0.4.1",
109
- "@backstage/plugin-permission-common": "^0.9.3",
110
- "@backstage/test-utils": "^1.7.13",
105
+ "@backstage/cli": "0.35.0-next.2",
106
+ "@backstage/core-app-api": "1.19.3-next.1",
107
+ "@backstage/dev-utils": "1.1.18-next.1",
108
+ "@backstage/frontend-test-utils": "0.4.2-next.0",
109
+ "@backstage/plugin-permission-common": "0.9.3",
110
+ "@backstage/test-utils": "1.7.14-next.0",
111
111
  "@testing-library/dom": "^10.0.0",
112
112
  "@testing-library/jest-dom": "^6.0.0",
113
113
  "@testing-library/react": "^16.0.0",