@backstage/plugin-catalog 2.0.2-next.2 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e4804ab: Migrated the unregister entity context menu item from the deprecated `DialogApi.showModal` to the new `DialogApi.open` method.
|
|
8
|
+
- d7b6077: Disabled the default page layout header for the catalog entity page in the new frontend system. The entity page already renders its own header through the `EntityHeader` extension, so the page layout header was redundant.
|
|
9
|
+
- ee1531d: Exported the NFS variant of the catalog index page as `CatalogIndexPage` from the `./alpha` entry point, along with supporting types `CatalogIndexPageProps`, `CatalogTableRow`, and `CatalogTableColumnsFunc`. This allows adopters to use and customize the catalog index page within a `PageBlueprint` in the new frontend system.
|
|
10
|
+
- 482ceed: Migrated from `assertError` to `toError` for error handling.
|
|
11
|
+
- 744f904: Fixed the catalog table briefly showing an empty loading state when changing filters. The table now keeps displaying stale results until new data arrives.
|
|
12
|
+
- c193ef1: Added Kind field to the About Card. Tags moved before Type and Lifecycle, Kind placed after them. A new `aboutCard.kindField.label` translation key was added.
|
|
13
|
+
- e5af44c: Replaced deprecated `humanizeEntityRef` usage with the Catalog Presentation API.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @backstage/ui@0.14.0
|
|
16
|
+
- @backstage/errors@1.3.0
|
|
17
|
+
- @backstage/catalog-model@1.8.0
|
|
18
|
+
- @backstage/plugin-catalog-react@2.1.2
|
|
19
|
+
- @backstage/frontend-plugin-api@0.16.0
|
|
20
|
+
- @backstage/core-components@0.18.9
|
|
21
|
+
- @backstage/core-compat-api@0.5.10
|
|
22
|
+
- @backstage/catalog-client@1.15.0
|
|
23
|
+
- @backstage/plugin-scaffolder-common@2.1.0
|
|
24
|
+
- @backstage/plugin-permission-react@0.5.0
|
|
25
|
+
- @backstage/core-plugin-api@1.12.5
|
|
26
|
+
- @backstage/integration-react@1.2.17
|
|
27
|
+
- @backstage/plugin-catalog-common@1.1.9
|
|
28
|
+
- @backstage/plugin-search-common@1.2.23
|
|
29
|
+
- @backstage/plugin-search-react@1.11.1
|
|
30
|
+
- @backstage/plugin-techdocs-react@1.3.10
|
|
31
|
+
|
|
3
32
|
## 2.0.2-next.2
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -77,7 +77,7 @@ const unregisterEntityContextMenuItem = EntityContextMenuItemBlueprint.make({
|
|
|
77
77
|
title: t("entityContextMenu.unregisterMenuTitle"),
|
|
78
78
|
disabled: !unregisterPermission.allowed,
|
|
79
79
|
onClick: async () => {
|
|
80
|
-
dialogApi.
|
|
80
|
+
dialogApi.open(({ dialog }) => /* @__PURE__ */ jsx(
|
|
81
81
|
UnregisterEntityDialog,
|
|
82
82
|
{
|
|
83
83
|
open: true,
|
|
@@ -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
|
|
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} 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.open(({ dialog }) => (\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":";;;;;;;;;;;;;;;AAuCO,MAAM,+BAA+B,8BAAA,CAA+B,IAAA;AAAA,EACzE;AAAA,IACE,IAAA,EAAM,iBAAA;AAAA,IACN,MAAA,EAAQ;AAAA,MACN,IAAA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AAA,QACH;AAAA,OACF;AAAA,IACF;AAAA;AAEJ,CAAC;AAEH,uBAAe;AAAA,EACb,+BAAA;AAAA,EACA,4BAAA;AAAA,EACA;AACF,CAAA;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -427,9 +427,9 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
427
427
|
icon: string | undefined;
|
|
428
428
|
};
|
|
429
429
|
configInput: {
|
|
430
|
-
filter?: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
431
|
-
title?: string | undefined;
|
|
432
430
|
path?: string | undefined;
|
|
431
|
+
title?: string | undefined;
|
|
432
|
+
filter?: _backstage_filter_predicates.FilterPredicate | undefined;
|
|
433
433
|
group?: string | false | undefined;
|
|
434
434
|
icon?: string | undefined;
|
|
435
435
|
};
|
|
@@ -822,8 +822,8 @@ declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationR
|
|
|
822
822
|
readonly "relatedEntitiesCard.emptyHelpLinkTitle": "Learn how to change this.";
|
|
823
823
|
readonly "systemDiagramCard.title": "System Diagram";
|
|
824
824
|
readonly "systemDiagramCard.description": "Use pinch & zoom to move around the diagram.";
|
|
825
|
-
readonly "systemDiagramCard.edgeLabels.dependsOn": "depends on";
|
|
826
825
|
readonly "systemDiagramCard.edgeLabels.partOf": "part of";
|
|
826
|
+
readonly "systemDiagramCard.edgeLabels.dependsOn": "depends on";
|
|
827
827
|
readonly "systemDiagramCard.edgeLabels.provides": "provides";
|
|
828
828
|
}>;
|
|
829
829
|
|
package/dist/index.d.ts
CHANGED
|
@@ -850,8 +850,8 @@ declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationR
|
|
|
850
850
|
readonly "relatedEntitiesCard.emptyHelpLinkTitle": "Learn how to change this.";
|
|
851
851
|
readonly "systemDiagramCard.title": "System Diagram";
|
|
852
852
|
readonly "systemDiagramCard.description": "Use pinch & zoom to move around the diagram.";
|
|
853
|
-
readonly "systemDiagramCard.edgeLabels.dependsOn": "depends on";
|
|
854
853
|
readonly "systemDiagramCard.edgeLabels.partOf": "part of";
|
|
854
|
+
readonly "systemDiagramCard.edgeLabels.dependsOn": "depends on";
|
|
855
855
|
readonly "systemDiagramCard.edgeLabels.provides": "provides";
|
|
856
856
|
}>;
|
|
857
857
|
|
package/dist/package.json.esm.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog",
|
|
3
|
-
"version": "2.0.2
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "The Backstage plugin for browsing the Backstage catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -70,25 +70,25 @@
|
|
|
70
70
|
"test": "backstage-cli package test"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@backstage/catalog-client": "1.
|
|
74
|
-
"@backstage/catalog-model": "1.
|
|
75
|
-
"@backstage/core-compat-api": "0.5.10
|
|
76
|
-
"@backstage/core-components": "0.18.9
|
|
77
|
-
"@backstage/core-plugin-api": "1.12.5
|
|
78
|
-
"@backstage/errors": "1.3.0
|
|
79
|
-
"@backstage/frontend-plugin-api": "0.16.0
|
|
80
|
-
"@backstage/integration-react": "1.2.17
|
|
81
|
-
"@backstage/plugin-catalog-common": "1.1.9
|
|
82
|
-
"@backstage/plugin-catalog-react": "2.1.2
|
|
83
|
-
"@backstage/plugin-permission-react": "0.
|
|
84
|
-
"@backstage/plugin-scaffolder-common": "2.
|
|
85
|
-
"@backstage/plugin-search-common": "1.2.23
|
|
86
|
-
"@backstage/plugin-search-react": "1.11.1
|
|
87
|
-
"@backstage/plugin-techdocs-common": "0.1.1",
|
|
88
|
-
"@backstage/plugin-techdocs-react": "1.3.10
|
|
89
|
-
"@backstage/types": "1.2.2",
|
|
90
|
-
"@backstage/ui": "0.14.0
|
|
91
|
-
"@backstage/version-bridge": "1.0.12",
|
|
73
|
+
"@backstage/catalog-client": "^1.15.0",
|
|
74
|
+
"@backstage/catalog-model": "^1.8.0",
|
|
75
|
+
"@backstage/core-compat-api": "^0.5.10",
|
|
76
|
+
"@backstage/core-components": "^0.18.9",
|
|
77
|
+
"@backstage/core-plugin-api": "^1.12.5",
|
|
78
|
+
"@backstage/errors": "^1.3.0",
|
|
79
|
+
"@backstage/frontend-plugin-api": "^0.16.0",
|
|
80
|
+
"@backstage/integration-react": "^1.2.17",
|
|
81
|
+
"@backstage/plugin-catalog-common": "^1.1.9",
|
|
82
|
+
"@backstage/plugin-catalog-react": "^2.1.2",
|
|
83
|
+
"@backstage/plugin-permission-react": "^0.5.0",
|
|
84
|
+
"@backstage/plugin-scaffolder-common": "^2.1.0",
|
|
85
|
+
"@backstage/plugin-search-common": "^1.2.23",
|
|
86
|
+
"@backstage/plugin-search-react": "^1.11.1",
|
|
87
|
+
"@backstage/plugin-techdocs-common": "^0.1.1",
|
|
88
|
+
"@backstage/plugin-techdocs-react": "^1.3.10",
|
|
89
|
+
"@backstage/types": "^1.2.2",
|
|
90
|
+
"@backstage/ui": "^0.14.0",
|
|
91
|
+
"@backstage/version-bridge": "^1.0.12",
|
|
92
92
|
"@material-ui/core": "^4.12.2",
|
|
93
93
|
"@material-ui/icons": "^4.9.1",
|
|
94
94
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -103,12 +103,12 @@
|
|
|
103
103
|
"zen-observable": "^0.10.0"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@backstage/cli": "0.36.1
|
|
107
|
-
"@backstage/core-app-api": "1.20.0
|
|
108
|
-
"@backstage/dev-utils": "1.1.22
|
|
109
|
-
"@backstage/frontend-test-utils": "0.5.2
|
|
110
|
-
"@backstage/plugin-permission-common": "0.9.8
|
|
111
|
-
"@backstage/test-utils": "1.7.17
|
|
106
|
+
"@backstage/cli": "^0.36.1",
|
|
107
|
+
"@backstage/core-app-api": "^1.20.0",
|
|
108
|
+
"@backstage/dev-utils": "^1.1.22",
|
|
109
|
+
"@backstage/frontend-test-utils": "^0.5.2",
|
|
110
|
+
"@backstage/plugin-permission-common": "^0.9.8",
|
|
111
|
+
"@backstage/test-utils": "^1.7.17",
|
|
112
112
|
"@testing-library/dom": "^10.0.0",
|
|
113
113
|
"@testing-library/jest-dom": "^6.0.0",
|
|
114
114
|
"@testing-library/react": "^16.0.0",
|