@backstage/plugin-catalog 1.31.0-next.1 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/dist/alpha/entityCards.esm.js +38 -7
- package/dist/alpha/entityCards.esm.js.map +1 -1
- package/dist/alpha/entityIconLinks.esm.js +13 -0
- package/dist/alpha/entityIconLinks.esm.js.map +1 -0
- package/dist/alpha/plugin.esm.js +2 -0
- package/dist/alpha/plugin.esm.js.map +1 -1
- package/dist/alpha.d.ts +37 -3
- package/dist/components/AboutCard/AboutCard.esm.js +79 -56
- package/dist/components/AboutCard/AboutCard.esm.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/package.json.esm.js +1 -1
- package/package.json +25 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 1.31.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 406acb6: Add support to customize the about card icon links via `EntityIconLinkBlueprint` and provide a default catalog view catalog source, launch scaffolder template and read techdocs docs icon links extensions.
|
|
8
|
+
|
|
9
|
+
**BREAKING ALPHA**
|
|
10
|
+
|
|
11
|
+
The `Scaffolder` launch template and `TechDocs` read documentation icons have been extracted from the default `Catalog` about card links and are now provided respectively by the `Scaffolder` and `TechDocs` plugins in the new frontend system. It means that they will not be available unless you install the `TechDocs` and `Scaffolder` plugins. Also If you are using translation for these icon link titles other than the default, you should now translate them using the scaffolder translation reference or the TechDocs translation reference (the translation keys are still the same, `aboutCard.viewTechdocs` and `aboutCard.launchTemplate`).
|
|
12
|
+
|
|
13
|
+
- ec7b35d: Introduced `backstage.io/techdocs-entity-path` annotation which allows deep linking into another entities TechDocs in conjunction with `backstage.io/techdocs-entity`.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 18c64e9: Added the `info.packageJson` option to the plugin instance for the new frontend system.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @backstage/core-components@0.17.3
|
|
20
|
+
- @backstage/catalog-client@1.10.1
|
|
21
|
+
- @backstage/core-plugin-api@1.10.8
|
|
22
|
+
- @backstage/frontend-plugin-api@0.10.3
|
|
23
|
+
- @backstage/plugin-catalog-react@1.19.0
|
|
24
|
+
- @backstage/plugin-techdocs-react@1.3.0
|
|
25
|
+
- @backstage/plugin-techdocs-common@0.1.1
|
|
26
|
+
- @backstage/plugin-search-react@1.9.1
|
|
27
|
+
- @backstage/integration-react@1.2.8
|
|
28
|
+
- @backstage/catalog-model@1.7.4
|
|
29
|
+
- @backstage/core-compat-api@0.4.3
|
|
30
|
+
- @backstage/errors@1.2.7
|
|
31
|
+
- @backstage/types@1.2.1
|
|
32
|
+
- @backstage/version-bridge@1.0.11
|
|
33
|
+
- @backstage/plugin-catalog-common@1.1.4
|
|
34
|
+
- @backstage/plugin-permission-react@0.4.35
|
|
35
|
+
- @backstage/plugin-scaffolder-common@1.5.11
|
|
36
|
+
- @backstage/plugin-search-common@1.2.18
|
|
37
|
+
|
|
38
|
+
## 1.31.0-next.2
|
|
39
|
+
|
|
40
|
+
### Minor Changes
|
|
41
|
+
|
|
42
|
+
- 406acb6: Add support to customize the about card icon links via `EntityIconLinkBlueprint` and provide a default catalog view catalog source, launch scaffolder template and read techdocs docs icon links extensions.
|
|
43
|
+
|
|
44
|
+
**BREAKING ALPHA**
|
|
45
|
+
|
|
46
|
+
The `Scaffolder` launch template and `TechDocs` read documentation icons have been extracted from the default `Catalog` about card links and are now provided respectively by the `Scaffolder` and `TechDocs` plugins in the new frontend system. It means that they will not be available unless you install the `TechDocs` and `Scaffolder` plugins. Also If you are using translation for these icon link titles other than the default, you should now translate them using the scaffolder translation reference or the TechDocs translation reference (the translation keys are still the same, `aboutCard.viewTechdocs` and `aboutCard.launchTemplate`).
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies
|
|
51
|
+
- @backstage/core-components@0.17.3-next.0
|
|
52
|
+
- @backstage/plugin-catalog-react@1.19.0-next.2
|
|
53
|
+
- @backstage/plugin-search-react@1.9.1-next.1
|
|
54
|
+
- @backstage/frontend-plugin-api@0.10.3-next.1
|
|
55
|
+
- @backstage/integration-react@1.2.7
|
|
56
|
+
- @backstage/plugin-techdocs-react@1.3.0-next.1
|
|
57
|
+
- @backstage/catalog-client@1.10.1-next.0
|
|
58
|
+
- @backstage/catalog-model@1.7.4
|
|
59
|
+
- @backstage/core-compat-api@0.4.3-next.2
|
|
60
|
+
- @backstage/core-plugin-api@1.10.7
|
|
61
|
+
- @backstage/errors@1.2.7
|
|
62
|
+
- @backstage/types@1.2.1
|
|
63
|
+
- @backstage/version-bridge@1.0.11
|
|
64
|
+
- @backstage/plugin-catalog-common@1.1.4
|
|
65
|
+
- @backstage/plugin-permission-react@0.4.34
|
|
66
|
+
- @backstage/plugin-scaffolder-common@1.5.11
|
|
67
|
+
- @backstage/plugin-search-common@1.2.18
|
|
68
|
+
- @backstage/plugin-techdocs-common@0.1.1-next.0
|
|
69
|
+
|
|
3
70
|
## 1.31.0-next.1
|
|
4
71
|
|
|
5
72
|
### Patch Changes
|
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
2
|
+
import { EntityCardBlueprint, EntityIconLinkBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
3
3
|
import { compatWrapper } from '@backstage/core-compat-api';
|
|
4
|
+
import { createExtensionInput } from '@backstage/frontend-plugin-api';
|
|
5
|
+
import { HeaderIconLinkRow } from '@backstage/core-components';
|
|
6
|
+
import { useEntity } from '@backstage/plugin-catalog-react';
|
|
7
|
+
import { buildFilterFn } from './filter/FilterWrapper.esm.js';
|
|
4
8
|
|
|
5
|
-
const catalogAboutEntityCard = EntityCardBlueprint.
|
|
9
|
+
const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({
|
|
6
10
|
name: "about",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(
|
|
11
|
-
|
|
11
|
+
inputs: {
|
|
12
|
+
iconLinks: createExtensionInput([
|
|
13
|
+
EntityIconLinkBlueprint.dataRefs.filterFunction.optional(),
|
|
14
|
+
EntityIconLinkBlueprint.dataRefs.filterExpression.optional(),
|
|
15
|
+
EntityIconLinkBlueprint.dataRefs.useProps
|
|
16
|
+
])
|
|
17
|
+
},
|
|
18
|
+
factory(originalFactory, { inputs }) {
|
|
19
|
+
function Subheader() {
|
|
20
|
+
const { entity } = useEntity();
|
|
21
|
+
const links = inputs.iconLinks.reduce((rest, iconLink) => {
|
|
22
|
+
const props = iconLink.get(EntityIconLinkBlueprint.dataRefs.useProps)();
|
|
23
|
+
const filter = buildFilterFn(
|
|
24
|
+
iconLink.get(EntityIconLinkBlueprint.dataRefs.filterFunction),
|
|
25
|
+
iconLink.get(EntityIconLinkBlueprint.dataRefs.filterExpression)
|
|
26
|
+
);
|
|
27
|
+
if (filter(entity)) {
|
|
28
|
+
return [...rest, props];
|
|
29
|
+
}
|
|
30
|
+
return rest;
|
|
31
|
+
}, new Array());
|
|
32
|
+
return links.length ? /* @__PURE__ */ jsx(HeaderIconLinkRow, { links }) : null;
|
|
33
|
+
}
|
|
34
|
+
return originalFactory({
|
|
35
|
+
type: "info",
|
|
36
|
+
async loader() {
|
|
37
|
+
const { InternalAboutCard } = await import('../components/AboutCard/AboutCard.esm.js');
|
|
38
|
+
return compatWrapper(
|
|
39
|
+
/* @__PURE__ */ jsx(InternalAboutCard, { variant: "gridItem", subheader: /* @__PURE__ */ jsx(Subheader, {}) })
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
12
43
|
}
|
|
13
44
|
});
|
|
14
45
|
const catalogLinksEntityCard = EntityCardBlueprint.make({
|
|
@@ -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 {
|
|
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 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: 'has:links',\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: 'has:labels',\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":";;;;;;;;AA6Ba,MAAA,sBAAA,GAAyB,oBAAoB,iBAAkB,CAAA;AAAA,EAC1E,IAAM,EAAA,OAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,WAAW,oBAAqB,CAAA;AAAA,MAC9B,uBAAA,CAAwB,QAAS,CAAA,cAAA,CAAe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AA;AAAA,IACR,MAAQ,EAAA,YACN,OAAO,8CAAiC,CAAE,CAAA,IAAA;AAAA,MAAK,CAAA,CAAA,KAC7C,8BAAe,GAAA,CAAA,CAAA,CAAE,mBAAF,EAAoB,OAAA,EAAQ,YAAW,CAAE;AAAA;AAC1D;AAEN,CAAC;AAEY,MAAA,2BAAA,GAA8B,oBAAoB,IAAK,CAAA;AAAA,EAClE,IAAM,EAAA,aAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,aAAA;AAAA,IACR,MAAQ,EAAA,YACN,OAAO,2CAA8B,CAAE,CAAA,IAAA;AAAA,MAAK,CAAA,CAAA,KAC1C,8BAAe,GAAA,CAAA,CAAA,CAAE,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;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EntityIconLinkBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
2
|
+
import { useCatalogSourceIconLinkProps } from '../components/AboutCard/AboutCard.esm.js';
|
|
3
|
+
|
|
4
|
+
const catalogViewSourceEntityIconLink = EntityIconLinkBlueprint.make({
|
|
5
|
+
name: "view-source",
|
|
6
|
+
params: {
|
|
7
|
+
useProps: useCatalogSourceIconLinkProps
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
var entityIconLinks = [catalogViewSourceEntityIconLink];
|
|
11
|
+
|
|
12
|
+
export { entityIconLinks as default };
|
|
13
|
+
//# sourceMappingURL=entityIconLinks.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityIconLinks.esm.js","sources":["../../src/alpha/entityIconLinks.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { EntityIconLinkBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { useCatalogSourceIconLinkProps } from '../components/AboutCard/AboutCard';\n\nconst catalogViewSourceEntityIconLink = EntityIconLinkBlueprint.make({\n name: 'view-source',\n params: {\n useProps: useCatalogSourceIconLinkProps,\n },\n});\n\nexport default [catalogViewSourceEntityIconLink];\n"],"names":[],"mappings":";;;AAmBA,MAAM,+BAAA,GAAkC,wBAAwB,IAAK,CAAA;AAAA,EACnE,IAAM,EAAA,aAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,QAAU,EAAA;AAAA;AAEd,CAAC,CAAA;AAED,sBAAe,CAAC,+BAA+B,CAAA;;;;"}
|
package/dist/alpha/plugin.esm.js
CHANGED
|
@@ -8,6 +8,7 @@ import filters from './filters.esm.js';
|
|
|
8
8
|
import navItems from './navItems.esm.js';
|
|
9
9
|
import entityCards from './entityCards.esm.js';
|
|
10
10
|
import entityContents from './entityContents.esm.js';
|
|
11
|
+
import entityIconLinks from './entityIconLinks.esm.js';
|
|
11
12
|
import searchResultItems from './searchResultItems.esm.js';
|
|
12
13
|
import contextMenuItems from './contextMenuItems.esm.js';
|
|
13
14
|
|
|
@@ -31,6 +32,7 @@ var plugin = createFrontendPlugin({
|
|
|
31
32
|
...navItems,
|
|
32
33
|
...entityCards,
|
|
33
34
|
...entityContents,
|
|
35
|
+
...entityIconLinks,
|
|
34
36
|
...contextMenuItems,
|
|
35
37
|
...searchResultItems
|
|
36
38
|
]
|
|
@@ -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 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 ...contextMenuItems,\n ...searchResultItems,\n ],\n});\n"],"names":[],"mappings":"
|
|
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,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,SAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,wBAAoB,CAAE,EAAA;AAAA,EACxD,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,YAAc,EAAA,YAAA;AAAA,IACd,aAAe,EAAA;AAAA,GAChB,CAAA;AAAA,EACD,gBAAgB,sBAAuB,CAAA;AAAA,IACrC,WAAa,EAAA,mBAAA;AAAA,IACb,eAAiB,EAAA,uBAAA;AAAA,IACjB,kBAAoB,EAAA,0BAAA;AAAA,IACpB,kBAAoB,EAAA;AAAA,GACrB,CAAA;AAAA,EACD,UAAY,EAAA;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,5 +1,6 @@
|
|
|
1
1
|
import * as _backstage_plugin_search_react_alpha from '@backstage/plugin-search-react/alpha';
|
|
2
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
+
import * as _backstage_core_components from '@backstage/core-components';
|
|
3
4
|
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
4
5
|
import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
|
|
5
6
|
import * as react from 'react';
|
|
@@ -176,8 +177,6 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
|
|
|
176
177
|
};
|
|
177
178
|
}>;
|
|
178
179
|
"entity-card:catalog/about": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
179
|
-
kind: "entity-card";
|
|
180
|
-
name: "about";
|
|
181
180
|
config: {
|
|
182
181
|
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
183
182
|
type: "content" | "summary" | "info" | undefined;
|
|
@@ -193,7 +192,18 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
|
|
|
193
192
|
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_plugin_catalog_react_alpha.EntityCardType, "catalog.entity-card-type", {
|
|
194
193
|
optional: true;
|
|
195
194
|
}>;
|
|
196
|
-
inputs: {
|
|
195
|
+
inputs: {
|
|
196
|
+
iconLinks: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
197
|
+
optional: true;
|
|
198
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
199
|
+
optional: true;
|
|
200
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<() => _backstage_core_components.IconLinkVerticalProps, "entity-icon-link-props", {}>, {
|
|
201
|
+
singleton: false;
|
|
202
|
+
optional: false;
|
|
203
|
+
}>;
|
|
204
|
+
};
|
|
205
|
+
kind: "entity-card";
|
|
206
|
+
name: "about";
|
|
197
207
|
params: {
|
|
198
208
|
loader: () => Promise<JSX.Element>;
|
|
199
209
|
filter?: string | _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
@@ -523,6 +533,30 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
|
|
|
523
533
|
inputs: {};
|
|
524
534
|
params: _backstage_plugin_catalog_react_alpha.EntityContextMenuItemParams;
|
|
525
535
|
}>;
|
|
536
|
+
"entity-icon-link:catalog/view-source": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
537
|
+
kind: "entity-icon-link";
|
|
538
|
+
name: "view-source";
|
|
539
|
+
config: {
|
|
540
|
+
label: string | undefined;
|
|
541
|
+
title: string | undefined;
|
|
542
|
+
filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
543
|
+
};
|
|
544
|
+
configInput: {
|
|
545
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
|
|
546
|
+
label?: string | undefined;
|
|
547
|
+
title?: string | undefined;
|
|
548
|
+
};
|
|
549
|
+
output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: _backstage_catalog_model.Entity) => boolean, "catalog.entity-filter-function", {
|
|
550
|
+
optional: true;
|
|
551
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<string, "catalog.entity-filter-expression", {
|
|
552
|
+
optional: true;
|
|
553
|
+
}> | _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<() => _backstage_core_components.IconLinkVerticalProps, "entity-icon-link-props", {}>;
|
|
554
|
+
inputs: {};
|
|
555
|
+
params: {
|
|
556
|
+
useProps: () => Omit<_backstage_core_components.IconLinkVerticalProps, "color">;
|
|
557
|
+
filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
|
|
558
|
+
};
|
|
559
|
+
}>;
|
|
526
560
|
"nav-item:catalog": _backstage_frontend_plugin_api.ExtensionDefinition<{
|
|
527
561
|
kind: "nav-item";
|
|
528
562
|
name: undefined;
|
|
@@ -1,33 +1,89 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
3
4
|
import Card from '@material-ui/core/Card';
|
|
4
5
|
import CardContent from '@material-ui/core/CardContent';
|
|
5
6
|
import CardHeader from '@material-ui/core/CardHeader';
|
|
6
7
|
import Divider from '@material-ui/core/Divider';
|
|
7
8
|
import IconButton from '@material-ui/core/IconButton';
|
|
8
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
9
|
-
import { Link, AppIcon, HeaderIconLinkRow } from '@backstage/core-components';
|
|
10
|
-
import { useCallback } from 'react';
|
|
11
|
-
import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
|
|
12
|
-
import { useApp, useApi, alertApiRef, errorApiRef, useRouteRef } from '@backstage/core-plugin-api';
|
|
13
|
-
import { useEntity, catalogApiRef, getEntitySourceLocation } from '@backstage/plugin-catalog-react';
|
|
14
|
-
import { viewTechDocRouteRef, createFromTemplateRouteRef } from '../../routes.esm.js';
|
|
15
|
-
import { AboutContent } from './AboutContent.esm.js';
|
|
16
9
|
import CachedIcon from '@material-ui/icons/Cached';
|
|
17
|
-
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
|
18
|
-
import DocsIcon from '@material-ui/icons/Description';
|
|
19
10
|
import EditIcon from '@material-ui/icons/Edit';
|
|
20
|
-
import
|
|
11
|
+
import DocsIcon from '@material-ui/icons/Description';
|
|
12
|
+
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
|
13
|
+
import { Link, AppIcon, HeaderIconLinkRow } from '@backstage/core-components';
|
|
14
|
+
import { useApi, alertApiRef, errorApiRef, useRouteRef, useApp } from '@backstage/core-plugin-api';
|
|
15
|
+
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
16
|
+
import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
|
|
17
|
+
import { ANNOTATION_EDIT_URL, ANNOTATION_LOCATION, stringifyEntityRef, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
|
|
18
|
+
import { useEntity, getEntitySourceLocation, catalogApiRef } from '@backstage/plugin-catalog-react';
|
|
21
19
|
import { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';
|
|
22
20
|
import { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';
|
|
23
|
-
import {
|
|
21
|
+
import { TECHDOCS_ANNOTATION, TECHDOCS_EXTERNAL_ANNOTATION } from '@backstage/plugin-techdocs-common';
|
|
22
|
+
import { buildTechDocsURL } from '@backstage/plugin-techdocs-react';
|
|
23
|
+
import { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
24
24
|
import { taskCreatePermission } from '@backstage/plugin-scaffolder-common/alpha';
|
|
25
25
|
import { usePermission } from '@backstage/plugin-permission-react';
|
|
26
|
+
import { createFromTemplateRouteRef, viewTechDocRouteRef } from '../../routes.esm.js';
|
|
26
27
|
import { catalogTranslationRef } from '../../alpha/translation.esm.js';
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { TECHDOCS_ANNOTATION, TECHDOCS_EXTERNAL_ANNOTATION } from '@backstage/plugin-techdocs-common';
|
|
28
|
+
import { useSourceTemplateCompoundEntityRef } from './hooks.esm.js';
|
|
29
|
+
import { AboutContent } from './AboutContent.esm.js';
|
|
30
30
|
|
|
31
|
+
function useCatalogSourceIconLinkProps() {
|
|
32
|
+
const { entity } = useEntity();
|
|
33
|
+
const scmIntegrationsApi = useApi(scmIntegrationsApiRef);
|
|
34
|
+
const { t } = useTranslationRef(catalogTranslationRef);
|
|
35
|
+
const entitySourceLocation = getEntitySourceLocation(
|
|
36
|
+
entity,
|
|
37
|
+
scmIntegrationsApi
|
|
38
|
+
);
|
|
39
|
+
return {
|
|
40
|
+
label: t("aboutCard.viewSource"),
|
|
41
|
+
disabled: !entitySourceLocation,
|
|
42
|
+
icon: /* @__PURE__ */ jsx(ScmIntegrationIcon, { type: entitySourceLocation?.integrationType }),
|
|
43
|
+
href: entitySourceLocation?.locationTargetUrl
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function useTechdocsReaderIconLinkProps() {
|
|
47
|
+
const { entity } = useEntity();
|
|
48
|
+
const viewTechdocLink = useRouteRef(viewTechDocRouteRef);
|
|
49
|
+
const { t } = useTranslationRef(catalogTranslationRef);
|
|
50
|
+
return {
|
|
51
|
+
label: t("aboutCard.viewTechdocs"),
|
|
52
|
+
disabled: !(entity.metadata.annotations?.[TECHDOCS_ANNOTATION] || entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) || !viewTechdocLink,
|
|
53
|
+
icon: /* @__PURE__ */ jsx(DocsIcon, {}),
|
|
54
|
+
href: buildTechDocsURL(entity, viewTechdocLink)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function useScaffolderTemplateIconLinkProps() {
|
|
58
|
+
const app = useApp();
|
|
59
|
+
const { entity } = useEntity();
|
|
60
|
+
const templateRoute = useRouteRef(createFromTemplateRouteRef);
|
|
61
|
+
const { t } = useTranslationRef(catalogTranslationRef);
|
|
62
|
+
const Icon = app.getSystemIcon("scaffolder") ?? CreateComponentIcon;
|
|
63
|
+
const { allowed: canCreateTemplateTask } = usePermission({
|
|
64
|
+
permission: taskCreatePermission
|
|
65
|
+
});
|
|
66
|
+
return {
|
|
67
|
+
label: t("aboutCard.launchTemplate"),
|
|
68
|
+
icon: /* @__PURE__ */ jsx(Icon, {}),
|
|
69
|
+
disabled: !templateRoute || !canCreateTemplateTask,
|
|
70
|
+
href: templateRoute && templateRoute({
|
|
71
|
+
templateName: entity.metadata.name,
|
|
72
|
+
namespace: entity.metadata.namespace || DEFAULT_NAMESPACE
|
|
73
|
+
})
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function DefaultAboutCardSubheader() {
|
|
77
|
+
const { entity } = useEntity();
|
|
78
|
+
const catalogSourceIconLink = useCatalogSourceIconLinkProps();
|
|
79
|
+
const techdocsreaderIconLink = useTechdocsReaderIconLinkProps();
|
|
80
|
+
const scaffolderTemplateIconLink = useScaffolderTemplateIconLinkProps();
|
|
81
|
+
const links = [catalogSourceIconLink, techdocsreaderIconLink];
|
|
82
|
+
if (isTemplateEntityV1beta3(entity)) {
|
|
83
|
+
links.push(scaffolderTemplateIconLink);
|
|
84
|
+
}
|
|
85
|
+
return /* @__PURE__ */ jsx(HeaderIconLinkRow, { links });
|
|
86
|
+
}
|
|
31
87
|
const useStyles = makeStyles({
|
|
32
88
|
gridItemCard: {
|
|
33
89
|
display: "flex",
|
|
@@ -48,56 +104,20 @@ const useStyles = makeStyles({
|
|
|
48
104
|
flex: 1
|
|
49
105
|
}
|
|
50
106
|
});
|
|
51
|
-
function
|
|
52
|
-
const { variant } = props;
|
|
53
|
-
const app = useApp();
|
|
107
|
+
function InternalAboutCard(props) {
|
|
108
|
+
const { variant, subheader } = props;
|
|
54
109
|
const classes = useStyles();
|
|
55
110
|
const { entity } = useEntity();
|
|
56
|
-
const scmIntegrationsApi = useApi(scmIntegrationsApiRef);
|
|
57
111
|
const catalogApi = useApi(catalogApiRef);
|
|
58
112
|
const alertApi = useApi(alertApiRef);
|
|
59
113
|
const errorApi = useApi(errorApiRef);
|
|
60
|
-
const viewTechdocLink = useRouteRef(viewTechDocRouteRef);
|
|
61
114
|
const templateRoute = useRouteRef(createFromTemplateRouteRef);
|
|
62
115
|
const sourceTemplateRef = useSourceTemplateCompoundEntityRef(entity);
|
|
63
116
|
const { allowed: canRefresh } = useEntityPermission(
|
|
64
117
|
catalogEntityRefreshPermission
|
|
65
118
|
);
|
|
66
119
|
const { t } = useTranslationRef(catalogTranslationRef);
|
|
67
|
-
const { allowed: canCreateTemplateTask } = usePermission({
|
|
68
|
-
permission: taskCreatePermission
|
|
69
|
-
});
|
|
70
|
-
const entitySourceLocation = getEntitySourceLocation(
|
|
71
|
-
entity,
|
|
72
|
-
scmIntegrationsApi
|
|
73
|
-
);
|
|
74
120
|
const entityMetadataEditUrl = entity.metadata.annotations?.[ANNOTATION_EDIT_URL];
|
|
75
|
-
const viewInSource = {
|
|
76
|
-
label: t("aboutCard.viewSource"),
|
|
77
|
-
disabled: !entitySourceLocation,
|
|
78
|
-
icon: /* @__PURE__ */ jsx(ScmIntegrationIcon, { type: entitySourceLocation?.integrationType }),
|
|
79
|
-
href: entitySourceLocation?.locationTargetUrl
|
|
80
|
-
};
|
|
81
|
-
const viewInTechDocs = {
|
|
82
|
-
label: t("aboutCard.viewTechdocs"),
|
|
83
|
-
disabled: !(entity.metadata.annotations?.[TECHDOCS_ANNOTATION] || entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) || !viewTechdocLink,
|
|
84
|
-
icon: /* @__PURE__ */ jsx(DocsIcon, {}),
|
|
85
|
-
href: buildTechDocsURL(entity, viewTechdocLink)
|
|
86
|
-
};
|
|
87
|
-
const subHeaderLinks = [viewInSource, viewInTechDocs];
|
|
88
|
-
if (isTemplateEntityV1beta3(entity)) {
|
|
89
|
-
const Icon = app.getSystemIcon("scaffolder") ?? CreateComponentIcon;
|
|
90
|
-
const launchTemplate = {
|
|
91
|
-
label: t("aboutCard.launchTemplate"),
|
|
92
|
-
icon: /* @__PURE__ */ jsx(Icon, {}),
|
|
93
|
-
disabled: !templateRoute || !canCreateTemplateTask,
|
|
94
|
-
href: templateRoute && templateRoute({
|
|
95
|
-
templateName: entity.metadata.name,
|
|
96
|
-
namespace: entity.metadata.namespace || DEFAULT_NAMESPACE
|
|
97
|
-
})
|
|
98
|
-
};
|
|
99
|
-
subHeaderLinks.push(launchTemplate);
|
|
100
|
-
}
|
|
101
121
|
let cardClass = "";
|
|
102
122
|
if (variant === "gridItem") {
|
|
103
123
|
cardClass = classes.gridItemCard;
|
|
@@ -163,13 +183,16 @@ function AboutCard(props) {
|
|
|
163
183
|
}
|
|
164
184
|
)
|
|
165
185
|
] }),
|
|
166
|
-
subheader: /* @__PURE__ */ jsx(
|
|
186
|
+
subheader: subheader ?? /* @__PURE__ */ jsx(DefaultAboutCardSubheader, {})
|
|
167
187
|
}
|
|
168
188
|
),
|
|
169
189
|
/* @__PURE__ */ jsx(Divider, {}),
|
|
170
190
|
/* @__PURE__ */ jsx(CardContent, { className: cardContentClass, children: /* @__PURE__ */ jsx(AboutContent, { entity }) })
|
|
171
191
|
] });
|
|
172
192
|
}
|
|
193
|
+
function AboutCard(props) {
|
|
194
|
+
return /* @__PURE__ */ jsx(InternalAboutCard, { ...props });
|
|
195
|
+
}
|
|
173
196
|
|
|
174
|
-
export { AboutCard };
|
|
197
|
+
export { AboutCard, InternalAboutCard, useCatalogSourceIconLinkProps };
|
|
175
198
|
//# sourceMappingURL=AboutCard.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AboutCard.esm.js","sources":["../../../src/components/AboutCard/AboutCard.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 */\nimport {\n ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n DEFAULT_NAMESPACE,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport IconButton from '@material-ui/core/IconButton';\nimport { makeStyles } from '@material-ui/core/styles';\nimport {\n AppIcon,\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport { useCallback } from 'react';\nimport {\n ScmIntegrationIcon,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\nimport {\n alertApiRef,\n errorApiRef,\n useApi,\n useApp,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n getEntitySourceLocation,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { createFromTemplateRouteRef, viewTechDocRouteRef } from '../../routes';\n\nimport { AboutContent } from './AboutContent';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport CreateComponentIcon from '@material-ui/icons/AddCircleOutline';\nimport DocsIcon from '@material-ui/icons/Description';\nimport EditIcon from '@material-ui/icons/Edit';\nimport { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';\nimport { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { useSourceTemplateCompoundEntityRef } from './hooks';\nimport { taskCreatePermission } from '@backstage/plugin-scaffolder-common/alpha';\nimport { usePermission } from '@backstage/plugin-permission-react';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { buildTechDocsURL } from '@backstage/plugin-techdocs-react';\nimport {\n TECHDOCS_ANNOTATION,\n TECHDOCS_EXTERNAL_ANNOTATION,\n} from '@backstage/plugin-techdocs-common';\n\nconst useStyles = makeStyles({\n gridItemCard: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n },\n fullHeightCard: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItemCardContent: {\n flex: 1,\n },\n fullHeightCardContent: {\n flex: 1,\n },\n});\n\n/**\n * Props for {@link EntityAboutCard}.\n *\n * @public\n */\nexport interface AboutCardProps {\n variant?: InfoCardVariants;\n}\n\n/**\n * Exported publicly via the EntityAboutCard\n *\n * NOTE: We generally do not accept pull requests to extend this class with more\n * props and customizability. If you need to tweak it, consider making a bespoke\n * card in your own repository instead, that is perfect for your own needs.\n */\nexport function AboutCard(props: AboutCardProps) {\n const { variant } = props;\n const app = useApp();\n const classes = useStyles();\n const { entity } = useEntity();\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const errorApi = useApi(errorApiRef);\n const viewTechdocLink = useRouteRef(viewTechDocRouteRef);\n const templateRoute = useRouteRef(createFromTemplateRouteRef);\n const sourceTemplateRef = useSourceTemplateCompoundEntityRef(entity);\n const { allowed: canRefresh } = useEntityPermission(\n catalogEntityRefreshPermission,\n );\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const { allowed: canCreateTemplateTask } = usePermission({\n permission: taskCreatePermission,\n });\n\n const entitySourceLocation = getEntitySourceLocation(\n entity,\n scmIntegrationsApi,\n );\n const entityMetadataEditUrl =\n entity.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n const viewInSource: IconLinkVerticalProps = {\n label: t('aboutCard.viewSource'),\n disabled: !entitySourceLocation,\n icon: <ScmIntegrationIcon type={entitySourceLocation?.integrationType} />,\n href: entitySourceLocation?.locationTargetUrl,\n };\n const viewInTechDocs: IconLinkVerticalProps = {\n label: t('aboutCard.viewTechdocs'),\n disabled:\n !(\n entity.metadata.annotations?.[TECHDOCS_ANNOTATION] ||\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]\n ) || !viewTechdocLink,\n icon: <DocsIcon />,\n href: buildTechDocsURL(entity, viewTechdocLink),\n };\n\n const subHeaderLinks = [viewInSource, viewInTechDocs];\n\n if (isTemplateEntityV1beta3(entity)) {\n const Icon = app.getSystemIcon('scaffolder') ?? CreateComponentIcon;\n\n const launchTemplate: IconLinkVerticalProps = {\n label: t('aboutCard.launchTemplate'),\n icon: <Icon />,\n disabled: !templateRoute || !canCreateTemplateTask,\n href:\n templateRoute &&\n templateRoute({\n templateName: entity.metadata.name,\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n }),\n };\n\n subHeaderLinks.push(launchTemplate);\n }\n\n let cardClass = '';\n if (variant === 'gridItem') {\n cardClass = classes.gridItemCard;\n } else if (variant === 'fullHeight') {\n cardClass = classes.fullHeightCard;\n }\n\n let cardContentClass = '';\n if (variant === 'gridItem') {\n cardContentClass = classes.gridItemCardContent;\n } else if (variant === 'fullHeight') {\n cardContentClass = classes.fullHeightCardContent;\n }\n\n const entityLocation = entity.metadata.annotations?.[ANNOTATION_LOCATION];\n // Limiting the ability to manually refresh to the less expensive locations\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n const refreshEntity = useCallback(async () => {\n try {\n await catalogApi.refreshEntity(stringifyEntityRef(entity));\n alertApi.post({\n message: t('aboutCard.refreshScheduledMessage'),\n severity: 'info',\n display: 'transient',\n });\n } catch (e) {\n errorApi.post(e);\n }\n }, [catalogApi, entity, alertApi, t, errorApi]);\n\n return (\n <Card className={cardClass}>\n <CardHeader\n title={t('aboutCard.title')}\n action={\n <>\n {allowRefresh && canRefresh && (\n <IconButton\n aria-label=\"Refresh\"\n title={t('aboutCard.refreshButtonTitle')}\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n <IconButton\n component={Link}\n aria-label=\"Edit\"\n disabled={!entityMetadataEditUrl}\n title={t('aboutCard.editButtonTitle')}\n to={entityMetadataEditUrl ?? '#'}\n >\n <EditIcon />\n </IconButton>\n {sourceTemplateRef && templateRoute && (\n <IconButton\n component={Link}\n title={t('aboutCard.createSimilarButtonTitle')}\n to={templateRoute({\n namespace: sourceTemplateRef.namespace,\n templateName: sourceTemplateRef.name,\n })}\n >\n <AppIcon id=\"scaffolder\" />\n </IconButton>\n )}\n </>\n }\n subheader={<HeaderIconLinkRow links={subHeaderLinks} />}\n />\n <Divider />\n <CardContent className={cardContentClass}>\n <AboutContent entity={entity} />\n </CardContent>\n </Card>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,MAAM,YAAY,UAAW,CAAA;AAAA,EAC3B,YAAc,EAAA;AAAA,IACZ,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA,QAAA;AAAA,IACf,MAAQ,EAAA,mBAAA;AAAA;AAAA,IACR,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,cAAgB,EAAA;AAAA,IACd,OAAS,EAAA,MAAA;AAAA,IACT,aAAe,EAAA,QAAA;AAAA,IACf,MAAQ,EAAA;AAAA,GACV;AAAA,EACA,mBAAqB,EAAA;AAAA,IACnB,IAAM,EAAA;AAAA,GACR;AAAA,EACA,qBAAuB,EAAA;AAAA,IACrB,IAAM,EAAA;AAAA;AAEV,CAAC,CAAA;AAkBM,SAAS,UAAU,KAAuB,EAAA;AAC/C,EAAM,MAAA,EAAE,SAAY,GAAA,KAAA;AACpB,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,MAA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UAAU,CAAC,qBAAA;AAAA,cACX,KAAA,EAAO,EAAE,2BAA2B,CAAA;AAAA,cACpC,IAAI,qBAAyB,IAAA,GAAA;AAAA,cAE7B,8BAAC,QAAS,EAAA,EAAA;AAAA;AAAA,WACZ;AAAA,UACC,qBAAqB,aACpB,oBAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,SAAW,EAAA,IAAA;AAAA,cACX,KAAA,EAAO,EAAE,oCAAoC,CAAA;AAAA,cAC7C,IAAI,aAAc,CAAA;AAAA,gBAChB,WAAW,iBAAkB,CAAA,SAAA;AAAA,gBAC7B,cAAc,iBAAkB,CAAA;AAAA,eACjC,CAAA;AAAA,cAED,QAAA,kBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,EAAA,EAAG,YAAa,EAAA;AAAA;AAAA;AAC3B,SAEJ,EAAA,CAAA;AAAA,QAEF,SAAW,kBAAA,GAAA,CAAC,iBAAkB,EAAA,EAAA,KAAA,EAAO,cAAgB,EAAA;AAAA;AAAA,KACvD;AAAA,wBACC,OAAQ,EAAA,EAAA,CAAA;AAAA,wBACR,WAAY,EAAA,EAAA,SAAA,EAAW,kBACtB,QAAC,kBAAA,GAAA,CAAA,YAAA,EAAA,EAAa,QAAgB,CAChC,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"AboutCard.esm.js","sources":["../../../src/components/AboutCard/AboutCard.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 { useCallback } from 'react';\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport Card from '@material-ui/core/Card';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport IconButton from '@material-ui/core/IconButton';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport EditIcon from '@material-ui/icons/Edit';\nimport DocsIcon from '@material-ui/icons/Description';\nimport CreateComponentIcon from '@material-ui/icons/AddCircleOutline';\n\nimport {\n AppIcon,\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport {\n alertApiRef,\n errorApiRef,\n useApp,\n useApi,\n useRouteRef,\n} from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\nimport {\n ScmIntegrationIcon,\n scmIntegrationsApiRef,\n} from '@backstage/integration-react';\n\nimport {\n DEFAULT_NAMESPACE,\n ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n getEntitySourceLocation,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';\nimport { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';\n\nimport {\n TECHDOCS_ANNOTATION,\n TECHDOCS_EXTERNAL_ANNOTATION,\n} from '@backstage/plugin-techdocs-common';\nimport { buildTechDocsURL } from '@backstage/plugin-techdocs-react';\n\nimport { isTemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';\nimport { taskCreatePermission } from '@backstage/plugin-scaffolder-common/alpha';\n\nimport { usePermission } from '@backstage/plugin-permission-react';\n\nimport { createFromTemplateRouteRef, viewTechDocRouteRef } from '../../routes';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useSourceTemplateCompoundEntityRef } from './hooks';\nimport { AboutContent } from './AboutContent';\n\nexport function useCatalogSourceIconLinkProps() {\n const { entity } = useEntity();\n const scmIntegrationsApi = useApi(scmIntegrationsApiRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n const entitySourceLocation = getEntitySourceLocation(\n entity,\n scmIntegrationsApi,\n );\n return {\n label: t('aboutCard.viewSource'),\n disabled: !entitySourceLocation,\n icon: <ScmIntegrationIcon type={entitySourceLocation?.integrationType} />,\n href: entitySourceLocation?.locationTargetUrl,\n };\n}\n\n// TODO: This hook is duplicated from the TechDocs plugin for backwards compatibility\n// Remove it when the the legacy frontend system support is dropped.\nfunction useTechdocsReaderIconLinkProps(): IconLinkVerticalProps {\n const { entity } = useEntity();\n const viewTechdocLink = useRouteRef(viewTechDocRouteRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n\n return {\n label: t('aboutCard.viewTechdocs'),\n disabled:\n !(\n entity.metadata.annotations?.[TECHDOCS_ANNOTATION] ||\n entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]\n ) || !viewTechdocLink,\n icon: <DocsIcon />,\n href: buildTechDocsURL(entity, viewTechdocLink),\n };\n}\n\n// TODO: This hook is duplicated from the Scaffolder plugin for backwards compatibility\n// Remove it when the the legacy frontend system support is dropped.\nfunction useScaffolderTemplateIconLinkProps(): IconLinkVerticalProps {\n const app = useApp();\n const { entity } = useEntity();\n const templateRoute = useRouteRef(createFromTemplateRouteRef);\n const { t } = useTranslationRef(catalogTranslationRef);\n const Icon = app.getSystemIcon('scaffolder') ?? CreateComponentIcon;\n const { allowed: canCreateTemplateTask } = usePermission({\n permission: taskCreatePermission,\n });\n\n return {\n label: t('aboutCard.launchTemplate'),\n icon: <Icon />,\n disabled: !templateRoute || !canCreateTemplateTask,\n href:\n templateRoute &&\n templateRoute({\n templateName: entity.metadata.name,\n namespace: entity.metadata.namespace || DEFAULT_NAMESPACE,\n }),\n };\n}\n\nfunction DefaultAboutCardSubheader() {\n const { entity } = useEntity();\n const catalogSourceIconLink = useCatalogSourceIconLinkProps();\n const techdocsreaderIconLink = useTechdocsReaderIconLinkProps();\n const scaffolderTemplateIconLink = useScaffolderTemplateIconLinkProps();\n\n const links = [catalogSourceIconLink, techdocsreaderIconLink];\n if (isTemplateEntityV1beta3(entity)) {\n links.push(scaffolderTemplateIconLink);\n }\n\n return <HeaderIconLinkRow links={links} />;\n}\n\nconst useStyles = makeStyles({\n gridItemCard: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n },\n fullHeightCard: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItemCardContent: {\n flex: 1,\n },\n fullHeightCardContent: {\n flex: 1,\n },\n});\n\n/**\n * Props for {@link EntityAboutCard}.\n *\n * @public\n */\nexport type AboutCardProps = {\n variant?: InfoCardVariants;\n};\n\nexport interface InternalAboutCardProps extends AboutCardProps {\n subheader?: JSX.Element;\n}\n\nexport function InternalAboutCard(props: InternalAboutCardProps) {\n const { variant, subheader } = props;\n const classes = useStyles();\n const { entity } = useEntity();\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const errorApi = useApi(errorApiRef);\n const templateRoute = useRouteRef(createFromTemplateRouteRef);\n const sourceTemplateRef = useSourceTemplateCompoundEntityRef(entity);\n const { allowed: canRefresh } = useEntityPermission(\n catalogEntityRefreshPermission,\n );\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const entityMetadataEditUrl =\n entity.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n let cardClass = '';\n if (variant === 'gridItem') {\n cardClass = classes.gridItemCard;\n } else if (variant === 'fullHeight') {\n cardClass = classes.fullHeightCard;\n }\n\n let cardContentClass = '';\n if (variant === 'gridItem') {\n cardContentClass = classes.gridItemCardContent;\n } else if (variant === 'fullHeight') {\n cardContentClass = classes.fullHeightCardContent;\n }\n\n const entityLocation = entity.metadata.annotations?.[ANNOTATION_LOCATION];\n // Limiting the ability to manually refresh to the less expensive locations\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n const refreshEntity = useCallback(async () => {\n try {\n await catalogApi.refreshEntity(stringifyEntityRef(entity));\n alertApi.post({\n message: t('aboutCard.refreshScheduledMessage'),\n severity: 'info',\n display: 'transient',\n });\n } catch (e) {\n errorApi.post(e);\n }\n }, [catalogApi, entity, alertApi, t, errorApi]);\n\n return (\n <Card className={cardClass}>\n <CardHeader\n title={t('aboutCard.title')}\n action={\n <>\n {allowRefresh && canRefresh && (\n <IconButton\n aria-label=\"Refresh\"\n title={t('aboutCard.refreshButtonTitle')}\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n <IconButton\n component={Link}\n aria-label=\"Edit\"\n disabled={!entityMetadataEditUrl}\n title={t('aboutCard.editButtonTitle')}\n to={entityMetadataEditUrl ?? '#'}\n >\n <EditIcon />\n </IconButton>\n {sourceTemplateRef && templateRoute && (\n <IconButton\n component={Link}\n title={t('aboutCard.createSimilarButtonTitle')}\n to={templateRoute({\n namespace: sourceTemplateRef.namespace,\n templateName: sourceTemplateRef.name,\n })}\n >\n <AppIcon id=\"scaffolder\" />\n </IconButton>\n )}\n </>\n }\n subheader={subheader ?? <DefaultAboutCardSubheader />}\n />\n <Divider />\n <CardContent className={cardContentClass}>\n <AboutContent entity={entity} />\n </CardContent>\n </Card>\n );\n}\n\n/**\n * Exported publicly via the EntityAboutCard\n *\n * NOTE: We generally do not accept pull requests to extend this class with more\n * props and customizability. If you need to tweak it, consider making a bespoke\n * card in your own repository instead, that is perfect for your own needs.\n */\nexport function AboutCard(props: AboutCardProps) {\n return <InternalAboutCard {...props} />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFO,SAAS,6BAAgC,GAAA;AAC9C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAM,MAAA,kBAAA,GAAqB,OAAO,qBAAqB,CAAA;AACvD,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,qBAAqB,CAAA;AACrD,EAAA,M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,cAE7B,8BAAC,QAAS,EAAA,EAAA;AAAA;AAAA,WACZ;AAAA,UACC,qBAAqB,aACpB,oBAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,SAAW,EAAA,IAAA;AAAA,cACX,KAAA,EAAO,EAAE,oCAAoC,CAAA;AAAA,cAC7C,IAAI,aAAc,CAAA;AAAA,gBAChB,WAAW,iBAAkB,CAAA,SAAA;AAAA,gBAC7B,cAAc,iBAAkB,CAAA;AAAA,eACjC,CAAA;AAAA,cAED,QAAA,kBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,EAAA,EAAG,YAAa,EAAA;AAAA;AAAA;AAC3B,SAEJ,EAAA,CAAA;AAAA,QAEF,SAAA,EAAW,SAAa,oBAAA,GAAA,CAAC,yBAA0B,EAAA,EAAA;AAAA;AAAA,KACrD;AAAA,wBACC,OAAQ,EAAA,EAAA,CAAA;AAAA,wBACR,WAAY,EAAA,EAAA,SAAA,EAAW,kBACtB,QAAC,kBAAA,GAAA,CAAA,YAAA,EAAA,EAAa,QAAgB,CAChC,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;AASO,SAAS,UAAU,KAAuB,EAAA;AAC/C,EAAO,uBAAA,GAAA,CAAC,iBAAmB,EAAA,EAAA,GAAG,KAAO,EAAA,CAAA;AACvC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -160,9 +160,9 @@ declare class DefaultStarredEntitiesApi implements StarredEntitiesApi {
|
|
|
160
160
|
*
|
|
161
161
|
* @public
|
|
162
162
|
*/
|
|
163
|
-
|
|
163
|
+
type AboutCardProps = {
|
|
164
164
|
variant?: InfoCardVariants;
|
|
165
|
-
}
|
|
165
|
+
};
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* Props for {@link AboutContent}.
|
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": "1.31.0
|
|
3
|
+
"version": "1.31.0",
|
|
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.10.1
|
|
74
|
-
"@backstage/catalog-model": "1.7.4",
|
|
75
|
-
"@backstage/core-compat-api": "0.4.3
|
|
76
|
-
"@backstage/core-components": "0.17.
|
|
77
|
-
"@backstage/core-plugin-api": "1.10.
|
|
78
|
-
"@backstage/errors": "1.2.7",
|
|
79
|
-
"@backstage/frontend-plugin-api": "0.10.3
|
|
80
|
-
"@backstage/integration-react": "1.2.
|
|
81
|
-
"@backstage/plugin-catalog-common": "1.1.4",
|
|
82
|
-
"@backstage/plugin-catalog-react": "1.
|
|
83
|
-
"@backstage/plugin-permission-react": "0.4.
|
|
84
|
-
"@backstage/plugin-scaffolder-common": "1.5.11",
|
|
85
|
-
"@backstage/plugin-search-common": "1.2.18",
|
|
86
|
-
"@backstage/plugin-search-react": "1.9.1
|
|
87
|
-
"@backstage/plugin-techdocs-common": "0.1.1
|
|
88
|
-
"@backstage/plugin-techdocs-react": "1.3.0
|
|
89
|
-
"@backstage/types": "1.2.1",
|
|
90
|
-
"@backstage/version-bridge": "1.0.11",
|
|
73
|
+
"@backstage/catalog-client": "^1.10.1",
|
|
74
|
+
"@backstage/catalog-model": "^1.7.4",
|
|
75
|
+
"@backstage/core-compat-api": "^0.4.3",
|
|
76
|
+
"@backstage/core-components": "^0.17.3",
|
|
77
|
+
"@backstage/core-plugin-api": "^1.10.8",
|
|
78
|
+
"@backstage/errors": "^1.2.7",
|
|
79
|
+
"@backstage/frontend-plugin-api": "^0.10.3",
|
|
80
|
+
"@backstage/integration-react": "^1.2.8",
|
|
81
|
+
"@backstage/plugin-catalog-common": "^1.1.4",
|
|
82
|
+
"@backstage/plugin-catalog-react": "^1.19.0",
|
|
83
|
+
"@backstage/plugin-permission-react": "^0.4.35",
|
|
84
|
+
"@backstage/plugin-scaffolder-common": "^1.5.11",
|
|
85
|
+
"@backstage/plugin-search-common": "^1.2.18",
|
|
86
|
+
"@backstage/plugin-search-react": "^1.9.1",
|
|
87
|
+
"@backstage/plugin-techdocs-common": "^0.1.1",
|
|
88
|
+
"@backstage/plugin-techdocs-react": "^1.3.0",
|
|
89
|
+
"@backstage/types": "^1.2.1",
|
|
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.
|
|
106
|
-
"@backstage/core-app-api": "1.17.
|
|
107
|
-
"@backstage/dev-utils": "1.1.11
|
|
108
|
-
"@backstage/frontend-test-utils": "0.3.3
|
|
109
|
-
"@backstage/plugin-permission-common": "0.9.0",
|
|
110
|
-
"@backstage/test-utils": "1.7.
|
|
105
|
+
"@backstage/cli": "^0.33.0",
|
|
106
|
+
"@backstage/core-app-api": "^1.17.1",
|
|
107
|
+
"@backstage/dev-utils": "^1.1.11",
|
|
108
|
+
"@backstage/frontend-test-utils": "^0.3.3",
|
|
109
|
+
"@backstage/plugin-permission-common": "^0.9.0",
|
|
110
|
+
"@backstage/test-utils": "^1.7.9",
|
|
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",
|