@backstage/plugin-catalog 1.34.0-next.1 → 2.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @backstage/plugin-catalog
2
2
 
3
+ ## 2.0.0-next.2
4
+
5
+ ### Major Changes
6
+
7
+ - 5fc35bb: Migrated `EntityAboutCard`, `EntityLinksCard`, `EntityLabelsCard`, `GroupProfileCard`, and `UserProfileCard` from MUI/InfoCard to use the new BUI card layout and BUI components where possible.
8
+
9
+ **BREAKING**: Removed `variant` prop from EntityAboutCard, EntityUserProfileCard, EntityGroupProfileCard, EntityLabelsCard, EntityLinksCard. Removed `gridSizes` prop from `AboutField`.
10
+
11
+ **Migration:**
12
+
13
+ Simply delete the obsolete `variant` and `gridSizes` props, e.g:
14
+
15
+ ```diff
16
+ - <EntityAboutCard variant="gridItem" />
17
+ + <EntityAboutCard />
18
+ ```
19
+
20
+ ```diff
21
+ - <AboutField label="Owner" gridSizes={{ xs: 12, sm: 6, lg: 4 }} />
22
+ + <AboutField label="Owner" />
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+ - @backstage/core-compat-api@0.5.9-next.2
29
+ - @backstage/ui@0.13.0-next.2
30
+ - @backstage/frontend-plugin-api@0.15.0-next.1
31
+ - @backstage/core-plugin-api@1.12.4-next.1
32
+ - @backstage/catalog-client@1.14.0-next.2
33
+ - @backstage/plugin-catalog-react@2.1.0-next.2
34
+ - @backstage/core-components@0.18.8-next.1
35
+ - @backstage/plugin-scaffolder-common@2.0.0-next.2
36
+ - @backstage/plugin-search-react@1.10.5-next.1
37
+ - @backstage/plugin-techdocs-react@1.3.9-next.1
38
+
3
39
  ## 1.34.0-next.1
4
40
 
5
41
  ### Minor Changes
@@ -41,7 +41,7 @@ const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({
41
41
  },
42
42
  async loader() {
43
43
  const { InternalAboutCard } = await import('../components/AboutCard/AboutCard.esm.js');
44
- return /* @__PURE__ */ jsx(InternalAboutCard, { variant: "gridItem", subheader: /* @__PURE__ */ jsx(Subheader, {}) });
44
+ return /* @__PURE__ */ jsx(InternalAboutCard, { iconLinks: /* @__PURE__ */ jsx(Subheader, {}) });
45
45
  }
46
46
  });
47
47
  }
@@ -51,7 +51,7 @@ const catalogLinksEntityCard = EntityCardBlueprint.make({
51
51
  params: {
52
52
  type: "info",
53
53
  filter: { "metadata.links": { $exists: true } },
54
- loader: async () => import('../components/EntityLinksCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.EntityLinksCard, { variant: "gridItem" }))
54
+ loader: async () => import('../components/EntityLinksCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.EntityLinksCard, {}))
55
55
  }
56
56
  });
57
57
  const catalogLabelsEntityCard = EntityCardBlueprint.make({
@@ -59,7 +59,7 @@ const catalogLabelsEntityCard = EntityCardBlueprint.make({
59
59
  params: {
60
60
  type: "info",
61
61
  filter: { "metadata.labels": { $exists: true } },
62
- loader: async () => import('../components/EntityLabelsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.EntityLabelsCard, { variant: "gridItem" }))
62
+ loader: async () => import('../components/EntityLabelsCard/index.esm.js').then((m) => /* @__PURE__ */ jsx(m.EntityLabelsCard, {}))
63
63
  }
64
64
  });
65
65
  const catalogDependsOnComponentsEntityCard = 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 {\n EntityIconLinkBlueprint,\n EntityCardBlueprint,\n} from '@backstage/plugin-catalog-react/alpha';\nimport { createExtensionInput } from '@backstage/frontend-plugin-api';\nimport {\n HeaderIconLinkRow,\n IconLinkVerticalProps,\n} from '@backstage/core-components';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { buildFilterFn } from './filter/FilterWrapper';\n\nexport const catalogAboutEntityCard = EntityCardBlueprint.makeWithOverrides({\n name: 'about',\n inputs: {\n iconLinks: createExtensionInput([\n EntityIconLinkBlueprint.dataRefs.filterFunction.optional(),\n EntityIconLinkBlueprint.dataRefs.filterExpression.optional(),\n EntityIconLinkBlueprint.dataRefs.useProps,\n ]),\n },\n factory(originalFactory, { inputs }) {\n function Subheader() {\n const { entity } = useEntity();\n // The \"useProps\" functions may be calling other hooks, so we need to\n // call them in a component function to avoid breaking the rules of hooks.\n const links = inputs.iconLinks.reduce((rest, iconLink) => {\n const filter = buildFilterFn(\n iconLink.get(EntityIconLinkBlueprint.dataRefs.filterFunction),\n iconLink.get(EntityIconLinkBlueprint.dataRefs.filterExpression),\n );\n if (filter(entity)) {\n const props = iconLink.get(\n EntityIconLinkBlueprint.dataRefs.useProps,\n )();\n return [...rest, props];\n }\n return rest;\n }, new Array<IconLinkVerticalProps>());\n return links.length ? <HeaderIconLinkRow links={links} /> : null;\n }\n return originalFactory({\n type: 'info',\n filter: {\n $not: {\n kind: { $in: ['user', 'group'] },\n },\n },\n async loader() {\n const { InternalAboutCard } = await import(\n '../components/AboutCard/AboutCard'\n );\n return (\n <InternalAboutCard variant=\"gridItem\" subheader={<Subheader />} />\n );\n },\n });\n },\n});\n\nexport const catalogLinksEntityCard = EntityCardBlueprint.make({\n name: 'links',\n params: {\n type: 'info',\n filter: { 'metadata.links': { $exists: true } },\n loader: async () =>\n import('../components/EntityLinksCard').then(m => (\n <m.EntityLinksCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogLabelsEntityCard = EntityCardBlueprint.make({\n name: 'labels',\n params: {\n type: 'info',\n filter: { 'metadata.labels': { $exists: true } },\n loader: async () =>\n import('../components/EntityLabelsCard').then(m => (\n <m.EntityLabelsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogDependsOnComponentsEntityCard = EntityCardBlueprint.make({\n name: 'depends-on-components',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/DependsOnComponentsCard').then(m => (\n <m.DependsOnComponentsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogDependsOnResourcesEntityCard = EntityCardBlueprint.make({\n name: 'depends-on-resources',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/DependsOnResourcesCard').then(m => (\n <m.DependsOnResourcesCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasComponentsEntityCard = EntityCardBlueprint.make({\n name: 'has-components',\n params: {\n filter: { kind: 'system' },\n loader: async () =>\n import('../components/HasComponentsCard').then(m => (\n <m.HasComponentsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasResourcesEntityCard = EntityCardBlueprint.make({\n name: 'has-resources',\n params: {\n filter: { kind: 'system' },\n loader: async () =>\n import('../components/HasResourcesCard').then(m => (\n <m.HasResourcesCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasSubcomponentsEntityCard = EntityCardBlueprint.make({\n name: 'has-subcomponents',\n params: {\n filter: { kind: 'component' },\n loader: async () =>\n import('../components/HasSubcomponentsCard').then(m => (\n <m.HasSubcomponentsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasSubdomainsEntityCard = EntityCardBlueprint.make({\n name: 'has-subdomains',\n params: {\n filter: { kind: 'domain' },\n loader: async () =>\n import('../components/HasSubdomainsCard').then(m => (\n <m.HasSubdomainsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport const catalogHasSystemsEntityCard = EntityCardBlueprint.make({\n name: 'has-systems',\n params: {\n filter: { kind: 'domain' },\n loader: async () =>\n import('../components/HasSystemsCard').then(m => (\n <m.HasSystemsCard variant=\"gridItem\" />\n )),\n },\n});\n\nexport default [\n catalogAboutEntityCard,\n catalogLinksEntityCard,\n catalogLabelsEntityCard,\n catalogDependsOnComponentsEntityCard,\n catalogDependsOnResourcesEntityCard,\n catalogHasComponentsEntityCard,\n catalogHasResourcesEntityCard,\n catalogHasSubcomponentsEntityCard,\n catalogHasSubdomainsEntityCard,\n catalogHasSystemsEntityCard,\n];\n"],"names":[],"mappings":";;;;;;;AA4BO,MAAM,sBAAA,GAAyB,oBAAoB,iBAAA,CAAkB;AAAA,EAC1E,IAAA,EAAM,OAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,WAAW,oBAAA,CAAqB;AAAA,MAC9B,uBAAA,CAAwB,QAAA,CAAS,cAAA,CAAe,QAAA,EAAS;AAAA,MACzD,uBAAA,CAAwB,QAAA,CAAS,gBAAA,CAAiB,QAAA,EAAS;AAAA,MAC3D,wBAAwB,QAAA,CAAS;AAAA,KAClC;AAAA,GACH;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,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A,EAAF,EAAiB,OAAA,EAAQ,YAAW,CACtC;AAAA;AAEP,CAAC;AAED,kBAAe;AAAA,EACb,sBAAA;AAAA,EACA,sBAAA;AAAA,EACA,uBAAA;AAAA,EACA,oCAAA;AAAA,EACA,mCAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,iCAAA;AAAA,EACA,8BAAA;AAAA,EACA;AACF,CAAA;;;;"}
1
+ {"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;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A,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,IACzB,MAAA,EAAQ,YACN,OAAO,8CAAiC,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC7C,GAAA,CAAC,CAAA,CAAE,iBAAA,EAAF,EAAoB,OAAA,EAAQ,YAAW,CACzC;AAAA;AAEP,CAAC;AAEM,MAAM,2BAAA,GAA8B,oBAAoB,IAAA,CAAK;AAAA,EAClE,IAAA,EAAM,aAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,IACzB,MAAA,EAAQ,YACN,OAAO,2CAA8B,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAC1C,GAAA,CAAC,CAAA,CAAE,cAAA,EAAF,EAAiB,OAAA,EAAQ,YAAW,CACtC;AAAA;AAEP,CAAC;AAED,kBAAe;AAAA,EACb,sBAAA;AAAA,EACA,sBAAA;AAAA,EACA,uBAAA;AAAA,EACA,oCAAA;AAAA,EACA,mCAAA;AAAA,EACA,8BAAA;AAAA,EACA,6BAAA;AAAA,EACA,iCAAA;AAAA,EACA,8BAAA;AAAA,EACA;AACF,CAAA;;;;"}
@@ -94,6 +94,8 @@ const catalogTranslationRef = createTranslationRef({
94
94
  },
95
95
  entityLabelsCard: {
96
96
  title: "Labels",
97
+ columnKeyLabel: "Label",
98
+ columnValueLabel: "Value",
97
99
  emptyDescription: "No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:",
98
100
  readMoreButtonTitle: "Read more"
99
101
  },
@@ -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/** @alpha */\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 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,KAAA,EAAO,OAAA;AAAA,QACP,KAAA,EAAO;AAAA,OACT;AAAA,MACA,WAAA,EAAa;AAAA,QACX,KAAA,EAAO,QAAA;AAAA,QACP,KAAA,EAAO;AAAA,OACT;AAAA,MACA,WAAA,EAAa;AAAA,QACX,KAAA,EAAO,QAAA;AAAA,QACP,KAAA,EAAO;AAAA,OACT;AAAA,MACA,oBAAA,EAAsB;AA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AAA,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;;;;"}
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/** @alpha */\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,u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;AAAA,MACnB,WAAA,EACE,uFAAA;AAAA,MACF,iBAAA,EAAmB;AAAA,KACrB;AAAA,IACA,iCAAA,EAAmC,iCAAA;AAAA,IACnC,gCAAA,EACE,8GAAA;AAAA,IACF,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO,gBAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,KAAA,EAAO,eAAA;AAAA,MACP,YAAA,EAAc;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
@@ -611,7 +611,6 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
611
611
  kind: "page";
612
612
  name: undefined;
613
613
  params: {
614
- defaultPath?: [Error: `Use the 'path' param instead`];
615
614
  path: string;
616
615
  title?: string;
617
616
  icon?: _backstage_frontend_plugin_api.IconElement;
@@ -699,7 +698,6 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
699
698
  kind: "page";
700
699
  name: "entity";
701
700
  params: {
702
- defaultPath?: [Error: `Use the 'path' param instead`];
703
701
  path: string;
704
702
  title?: string;
705
703
  icon?: _backstage_frontend_plugin_api.IconElement;
@@ -789,6 +787,8 @@ declare const catalogTranslationRef: _backstage_frontend_plugin_api.TranslationR
789
787
  readonly "entityContextMenu.moreButtonAriaLabel": "more";
790
788
  readonly "entityLabelsCard.title": "Labels";
791
789
  readonly "entityLabelsCard.readMoreButtonTitle": "Read more";
790
+ readonly "entityLabelsCard.columnKeyLabel": "Label";
791
+ readonly "entityLabelsCard.columnValueLabel": "Value";
792
792
  readonly "entityLabelsCard.emptyDescription": "No labels defined for this entity. You can add labels to your entity YAML as shown in the highlighted example below:";
793
793
  readonly "entityLabels.ownerLabel": "Owner";
794
794
  readonly "entityLabels.warningPanelTitle": "Entity not found";
@@ -1,21 +1,16 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { useCallback } from 'react';
3
- import { makeStyles } from '@material-ui/core/styles';
4
- import Card from '@material-ui/core/Card';
5
- import CardContent from '@material-ui/core/CardContent';
6
- import CardHeader from '@material-ui/core/CardHeader';
7
- import Divider from '@material-ui/core/Divider';
8
3
  import IconButton from '@material-ui/core/IconButton';
9
4
  import CachedIcon from '@material-ui/icons/Cached';
10
5
  import EditIcon from '@material-ui/icons/Edit';
11
6
  import DocsIcon from '@material-ui/icons/Description';
12
7
  import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
13
8
  import { Link, AppIcon, HeaderIconLinkRow } from '@backstage/core-components';
9
+ import { useEntity, catalogApiRef, EntityInfoCard, getEntitySourceLocation } from '@backstage/plugin-catalog-react';
14
10
  import { useApi, alertApiRef, errorApiRef, useRouteRef, useApp } from '@backstage/core-plugin-api';
15
11
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
16
12
  import { scmIntegrationsApiRef, ScmIntegrationIcon } from '@backstage/integration-react';
17
13
  import { ANNOTATION_EDIT_URL, ANNOTATION_LOCATION, stringifyEntityRef, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
18
- import { useEntity, catalogApiRef, getEntitySourceLocation } from '@backstage/plugin-catalog-react';
19
14
  import { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';
20
15
  import { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';
21
16
  import { TECHDOCS_ANNOTATION, TECHDOCS_EXTERNAL_ANNOTATION } from '@backstage/plugin-techdocs-common';
@@ -27,7 +22,16 @@ import { createFromTemplateRouteRef, viewTechDocRouteRef } from '../../routes.es
27
22
  import { catalogTranslationRef } from '../../alpha/translation.esm.js';
28
23
  import { useSourceTemplateCompoundEntityRef } from './hooks.esm.js';
29
24
  import { AboutContent } from './AboutContent.esm.js';
25
+ import { makeStyles } from '@material-ui/core/styles';
30
26
 
27
+ const useStyles = makeStyles({
28
+ linkContainer: {
29
+ border: "1px solid var(--bui-border-1)",
30
+ borderLeft: "none",
31
+ borderRight: "none",
32
+ marginBottom: "var(--bui-space-6)"
33
+ }
34
+ });
31
35
  function useCatalogSourceIconLinkProps() {
32
36
  const { entity } = useEntity();
33
37
  const scmIntegrationsApi = useApi(scmIntegrationsApiRef);
@@ -84,28 +88,8 @@ function DefaultAboutCardSubheader() {
84
88
  }
85
89
  return /* @__PURE__ */ jsx(HeaderIconLinkRow, { links });
86
90
  }
87
- const useStyles = makeStyles({
88
- gridItemCard: {
89
- display: "flex",
90
- flexDirection: "column",
91
- height: "calc(100% - 10px)",
92
- // for pages without content header
93
- marginBottom: "10px"
94
- },
95
- fullHeightCard: {
96
- display: "flex",
97
- flexDirection: "column",
98
- height: "100%"
99
- },
100
- gridItemCardContent: {
101
- flex: 1
102
- },
103
- fullHeightCardContent: {
104
- flex: 1
105
- }
106
- });
107
91
  function InternalAboutCard(props) {
108
- const { variant, subheader } = props;
92
+ const { iconLinks } = props;
109
93
  const classes = useStyles();
110
94
  const { entity } = useEntity();
111
95
  const catalogApi = useApi(catalogApiRef);
@@ -118,18 +102,6 @@ function InternalAboutCard(props) {
118
102
  );
119
103
  const { t } = useTranslationRef(catalogTranslationRef);
120
104
  const entityMetadataEditUrl = entity.metadata.annotations?.[ANNOTATION_EDIT_URL];
121
- let cardClass = "";
122
- if (variant === "gridItem") {
123
- cardClass = classes.gridItemCard;
124
- } else if (variant === "fullHeight") {
125
- cardClass = classes.fullHeightCard;
126
- }
127
- let cardContentClass = "";
128
- if (variant === "gridItem") {
129
- cardContentClass = classes.gridItemCardContent;
130
- } else if (variant === "fullHeight") {
131
- cardContentClass = classes.fullHeightCardContent;
132
- }
133
105
  const entityLocation = entity.metadata.annotations?.[ANNOTATION_LOCATION];
134
106
  const allowRefresh = entityLocation?.startsWith("url:") || entityLocation?.startsWith("file:");
135
107
  const refreshEntity = useCallback(async () => {
@@ -144,54 +116,53 @@ function InternalAboutCard(props) {
144
116
  errorApi.post(e);
145
117
  }
146
118
  }, [catalogApi, entity, alertApi, t, errorApi]);
147
- return /* @__PURE__ */ jsxs(Card, { className: cardClass, children: [
148
- /* @__PURE__ */ jsx(
149
- CardHeader,
150
- {
151
- title: t("aboutCard.title"),
152
- action: /* @__PURE__ */ jsxs(Fragment, { children: [
153
- allowRefresh && canRefresh && /* @__PURE__ */ jsx(
154
- IconButton,
155
- {
156
- "aria-label": t("aboutCard.refreshButtonAriaLabel"),
157
- title: t("aboutCard.refreshButtonTitle"),
158
- onClick: refreshEntity,
159
- children: /* @__PURE__ */ jsx(CachedIcon, {})
160
- }
161
- ),
162
- /* @__PURE__ */ jsx(
163
- IconButton,
164
- {
165
- component: Link,
166
- "aria-label": t("aboutCard.editButtonAriaLabel"),
167
- disabled: !entityMetadataEditUrl,
168
- title: t("aboutCard.editButtonTitle"),
169
- to: entityMetadataEditUrl ?? "#",
170
- children: /* @__PURE__ */ jsx(EditIcon, {})
171
- }
172
- ),
173
- sourceTemplateRef && templateRoute && /* @__PURE__ */ jsx(
174
- IconButton,
175
- {
176
- component: Link,
177
- title: t("aboutCard.createSimilarButtonTitle"),
178
- to: templateRoute({
179
- namespace: sourceTemplateRef.namespace,
180
- templateName: sourceTemplateRef.name
181
- }),
182
- children: /* @__PURE__ */ jsx(AppIcon, { id: "scaffolder" })
183
- }
184
- )
185
- ] }),
186
- subheader: subheader ?? /* @__PURE__ */ jsx(DefaultAboutCardSubheader, {})
187
- }
188
- ),
189
- /* @__PURE__ */ jsx(Divider, {}),
190
- /* @__PURE__ */ jsx(CardContent, { className: cardContentClass, children: /* @__PURE__ */ jsx(AboutContent, { entity }) })
191
- ] });
119
+ return /* @__PURE__ */ jsxs(
120
+ EntityInfoCard,
121
+ {
122
+ title: t("aboutCard.title"),
123
+ headerActions: /* @__PURE__ */ jsxs(Fragment, { children: [
124
+ allowRefresh && canRefresh && /* @__PURE__ */ jsx(
125
+ IconButton,
126
+ {
127
+ "aria-label": t("aboutCard.refreshButtonAriaLabel"),
128
+ title: t("aboutCard.refreshButtonTitle"),
129
+ onClick: refreshEntity,
130
+ children: /* @__PURE__ */ jsx(CachedIcon, {})
131
+ }
132
+ ),
133
+ /* @__PURE__ */ jsx(
134
+ IconButton,
135
+ {
136
+ component: Link,
137
+ "aria-label": t("aboutCard.editButtonAriaLabel"),
138
+ disabled: !entityMetadataEditUrl,
139
+ title: t("aboutCard.editButtonTitle"),
140
+ to: entityMetadataEditUrl ?? "#",
141
+ children: /* @__PURE__ */ jsx(EditIcon, {})
142
+ }
143
+ ),
144
+ sourceTemplateRef && templateRoute && /* @__PURE__ */ jsx(
145
+ IconButton,
146
+ {
147
+ component: Link,
148
+ title: t("aboutCard.createSimilarButtonTitle"),
149
+ to: templateRoute({
150
+ namespace: sourceTemplateRef.namespace,
151
+ templateName: sourceTemplateRef.name
152
+ }),
153
+ children: /* @__PURE__ */ jsx(AppIcon, { id: "scaffolder" })
154
+ }
155
+ )
156
+ ] }),
157
+ children: [
158
+ /* @__PURE__ */ jsx("div", { className: classes.linkContainer, children: iconLinks ?? /* @__PURE__ */ jsx(DefaultAboutCardSubheader, {}) }),
159
+ /* @__PURE__ */ jsx(AboutContent, { entity })
160
+ ]
161
+ }
162
+ );
192
163
  }
193
- function AboutCard(props) {
194
- return /* @__PURE__ */ jsx(InternalAboutCard, { ...props });
164
+ function AboutCard() {
165
+ return /* @__PURE__ */ jsx(InternalAboutCard, {});
195
166
  }
196
167
 
197
168
  export { AboutCard, InternalAboutCard, useCatalogSourceIconLinkProps };
@@ -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 */\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={t('aboutCard.refreshButtonAriaLabel')}\n title={t('aboutCard.refreshButtonTitle')}\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n <IconButton\n component={Link}\n aria-label={t('aboutCard.editButtonAriaLabel')}\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,6BAAA,GAAgC;AAC9C,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,kBAAA,GAAqB,OAAO,qBAAqB,CAAA;AACvD,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AACrD,EAAA,MAAM,oBAAA,GAAuB,uBAAA;AAAA,IAC3B,MAAA;AAAA,IACA;AAAA,GACF;AACA,EAAA,OAAO;AAAA,IACL,KAAA,EAAO,EAAE,sBAAsB,CAAA;AAAA,IAC/B,UAAU,CAAC,oBAAA;AAAA,IACX,IAAA,kBAAM,GAAA,CAAC,kBAAA,EAAA,EAAmB,IAAA,EAAM,sBAAsB,eAAA,EAAiB,CAAA;AAAA,IACvE,MAAM,oBAAA,EAAsB;AAAA,GAC9B;AACF;AAIA,SAAS,8BAAA,GAAwD;AAC/D,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,eAAA,GAAkB,YAAY,mBAAmB,CAAA;AACvD,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,OAAO;AAAA,IACL,KAAA,EAAO,EAAE,wBAAwB,CAAA;AAAA,IACjC,QAAA,EACE,EACE,MAAA,CAAO,QAAA,CA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EAAQ,CAAA;AAAA,wBACR,WAAA,EAAA,EAAY,SAAA,EAAW,kBACtB,QAAA,kBAAA,GAAA,CAAC,YAAA,EAAA,EAAa,QAAgB,CAAA,EAChC;AAAA,GAAA,EACF,CAAA;AAEJ;AASO,SAAS,UAAU,KAAA,EAAuB;AAC/C,EAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AACvC;;;;"}
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 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 Link,\n} from '@backstage/core-components';\nimport { EntityInfoCard } from '@backstage/plugin-catalog-react';\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';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles({\n linkContainer: {\n border: '1px solid var(--bui-border-1)',\n borderLeft: 'none',\n borderRight: 'none',\n marginBottom: 'var(--bui-space-6)',\n },\n});\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\nexport interface InternalAboutCardProps {\n /** Icon link row rendered at the top of the card body. */\n iconLinks?: JSX.Element;\n}\n\nexport function InternalAboutCard(props: InternalAboutCardProps) {\n const { iconLinks } = 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 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 <EntityInfoCard\n title={t('aboutCard.title')}\n headerActions={\n <>\n {allowRefresh && canRefresh && (\n <IconButton\n aria-label={t('aboutCard.refreshButtonAriaLabel')}\n title={t('aboutCard.refreshButtonTitle')}\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n <IconButton\n component={Link}\n aria-label={t('aboutCard.editButtonAriaLabel')}\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 >\n <div className={classes.linkContainer}>\n {iconLinks ?? <DefaultAboutCardSubheader />}\n </div>\n <AboutContent entity={entity} />\n </EntityInfoCard>\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 props\n * and customizability. If you need to tweak it, consider making a bespoke card\n * in your own repository instead, that is perfect for your own needs.\n */\nexport function AboutCard() {\n return <InternalAboutCard />;\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4EA,MAAM,YA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eACrB,QAAA,EAAA,SAAA,oBAAa,GAAA,CAAC,6BAA0B,CAAA,EAC3C,CAAA;AAAA,wBACA,GAAA,CAAC,gBAAa,MAAA,EAAgB;AAAA;AAAA;AAAA,GAChC;AAEJ;AASO,SAAS,SAAA,GAAY;AAC1B,EAAA,2BAAQ,iBAAA,EAAA,EAAkB,CAAA;AAC5B;;;;"}
@@ -2,8 +2,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { RELATION_PART_OF, RELATION_OWNED_BY, getEntitySourceLocation } from '@backstage/catalog-model';
3
3
  import { getEntityRelations, EntityRefLinks } from '@backstage/plugin-catalog-react';
4
4
  import Chip from '@material-ui/core/Chip';
5
- import Grid from '@material-ui/core/Grid';
6
5
  import { makeStyles } from '@material-ui/core/styles';
6
+ import { Grid } from '@backstage/ui';
7
7
  import { MarkdownContent } from '@backstage/core-components';
8
8
  import { AboutField } from './AboutField.esm.js';
9
9
  import { LinksGridList } from '../EntityLinksCard/LinksGridList.esm.js';
@@ -56,28 +56,21 @@ function AboutContent(props) {
56
56
  } catch (e) {
57
57
  entitySourceLocation = void 0;
58
58
  }
59
- return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
60
- /* @__PURE__ */ jsx(
61
- AboutField,
59
+ const columns = { initial: "1", sm: "2", lg: "3" };
60
+ return /* @__PURE__ */ jsxs(Grid.Root, { columns, gap: "3", children: [
61
+ /* @__PURE__ */ jsx(Grid.Item, { colSpan: columns, children: /* @__PURE__ */ jsx(AboutField, { label: t("aboutCard.descriptionField.label"), children: /* @__PURE__ */ jsx(
62
+ MarkdownContent,
62
63
  {
63
- label: t("aboutCard.descriptionField.label"),
64
- gridSizes: { xs: 12 },
65
- children: /* @__PURE__ */ jsx(
66
- MarkdownContent,
67
- {
68
- className: classes.description,
69
- content: entity?.metadata?.description || t("aboutCard.descriptionField.value")
70
- }
71
- )
64
+ className: classes.description,
65
+ content: entity?.metadata?.description || t("aboutCard.descriptionField.value")
72
66
  }
73
- ),
67
+ ) }) }),
74
68
  /* @__PURE__ */ jsx(
75
69
  AboutField,
76
70
  {
77
71
  label: t("aboutCard.ownerField.label"),
78
72
  value: t("aboutCard.ownerField.value"),
79
73
  className: classes.description,
80
- gridSizes: { xs: 12, sm: 6, lg: 4 },
81
74
  children: ownedByRelations.length > 0 && /* @__PURE__ */ jsx(EntityRefLinks, { entityRefs: ownedByRelations, defaultKind: "group" })
82
75
  }
83
76
  ),
@@ -86,7 +79,6 @@ function AboutContent(props) {
86
79
  {
87
80
  label: t("aboutCard.domainField.label"),
88
81
  value: t("aboutCard.domainField.value"),
89
- gridSizes: { xs: 12, sm: 6, lg: 4 },
90
82
  children: partOfDomainRelations.length > 0 && /* @__PURE__ */ jsx(
91
83
  EntityRefLinks,
92
84
  {
@@ -101,7 +93,6 @@ function AboutContent(props) {
101
93
  {
102
94
  label: t("aboutCard.systemField.label"),
103
95
  value: t("aboutCard.systemField.value"),
104
- gridSizes: { xs: 12, sm: 6, lg: 4 },
105
96
  children: partOfSystemRelations.length > 0 && /* @__PURE__ */ jsx(
106
97
  EntityRefLinks,
107
98
  {
@@ -116,7 +107,6 @@ function AboutContent(props) {
116
107
  {
117
108
  label: t("aboutCard.parentComponentField.label"),
118
109
  value: t("aboutCard.parentComponentField.value"),
119
- gridSizes: { xs: 12, sm: 6, lg: 4 },
120
110
  children: /* @__PURE__ */ jsx(
121
111
  EntityRefLinks,
122
112
  {
@@ -130,16 +120,14 @@ function AboutContent(props) {
130
120
  AboutField,
131
121
  {
132
122
  label: t("aboutCard.typeField.label"),
133
- value: entity?.spec?.type,
134
- gridSizes: { xs: 12, sm: 6, lg: 4 }
123
+ value: entity?.spec?.type
135
124
  }
136
125
  ),
137
126
  (isAPI || isComponent || typeof entity?.spec?.lifecycle === "string") && /* @__PURE__ */ jsx(
138
127
  AboutField,
139
128
  {
140
129
  label: t("aboutCard.lifecycleField.label"),
141
- value: entity?.spec?.lifecycle,
142
- gridSizes: { xs: 12, sm: 6, lg: 4 }
130
+ value: entity?.spec?.lifecycle
143
131
  }
144
132
  ),
145
133
  /* @__PURE__ */ jsx(
@@ -147,31 +135,23 @@ function AboutContent(props) {
147
135
  {
148
136
  label: t("aboutCard.tagsField.label"),
149
137
  value: t("aboutCard.tagsField.value"),
150
- gridSizes: { xs: 12, sm: 6, lg: 4 },
151
138
  children: (entity?.metadata?.tags || []).map((tag) => /* @__PURE__ */ jsx(Chip, { size: "small", label: tag }, tag))
152
139
  }
153
140
  ),
154
- isLocation && (entity?.spec?.targets || entity?.spec?.target) && /* @__PURE__ */ jsx(
155
- AboutField,
141
+ isLocation && (entity?.spec?.targets || entity?.spec?.target) && /* @__PURE__ */ jsx(Grid.Item, { colSpan: columns, children: /* @__PURE__ */ jsx(AboutField, { label: t("aboutCard.targetsField.label"), children: /* @__PURE__ */ jsx(
142
+ LinksGridList,
156
143
  {
157
- label: t("aboutCard.targetsField.label"),
158
- gridSizes: { xs: 12 },
159
- children: /* @__PURE__ */ jsx(
160
- LinksGridList,
161
- {
162
- cols: 1,
163
- items: (entity.spec.targets || [entity.spec.target]).map((target) => target).map((target) => ({
164
- text: target,
165
- href: getLocationTargetHref(
166
- target,
167
- entity?.spec?.type || t("aboutCard.unknown"),
168
- entitySourceLocation
169
- )
170
- }))
171
- }
172
- )
144
+ cols: 1,
145
+ items: (entity.spec.targets || [entity.spec.target]).map((target) => target).map((target) => ({
146
+ text: target,
147
+ href: getLocationTargetHref(
148
+ target,
149
+ entity?.spec?.type || t("aboutCard.unknown"),
150
+ entitySourceLocation
151
+ )
152
+ }))
173
153
  }
174
- )
154
+ ) }) })
175
155
  ] });
176
156
  }
177
157
 
@@ -1 +1 @@
1
- {"version":3,"file":"AboutContent.esm.js","sources":["../../../src/components/AboutCard/AboutContent.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 {\n Entity,\n getEntitySourceLocation,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { JsonArray } from '@backstage/types';\nimport Chip from '@material-ui/core/Chip';\nimport Grid from '@material-ui/core/Grid';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { MarkdownContent } from '@backstage/core-components';\nimport { AboutField } from './AboutField';\nimport { LinksGridList } from '../EntityLinksCard/LinksGridList';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\nconst useStyles = makeStyles({\n description: {\n wordBreak: 'break-word',\n },\n});\n\n/**\n * Props for {@link AboutContent}.\n *\n * @public\n */\nexport interface AboutContentProps {\n entity: Entity;\n}\n\nfunction getLocationTargetHref(\n target: string,\n type: string,\n entitySourceLocation: {\n type: string;\n target: string;\n },\n): string {\n if (type === 'url' || target.includes('://')) {\n return target;\n }\n\n const srcLocationUrl =\n entitySourceLocation.type === 'file'\n ? `file://${entitySourceLocation.target}`\n : entitySourceLocation.target;\n\n if (type === 'file' || entitySourceLocation.type === 'file') {\n return new URL(target, srcLocationUrl).href;\n }\n\n return srcLocationUrl;\n}\n\n/** @public */\nexport function AboutContent(props: AboutContentProps) {\n const { entity } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const isSystem = entity.kind.toLocaleLowerCase('en-US') === 'system';\n const isResource = entity.kind.toLocaleLowerCase('en-US') === 'resource';\n const isComponent = entity.kind.toLocaleLowerCase('en-US') === 'component';\n const isAPI = entity.kind.toLocaleLowerCase('en-US') === 'api';\n const isTemplate = entity.kind.toLocaleLowerCase('en-US') === 'template';\n const isLocation = entity.kind.toLocaleLowerCase('en-US') === 'location';\n const isGroup = entity.kind.toLocaleLowerCase('en-US') === 'group';\n\n const partOfSystemRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'system',\n });\n const partOfComponentRelations = getEntityRelations(\n entity,\n RELATION_PART_OF,\n {\n kind: 'component',\n },\n );\n const partOfDomainRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'domain',\n });\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n\n let entitySourceLocation:\n | {\n type: string;\n target: string;\n }\n | undefined;\n try {\n entitySourceLocation = getEntitySourceLocation(entity);\n } catch (e) {\n entitySourceLocation = undefined;\n }\n\n return (\n <Grid container>\n <AboutField\n label={t('aboutCard.descriptionField.label')}\n gridSizes={{ xs: 12 }}\n >\n <MarkdownContent\n className={classes.description}\n content={\n entity?.metadata?.description ||\n t('aboutCard.descriptionField.value')\n }\n />\n </AboutField>\n <AboutField\n label={t('aboutCard.ownerField.label')}\n value={t('aboutCard.ownerField.value')}\n className={classes.description}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {ownedByRelations.length > 0 && (\n <EntityRefLinks entityRefs={ownedByRelations} defaultKind=\"group\" />\n )}\n </AboutField>\n {(isSystem || partOfDomainRelations.length > 0) && (\n <AboutField\n label={t('aboutCard.domainField.label')}\n value={t('aboutCard.domainField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfDomainRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfDomainRelations}\n defaultKind=\"domain\"\n />\n )}\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n partOfSystemRelations.length > 0) && (\n <AboutField\n label={t('aboutCard.systemField.label')}\n value={t('aboutCard.systemField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {partOfSystemRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfSystemRelations}\n defaultKind=\"system\"\n />\n )}\n </AboutField>\n )}\n {isComponent && partOfComponentRelations.length > 0 && (\n <AboutField\n label={t('aboutCard.parentComponentField.label')}\n value={t('aboutCard.parentComponentField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n <EntityRefLinks\n entityRefs={partOfComponentRelations}\n defaultKind=\"component\"\n />\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n isTemplate ||\n isGroup ||\n isLocation ||\n typeof entity?.spec?.type === 'string') && (\n <AboutField\n label={t('aboutCard.typeField.label')}\n value={entity?.spec?.type as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n {(isAPI ||\n isComponent ||\n typeof entity?.spec?.lifecycle === 'string') && (\n <AboutField\n label={t('aboutCard.lifecycleField.label')}\n value={entity?.spec?.lifecycle as string}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n />\n )}\n <AboutField\n label={t('aboutCard.tagsField.label')}\n value={t('aboutCard.tagsField.value')}\n gridSizes={{ xs: 12, sm: 6, lg: 4 }}\n >\n {(entity?.metadata?.tags || []).map(tag => (\n <Chip key={tag} size=\"small\" label={tag} />\n ))}\n </AboutField>\n {isLocation && (entity?.spec?.targets || entity?.spec?.target) && (\n <AboutField\n label={t('aboutCard.targetsField.label')}\n gridSizes={{ xs: 12 }}\n >\n <LinksGridList\n cols={1}\n items={((entity.spec.targets as JsonArray) || [entity.spec.target])\n .map(target => target as string)\n .map(target => ({\n text: target,\n href: getLocationTargetHref(\n target,\n (entity?.spec?.type || t('aboutCard.unknown')) as string,\n entitySourceLocation!,\n ),\n }))}\n />\n </AboutField>\n )}\n </Grid>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAoCA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,WAAA,EAAa;AAAA,IACX,SAAA,EAAW;AAAA;AAEf,CAAC,CAAA;AAWD,SAAS,qBAAA,CACP,MAAA,EACA,IAAA,EACA,oBAAA,EAIQ;AACR,EAAA,IAAI,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AEhC,QAAA,EAAA,CAAA,MAAA,EAAQ,QAAA,EAAU,IAAA,IAAQ,IAAI,GAAA,CAAI,CAAA,GAAA,qBAClC,GAAA,CAAC,IAAA,EAAA,EAAe,IAAA,EAAK,OAAA,EAAQ,KAAA,EAAO,GAAA,EAAA,EAAzB,GAA8B,CAC1C;AAAA;AAAA,KACH;AAAA,IACC,eAAe,MAAA,EAAQ,IAAA,EAAM,OAAA,IAAW,MAAA,EAAQ,MAAM,MAAA,CAAA,oBACrD,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,KAAA,EAAO,EAAE,8BAA8B,CAAA;AAAA,QACvC,SAAA,EAAW,EAAE,EAAA,EAAI,EAAA,EAAG;AAAA,QAEpB,QAAA,kBAAA,GAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,IAAA,EAAM,CAAA;AAAA,YACN,KAAA,EAAA,CAAS,MAAA,CAAO,IAAA,CAAK,OAAA,IAAyB,CAAC,MAAA,CAAO,IAAA,CAAK,MAAM,CAAA,EAC9D,GAAA,CAAI,CAAA,MAAA,KAAU,MAAgB,CAAA,CAC9B,IAAI,CAAA,MAAA,MAAW;AAAA,cACd,IAAA,EAAM,MAAA;AAAA,cACN,IAAA,EAAM,qBAAA;AAAA,gBACJ,MAAA;AAAA,gBACC,MAAA,EAAQ,IAAA,EAAM,IAAA,IAAQ,CAAA,CAAE,mBAAmB,CAAA;AAAA,gBAC5C;AAAA;AACF,aACF,CAAE;AAAA;AAAA;AACN;AAAA;AACF,GAAA,EAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"AboutContent.esm.js","sources":["../../../src/components/AboutCard/AboutContent.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 {\n Entity,\n getEntitySourceLocation,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport {\n EntityRefLinks,\n getEntityRelations,\n} from '@backstage/plugin-catalog-react';\nimport { JsonArray } from '@backstage/types';\nimport Chip from '@material-ui/core/Chip';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Grid } from '@backstage/ui';\nimport { MarkdownContent } from '@backstage/core-components';\nimport { AboutField } from './AboutField';\nimport { LinksGridList } from '../EntityLinksCard/LinksGridList';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\nconst useStyles = makeStyles({\n description: {\n wordBreak: 'break-word',\n },\n});\n\n/**\n * Props for {@link AboutContent}.\n *\n * @public\n */\nexport interface AboutContentProps {\n entity: Entity;\n}\n\nfunction getLocationTargetHref(\n target: string,\n type: string,\n entitySourceLocation: {\n type: string;\n target: string;\n },\n): string {\n if (type === 'url' || target.includes('://')) {\n return target;\n }\n\n const srcLocationUrl =\n entitySourceLocation.type === 'file'\n ? `file://${entitySourceLocation.target}`\n : entitySourceLocation.target;\n\n if (type === 'file' || entitySourceLocation.type === 'file') {\n return new URL(target, srcLocationUrl).href;\n }\n\n return srcLocationUrl;\n}\n\n/** @public */\nexport function AboutContent(props: AboutContentProps) {\n const { entity } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const isSystem = entity.kind.toLocaleLowerCase('en-US') === 'system';\n const isResource = entity.kind.toLocaleLowerCase('en-US') === 'resource';\n const isComponent = entity.kind.toLocaleLowerCase('en-US') === 'component';\n const isAPI = entity.kind.toLocaleLowerCase('en-US') === 'api';\n const isTemplate = entity.kind.toLocaleLowerCase('en-US') === 'template';\n const isLocation = entity.kind.toLocaleLowerCase('en-US') === 'location';\n const isGroup = entity.kind.toLocaleLowerCase('en-US') === 'group';\n\n const partOfSystemRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'system',\n });\n const partOfComponentRelations = getEntityRelations(\n entity,\n RELATION_PART_OF,\n {\n kind: 'component',\n },\n );\n const partOfDomainRelations = getEntityRelations(entity, RELATION_PART_OF, {\n kind: 'domain',\n });\n const ownedByRelations = getEntityRelations(entity, RELATION_OWNED_BY);\n\n let entitySourceLocation:\n | {\n type: string;\n target: string;\n }\n | undefined;\n try {\n entitySourceLocation = getEntitySourceLocation(entity);\n } catch (e) {\n entitySourceLocation = undefined;\n }\n\n const columns = { initial: '1', sm: '2', lg: '3' } as const;\n\n return (\n <Grid.Root columns={columns} gap=\"3\">\n <Grid.Item colSpan={columns}>\n <AboutField label={t('aboutCard.descriptionField.label')}>\n <MarkdownContent\n className={classes.description}\n content={\n entity?.metadata?.description ||\n t('aboutCard.descriptionField.value')\n }\n />\n </AboutField>\n </Grid.Item>\n <AboutField\n label={t('aboutCard.ownerField.label')}\n value={t('aboutCard.ownerField.value')}\n className={classes.description}\n >\n {ownedByRelations.length > 0 && (\n <EntityRefLinks entityRefs={ownedByRelations} defaultKind=\"group\" />\n )}\n </AboutField>\n {(isSystem || partOfDomainRelations.length > 0) && (\n <AboutField\n label={t('aboutCard.domainField.label')}\n value={t('aboutCard.domainField.value')}\n >\n {partOfDomainRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfDomainRelations}\n defaultKind=\"domain\"\n />\n )}\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n partOfSystemRelations.length > 0) && (\n <AboutField\n label={t('aboutCard.systemField.label')}\n value={t('aboutCard.systemField.value')}\n >\n {partOfSystemRelations.length > 0 && (\n <EntityRefLinks\n entityRefs={partOfSystemRelations}\n defaultKind=\"system\"\n />\n )}\n </AboutField>\n )}\n {isComponent && partOfComponentRelations.length > 0 && (\n <AboutField\n label={t('aboutCard.parentComponentField.label')}\n value={t('aboutCard.parentComponentField.value')}\n >\n <EntityRefLinks\n entityRefs={partOfComponentRelations}\n defaultKind=\"component\"\n />\n </AboutField>\n )}\n {(isAPI ||\n isComponent ||\n isResource ||\n isTemplate ||\n isGroup ||\n isLocation ||\n typeof entity?.spec?.type === 'string') && (\n <AboutField\n label={t('aboutCard.typeField.label')}\n value={entity?.spec?.type as string}\n />\n )}\n {(isAPI ||\n isComponent ||\n typeof entity?.spec?.lifecycle === 'string') && (\n <AboutField\n label={t('aboutCard.lifecycleField.label')}\n value={entity?.spec?.lifecycle as string}\n />\n )}\n <AboutField\n label={t('aboutCard.tagsField.label')}\n value={t('aboutCard.tagsField.value')}\n >\n {(entity?.metadata?.tags || []).map(tag => (\n <Chip key={tag} size=\"small\" label={tag} />\n ))}\n </AboutField>\n {isLocation && (entity?.spec?.targets || entity?.spec?.target) && (\n <Grid.Item colSpan={columns}>\n <AboutField label={t('aboutCard.targetsField.label')}>\n <LinksGridList\n cols={1}\n items={(\n (entity.spec.targets as JsonArray) || [entity.spec.target]\n )\n .map(target => target as string)\n .map(target => ({\n text: target,\n href: getLocationTargetHref(\n target,\n (entity?.spec?.type || t('aboutCard.unknown')) as string,\n entitySourceLocation!,\n ),\n }))}\n />\n </AboutField>\n </Grid.Item>\n )}\n </Grid.Root>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAoCA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,WAAA,EAAa;AAAA,IACX,SAAA,EAAW;AAAA;AAEf,CAAC,CAAA;AAWD,SAAS,qBAAA,CACP,MAAA,EACA,IAAA,EACA,oBAAA,EAIQ;AACR,EAAA,IAAI,IAAA,KAAS,KAAA,IAAS,MAAA,CAAO,QAAA,CAAS,KAAK,CAAA,EAAG;AAC5C,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,MAAM,cAAA,GACJ,qBAAqB,IAAA,KAAS,MAAA,GAC1B,UAAU,oBAAA,CAAqB,MAAM,KACrC,oBAAA,CAAqB,MAAA;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EAAM,MAAA;AAAA,UACN,IAAA,EAAM,qBAAA;AAAA,YACJ,MAAA;AAAA,YACC,MAAA,EAAQ,IAAA,EAAM,IAAA,IAAQ,CAAA,CAAE,mBAAmB,CAAA;AAAA,YAC5C;AAAA;AACF,SACF,CAAE;AAAA;AAAA,OAER,CAAA,EACF;AAAA,GAAA,EAEJ,CAAA;AAEJ;;;;"}
@@ -1,6 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useElementFilter } from '@backstage/core-plugin-api';
3
- import Grid from '@material-ui/core/Grid';
4
3
  import Typography from '@material-ui/core/Typography';
5
4
  import { makeStyles } from '@material-ui/core/styles';
6
5
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
@@ -24,12 +23,12 @@ const useStyles = makeStyles((theme) => ({
24
23
  }
25
24
  }));
26
25
  function AboutField(props) {
27
- const { label, value, gridSizes, children, className } = props;
26
+ const { label, value, children, className } = props;
28
27
  const classes = useStyles();
29
28
  const { t } = useTranslationRef(catalogTranslationRef);
30
29
  const childElements = useElementFilter(children, (c) => c.getElements());
31
30
  const content = childElements.length > 0 ? childElements : /* @__PURE__ */ jsx(Typography, { variant: "body2", className: classes.value, children: value || t("aboutCard.unknown") });
32
- return /* @__PURE__ */ jsxs(Grid, { item: true, ...gridSizes, className, children: [
31
+ return /* @__PURE__ */ jsxs("div", { className, children: [
33
32
  /* @__PURE__ */ jsx(Typography, { variant: "h2", className: classes.label, children: label }),
34
33
  content
35
34
  ] });
@@ -1 +1 @@
1
- {"version":3,"file":"AboutField.esm.js","sources":["../../../src/components/AboutCard/AboutField.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 { useElementFilter } from '@backstage/core-plugin-api';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ReactNode } from 'react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\nconst useStyles = makeStyles(theme => ({\n value: {\n fontWeight: 'bold',\n overflow: 'hidden',\n lineHeight: '24px',\n wordBreak: 'break-word',\n },\n label: {\n color: theme.palette.text.secondary,\n textTransform: 'uppercase',\n fontSize: '10px',\n fontWeight: 'bold',\n letterSpacing: 0.5,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n}));\n\n/**\n * Props for {@link AboutField}.\n *\n * @public\n */\nexport interface AboutFieldProps {\n label: string;\n value?: string;\n gridSizes?: Record<string, number>;\n children?: ReactNode;\n className?: string;\n}\n\n/** @public */\nexport function AboutField(props: AboutFieldProps) {\n const { label, value, gridSizes, children, className } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const childElements = useElementFilter(children, c => c.getElements());\n\n // Content is either children or a string prop `value`\n const content =\n childElements.length > 0 ? (\n childElements\n ) : (\n <Typography variant=\"body2\" className={classes.value}>\n {value || t('aboutCard.unknown')}\n </Typography>\n );\n return (\n <Grid item {...gridSizes} className={className}>\n <Typography variant=\"h2\" className={classes.label}>\n {label}\n </Typography>\n {content}\n </Grid>\n );\n}\n"],"names":[],"mappings":";;;;;;;;AAwBA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,KAAA,EAAO;AAAA,IACL,UAAA,EAAY,MAAA;AAAA,IACZ,QAAA,EAAU,QAAA;AAAA,IACV,UAAA,EAAY,MAAA;AAAA,IACZ,SAAA,EAAW;AAAA,GACb;AAAA,EACA,KAAA,EAAO;AAAA,IACL,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,SAAA;AAAA,IAC1B,aAAA,EAAe,WAAA;AAAA,IACf,QAAA,EAAU,MAAA;AAAA,IACV,UAAA,EAAY,MAAA;AAAA,IACZ,aAAA,EAAe,GAAA;AAAA,IACf,QAAA,EAAU,QAAA;AAAA,IACV,UAAA,EAAY;AAAA;AAEhB,CAAA,CAAE,CAAA;AAgBK,SAAS,WAAW,KAAA,EAAwB;AACjD,EAAA,MAAM,EAAE,KAAA,EAAO,KAAA,EAAO,SAAA,EAAW,QAAA,EAAU,WAAU,GAAI,KAAA;AACzD,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,gBAAgB,gBAAA,CAAiB,QAAA,EAAU,CAAA,CAAA,KAAK,CAAA,CAAE,aAAa,CAAA;AAGrE,EAAA,MAAM,OAAA,GACJ,aAAA,CAAc,MAAA,GAAS,CAAA,GACrB,gCAEA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ,WAAW,OAAA,CAAQ,KAAA,EAC5C,QAAA,EAAA,KAAA,IAAS,CAAA,CAAE,mBAAmB,CAAA,EACjC,CAAA;AAEJ,EAAA,4BACG,IAAA,EAAA,EAAK,IAAA,EAAI,IAAA,EAAE,GAAG,WAAW,SAAA,EACxB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAW,OAAA,EAAQ,IAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OACzC,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,IACC;AAAA,GAAA,EACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"AboutField.esm.js","sources":["../../../src/components/AboutCard/AboutField.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 { useElementFilter } from '@backstage/core-plugin-api';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ReactNode } from 'react';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\nconst useStyles = makeStyles(theme => ({\n value: {\n fontWeight: 'bold',\n overflow: 'hidden',\n lineHeight: '24px',\n wordBreak: 'break-word',\n },\n label: {\n color: theme.palette.text.secondary,\n textTransform: 'uppercase',\n fontSize: '10px',\n fontWeight: 'bold',\n letterSpacing: 0.5,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n}));\n\n/**\n * Props for {@link AboutField}.\n *\n * @public\n */\nexport interface AboutFieldProps {\n label: string;\n value?: string;\n children?: ReactNode;\n className?: string;\n}\n\n/** @public */\nexport function AboutField(props: AboutFieldProps) {\n const { label, value, children, className } = props;\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const childElements = useElementFilter(children, c => c.getElements());\n\n // Content is either children or a string prop `value`\n const content =\n childElements.length > 0 ? (\n childElements\n ) : (\n <Typography variant=\"body2\" className={classes.value}>\n {value || t('aboutCard.unknown')}\n </Typography>\n );\n return (\n <div className={className}>\n <Typography variant=\"h2\" className={classes.label}>\n {label}\n </Typography>\n {content}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAuBA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,KAAA,EAAO;AAAA,IACL,UAAA,EAAY,MAAA;AAAA,IACZ,QAAA,EAAU,QAAA;AAAA,IACV,UAAA,EAAY,MAAA;AAAA,IACZ,SAAA,EAAW;AAAA,GACb;AAAA,EACA,KAAA,EAAO;AAAA,IACL,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,SAAA;AAAA,IAC1B,aAAA,EAAe,WAAA;AAAA,IACf,QAAA,EAAU,MAAA;AAAA,IACV,UAAA,EAAY,MAAA;AAAA,IACZ,aAAA,EAAe,GAAA;AAAA,IACf,QAAA,EAAU,QAAA;AAAA,IACV,UAAA,EAAY;AAAA;AAEhB,CAAA,CAAE,CAAA;AAeK,SAAS,WAAW,KAAA,EAAwB;AACjD,EAAA,MAAM,EAAE,KAAA,EAAO,KAAA,EAAO,QAAA,EAAU,WAAU,GAAI,KAAA;AAC9C,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,gBAAgB,gBAAA,CAAiB,QAAA,EAAU,CAAA,CAAA,KAAK,CAAA,CAAE,aAAa,CAAA;AAGrE,EAAA,MAAM,OAAA,GACJ,aAAA,CAAc,MAAA,GAAS,CAAA,GACrB,gCAEA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ,WAAW,OAAA,CAAQ,KAAA,EAC5C,QAAA,EAAA,KAAA,IAAS,CAAA,CAAE,mBAAmB,CAAA,EACjC,CAAA;AAEJ,EAAA,uBACE,IAAA,CAAC,SAAI,SAAA,EACH,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cAAW,OAAA,EAAQ,IAAA,EAAK,SAAA,EAAW,OAAA,CAAQ,OACzC,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,IACC;AAAA,GAAA,EACH,CAAA;AAEJ;;;;"}
@@ -1,53 +1,46 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useEntity } from '@backstage/plugin-catalog-react';
3
- import { InfoCard, Table } from '@backstage/core-components';
2
+ import { useEntity, EntityInfoCard } from '@backstage/plugin-catalog-react';
4
3
  import { EntityLabelsEmptyState } from './EntityLabelsEmptyState.esm.js';
5
- import Typography from '@material-ui/core/Typography';
6
- import { makeStyles } from '@material-ui/core/styles';
4
+ import { CellText, useTable, Table } from '@backstage/ui';
7
5
  import { catalogTranslationRef } from '../../alpha/translation.esm.js';
8
6
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
7
+ import { useMemo } from 'react';
9
8
 
10
- const useStyles = makeStyles((_) => ({
11
- key: {
12
- fontWeight: "bold"
13
- }
14
- }));
15
9
  const EntityLabelsCard = (props) => {
16
- const { variant, title } = props;
10
+ const { title } = props;
17
11
  const { entity } = useEntity();
18
- const classes = useStyles();
19
12
  const { t } = useTranslationRef(catalogTranslationRef);
20
- const columns = [
21
- {
22
- render: (row) => {
23
- return /* @__PURE__ */ jsx(Typography, { className: classes.key, variant: "body2", children: row.key });
24
- }
25
- },
26
- {
27
- field: "value"
28
- }
29
- ];
30
13
  const labels = entity?.metadata?.labels;
31
- return /* @__PURE__ */ jsx(InfoCard, { title: title || t("entityLabelsCard.title"), variant, children: !labels || Object.keys(labels).length === 0 ? /* @__PURE__ */ jsx(EntityLabelsEmptyState, {}) : /* @__PURE__ */ jsx(
32
- Table,
33
- {
34
- columns,
35
- data: Object.keys(labels).map((labelKey) => ({
36
- key: labelKey,
37
- value: labels[labelKey]
38
- })),
39
- options: {
40
- search: false,
41
- showTitle: true,
42
- loadingType: "linear",
43
- header: false,
44
- padding: "dense",
45
- pageSize: 5,
46
- toolbar: false,
47
- paging: Object.keys(labels).length > 5
14
+ const columnConfig = useMemo(
15
+ () => [
16
+ {
17
+ id: "key",
18
+ label: t("entityLabelsCard.columnKeyLabel"),
19
+ isRowHeader: true,
20
+ cell: (item) => /* @__PURE__ */ jsx(CellText, { title: item.key })
21
+ },
22
+ {
23
+ id: "value",
24
+ label: t("entityLabelsCard.columnValueLabel"),
25
+ cell: (item) => /* @__PURE__ */ jsx(CellText, { title: item.value })
48
26
  }
49
- }
50
- ) });
27
+ ],
28
+ [t]
29
+ );
30
+ const data = useMemo(
31
+ () => Object.keys(labels ?? {}).map((labelKey) => ({
32
+ id: labelKey,
33
+ key: labelKey,
34
+ value: labels[labelKey]
35
+ })),
36
+ [labels]
37
+ );
38
+ const { tableProps } = useTable({
39
+ mode: "complete",
40
+ data,
41
+ paginationOptions: { pageSize: 5 }
42
+ });
43
+ return /* @__PURE__ */ jsx(EntityInfoCard, { title: title || t("entityLabelsCard.title"), children: !labels || Object.keys(labels).length === 0 ? /* @__PURE__ */ jsx(EntityLabelsEmptyState, {}) : /* @__PURE__ */ jsx(Table, { columnConfig, ...tableProps }) });
51
44
  };
52
45
 
53
46
  export { EntityLabelsCard };
@@ -1 +1 @@
1
- {"version":3,"file":"EntityLabelsCard.esm.js","sources":["../../../src/components/EntityLabelsCard/EntityLabelsCard.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport {\n InfoCard,\n InfoCardVariants,\n Table,\n TableColumn,\n} from '@backstage/core-components';\nimport { EntityLabelsEmptyState } from './EntityLabelsEmptyState';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport interface EntityLabelsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nconst useStyles = makeStyles(_ => ({\n key: {\n fontWeight: 'bold',\n },\n}));\n\nexport const EntityLabelsCard = (props: EntityLabelsCardProps) => {\n const { variant, title } = props;\n const { entity } = useEntity();\n const classes = useStyles();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const columns: TableColumn<{ key: string; value: string }>[] = [\n {\n render: row => {\n return (\n <Typography className={classes.key} variant=\"body2\">\n {row.key}\n </Typography>\n );\n },\n },\n {\n field: 'value',\n },\n ];\n\n const labels = entity?.metadata?.labels;\n\n return (\n <InfoCard title={title || t('entityLabelsCard.title')} variant={variant}>\n {!labels || Object.keys(labels).length === 0 ? (\n <EntityLabelsEmptyState />\n ) : (\n <Table\n columns={columns}\n data={Object.keys(labels).map(labelKey => ({\n key: labelKey,\n value: labels[labelKey],\n }))}\n options={{\n search: false,\n showTitle: true,\n loadingType: 'linear',\n header: false,\n padding: 'dense',\n pageSize: 5,\n toolbar: false,\n paging: Object.keys(labels).length > 5,\n }}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAmCA,MAAM,SAAA,GAAY,WAAW,CAAA,CAAA,MAAM;AAAA,EACjC,GAAA,EAAK;AAAA,IACH,UAAA,EAAY;AAAA;AAEhB,CAAA,CAAE,CAAA;AAEK,MAAM,gBAAA,GAAmB,CAAC,KAAA,KAAiC;AAChE,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,KAAA;AAC3B,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,OAAA,GAAyD;AAAA,IAC7D;AAAA,MACE,QAAQ,CAAA,GAAA,KAAO;AACb,QAAA,uBACE,GAAA,CAAC,cAAW,SAAA,EAAW,OAAA,CAAQ,KAAK,OAAA,EAAQ,OAAA,EACzC,cAAI,GAAA,EACP,CAAA;AAAA,MAEJ;AAAA,KACF;AAAA,IACA;AAAA,MACE,KAAA,EAAO;AAAA;AACT,GACF;AAEA,EAAA,MAAM,MAAA,GAAS,QAAQ,QAAA,EAAU,MAAA;AAEjC,EAAA,2BACG,QAAA,EAAA,EAAS,KAAA,EAAO,SAAS,CAAA,CAAE,wBAAwB,GAAG,OAAA,EACpD,QAAA,EAAA,CAAC,MAAA,IAAU,MAAA,CAAO,KAAK,MAAM,CAAA,CAAE,WAAW,CAAA,mBACzC,GAAA,CAAC,0BAAuB,CAAA,mBAExB,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA;AAAA,MACA,MAAM,MAAA,CAAO,IAAA,CAAK,MAAM,CAAA,CAAE,IAAI,CAAA,QAAA,MAAa;AAAA,QACzC,GAAA,EAAK,QAAA;AAAA,QACL,KAAA,EAAO,OAAO,QAAQ;AAAA,OACxB,CAAE,CAAA;AAAA,MACF,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ,KAAA;AAAA,QACR,SAAA,EAAW,IAAA;AAAA,QACX,WAAA,EAAa,QAAA;AAAA,QACb,MAAA,EAAQ,KAAA;AAAA,QACR,OAAA,EAAS,OAAA;AAAA,QACT,QAAA,EAAU,CAAA;AAAA,QACV,OAAA,EAAS,KAAA;AAAA,QACT,MAAA,EAAQ,MAAA,CAAO,IAAA,CAAK,MAAM,EAAE,MAAA,GAAS;AAAA;AACvC;AAAA,GACF,EAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityLabelsCard.esm.js","sources":["../../../src/components/EntityLabelsCard/EntityLabelsCard.tsx"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity, EntityInfoCard } from '@backstage/plugin-catalog-react';\nimport { EntityLabelsEmptyState } from './EntityLabelsEmptyState';\nimport {\n Table,\n CellText,\n useTable,\n type ColumnConfig,\n type TableItem,\n} from '@backstage/ui';\nimport { catalogTranslationRef } from '../../alpha/translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { useMemo } from 'react';\n\n/** @public */\nexport interface EntityLabelsCardProps {\n title?: string;\n}\n\ninterface LabelItem extends TableItem {\n id: string;\n key: string;\n value: string;\n}\n\nexport const EntityLabelsCard = (props: EntityLabelsCardProps) => {\n const { title } = props;\n const { entity } = useEntity();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const labels = entity?.metadata?.labels;\n\n const columnConfig: ColumnConfig<LabelItem>[] = useMemo(\n () => [\n {\n id: 'key',\n label: t('entityLabelsCard.columnKeyLabel'),\n isRowHeader: true,\n cell: item => <CellText title={item.key} />,\n },\n {\n id: 'value',\n label: t('entityLabelsCard.columnValueLabel'),\n cell: item => <CellText title={item.value} />,\n },\n ],\n [t],\n );\n\n const data = useMemo(\n () =>\n Object.keys(labels ?? {}).map(labelKey => ({\n id: labelKey,\n key: labelKey,\n value: labels![labelKey],\n })),\n [labels],\n );\n\n const { tableProps } = useTable({\n mode: 'complete',\n data,\n paginationOptions: { pageSize: 5 },\n });\n\n return (\n <EntityInfoCard title={title || t('entityLabelsCard.title')}>\n {!labels || Object.keys(labels).length === 0 ? (\n <EntityLabelsEmptyState />\n ) : (\n <Table columnConfig={columnConfig} {...tableProps} />\n )}\n </EntityInfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAwCO,MAAM,gBAAA,GAAmB,CAAC,KAAA,KAAiC;AAChE,EAAA,MAAM,EAAE,OAAM,GAAI,KAAA;AAClB,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,MAAA,GAAS,QAAQ,QAAA,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,YAAA,EAA6B,GAAG,UAAA,EAAY,CAAA,EAEvD,CAAA;AAEJ;;;;"}
@@ -1,21 +1,20 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useEntity } from '@backstage/plugin-catalog-react';
2
+ import { useEntity, EntityInfoCard } from '@backstage/plugin-catalog-react';
3
3
  import LanguageIcon from '@material-ui/icons/Language';
4
4
  import { EntityLinksEmptyState } from './EntityLinksEmptyState.esm.js';
5
5
  import { LinksGridList } from './LinksGridList.esm.js';
6
6
  import { useApp } from '@backstage/core-plugin-api';
7
- import { InfoCard } from '@backstage/core-components';
8
7
  import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
9
8
  import { catalogTranslationRef } from '../../alpha/translation.esm.js';
10
9
 
11
10
  const EntityLinksCard = (props) => {
12
- const { cols = void 0, variant } = props;
11
+ const { cols = void 0 } = props;
13
12
  const { entity } = useEntity();
14
13
  const app = useApp();
15
14
  const { t } = useTranslationRef(catalogTranslationRef);
16
15
  const iconResolver = (key) => key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;
17
16
  const links = entity?.metadata?.links;
18
- return /* @__PURE__ */ jsx(InfoCard, { title: t("entityLinksCard.title"), variant, children: !links || links.length === 0 ? /* @__PURE__ */ jsx(EntityLinksEmptyState, {}) : /* @__PURE__ */ jsx(
17
+ return /* @__PURE__ */ jsx(EntityInfoCard, { title: t("entityLinksCard.title"), children: !links || links.length === 0 ? /* @__PURE__ */ jsx(EntityLinksEmptyState, {}) : /* @__PURE__ */ jsx(
19
18
  LinksGridList,
20
19
  {
21
20
  cols,
@@ -1 +1 @@
1
- {"version":3,"file":"EntityLinksCard.esm.js","sources":["../../../src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { InfoCard, InfoCardVariants } from '@backstage/core-components';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n variant?: InfoCardVariants;\n}\n\nexport const EntityLinksCard = (props: EntityLinksCardProps) => {\n const { cols = undefined, variant } = props;\n const { entity } = useEntity();\n const app = useApp();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <InfoCard title={t('entityLinksCard.title')} variant={variant}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAgCO,MAAM,eAAA,GAAkB,CAAC,KAAA,KAAgC;AAC9D,EAAA,MAAM,EAAE,IAAA,GAAO,MAAA,EAAW,OAAA,EAAQ,GAAI,KAAA;AACtC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,MAAM,MAAA,EAAO;AACnB,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,YAAA,GAAe,CAAC,GAAA,KACpB,GAAA,GAAM,IAAI,aAAA,CAAc,GAAG,KAAK,YAAA,GAAe,YAAA;AAEjD,EAAA,MAAM,KAAA,GAAQ,QAAQ,QAAA,EAAU,KAAA;AAEhC,EAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAO,CAAA,CAAE,uBAAuB,CAAA,EAAG,OAAA,EAC1C,QAAA,EAAA,CAAC,KAAA,IAAS,KAAA,CAAM,MAAA,KAAW,CAAA,mBAC1B,GAAA,CAAC,yBAAsB,CAAA,mBAEvB,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,KAAA,EAAO,MAAM,GAAA,CAAI,CAAC,EAAE,GAAA,EAAK,KAAA,EAAO,MAAK,MAAO;AAAA,QAC1C,MAAM,KAAA,IAAS,GAAA;AAAA,QACf,IAAA,EAAM,GAAA;AAAA,QACN,IAAA,EAAM,aAAa,IAAI;AAAA,OACzB,CAAE;AAAA;AAAA,GACJ,EAEJ,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"EntityLinksCard.esm.js","sources":["../../../src/components/EntityLinksCard/EntityLinksCard.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity, EntityInfoCard } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\nimport { ColumnBreakpoints } from './types';\nimport { IconComponent, useApp } from '@backstage/core-plugin-api';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { catalogTranslationRef } from '../../alpha/translation';\n\n/** @public */\nexport interface EntityLinksCardProps {\n cols?: ColumnBreakpoints | number;\n}\n\nexport const EntityLinksCard = (props: EntityLinksCardProps) => {\n const { cols = undefined } = props;\n const { entity } = useEntity();\n const app = useApp();\n const { t } = useTranslationRef(catalogTranslationRef);\n\n const iconResolver = (key?: string): IconComponent =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n <EntityInfoCard title={t('entityLinksCard.title')}>\n {!links || links.length === 0 ? (\n <EntityLinksEmptyState />\n ) : (\n <LinksGridList\n cols={cols}\n items={links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n }))}\n />\n )}\n </EntityInfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA8BO,MAAM,eAAA,GAAkB,CAAC,KAAA,KAAgC;AAC9D,EAAA,MAAM,EAAE,IAAA,GAAO,MAAA,EAAU,GAAI,KAAA;AAC7B,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,MAAM,MAAA,EAAO;AACnB,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,qBAAqB,CAAA;AAErD,EAAA,MAAM,YAAA,GAAe,CAAC,GAAA,KACpB,GAAA,GAAM,IAAI,aAAA,CAAc,GAAG,KAAK,YAAA,GAAe,YAAA;AAEjD,EAAA,MAAM,KAAA,GAAQ,QAAQ,QAAA,EAAU,KAAA;AAEhC,EAAA,uBACE,GAAA,CAAC,cAAA,EAAA,EAAe,KAAA,EAAO,CAAA,CAAE,uBAAuB,CAAA,EAC7C,QAAA,EAAA,CAAC,KAAA,IAAS,KAAA,CAAM,MAAA,KAAW,CAAA,mBAC1B,GAAA,CAAC,yBAAsB,CAAA,mBAEvB,GAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,IAAA;AAAA,MACA,KAAA,EAAO,MAAM,GAAA,CAAI,CAAC,EAAE,GAAA,EAAK,KAAA,EAAO,MAAK,MAAO;AAAA,QAC1C,MAAM,KAAA,IAAS,GAAA;AAAA,QACf,IAAA,EAAM,GAAA;AAAA,QACN,IAAA,EAAM,aAAa,IAAI;AAAA,OACzB,CAAE;AAAA;AAAA,GACJ,EAEJ,CAAA;AAEJ;;;;"}
@@ -1,13 +1,19 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import ImageList from '@material-ui/core/ImageList';
3
- import ImageListItem from '@material-ui/core/ImageListItem';
2
+ import { Grid } from '@backstage/ui';
4
3
  import { IconLink } from './IconLink.esm.js';
5
4
  import { useDynamicColumns } from './useDynamicColumns.esm.js';
6
5
 
7
6
  function LinksGridList(props) {
8
7
  const { items, cols = void 0 } = props;
9
8
  const numOfCols = useDynamicColumns(cols);
10
- return /* @__PURE__ */ jsx(ImageList, { rowHeight: "auto", cols: numOfCols, children: items.map(({ text, href, Icon }, i) => /* @__PURE__ */ jsx(ImageListItem, { children: /* @__PURE__ */ jsx(IconLink, { href, text: text ?? href, Icon }) }, i)) });
9
+ return /* @__PURE__ */ jsx(
10
+ Grid.Root,
11
+ {
12
+ columns: String(Math.min(Math.max(numOfCols, 1), 12)),
13
+ gap: "2",
14
+ children: items.map(({ text, href, Icon }, i) => /* @__PURE__ */ jsx(IconLink, { href, text: text ?? href, Icon }, i))
15
+ }
16
+ );
11
17
  }
12
18
 
13
19
  export { LinksGridList };
@@ -1 +1 @@
1
- {"version":3,"file":"LinksGridList.esm.js","sources":["../../../src/components/EntityLinksCard/LinksGridList.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 ImageList from '@material-ui/core/ImageList';\nimport ImageListItem from '@material-ui/core/ImageListItem';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <ImageList rowHeight=\"auto\" cols={numOfCols}>\n {items.map(({ text, href, Icon }, i) => (\n <ImageListItem key={i}>\n <IconLink href={href} text={text ?? href} Icon={Icon} />\n </ImageListItem>\n ))}\n </ImageList>\n );\n}\n"],"names":[],"mappings":";;;;;;AAkCO,SAAS,cAAc,KAAA,EAA2B;AACvD,EAAA,MAAM,EAAE,KAAA,EAAO,IAAA,GAAO,MAAA,EAAU,GAAI,KAAA;AACpC,EAAA,MAAM,SAAA,GAAY,kBAAkB,IAAI,CAAA;AAExC,EAAA,uBACE,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAU,MAAA,EAAO,IAAA,EAAM,SAAA,EAC/B,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,EAAE,IAAA,EAAM,IAAA,EAAM,IAAA,EAAK,EAAG,CAAA,qBAChC,GAAA,CAAC,aAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAY,IAAA,EAAM,IAAA,IAAQ,IAAA,EAAM,IAAA,EAAY,CAAA,EAAA,EADpC,CAEpB,CACD,CAAA,EACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"LinksGridList.esm.js","sources":["../../../src/components/EntityLinksCard/LinksGridList.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 { Grid, type Columns } from '@backstage/ui';\nimport { IconLink } from './IconLink';\nimport { ColumnBreakpoints } from './types';\nimport { useDynamicColumns } from './useDynamicColumns';\nimport { IconComponent } from '@backstage/core-plugin-api';\n\nexport interface LinksGridListItem {\n href: string;\n text?: string;\n Icon?: IconComponent;\n}\n\ninterface LinksGridListProps {\n items: LinksGridListItem[];\n cols?: ColumnBreakpoints | number;\n}\n\nexport function LinksGridList(props: LinksGridListProps) {\n const { items, cols = undefined } = props;\n const numOfCols = useDynamicColumns(cols);\n\n return (\n <Grid.Root\n columns={String(Math.min(Math.max(numOfCols, 1), 12)) as Columns}\n gap=\"2\"\n >\n {items.map(({ text, href, Icon }, i) => (\n <IconLink key={i} href={href} text={text ?? href} Icon={Icon} />\n ))}\n </Grid.Root>\n );\n}\n"],"names":[],"mappings":";;;;;AAiCO,SAAS,cAAc,KAAA,EAA2B;AACvD,EAAA,MAAM,EAAE,KAAA,EAAO,IAAA,GAAO,MAAA,EAAU,GAAI,KAAA;AACpC,EAAA,MAAM,SAAA,GAAY,kBAAkB,IAAI,CAAA;AAExC,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,IAAA;AAAA,IAAL;AAAA,MACC,OAAA,EAAS,MAAA,CAAO,IAAA,CAAK,GAAA,CAAI,IAAA,CAAK,IAAI,SAAA,EAAW,CAAC,CAAA,EAAG,EAAE,CAAC,CAAA;AAAA,MACpD,GAAA,EAAI,GAAA;AAAA,MAEH,gBAAM,GAAA,CAAI,CAAC,EAAE,IAAA,EAAM,MAAM,IAAA,EAAK,EAAG,CAAA,qBAChC,GAAA,CAAC,YAAiB,IAAA,EAAY,IAAA,EAAM,QAAQ,IAAA,EAAM,IAAA,EAAA,EAAnC,CAA+C,CAC/D;AAAA;AAAA,GACH;AAEJ;;;;"}
package/dist/index.d.ts CHANGED
@@ -3,10 +3,10 @@ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
3
  import { IconComponent, StorageApi, ApiHolder } from '@backstage/core-plugin-api';
4
4
  import { EntityPresentationApi, CatalogApi, EntityRefPresentationSnapshot, EntityRefPresentation, StarredEntitiesApi, EntityListContextProps, UserListFilterKind, EntityOwnerPickerProps, EntityListPagination } from '@backstage/plugin-catalog-react';
5
5
  import { HumanDuration, Observable } from '@backstage/types';
6
- import { InfoCardVariants, TableColumn, TableProps, TableOptions } from '@backstage/core-components';
7
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
7
  import * as react from 'react';
9
8
  import { ReactNode, ElementType } from 'react';
9
+ import { TableColumn, TableProps, InfoCardVariants, TableOptions } from '@backstage/core-components';
10
10
  import { TabProps } from '@material-ui/core/Tab';
11
11
  import { Overrides } from '@material-ui/core/styles/overrides';
12
12
  import { StyleRules } from '@material-ui/core/styles/withStyles';
@@ -155,15 +155,6 @@ declare class DefaultStarredEntitiesApi implements StarredEntitiesApi {
155
155
  private notifyChanges;
156
156
  }
157
157
 
158
- /**
159
- * Props for {@link EntityAboutCard}.
160
- *
161
- * @public
162
- */
163
- type AboutCardProps = {
164
- variant?: InfoCardVariants;
165
- };
166
-
167
158
  /**
168
159
  * Props for {@link AboutContent}.
169
160
  *
@@ -183,7 +174,6 @@ declare function AboutContent(props: AboutContentProps): react_jsx_runtime.JSX.E
183
174
  interface AboutFieldProps {
184
175
  label: string;
185
176
  value?: string;
186
- gridSizes?: Record<string, number>;
187
177
  children?: ReactNode;
188
178
  className?: string;
189
179
  }
@@ -486,7 +476,6 @@ type ColumnBreakpoints = Record<Breakpoint, number>;
486
476
  /** @public */
487
477
  interface EntityLinksCardProps {
488
478
  cols?: ColumnBreakpoints | number;
489
- variant?: InfoCardVariants;
490
479
  }
491
480
 
492
481
  /** @public */
@@ -515,7 +504,6 @@ interface CatalogSearchResultListItemProps {
515
504
 
516
505
  /** @public */
517
506
  interface EntityLabelsCardProps {
518
- variant?: InfoCardVariants;
519
507
  title?: string;
520
508
  }
521
509
 
@@ -681,7 +669,7 @@ declare const CatalogEntityPage: () => JSX.Element;
681
669
  * not extremely customizable; feel free to make a copy of it as a starting
682
670
  * point if you like.
683
671
  */
684
- declare const EntityAboutCard: (props: AboutCardProps) => JSX.Element;
672
+ declare const EntityAboutCard: () => JSX.Element;
685
673
  /** @public */
686
674
  declare const EntityLinksCard: (props: EntityLinksCardProps) => react_jsx_runtime.JSX.Element;
687
675
  /** @public */
@@ -708,4 +696,4 @@ declare const RelatedEntitiesCard: <T extends Entity>(props: RelatedEntitiesCard
708
696
  declare const CatalogSearchResultListItem: (props: SearchResultListItemExtensionProps<CatalogSearchResultListItemProps>) => JSX.Element | null;
709
697
 
710
698
  export { AboutContent, AboutField, CatalogEntityPage, CatalogIndexPage, CatalogKindHeader, CatalogSearchResultListItem, CatalogTable, DefaultEntityPresentationApi, DefaultStarredEntitiesApi, EntityAboutCard, EntityDependencyOfComponentsCard, EntityDependsOnComponentsCard, EntityDependsOnResourcesCard, EntityHasComponentsCard, EntityHasResourcesCard, EntityHasSubcomponentsCard, EntityHasSubdomainsCard, EntityHasSystemsCard, EntityLabelsCard, EntityLayout, EntityLinksCard, EntityListContainer, EntityOrphanWarning, EntityProcessingErrorsPanel, EntityRelationWarning, EntitySwitch, FilterContainer, FilteredEntityLayout, RelatedEntitiesCard, catalogPlugin, hasCatalogProcessingErrors, hasLabels, hasRelationWarnings, isApiType, isComponentType, isEntityWith, isKind, isNamespace, isOrphan, isResourceType };
711
- export type { AboutCardProps, AboutContentProps, AboutFieldProps, BackstageOverrides, Breakpoint, CatalogKindHeaderProps, CatalogSearchResultListItemClassKey, CatalogSearchResultListItemProps, CatalogTableColumnsFunc, CatalogTableProps, CatalogTableRow, CatalogTableToolbarClassKey, ColumnBreakpoints, DefaultCatalogPageProps, DefaultEntityPresentationApiOptions, DefaultEntityPresentationApiRenderer, DependencyOfComponentsCardProps, DependsOnComponentsCardProps, DependsOnResourcesCardProps, EntityContextMenuClassKey, EntityLabelsCardProps, EntityLabelsEmptyStateClassKey, EntityLayoutProps, EntityLayoutRouteProps, EntityLinksCardProps, EntityLinksEmptyStateClassKey, EntityPredicates, EntitySwitchCaseProps, EntitySwitchProps, HasComponentsCardProps, HasResourcesCardProps, HasSubcomponentsCardProps, HasSubdomainsCardProps, HasSystemsCardProps, PluginCatalogComponentsNameToClassKey, RelatedEntitiesCardProps, SystemDiagramCardClassKey };
699
+ export type { AboutContentProps, AboutFieldProps, BackstageOverrides, Breakpoint, CatalogKindHeaderProps, CatalogSearchResultListItemClassKey, CatalogSearchResultListItemProps, CatalogTableColumnsFunc, CatalogTableProps, CatalogTableRow, CatalogTableToolbarClassKey, ColumnBreakpoints, DefaultCatalogPageProps, DefaultEntityPresentationApiOptions, DefaultEntityPresentationApiRenderer, DependencyOfComponentsCardProps, DependsOnComponentsCardProps, DependsOnResourcesCardProps, EntityContextMenuClassKey, EntityLabelsCardProps, EntityLabelsEmptyStateClassKey, EntityLayoutProps, EntityLayoutRouteProps, EntityLinksCardProps, EntityLinksEmptyStateClassKey, EntityPredicates, EntitySwitchCaseProps, EntitySwitchProps, HasComponentsCardProps, HasResourcesCardProps, HasSubcomponentsCardProps, HasSubdomainsCardProps, HasSystemsCardProps, PluginCatalogComponentsNameToClassKey, RelatedEntitiesCardProps, SystemDiagramCardClassKey };
package/dist/index.esm.js CHANGED
@@ -12,7 +12,13 @@ export { EntityProcessingErrorsPanel, hasCatalogProcessingErrors } from './compo
12
12
  export { EntitySwitch } from './components/EntitySwitch/EntitySwitch.esm.js';
13
13
  export { isApiType, isComponentType, isEntityWith, isKind, isNamespace, isResourceType } from './components/EntitySwitch/conditions.esm.js';
14
14
  export { EntityListContainer, FilterContainer, FilteredEntityLayout } from './components/FilteredEntityLayout/index.esm.js';
15
- import './components/EntityLabelsCard/EntityLabelsCard.esm.js';
15
+ import 'react/jsx-runtime';
16
+ import '@backstage/plugin-catalog-react';
17
+ import './components/EntityLabelsCard/EntityLabelsEmptyState.esm.js';
18
+ import '@backstage/ui';
19
+ import './alpha/translation.esm.js';
20
+ import '@backstage/core-plugin-api/alpha';
21
+ import 'react';
16
22
  export { hasLabels } from './components/EntityLabelsCard/conditions.esm.js';
17
23
  import './components/CatalogSearchResultListItem/CatalogSearchResultListItem.esm.js';
18
24
  export { CatalogEntityPage, CatalogIndexPage, CatalogSearchResultListItem, EntityAboutCard, EntityDependencyOfComponentsCard, EntityDependsOnComponentsCard, EntityDependsOnResourcesCard, EntityHasComponentsCard, EntityHasResourcesCard, EntityHasSubcomponentsCard, EntityHasSubdomainsCard, EntityHasSystemsCard, EntityLabelsCard, EntityLinksCard, RelatedEntitiesCard, catalogPlugin } from './plugin.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-catalog";
2
- var version = "1.34.0-next.1";
2
+ var version = "2.0.0-next.2";
3
3
  var description = "The Backstage plugin for browsing the Backstage catalog";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"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 { CatalogClient } from '@backstage/catalog-client';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n entityPresentationApiRef,\n entityRouteRef,\n starredEntitiesApiRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n createComponentRouteRef,\n createFromTemplateRouteRef,\n unregisterRedirectRouteRef,\n viewTechDocRouteRef,\n rootRouteRef,\n} from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n storageApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { DefaultStarredEntitiesApi } from './apis';\nimport { AboutCardProps } from './components/AboutCard';\nimport { DefaultCatalogPageProps } from './components/CatalogPage';\nimport { DependencyOfComponentsCardProps } from './components/DependencyOfComponentsCard';\nimport { DependsOnComponentsCardProps } from './components/DependsOnComponentsCard';\nimport { DependsOnResourcesCardProps } from './components/DependsOnResourcesCard';\nimport { HasComponentsCardProps } from './components/HasComponentsCard';\nimport { HasResourcesCardProps } from './components/HasResourcesCard';\nimport { HasSubcomponentsCardProps } from './components/HasSubcomponentsCard';\nimport { HasSubdomainsCardProps } from './components/HasSubdomainsCard';\nimport { HasSystemsCardProps } from './components/HasSystemsCard';\nimport { RelatedEntitiesCardProps } from './components/RelatedEntitiesCard';\nimport { CatalogSearchResultListItemProps } from './components/CatalogSearchResultListItem';\nimport { DefaultEntityPresentationApi } from './apis/EntityPresentationApi';\n\n/** @public */\nexport const catalogPlugin = createPlugin({\n id: 'catalog',\n apis: [\n createApiFactory({\n api: catalogApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogClient({ discoveryApi, fetchApi }),\n }),\n createApiFactory({\n api: starredEntitiesApiRef,\n deps: { storageApi: storageApiRef },\n factory: ({ storageApi }) =>\n new DefaultStarredEntitiesApi({ storageApi }),\n }),\n createApiFactory({\n api: entityPresentationApiRef,\n deps: { catalogApi: catalogApiRef },\n factory: ({ catalogApi }) =>\n DefaultEntityPresentationApi.create({ catalogApi }),\n }),\n ],\n routes: {\n catalogIndex: rootRouteRef,\n catalogEntity: entityRouteRef,\n },\n externalRoutes: {\n createComponent: createComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n createFromTemplate: createFromTemplateRouteRef,\n unregisterRedirect: unregisterRedirectRouteRef,\n },\n});\n\n/** @public */\nexport const CatalogIndexPage: (props: DefaultCatalogPageProps) => JSX.Element =\n catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogIndexPage',\n component: () =>\n import('./components/CatalogPage').then(m => m.CatalogPage),\n mountPoint: rootRouteRef,\n }),\n );\n\n/** @public */\nexport const CatalogEntityPage: () => JSX.Element = catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogEntityPage',\n component: () =>\n import('./components/CatalogEntityPage').then(m => m.CatalogEntityPage),\n mountPoint: entityRouteRef,\n }),\n);\n\n/**\n * An example About card to show at the top of entity pages.\n *\n * @public\n * @remarks\n *\n * This card collects some high level information about the entity, but is just\n * an example component. Many organizations will want to replace it with a\n * custom card that is more tailored to their specific needs. The card itself is\n * not extremely customizable; feel free to make a copy of it as a starting\n * point if you like.\n */\nexport const EntityAboutCard: (props: AboutCardProps) => JSX.Element =\n catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityAboutCard',\n component: {\n lazy: () => import('./components/AboutCard').then(m => m.AboutCard),\n },\n }),\n );\n\n/** @public */\nexport const EntityLinksCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLinksCard',\n component: {\n lazy: () =>\n import('./components/EntityLinksCard').then(m => m.EntityLinksCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityLabelsCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLabelsCard',\n component: {\n lazy: () =>\n import('./components/EntityLabelsCard').then(m => m.EntityLabelsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSystemsCard: (props: HasSystemsCardProps) => JSX.Element =\n catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSystemsCard',\n component: {\n lazy: () =>\n import('./components/HasSystemsCard').then(m => m.HasSystemsCard),\n },\n }),\n );\n\n/** @public */\nexport const EntityHasComponentsCard: (\n props: HasComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasComponentsCard',\n component: {\n lazy: () =>\n import('./components/HasComponentsCard').then(m => m.HasComponentsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSubcomponentsCard: (\n props: HasSubcomponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSubcomponentsCard',\n component: {\n lazy: () =>\n import('./components/HasSubcomponentsCard').then(\n m => m.HasSubcomponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSubdomainsCard: (\n props: HasSubdomainsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSubdomainsCard',\n component: {\n lazy: () =>\n import('./components/HasSubdomainsCard').then(m => m.HasSubdomainsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasResourcesCard: (\n props: HasResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasResourcesCard',\n component: {\n lazy: () =>\n import('./components/HasResourcesCard').then(m => m.HasResourcesCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnComponentsCard: (\n props: DependsOnComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependsOnComponentsCard').then(\n m => m.DependsOnComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependencyOfComponentsCard: (\n props: DependencyOfComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependencyOfComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependencyOfComponentsCard').then(\n m => m.DependencyOfComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnResourcesCard: (\n props: DependsOnResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnResourcesCard',\n component: {\n lazy: () =>\n import('./components/DependsOnResourcesCard').then(\n m => m.DependsOnResourcesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const RelatedEntitiesCard: <T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'RelatedEntitiesCard',\n component: {\n lazy: () =>\n import('./components/RelatedEntitiesCard').then(\n m => m.RelatedEntitiesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const CatalogSearchResultListItem: (\n props: SearchResultListItemExtensionProps<CatalogSearchResultListItemProps>,\n) => JSX.Element | null = catalogPlugin.provide(\n createSearchResultListItemExtension({\n name: 'CatalogSearchResultListItem',\n component: () =>\n import('./components/CatalogSearchResultListItem').then(\n m => m.CatalogSearchResultListItem,\n ),\n predicate: result => result.type === 'software-catalog',\n }),\n);\n"],"names":[],"mappings":";;;;;;;;AA4DO,MAAM,gBAAgB,YAAA,CAAa;AAAA,EACxC,EAAA,EAAI,SAAA;AAAA,EACJ,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,aAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc,eAAA;AAAA,QACd,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,aAAA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AM,MACJ,OAAO,kDAAqC,CAAA,CAAE,IAAA;AAAA,QAC5C,OAAK,CAAA,CAAE;AAAA;AACT;AACJ,GACD;AACH;AAGO,MAAM,sBAEM,aAAA,CAAc,OAAA;AAAA,EAC/B,wBAAA,CAAyB;AAAA,IACvB,IAAA,EAAM,qBAAA;AAAA,IACN,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,MACJ,OAAO,+CAAkC,CAAA,CAAE,IAAA;AAAA,QACzC,OAAK,CAAA,CAAE;AAAA;AACT;AACJ,GACD;AACH;AAGO,MAAM,8BAEa,aAAA,CAAc,OAAA;AAAA,EACtC,mCAAA,CAAoC;AAAA,IAClC,IAAA,EAAM,6BAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,uDAA0C,CAAA,CAAE,IAAA;AAAA,MACjD,OAAK,CAAA,CAAE;AAAA,KACT;AAAA,IACF,SAAA,EAAW,CAAA,MAAA,KAAU,MAAA,CAAO,IAAA,KAAS;AAAA,GACtC;AACH;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"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 { CatalogClient } from '@backstage/catalog-client';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n catalogApiRef,\n entityPresentationApiRef,\n entityRouteRef,\n starredEntitiesApiRef,\n} from '@backstage/plugin-catalog-react';\nimport {\n createComponentRouteRef,\n createFromTemplateRouteRef,\n unregisterRedirectRouteRef,\n viewTechDocRouteRef,\n rootRouteRef,\n} from './routes';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n storageApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n createSearchResultListItemExtension,\n SearchResultListItemExtensionProps,\n} from '@backstage/plugin-search-react';\nimport { DefaultStarredEntitiesApi } from './apis';\nimport { DefaultCatalogPageProps } from './components/CatalogPage';\nimport { DependencyOfComponentsCardProps } from './components/DependencyOfComponentsCard';\nimport { DependsOnComponentsCardProps } from './components/DependsOnComponentsCard';\nimport { DependsOnResourcesCardProps } from './components/DependsOnResourcesCard';\nimport { HasComponentsCardProps } from './components/HasComponentsCard';\nimport { HasResourcesCardProps } from './components/HasResourcesCard';\nimport { HasSubcomponentsCardProps } from './components/HasSubcomponentsCard';\nimport { HasSubdomainsCardProps } from './components/HasSubdomainsCard';\nimport { HasSystemsCardProps } from './components/HasSystemsCard';\nimport { RelatedEntitiesCardProps } from './components/RelatedEntitiesCard';\nimport { CatalogSearchResultListItemProps } from './components/CatalogSearchResultListItem';\nimport { DefaultEntityPresentationApi } from './apis/EntityPresentationApi';\n\n/** @public */\nexport const catalogPlugin = createPlugin({\n id: 'catalog',\n apis: [\n createApiFactory({\n api: catalogApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new CatalogClient({ discoveryApi, fetchApi }),\n }),\n createApiFactory({\n api: starredEntitiesApiRef,\n deps: { storageApi: storageApiRef },\n factory: ({ storageApi }) =>\n new DefaultStarredEntitiesApi({ storageApi }),\n }),\n createApiFactory({\n api: entityPresentationApiRef,\n deps: { catalogApi: catalogApiRef },\n factory: ({ catalogApi }) =>\n DefaultEntityPresentationApi.create({ catalogApi }),\n }),\n ],\n routes: {\n catalogIndex: rootRouteRef,\n catalogEntity: entityRouteRef,\n },\n externalRoutes: {\n createComponent: createComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n createFromTemplate: createFromTemplateRouteRef,\n unregisterRedirect: unregisterRedirectRouteRef,\n },\n});\n\n/** @public */\nexport const CatalogIndexPage: (props: DefaultCatalogPageProps) => JSX.Element =\n catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogIndexPage',\n component: () =>\n import('./components/CatalogPage').then(m => m.CatalogPage),\n mountPoint: rootRouteRef,\n }),\n );\n\n/** @public */\nexport const CatalogEntityPage: () => JSX.Element = catalogPlugin.provide(\n createRoutableExtension({\n name: 'CatalogEntityPage',\n component: () =>\n import('./components/CatalogEntityPage').then(m => m.CatalogEntityPage),\n mountPoint: entityRouteRef,\n }),\n);\n\n/**\n * An example About card to show at the top of entity pages.\n *\n * @public\n * @remarks\n *\n * This card collects some high level information about the entity, but is just\n * an example component. Many organizations will want to replace it with a\n * custom card that is more tailored to their specific needs. The card itself is\n * not extremely customizable; feel free to make a copy of it as a starting\n * point if you like.\n */\nexport const EntityAboutCard: () => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityAboutCard',\n component: {\n lazy: () => import('./components/AboutCard').then(m => m.AboutCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityLinksCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLinksCard',\n component: {\n lazy: () =>\n import('./components/EntityLinksCard').then(m => m.EntityLinksCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityLabelsCard = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityLabelsCard',\n component: {\n lazy: () =>\n import('./components/EntityLabelsCard').then(m => m.EntityLabelsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSystemsCard: (props: HasSystemsCardProps) => JSX.Element =\n catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSystemsCard',\n component: {\n lazy: () =>\n import('./components/HasSystemsCard').then(m => m.HasSystemsCard),\n },\n }),\n );\n\n/** @public */\nexport const EntityHasComponentsCard: (\n props: HasComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasComponentsCard',\n component: {\n lazy: () =>\n import('./components/HasComponentsCard').then(m => m.HasComponentsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSubcomponentsCard: (\n props: HasSubcomponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSubcomponentsCard',\n component: {\n lazy: () =>\n import('./components/HasSubcomponentsCard').then(\n m => m.HasSubcomponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasSubdomainsCard: (\n props: HasSubdomainsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasSubdomainsCard',\n component: {\n lazy: () =>\n import('./components/HasSubdomainsCard').then(m => m.HasSubdomainsCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityHasResourcesCard: (\n props: HasResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityHasResourcesCard',\n component: {\n lazy: () =>\n import('./components/HasResourcesCard').then(m => m.HasResourcesCard),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnComponentsCard: (\n props: DependsOnComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependsOnComponentsCard').then(\n m => m.DependsOnComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependencyOfComponentsCard: (\n props: DependencyOfComponentsCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependencyOfComponentsCard',\n component: {\n lazy: () =>\n import('./components/DependencyOfComponentsCard').then(\n m => m.DependencyOfComponentsCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const EntityDependsOnResourcesCard: (\n props: DependsOnResourcesCardProps,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'EntityDependsOnResourcesCard',\n component: {\n lazy: () =>\n import('./components/DependsOnResourcesCard').then(\n m => m.DependsOnResourcesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const RelatedEntitiesCard: <T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) => JSX.Element = catalogPlugin.provide(\n createComponentExtension({\n name: 'RelatedEntitiesCard',\n component: {\n lazy: () =>\n import('./components/RelatedEntitiesCard').then(\n m => m.RelatedEntitiesCard,\n ),\n },\n }),\n);\n\n/** @public */\nexport const CatalogSearchResultListItem: (\n props: SearchResultListItemExtensionProps<CatalogSearchResultListItemProps>,\n) => JSX.Element | null = catalogPlugin.provide(\n createSearchResultListItemExtension({\n name: 'CatalogSearchResultListItem',\n component: () =>\n import('./components/CatalogSearchResultListItem').then(\n m => m.CatalogSearchResultListItem,\n ),\n predicate: result => result.type === 'software-catalog',\n }),\n);\n"],"names":[],"mappings":";;;;;;;;AA2DO,MAAM,gBAAgB,YAAA,CAAa;AAAA,EACxC,EAAA,EAAI,SAAA;AAAA,EACJ,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,aAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc,eAAA;AAAA,QACd,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,aAAA,CAAc,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,KAC/C,CAAA;AAAA,IACD,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,qBAAA;AAAA,MACL,IAAA,EAAM,EAAE,UAAA,EAAY,aAAA,EAAc;AAAA,MAClC,OAAA,EAAS,CAAC,EAAE,UAAA,OACV,IAAI,yBAAA,CAA0B,EAAE,UAAA,EAAY;AAAA,KAC/C,CAAA;AAAA,IACD,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,wBAAA;AAAA,MACL,IAAA,EAAM,EAAE,UAAA,EAAY,aAAA,EAAc;AAAA,MAClC,OAAA,EAAS,CAAC,EAAE,UAAA,OACV,4BAAA,CAA6B,MAAA,CAAO,EAAE,UA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ACT,OAAO,uDAA0C,CAAA,CAAE,IAAA;AAAA,MACjD,OAAK,CAAA,CAAE;AAAA,KACT;AAAA,IACF,SAAA,EAAW,CAAA,MAAA,KAAU,MAAA,CAAO,IAAA,KAAS;AAAA,GACtC;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog",
3
- "version": "1.34.0-next.1",
3
+ "version": "2.0.0-next.2",
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.14.0-next.1",
73
+ "@backstage/catalog-client": "1.14.0-next.2",
74
74
  "@backstage/catalog-model": "1.7.6",
75
- "@backstage/core-compat-api": "0.5.9-next.1",
76
- "@backstage/core-components": "0.18.8-next.0",
77
- "@backstage/core-plugin-api": "1.12.4-next.0",
75
+ "@backstage/core-compat-api": "0.5.9-next.2",
76
+ "@backstage/core-components": "0.18.8-next.1",
77
+ "@backstage/core-plugin-api": "1.12.4-next.1",
78
78
  "@backstage/errors": "1.2.7",
79
- "@backstage/frontend-plugin-api": "0.14.2-next.0",
79
+ "@backstage/frontend-plugin-api": "0.15.0-next.1",
80
80
  "@backstage/integration-react": "1.2.16-next.1",
81
81
  "@backstage/plugin-catalog-common": "1.1.8",
82
- "@backstage/plugin-catalog-react": "2.1.0-next.1",
82
+ "@backstage/plugin-catalog-react": "2.1.0-next.2",
83
83
  "@backstage/plugin-permission-react": "0.4.41-next.0",
84
- "@backstage/plugin-scaffolder-common": "2.0.0-next.1",
84
+ "@backstage/plugin-scaffolder-common": "2.0.0-next.2",
85
85
  "@backstage/plugin-search-common": "1.2.22",
86
- "@backstage/plugin-search-react": "1.10.5-next.0",
86
+ "@backstage/plugin-search-react": "1.10.5-next.1",
87
87
  "@backstage/plugin-techdocs-common": "0.1.1",
88
- "@backstage/plugin-techdocs-react": "1.3.9-next.0",
88
+ "@backstage/plugin-techdocs-react": "1.3.9-next.1",
89
89
  "@backstage/types": "1.2.2",
90
- "@backstage/ui": "0.13.0-next.1",
90
+ "@backstage/ui": "0.13.0-next.2",
91
91
  "@backstage/version-bridge": "1.0.12",
92
92
  "@material-ui/core": "^4.12.2",
93
93
  "@material-ui/icons": "^4.9.1",
@@ -103,10 +103,10 @@
103
103
  "zen-observable": "^0.10.0"
104
104
  },
105
105
  "devDependencies": {
106
- "@backstage/cli": "0.36.0-next.1",
107
- "@backstage/core-app-api": "1.19.6-next.0",
106
+ "@backstage/cli": "0.36.0-next.2",
107
+ "@backstage/core-app-api": "1.19.6-next.1",
108
108
  "@backstage/dev-utils": "1.1.21-next.1",
109
- "@backstage/frontend-test-utils": "0.5.1-next.1",
109
+ "@backstage/frontend-test-utils": "0.5.1-next.2",
110
110
  "@backstage/plugin-permission-common": "0.9.6",
111
111
  "@backstage/test-utils": "1.7.16-next.0",
112
112
  "@testing-library/dom": "^10.0.0",