@backstage/plugin-catalog 2.0.0-next.2 → 2.0.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 +61 -0
- package/README.md +6 -2
- package/dist/alpha/entityCards.esm.js +7 -7
- package/dist/alpha/entityCards.esm.js.map +1 -1
- package/dist/alpha/pages.esm.js +4 -3
- package/dist/alpha/pages.esm.js.map +1 -1
- package/dist/alpha/plugin.esm.js +1 -1
- package/dist/alpha/plugin.esm.js.map +1 -1
- package/dist/alpha/translation.esm.js +9 -9
- package/dist/alpha/translation.esm.js.map +1 -1
- package/dist/alpha.d.ts +14 -11
- package/dist/alpha.esm.js +5 -1
- package/dist/alpha.esm.js.map +1 -1
- package/dist/components/CatalogPage/DefaultCatalogPage.esm.js +89 -19
- package/dist/components/CatalogPage/DefaultCatalogPage.esm.js.map +1 -1
- package/dist/components/CatalogTable/CatalogTable.esm.js +1 -1
- package/dist/components/DependencyOfComponentsCard/DependencyOfComponentsCard.esm.js +33 -10
- package/dist/components/DependencyOfComponentsCard/DependencyOfComponentsCard.esm.js.map +1 -1
- package/dist/components/DependsOnComponentsCard/DependsOnComponentsCard.esm.js +33 -10
- package/dist/components/DependsOnComponentsCard/DependsOnComponentsCard.esm.js.map +1 -1
- package/dist/components/DependsOnResourcesCard/DependsOnResourcesCard.esm.js +33 -10
- package/dist/components/DependsOnResourcesCard/DependsOnResourcesCard.esm.js.map +1 -1
- package/dist/components/HasComponentsCard/HasComponentsCard.esm.js +33 -10
- package/dist/components/HasComponentsCard/HasComponentsCard.esm.js.map +1 -1
- package/dist/components/HasResourcesCard/HasResourcesCard.esm.js +34 -11
- package/dist/components/HasResourcesCard/HasResourcesCard.esm.js.map +1 -1
- package/dist/components/HasSubcomponentsCard/HasSubcomponentsCard.esm.js +34 -10
- package/dist/components/HasSubcomponentsCard/HasSubcomponentsCard.esm.js.map +1 -1
- package/dist/components/HasSubdomainsCard/HasSubdomainsCard.esm.js +33 -10
- package/dist/components/HasSubdomainsCard/HasSubdomainsCard.esm.js.map +1 -1
- package/dist/components/HasSystemsCard/HasSystemsCard.esm.js +33 -10
- package/dist/components/HasSystemsCard/HasSystemsCard.esm.js.map +1 -1
- package/dist/components/RelatedEntitiesCard/RelatedEntitiesCard.esm.js.map +1 -1
- package/dist/index.d.ts +204 -10
- package/dist/index.esm.js +1 -1
- package/dist/package.json.esm.js +1 -1
- package/package.json +26 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
# @backstage/plugin-catalog
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5b7e221: 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.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/ui@0.13.1
|
|
10
|
+
- @backstage/frontend-plugin-api@0.15.1
|
|
11
|
+
|
|
12
|
+
## 2.0.0
|
|
13
|
+
|
|
14
|
+
### Major Changes
|
|
15
|
+
|
|
16
|
+
- 5fc35bb: Migrated `EntityAboutCard`, `EntityLinksCard`, `EntityLabelsCard`, `GroupProfileCard`, and `UserProfileCard` from MUI/InfoCard to use the new BUI card layout and BUI components where possible.
|
|
17
|
+
|
|
18
|
+
**BREAKING**: Removed `variant` prop from EntityAboutCard, EntityUserProfileCard, EntityGroupProfileCard, EntityLabelsCard, EntityLinksCard. Removed `gridSizes` prop from `AboutField`.
|
|
19
|
+
|
|
20
|
+
**Migration:**
|
|
21
|
+
|
|
22
|
+
Simply delete the obsolete `variant` and `gridSizes` props, e.g:
|
|
23
|
+
|
|
24
|
+
```diff
|
|
25
|
+
- <EntityAboutCard variant="gridItem" />
|
|
26
|
+
+ <EntityAboutCard />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```diff
|
|
30
|
+
- <AboutField label="Owner" gridSizes={{ xs: 12, sm: 6, lg: 4 }} />
|
|
31
|
+
+ <AboutField label="Owner" />
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Minor Changes
|
|
35
|
+
|
|
36
|
+
- 4d58894: Added support for group alias IDs and configurable content ordering on the entity page. Groups can now declare `aliases` so that content targeting an aliased group is included in the group. A new `defaultContentOrder` option (default `title`) controls how content items within each group are sorted, with support for both a page-level default and per-group overrides.
|
|
37
|
+
- c548a0f: Migrated entity table cards (`HasComponentsCard`, `HasResourcesCard`, `HasSubcomponentsCard`, `HasSubdomainsCard`, `HasSystemsCard`, `DependsOnComponentsCard`, `DependsOnResourcesCard`, `DependencyOfComponentsCard`) to use BUI when no legacy props are passed. The old `variant`, `columns`, and `tableOptions` props are deprecated but still supported — passing any of them triggers the legacy MUI-based rendering. The new `columnConfig` prop accepts `EntityColumnConfig[]` for BUI-based rendering.
|
|
38
|
+
|
|
39
|
+
`RelatedEntitiesCard` is deprecated — use `EntityRelationCard` from `@backstage/plugin-catalog-react/alpha` instead.
|
|
40
|
+
|
|
41
|
+
- 0be2541: Promoted the plugin's translation ref to the stable package entry point. It was previously only available through the alpha entry point.
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- 538c985: Updated installation documentation to use feature discovery as the default.
|
|
46
|
+
- 07ba746: Fixed entity page tab groups not respecting the ordering from the `groups` configuration.
|
|
47
|
+
- aa29b50: New frontend system pages now use the default plugin header together with `HeaderPage` instead of the legacy core page header pattern.
|
|
48
|
+
- 3f36ce1: Updated alpha plugin icons to follow the new frontend icon sizing rules when rendered in plugin and navigation surfaces.
|
|
49
|
+
- Updated dependencies
|
|
50
|
+
- @backstage/plugin-catalog-react@2.1.0
|
|
51
|
+
- @backstage/ui@0.13.0
|
|
52
|
+
- @backstage/core-compat-api@0.5.9
|
|
53
|
+
- @backstage/core-plugin-api@1.12.4
|
|
54
|
+
- @backstage/core-components@0.18.8
|
|
55
|
+
- @backstage/frontend-plugin-api@0.15.0
|
|
56
|
+
- @backstage/plugin-search-react@1.11.0
|
|
57
|
+
- @backstage/catalog-client@1.14.0
|
|
58
|
+
- @backstage/plugin-permission-react@0.4.41
|
|
59
|
+
- @backstage/plugin-scaffolder-common@2.0.0
|
|
60
|
+
- @backstage/catalog-model@1.7.7
|
|
61
|
+
- @backstage/integration-react@1.2.16
|
|
62
|
+
- @backstage/plugin-techdocs-react@1.3.9
|
|
63
|
+
|
|
3
64
|
## 2.0.0-next.2
|
|
4
65
|
|
|
5
66
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -15,13 +15,17 @@ To check if you already have the package, look under
|
|
|
15
15
|
`@backstage/plugin-catalog`. The instructions below walk through restoring the
|
|
16
16
|
plugin, if you previously removed it.
|
|
17
17
|
|
|
18
|
-
### Install the package
|
|
19
|
-
|
|
20
18
|
```bash
|
|
21
19
|
# From your Backstage root directory
|
|
22
20
|
yarn --cwd packages/app add @backstage/plugin-catalog
|
|
23
21
|
```
|
|
24
22
|
|
|
23
|
+
Once installed, the plugin is automatically available in your app through the default feature discovery. For more details and alternative installation methods, see [installing plugins](https://backstage.io/docs/frontend-system/building-apps/installing-plugins).
|
|
24
|
+
|
|
25
|
+
## Old Frontend System
|
|
26
|
+
|
|
27
|
+
If your Backstage app uses the old frontend system, you need to manually wire the plugin into your app as outlined in this section. If you are on the new frontend system, you can skip this.
|
|
28
|
+
|
|
25
29
|
### Add the plugin to your `packages/app`
|
|
26
30
|
|
|
27
31
|
Add the two pages that the catalog plugin provides to your app. You can choose
|
|
@@ -66,49 +66,49 @@ const catalogDependsOnComponentsEntityCard = EntityCardBlueprint.make({
|
|
|
66
66
|
name: "depends-on-components",
|
|
67
67
|
params: {
|
|
68
68
|
filter: { kind: "component" },
|
|
69
|
-
loader: async () => import('../components/DependsOnComponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.DependsOnComponentsCard, {
|
|
69
|
+
loader: async () => import('../components/DependsOnComponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.DependsOnComponentsCard, {}))
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
const catalogDependsOnResourcesEntityCard = EntityCardBlueprint.make({
|
|
73
73
|
name: "depends-on-resources",
|
|
74
74
|
params: {
|
|
75
75
|
filter: { kind: "component" },
|
|
76
|
-
loader: async () => import('../components/DependsOnResourcesCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.DependsOnResourcesCard, {
|
|
76
|
+
loader: async () => import('../components/DependsOnResourcesCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.DependsOnResourcesCard, {}))
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
const catalogHasComponentsEntityCard = EntityCardBlueprint.make({
|
|
80
80
|
name: "has-components",
|
|
81
81
|
params: {
|
|
82
82
|
filter: { kind: "system" },
|
|
83
|
-
loader: async () => import('../components/HasComponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasComponentsCard, {
|
|
83
|
+
loader: async () => import('../components/HasComponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasComponentsCard, {}))
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
const catalogHasResourcesEntityCard = EntityCardBlueprint.make({
|
|
87
87
|
name: "has-resources",
|
|
88
88
|
params: {
|
|
89
89
|
filter: { kind: "system" },
|
|
90
|
-
loader: async () => import('../components/HasResourcesCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasResourcesCard, {
|
|
90
|
+
loader: async () => import('../components/HasResourcesCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasResourcesCard, {}))
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
const catalogHasSubcomponentsEntityCard = EntityCardBlueprint.make({
|
|
94
94
|
name: "has-subcomponents",
|
|
95
95
|
params: {
|
|
96
96
|
filter: { kind: "component" },
|
|
97
|
-
loader: async () => import('../components/HasSubcomponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSubcomponentsCard, {
|
|
97
|
+
loader: async () => import('../components/HasSubcomponentsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSubcomponentsCard, {}))
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
const catalogHasSubdomainsEntityCard = EntityCardBlueprint.make({
|
|
101
101
|
name: "has-subdomains",
|
|
102
102
|
params: {
|
|
103
103
|
filter: { kind: "domain" },
|
|
104
|
-
loader: async () => import('../components/HasSubdomainsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSubdomainsCard, {
|
|
104
|
+
loader: async () => import('../components/HasSubdomainsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSubdomainsCard, {}))
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
const catalogHasSystemsEntityCard = EntityCardBlueprint.make({
|
|
108
108
|
name: "has-systems",
|
|
109
109
|
params: {
|
|
110
110
|
filter: { kind: "domain" },
|
|
111
|
-
loader: async () => import('../components/HasSystemsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSystemsCard, {
|
|
111
|
+
loader: async () => import('../components/HasSystemsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.HasSystemsCard, {}))
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
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 { 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 <InternalAboutCard iconLinks={<Subheader />} />;\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 => <m.EntityLinksCard />),\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 />\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;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,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,MAAM,QAAQ,QAAA,CAAS,GAAA;AAAA,YACrB,wBAAwB,QAAA,CAAS;AAAA,WACnC,EAAE;AACF,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,KAAA,CAAM,MAAA,mBAA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AA;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 <InternalAboutCard iconLinks={<Subheader />} />;\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 => <m.EntityLinksCard />),\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 />\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 />\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 />\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 />\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 />\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 />\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 />\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 => <m.HasSystemsCard />),\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;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,MAAA,GAAS,aAAA;AAAA,UACb,QAAA,CAAS,GAAA,CAAI,uBAAA,CAAwB,QAAA,CAAS,cAAc,CAAA;AAAA,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AAO,2CAA8B,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAAK,GAAA,CAAC,CAAA,CAAE,cAAA,EAAF,EAAiB,CAAE;AAAA;AAE3E,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;;;;"}
|
package/dist/alpha/pages.esm.js
CHANGED
|
@@ -28,15 +28,15 @@ const catalogPage = PageBlueprint.makeWithOverrides({
|
|
|
28
28
|
return originalFactory({
|
|
29
29
|
path: "/catalog",
|
|
30
30
|
routeRef: rootRouteRef,
|
|
31
|
-
icon: /* @__PURE__ */ jsx(CategoryIcon, {}),
|
|
31
|
+
icon: /* @__PURE__ */ jsx(CategoryIcon, { fontSize: "inherit" }),
|
|
32
32
|
title: "Catalog",
|
|
33
33
|
loader: async () => {
|
|
34
|
-
const {
|
|
34
|
+
const { NfsDefaultCatalogPage } = await import('../components/CatalogPage/DefaultCatalogPage.esm.js');
|
|
35
35
|
const filters = inputs.filters.map(
|
|
36
36
|
(filter) => filter.get(coreExtensionData.reactElement)
|
|
37
37
|
);
|
|
38
38
|
return /* @__PURE__ */ jsx(
|
|
39
|
-
|
|
39
|
+
NfsDefaultCatalogPage,
|
|
40
40
|
{
|
|
41
41
|
filters: /* @__PURE__ */ jsx(Fragment, { children: filters }),
|
|
42
42
|
pagination: config.pagination
|
|
@@ -88,6 +88,7 @@ const catalogEntityPage = PageBlueprint.makeWithOverrides({
|
|
|
88
88
|
factory(originalFactory, { config, inputs }) {
|
|
89
89
|
return originalFactory({
|
|
90
90
|
path: "/catalog/:namespace/:kind/:name",
|
|
91
|
+
noHeader: true,
|
|
91
92
|
title: "Catalog Entity",
|
|
92
93
|
// NOTE: The `convertLegacyRouteRef` call here ensures that this route ref
|
|
93
94
|
// is mutated to support the new frontend system. Removing this conversion
|
|
@@ -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 { 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 defaultEntityContentGroupDefinitions,\n EntityContentBlueprint,\n EntityContextMenuItemBlueprint,\n EntityHeaderBlueprint,\n EntityContentGroupDefinitions,\n} from '@backstage/plugin-catalog-react/alpha';\nimport CategoryIcon from '@material-ui/icons/Category';\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 icon: <CategoryIcon />,\n title: 'Catalog',\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 EntityContentBlueprint.dataRefs.icon.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(\n z.record(\n z.string(),\n z.object({\n title: z.string(),\n icon: z.string().optional(),\n aliases: z.array(z.string()).optional(),\n contentOrder: z.enum(['title', 'natural']).optional(),\n }),\n ),\n )\n .optional(),\n defaultContentOrder: z =>\n z.enum(['title', 'natural']).optional().default('title'),\n showNavItemIcons: z => z.boolean().optional().default(false),\n },\n },\n factory(originalFactory, { config, inputs }) {\n return originalFactory({\n path: '/catalog/:namespace/:kind/:name',\n title: 'Catalog Entity',\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 // 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 const groupDefinitions =\n config.groups?.reduce(\n (rest, group) => ({ ...rest, ...group }),\n {} as EntityContentGroupDefinitions,\n ) ?? defaultEntityContentGroupDefinitions;\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 groupDefinitions={groupDefinitions}\n defaultContentOrder={config.defaultContentOrder}\n showNavItemIcons={config.showNavItemIcons}\n >\n {inputs.contents.map(output => (\n <EntityLayout.Route\n group={output.get(EntityContentBlueprint.dataRefs.group)}\n key={output.get(coreExtensionData.routePath)}\n path={output.get(coreExtensionData.routePath)}\n title={output.get(EntityContentBlueprint.dataRefs.title)}\n icon={output.get(EntityContentBlueprint.dataRefs.icon)}\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 </EntityLayout>\n </AsyncEntityProvider>\n );\n };\n\n return <Component />;\n },\n });\n },\n});\n\nexport default [catalogPage, catalogEntityPage];\n"],"names":[],"mappings":";;;;;;;;;;AAsCO,MAAM,WAAA,GAAc,cAAc,iBAAA,CAAkB;AAAA,EACzD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;AAAA,gBAAC,YAAA,CAAa,KAAA;AAAA,gBAAb;AAAA,kBACC,KAAA,EAAO,MAAA,CAAO,GAAA,CAAI,sBAAA,CAAuB,SAAS,KAAK,CAAA;AAAA,kBAEvD,IAAA,EAAM,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,SAAS,CAAA;AAAA,kBAC5C,KAAA,EAAO,MAAA,CAAO,GAAA,CAAI,sBAAA,CAAuB,SAAS,KAAK,CAAA;AAAA,kBACvD,IAAA,EAAM,MAAA,CAAO,GAAA,CAAI,sBAAA,CAAuB,SAAS,IAAI,CAAA;AAAA,kBACrD,EAAA,EAAI,aAAA;AAAA,oBACF,MAAA,CAAO,GAAA;AAAA,sBACL,uBAAuB,QAAA,CAAS;AAAA,qBAClC;AAAA,oBACA,MAAA,CAAO,GAAA;AAAA,sBACL,uBAAuB,QAAA,CAAS;AAAA;AAClC,mBACF;AAAA,kBAEC,QAAA,EAAA,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,YAAY;AAAA,iBAAA;AAAA,gBAbrC,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,SAAS;AAAA,eAe9C;AAAA;AAAA,WACH,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
|
+
{"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 defaultEntityContentGroupDefinitions,\n EntityContentBlueprint,\n EntityContextMenuItemBlueprint,\n EntityHeaderBlueprint,\n EntityContentGroupDefinitions,\n} from '@backstage/plugin-catalog-react/alpha';\nimport CategoryIcon from '@material-ui/icons/Category';\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 icon: <CategoryIcon fontSize=\"inherit\" />,\n title: 'Catalog',\n loader: async () => {\n const { NfsDefaultCatalogPage } = await import(\n '../components/CatalogPage/DefaultCatalogPage'\n );\n const filters = inputs.filters.map(filter =>\n filter.get(coreExtensionData.reactElement),\n );\n return (\n <NfsDefaultCatalogPage\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 EntityContentBlueprint.dataRefs.icon.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(\n z.record(\n z.string(),\n z.object({\n title: z.string(),\n icon: z.string().optional(),\n aliases: z.array(z.string()).optional(),\n contentOrder: z.enum(['title', 'natural']).optional(),\n }),\n ),\n )\n .optional(),\n defaultContentOrder: z =>\n z.enum(['title', 'natural']).optional().default('title'),\n showNavItemIcons: z => z.boolean().optional().default(false),\n },\n },\n factory(originalFactory, { config, inputs }) {\n return originalFactory({\n path: '/catalog/:namespace/:kind/:name',\n noHeader: true,\n title: 'Catalog Entity',\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 // 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 const groupDefinitions =\n config.groups?.reduce(\n (rest, group) => ({ ...rest, ...group }),\n {} as EntityContentGroupDefinitions,\n ) ?? defaultEntityContentGroupDefinitions;\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 groupDefinitions={groupDefinitions}\n defaultContentOrder={config.defaultContentOrder}\n showNavItemIcons={config.showNavItemIcons}\n >\n {inputs.contents.map(output => (\n <EntityLayout.Route\n group={output.get(EntityContentBlueprint.dataRefs.group)}\n key={output.get(coreExtensionData.routePath)}\n path={output.get(coreExtensionData.routePath)}\n title={output.get(EntityContentBlueprint.dataRefs.title)}\n icon={output.get(EntityContentBlueprint.dataRefs.icon)}\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 </EntityLayout>\n </AsyncEntityProvider>\n );\n };\n\n return <Component />;\n },\n });\n },\n});\n\nexport default [catalogPage, catalogEntityPage];\n"],"names":[],"mappings":";;;;;;;;;;AAsCO,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,QAA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uB,SAAS,KAAK,CAAA;AAAA,kBACvD,IAAA,EAAM,MAAA,CAAO,GAAA,CAAI,sBAAA,CAAuB,SAAS,IAAI,CAAA;AAAA,kBACrD,EAAA,EAAI,aAAA;AAAA,oBACF,MAAA,CAAO,GAAA;AAAA,sBACL,uBAAuB,QAAA,CAAS;AAAA,qBAClC;AAAA,oBACA,MAAA,CAAO,GAAA;AAAA,sBACL,uBAAuB,QAAA,CAAS;AAAA;AAClC,mBACF;AAAA,kBAEC,QAAA,EAAA,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,YAAY;AAAA,iBAAA;AAAA,gBAbrC,MAAA,CAAO,GAAA,CAAI,iBAAA,CAAkB,SAAS;AAAA,eAe9C;AAAA;AAAA,WACH,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;;;;"}
|
package/dist/alpha/plugin.esm.js
CHANGED
|
@@ -16,7 +16,7 @@ import contextMenuItems from './contextMenuItems.esm.js';
|
|
|
16
16
|
var plugin = createFrontendPlugin({
|
|
17
17
|
pluginId: "catalog",
|
|
18
18
|
title: "Catalog",
|
|
19
|
-
icon: /* @__PURE__ */ jsx(CategoryIcon, {}),
|
|
19
|
+
icon: /* @__PURE__ */ jsx(CategoryIcon, { fontSize: "inherit" }),
|
|
20
20
|
info: {
|
|
21
21
|
packageJson: () => import('../package.json.esm.js')
|
|
22
22
|
},
|
|
@@ -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 { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\nimport CategoryIcon from '@material-ui/icons/Category';\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 title: 'Catalog',\n icon: <CategoryIcon />,\n info: {\n packageJson: () => import('../../package.json'),\n },\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,KAAA,EAAO,SAAA;AAAA,EACP,IAAA,
|
|
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';\nimport { entityRouteRef } from '@backstage/plugin-catalog-react';\nimport CategoryIcon from '@material-ui/icons/Category';\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 title: 'Catalog',\n icon: <CategoryIcon fontSize=\"inherit\" />,\n info: {\n packageJson: () => import('../../package.json'),\n },\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,KAAA,EAAO,SAAA;AAAA,EACP,IAAA,kBAAM,GAAA,CAAC,YAAA,EAAA,EAAa,QAAA,EAAS,SAAA,EAAU,CAAA;AAAA,EACvC,IAAA,EAAM;AAAA,IACJ,WAAA,EAAa,MAAM,OAAO,wBAAoB;AAAA,GAChD;AAAA,EACA,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;;;;"}
|
|
@@ -74,15 +74,15 @@ const catalogTranslationRef = createTranslationRef({
|
|
|
74
74
|
},
|
|
75
75
|
dependencyOfComponentsCard: {
|
|
76
76
|
title: "Dependency of components",
|
|
77
|
-
emptyMessage: "No component depends on this component"
|
|
77
|
+
emptyMessage: "No component depends on this component."
|
|
78
78
|
},
|
|
79
79
|
dependsOnComponentsCard: {
|
|
80
80
|
title: "Depends on components",
|
|
81
|
-
emptyMessage: "No component is a dependency of this component"
|
|
81
|
+
emptyMessage: "No component is a dependency of this component."
|
|
82
82
|
},
|
|
83
83
|
dependsOnResourcesCard: {
|
|
84
84
|
title: "Depends on resources",
|
|
85
|
-
emptyMessage: "No resource is a dependency of this component"
|
|
85
|
+
emptyMessage: "No resource is a dependency of this component."
|
|
86
86
|
},
|
|
87
87
|
entityContextMenu: {
|
|
88
88
|
copiedMessage: "Copied!",
|
|
@@ -128,26 +128,26 @@ const catalogTranslationRef = createTranslationRef({
|
|
|
128
128
|
entityRelationWarningDescription: "This entity has relations to other entities, which can't be found in the catalog.\n Entities not found are: ",
|
|
129
129
|
hasComponentsCard: {
|
|
130
130
|
title: "Has components",
|
|
131
|
-
emptyMessage: "No component is part of this system"
|
|
131
|
+
emptyMessage: "No component is part of this system."
|
|
132
132
|
},
|
|
133
133
|
hasResourcesCard: {
|
|
134
134
|
title: "Has resources",
|
|
135
|
-
emptyMessage: "No resource is part of this system"
|
|
135
|
+
emptyMessage: "No resource is part of this system."
|
|
136
136
|
},
|
|
137
137
|
hasSubcomponentsCard: {
|
|
138
138
|
title: "Has subcomponents",
|
|
139
|
-
emptyMessage: "No subcomponent is part of this component"
|
|
139
|
+
emptyMessage: "No subcomponent is part of this component."
|
|
140
140
|
},
|
|
141
141
|
hasSubdomainsCard: {
|
|
142
142
|
title: "Has subdomains",
|
|
143
|
-
emptyMessage: "No subdomain is part of this domain"
|
|
143
|
+
emptyMessage: "No subdomain is part of this domain."
|
|
144
144
|
},
|
|
145
145
|
hasSystemsCard: {
|
|
146
146
|
title: "Has systems",
|
|
147
|
-
emptyMessage: "No system is part of this domain"
|
|
147
|
+
emptyMessage: "No system is part of this domain."
|
|
148
148
|
},
|
|
149
149
|
relatedEntitiesCard: {
|
|
150
|
-
emptyHelpLinkTitle: "Learn how to change this"
|
|
150
|
+
emptyHelpLinkTitle: "Learn how to change this."
|
|
151
151
|
},
|
|
152
152
|
systemDiagramCard: {
|
|
153
153
|
title: "System Diagram",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../../src/alpha/translation.ts"],"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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../../src/alpha/translation.ts"],"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 { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport const catalogTranslationRef = createTranslationRef({\n id: 'catalog',\n messages: {\n indexPage: {\n title: `{{orgName}} Catalog`,\n createButtonTitle: 'Create',\n supportButtonContent: 'All your software catalog entities',\n },\n entityPage: {\n notFoundMessage: 'There is no {{kind}} with the requested {{link}}.',\n notFoundLinkText: 'kind, namespace, and name',\n },\n aboutCard: {\n title: 'About',\n refreshButtonTitle: 'Schedule entity refresh',\n editButtonTitle: 'Edit Metadata',\n editButtonAriaLabel: 'Edit',\n createSimilarButtonTitle: 'Create something similar',\n refreshScheduledMessage: 'Refresh scheduled',\n refreshButtonAriaLabel: 'Refresh',\n launchTemplate: 'Launch Template',\n viewTechdocs: 'View TechDocs',\n viewSource: 'View Source',\n unknown: 'unknown',\n descriptionField: {\n label: 'Description',\n value: 'No description',\n },\n ownerField: {\n label: 'Owner',\n value: 'No Owner',\n },\n domainField: {\n label: 'Domain',\n value: 'No Domain',\n },\n systemField: {\n label: 'System',\n value: 'No System',\n },\n parentComponentField: {\n label: 'Parent Component',\n value: 'No Parent Component',\n },\n typeField: {\n label: 'Type',\n },\n lifecycleField: {\n label: 'Lifecycle',\n },\n tagsField: {\n label: 'Tags',\n value: 'No Tags',\n },\n targetsField: {\n label: 'Targets',\n },\n },\n searchResultItem: {\n kind: 'Kind',\n type: 'Type',\n lifecycle: 'Lifecycle',\n owner: 'Owner',\n },\n catalogTable: {\n warningPanelTitle: 'Could not fetch catalog entities.',\n viewActionTitle: 'View',\n editActionTitle: 'Edit',\n starActionTitle: 'Add to favorites',\n unStarActionTitle: 'Remove from favorites',\n allFilters: 'All',\n },\n dependencyOfComponentsCard: {\n title: 'Dependency of components',\n emptyMessage: 'No component depends on this component.',\n },\n dependsOnComponentsCard: {\n title: 'Depends on components',\n emptyMessage: 'No component is a dependency of this component.',\n },\n dependsOnResourcesCard: {\n title: 'Depends on resources',\n emptyMessage: 'No resource is a dependency of this component.',\n },\n entityContextMenu: {\n copiedMessage: 'Copied!',\n moreButtonTitle: 'More',\n inspectMenuTitle: 'Inspect entity',\n copyURLMenuTitle: 'Copy entity URL',\n unregisterMenuTitle: 'Unregister entity',\n moreButtonAriaLabel: 'more',\n },\n entityLabelsCard: {\n title: 'Labels',\n columnKeyLabel: 'Label',\n columnValueLabel: 'Value',\n emptyDescription:\n 'No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityLabels: {\n warningPanelTitle: 'Entity not found',\n ownerLabel: 'Owner',\n lifecycleLabel: 'Lifecycle',\n },\n entityLinksCard: {\n title: 'Links',\n emptyDescription:\n 'No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:',\n readMoreButtonTitle: 'Read more',\n },\n entityNotFound: {\n title: 'Entity was not found',\n description:\n 'Want to help us build this? Check out our Getting Started documentation.',\n docButtonTitle: 'DOCS',\n },\n entityTabs: {\n tabsAriaLabel: 'Tabs',\n },\n deleteEntity: {\n dialogTitle: 'Are you sure you want to delete this entity?',\n deleteButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n description:\n 'This entity is not referenced by any location and is therefore not receiving updates.',\n actionButtonTitle: 'Delete entity',\n },\n entityProcessingErrorsDescription: 'The error below originates from',\n entityRelationWarningDescription:\n \"This entity has relations to other entities, which can't be found in the catalog.\\n Entities not found are: \",\n hasComponentsCard: {\n title: 'Has components',\n emptyMessage: 'No component is part of this system.',\n },\n hasResourcesCard: {\n title: 'Has resources',\n emptyMessage: 'No resource is part of this system.',\n },\n hasSubcomponentsCard: {\n title: 'Has subcomponents',\n emptyMessage: 'No subcomponent is part of this component.',\n },\n hasSubdomainsCard: {\n title: 'Has subdomains',\n emptyMessage: 'No subdomain is part of this domain.',\n },\n hasSystemsCard: {\n title: 'Has systems',\n emptyMessage: 'No system is part of this domain.',\n },\n relatedEntitiesCard: {\n emptyHelpLinkTitle: 'Learn how to change this.',\n },\n systemDiagramCard: {\n title: 'System Diagram',\n description: 'Use pinch & zoom to move around the diagram.',\n edgeLabels: {\n partOf: 'part of',\n provides: 'provides',\n dependsOn: 'depends on',\n },\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,wBAAwB,oBAAA,CAAqB;AAAA,EACxD,EAAA,EAAI,SAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,SAAA,EAAW;AAAA,MACT,KAAA,EAAO,CAAA,mBAAA,CAAA;AAAA,MACP,iBAAA,EAAmB,QAAA;AAAA,MACnB,oBAAA,EAAsB;AAAA,KACxB;AAAA,IACA,UAAA,EAAY;AAAA,MACV,eAAA,EAAiB,mDAAA;AAAA,MACjB,gBAAA,EAAkB;AAAA,KACpB;AAAA,IACA,SAAA,EAAW;AAAA,MACT,KAAA,EAAO,OAAA;AAAA,MACP,kBAAA,EAAoB,yBAAA;AAAA,MACpB,eAAA,EAAiB,eAAA;AAAA,MACjB,mBAAA,EAAqB,MAAA;AAAA,MACrB,wBAAA,EAA0B,0BAAA;AAAA,MAC1B,uBAAA,EAAyB,mBAAA;AAAA,MACzB,sBAAA,EAAwB,SAAA;AAAA,MACxB,cAAA,EAAgB,iBAAA;AAAA,MAChB,YAAA,EAAc,eAAA;AAAA,MACd,UAAA,EAAY,aAAA;AAAA,MACZ,OAAA,EAAS,SAAA;AAAA,MACT,gBAAA,EAAkB;AAAA,QAChB,KAAA,EAAO,aAAA;AAAA,QACP,KAAA,EAAO;AAAA,OACT;AAAA,MACA,UAAA,EAAY;AAAA,QACV,KAA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;AAAA,KAChB;AAAA,IACA,oBAAA,EAAsB;AAAA,MACpB,KAAA,EAAO,mBAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO,gBAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,KAAA,EAAO,aAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,mBAAA,EAAqB;AAAA,MACnB,kBAAA,EAAoB;AAAA,KACtB;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO,gBAAA;AAAA,MACP,WAAA,EAAa,8CAAA;AAAA,MACb,UAAA,EAAY;AAAA,QACV,MAAA,EAAQ,SAAA;AAAA,QACR,QAAA,EAAU,UAAA;AAAA,QACV,SAAA,EAAW;AAAA;AACb;AACF;AAEJ,CAAC;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
1
2
|
import * as _backstage_plugin_search_react_alpha from '@backstage/plugin-search-react/alpha';
|
|
2
3
|
import * as _backstage_core_components from '@backstage/core-components';
|
|
3
4
|
import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
|
|
4
5
|
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
5
6
|
import * as _backstage_filter_predicates from '@backstage/filter-predicates';
|
|
6
7
|
import * as react from 'react';
|
|
7
|
-
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
8
8
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
9
9
|
|
|
10
10
|
/** @alpha */
|
|
@@ -725,7 +725,10 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
|
|
|
725
725
|
}>;
|
|
726
726
|
}>;
|
|
727
727
|
|
|
728
|
-
/**
|
|
728
|
+
/**
|
|
729
|
+
* @alpha
|
|
730
|
+
* @deprecated Import from `@backstage/plugin-catalog` instead.
|
|
731
|
+
*/
|
|
729
732
|
declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"catalog", {
|
|
730
733
|
readonly "deleteEntity.description": "This entity is not referenced by any location and is therefore not receiving updates.";
|
|
731
734
|
readonly "deleteEntity.cancelButtonTitle": "Cancel";
|
|
@@ -774,11 +777,11 @@ declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationR
|
|
|
774
777
|
readonly "catalogTable.starActionTitle": "Add to favorites";
|
|
775
778
|
readonly "catalogTable.unStarActionTitle": "Remove from favorites";
|
|
776
779
|
readonly "dependencyOfComponentsCard.title": "Dependency of components";
|
|
777
|
-
readonly "dependencyOfComponentsCard.emptyMessage": "No component depends on this component";
|
|
780
|
+
readonly "dependencyOfComponentsCard.emptyMessage": "No component depends on this component.";
|
|
778
781
|
readonly "dependsOnComponentsCard.title": "Depends on components";
|
|
779
|
-
readonly "dependsOnComponentsCard.emptyMessage": "No component is a dependency of this component";
|
|
782
|
+
readonly "dependsOnComponentsCard.emptyMessage": "No component is a dependency of this component.";
|
|
780
783
|
readonly "dependsOnResourcesCard.title": "Depends on resources";
|
|
781
|
-
readonly "dependsOnResourcesCard.emptyMessage": "No resource is a dependency of this component";
|
|
784
|
+
readonly "dependsOnResourcesCard.emptyMessage": "No resource is a dependency of this component.";
|
|
782
785
|
readonly "entityContextMenu.copiedMessage": "Copied!";
|
|
783
786
|
readonly "entityContextMenu.moreButtonTitle": "More";
|
|
784
787
|
readonly "entityContextMenu.inspectMenuTitle": "Inspect entity";
|
|
@@ -803,16 +806,16 @@ declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationR
|
|
|
803
806
|
readonly entityProcessingErrorsDescription: "The error below originates from";
|
|
804
807
|
readonly entityRelationWarningDescription: "This entity has relations to other entities, which can't be found in the catalog.\n Entities not found are: ";
|
|
805
808
|
readonly "hasComponentsCard.title": "Has components";
|
|
806
|
-
readonly "hasComponentsCard.emptyMessage": "No component is part of this system";
|
|
809
|
+
readonly "hasComponentsCard.emptyMessage": "No component is part of this system.";
|
|
807
810
|
readonly "hasResourcesCard.title": "Has resources";
|
|
808
|
-
readonly "hasResourcesCard.emptyMessage": "No resource is part of this system";
|
|
811
|
+
readonly "hasResourcesCard.emptyMessage": "No resource is part of this system.";
|
|
809
812
|
readonly "hasSubcomponentsCard.title": "Has subcomponents";
|
|
810
|
-
readonly "hasSubcomponentsCard.emptyMessage": "No subcomponent is part of this component";
|
|
813
|
+
readonly "hasSubcomponentsCard.emptyMessage": "No subcomponent is part of this component.";
|
|
811
814
|
readonly "hasSubdomainsCard.title": "Has subdomains";
|
|
812
|
-
readonly "hasSubdomainsCard.emptyMessage": "No subdomain is part of this domain";
|
|
815
|
+
readonly "hasSubdomainsCard.emptyMessage": "No subdomain is part of this domain.";
|
|
813
816
|
readonly "hasSystemsCard.title": "Has systems";
|
|
814
|
-
readonly "hasSystemsCard.emptyMessage": "No system is part of this domain";
|
|
815
|
-
readonly "relatedEntitiesCard.emptyHelpLinkTitle": "Learn how to change this";
|
|
817
|
+
readonly "hasSystemsCard.emptyMessage": "No system is part of this domain.";
|
|
818
|
+
readonly "relatedEntitiesCard.emptyHelpLinkTitle": "Learn how to change this.";
|
|
816
819
|
readonly "systemDiagramCard.title": "System Diagram";
|
|
817
820
|
readonly "systemDiagramCard.description": "Use pinch & zoom to move around the diagram.";
|
|
818
821
|
readonly "systemDiagramCard.edgeLabels.dependsOn": "depends on";
|
package/dist/alpha.esm.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { default } from './alpha/plugin.esm.js';
|
|
2
|
-
|
|
2
|
+
import { catalogTranslationRef as catalogTranslationRef$1 } from './alpha/translation.esm.js';
|
|
3
|
+
|
|
4
|
+
const catalogTranslationRef = catalogTranslationRef$1;
|
|
5
|
+
|
|
6
|
+
export { catalogTranslationRef };
|
|
3
7
|
//# sourceMappingURL=alpha.esm.js.map
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.ts"],"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\nexport { default } from './plugin';\n\nimport { catalogTranslationRef as _catalogTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-catalog` instead.\n */\nexport const catalogTranslationRef = _catalogTranslationRef;\n"],"names":["_catalogTranslationRef"],"mappings":";;;AAwBO,MAAM,qBAAA,GAAwBA;;;;"}
|