@backstage/plugin-org 0.6.50-next.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,110 @@
1
1
  # @backstage/plugin-org
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d14b6e0: **BREAKING**: Migrated `MembersListCard`, `OwnershipCard`, and `CatalogGraphCard` to use BUI card primitives via `EntityInfoCard`.
8
+
9
+ - `OwnershipCard`: Removed `variant` and `maxScrollHeight` props. Card height and scrolling are now controlled by the parent container — the card fills its container and the body scrolls automatically when content overflows.
10
+ - `CatalogGraphCard`: Removed `variant` prop.
11
+ - `MembersListCard`: Translation keys `subtitle`, `paginationLabel`, `aggregateMembersToggle.directMembers`, `aggregateMembersToggle.aggregatedMembers`, and `aggregateMembersToggle.ariaLabel` have been removed. The `title` key now includes `{{groupName}}`. New keys added: `cardLabel`, `noSearchResult`, `aggregateMembersToggle.label`.
12
+ - `OwnershipCard`: Translation keys `aggregateRelationsToggle.directRelations`, `aggregateRelationsToggle.aggregatedRelations`, and `aggregateRelationsToggle.ariaLabel` have been removed. New key added: `aggregateRelationsToggle.label`.
13
+ - Removed `MemberComponentClassKey` export, and `root` and `cardContent` from `MembersListCardClassKey`, `card` from `OwnershipCardClassKey`, and `card` from `CatalogGraphCardClassKey`.
14
+
15
+ **Migration:**
16
+
17
+ ```diff
18
+ - <EntityOwnershipCard variant="gridItem" />
19
+ + <EntityOwnershipCard />
20
+ ```
21
+
22
+ ```diff
23
+ - <EntityCatalogGraphCard variant="gridItem" height={400} />
24
+ + <EntityCatalogGraphCard height={400} />
25
+ ```
26
+
27
+ - 5fc35bb: Migrated `EntityAboutCard`, `EntityLinksCard`, `EntityLabelsCard`, `GroupProfileCard`, and `UserProfileCard` from MUI/InfoCard to use the new BUI card layout and BUI components where possible.
28
+
29
+ **BREAKING**: Removed `variant` prop from EntityAboutCard, EntityUserProfileCard, EntityGroupProfileCard, EntityLabelsCard, EntityLinksCard. Removed `gridSizes` prop from `AboutField`.
30
+
31
+ **Migration:**
32
+
33
+ Simply delete the obsolete `variant` and `gridSizes` props, e.g:
34
+
35
+ ```diff
36
+ - <EntityAboutCard variant="gridItem" />
37
+ + <EntityAboutCard />
38
+ ```
39
+
40
+ ```diff
41
+ - <AboutField label="Owner" gridSizes={{ xs: 12, sm: 6, lg: 4 }} />
42
+ + <AboutField label="Owner" />
43
+ ```
44
+
45
+ ### Patch Changes
46
+
47
+ - 538c985: Updated installation documentation to use feature discovery as the default.
48
+ - 0be2541: Promoted the plugin's translation ref to the stable package entry point. It was previously only available through the alpha entry point.
49
+ - Updated dependencies
50
+ - @backstage/plugin-catalog-react@2.1.0
51
+ - @backstage/ui@0.13.0
52
+ - @backstage/core-plugin-api@1.12.4
53
+ - @backstage/core-components@0.18.8
54
+ - @backstage/frontend-plugin-api@0.15.0
55
+ - @backstage/catalog-model@1.7.7
56
+
57
+ ## 0.7.0-next.2
58
+
59
+ ### Minor Changes
60
+
61
+ - d14b6e0: **BREAKING**: Migrated `MembersListCard`, `OwnershipCard`, and `CatalogGraphCard` to use BUI card primitives via `EntityInfoCard`.
62
+
63
+ - `OwnershipCard`: Removed `variant` and `maxScrollHeight` props. Card height and scrolling are now controlled by the parent container — the card fills its container and the body scrolls automatically when content overflows.
64
+ - `CatalogGraphCard`: Removed `variant` prop.
65
+ - `MembersListCard`: Translation keys `subtitle`, `paginationLabel`, `aggregateMembersToggle.directMembers`, `aggregateMembersToggle.aggregatedMembers`, and `aggregateMembersToggle.ariaLabel` have been removed. The `title` key now includes `{{groupName}}`. New keys added: `cardLabel`, `noSearchResult`, `aggregateMembersToggle.label`.
66
+ - `OwnershipCard`: Translation keys `aggregateRelationsToggle.directRelations`, `aggregateRelationsToggle.aggregatedRelations`, and `aggregateRelationsToggle.ariaLabel` have been removed. New key added: `aggregateRelationsToggle.label`.
67
+ - Removed `MemberComponentClassKey` export, and `root` and `cardContent` from `MembersListCardClassKey`, `card` from `OwnershipCardClassKey`, and `card` from `CatalogGraphCardClassKey`.
68
+
69
+ **Migration:**
70
+
71
+ ```diff
72
+ - <EntityOwnershipCard variant="gridItem" />
73
+ + <EntityOwnershipCard />
74
+ ```
75
+
76
+ ```diff
77
+ - <EntityCatalogGraphCard variant="gridItem" height={400} />
78
+ + <EntityCatalogGraphCard height={400} />
79
+ ```
80
+
81
+ - 5fc35bb: Migrated `EntityAboutCard`, `EntityLinksCard`, `EntityLabelsCard`, `GroupProfileCard`, and `UserProfileCard` from MUI/InfoCard to use the new BUI card layout and BUI components where possible.
82
+
83
+ **BREAKING**: Removed `variant` prop from EntityAboutCard, EntityUserProfileCard, EntityGroupProfileCard, EntityLabelsCard, EntityLinksCard. Removed `gridSizes` prop from `AboutField`.
84
+
85
+ **Migration:**
86
+
87
+ Simply delete the obsolete `variant` and `gridSizes` props, e.g:
88
+
89
+ ```diff
90
+ - <EntityAboutCard variant="gridItem" />
91
+ + <EntityAboutCard />
92
+ ```
93
+
94
+ ```diff
95
+ - <AboutField label="Owner" gridSizes={{ xs: 12, sm: 6, lg: 4 }} />
96
+ + <AboutField label="Owner" />
97
+ ```
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies
102
+ - @backstage/ui@0.13.0-next.2
103
+ - @backstage/frontend-plugin-api@0.15.0-next.1
104
+ - @backstage/core-plugin-api@1.12.4-next.1
105
+ - @backstage/plugin-catalog-react@2.1.0-next.2
106
+ - @backstage/core-components@0.18.8-next.1
107
+
3
108
  ## 0.6.50-next.1
4
109
 
5
110
  ### Patch Changes
package/README.md CHANGED
@@ -1,8 +1,5 @@
1
1
  # Org Plugin for Backstage
2
2
 
3
- > Disclaimer:
4
- > If you are looking for documentation on the experimental new frontend system support, please go [here](./README-alpha.md).
5
-
6
3
  ## Features
7
4
 
8
5
  - Show Group Page
@@ -21,6 +18,33 @@ Here's an example of what the User Profile looks like:
21
18
 
22
19
  ![Group Page example](./docs/user-profile-example.png)
23
20
 
21
+ ## Installation
22
+
23
+ ```bash
24
+ # From your Backstage root directory
25
+ yarn --cwd packages/app add @backstage/plugin-org
26
+ ```
27
+
28
+ Once installed, the plugin is automatically available in your app through the default feature discovery. For more details and alternative installation methods, see [installing plugins](https://backstage.io/docs/frontend-system/building-apps/installing-plugins).
29
+
30
+ You can enable entity cards on the catalog entity page through configuration:
31
+
32
+ ```yaml
33
+ # app-config.yaml
34
+ app:
35
+ extensions:
36
+ - entity-card:org/group-profile
37
+ - entity-card:org/members-list
38
+ - entity-card:org/ownership
39
+ - entity-card:org/user-profile
40
+ ```
41
+
42
+ For the full list of available extensions and their configuration options, see the [README-alpha.md](./README-alpha.md).
43
+
44
+ ## Old Frontend System
45
+
46
+ If your Backstage app uses the old frontend system, you need to manually wire the plugin into your app as outlined in this section. If you are on the new frontend system, you can skip this.
47
+
24
48
  ### MyGroupsSidebarItem
25
49
 
26
50
  The MyGroupsSidebarItem provides quick access to the group(s) the logged in user is a member of directly in the sidebar.
package/dist/alpha.d.ts CHANGED
@@ -5,38 +5,6 @@ import * as react from 'react';
5
5
  import * as _backstage_filter_predicates from '@backstage/filter-predicates';
6
6
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
7
7
 
8
- /**
9
- * @alpha
10
- */
11
- declare const orgTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"org", {
12
- readonly "groupProfileCard.groupNotFound": "Group not found";
13
- readonly "groupProfileCard.editIconButtonTitle": "Edit Metadata";
14
- readonly "groupProfileCard.refreshIconButtonTitle": "Schedule entity refresh";
15
- readonly "groupProfileCard.refreshIconButtonAriaLabel": "Refresh";
16
- readonly "groupProfileCard.listItemTitle.email": "Email";
17
- readonly "groupProfileCard.listItemTitle.entityRef": "Entity Ref";
18
- readonly "groupProfileCard.listItemTitle.parentGroup": "Parent Group";
19
- readonly "groupProfileCard.listItemTitle.childGroups": "Child Groups";
20
- readonly "membersListCard.title": "Members";
21
- readonly "membersListCard.subtitle": "of {{groupName}}";
22
- readonly "membersListCard.paginationLabel": ", page {{page}} of {{nbPages}}";
23
- readonly "membersListCard.noMembersDescription": "This group has no members.";
24
- readonly "membersListCard.aggregateMembersToggle.ariaLabel": "Users Type Switch";
25
- readonly "membersListCard.aggregateMembersToggle.directMembers": "Direct Members";
26
- readonly "membersListCard.aggregateMembersToggle.aggregatedMembers": "Aggregated Members";
27
- readonly "ownershipCard.title": "Ownership";
28
- readonly "ownershipCard.aggregateRelationsToggle.ariaLabel": "Ownership Type Switch";
29
- readonly "ownershipCard.aggregateRelationsToggle.directRelations": "Direct Relations";
30
- readonly "ownershipCard.aggregateRelationsToggle.aggregatedRelations": "Aggregated Relations";
31
- readonly "userProfileCard.editIconButtonTitle": "Edit Metadata";
32
- readonly "userProfileCard.listItemTitle.email": "Email";
33
- readonly "userProfileCard.listItemTitle.memberOf": "Member of";
34
- readonly "userProfileCard.userNotFound": "User not found";
35
- readonly "userProfileCard.moreGroupButtonTitle": "...More ({{number}})";
36
- readonly "userProfileCard.allGroupDialog.title": "All {{name}}'s groups:";
37
- readonly "userProfileCard.allGroupDialog.closeButtonTitle": "Close";
38
- }>;
39
-
40
8
  /** @alpha */
41
9
  declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin<{}, {
42
10
  catalogIndex: _backstage_core_plugin_api.ExternalRouteRef<undefined, true>;
@@ -157,4 +125,33 @@ declare const _default: _backstage_frontend_plugin_api.OverridableFrontendPlugin
157
125
  }>;
158
126
  }>;
159
127
 
128
+ /**
129
+ * @alpha
130
+ * @deprecated Import from `@backstage/plugin-org` instead.
131
+ */
132
+ declare const orgTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"org", {
133
+ readonly "groupProfileCard.groupNotFound": "Group not found";
134
+ readonly "groupProfileCard.editIconButtonTitle": "Edit Metadata";
135
+ readonly "groupProfileCard.refreshIconButtonTitle": "Schedule entity refresh";
136
+ readonly "groupProfileCard.refreshIconButtonAriaLabel": "Refresh";
137
+ readonly "groupProfileCard.listItemTitle.email": "Email";
138
+ readonly "groupProfileCard.listItemTitle.entityRef": "Entity Ref";
139
+ readonly "groupProfileCard.listItemTitle.parentGroup": "Parent Group";
140
+ readonly "groupProfileCard.listItemTitle.childGroups": "Child Groups";
141
+ readonly "membersListCard.title": "{{groupName}} members";
142
+ readonly "membersListCard.cardLabel": "User page for {{memberName}}";
143
+ readonly "membersListCard.noMembersDescription": "This group has no members.";
144
+ readonly "membersListCard.noSearchResult": "Found no members matching \"{{searchTerm}}\".";
145
+ readonly "membersListCard.aggregateMembersToggle.label": "Include subgroups";
146
+ readonly "ownershipCard.title": "Ownership";
147
+ readonly "ownershipCard.aggregateRelationsToggle.label": "Include indirect ownership";
148
+ readonly "userProfileCard.editIconButtonTitle": "Edit Metadata";
149
+ readonly "userProfileCard.listItemTitle.email": "Email";
150
+ readonly "userProfileCard.listItemTitle.memberOf": "Member of";
151
+ readonly "userProfileCard.userNotFound": "User not found";
152
+ readonly "userProfileCard.moreGroupButtonTitle": "...More ({{number}})";
153
+ readonly "userProfileCard.allGroupDialog.title": "All {{name}}'s groups:";
154
+ readonly "userProfileCard.allGroupDialog.closeButtonTitle": "Close";
155
+ }>;
156
+
160
157
  export { _default as default, orgTranslationRef };
package/dist/alpha.esm.js CHANGED
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
3
  import { catalogIndexRouteRef } from './routes.esm.js';
4
4
  import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
5
- export { orgTranslationRef } from './translation.esm.js';
5
+ import { orgTranslationRef as orgTranslationRef$1 } from './translation.esm.js';
6
6
 
7
7
  const EntityGroupProfileCard = EntityCardBlueprint.make({
8
8
  name: "group-profile",
@@ -97,6 +97,7 @@ var alpha = createFrontendPlugin({
97
97
  catalogIndex: catalogIndexRouteRef
98
98
  }
99
99
  });
100
+ const orgTranslationRef = orgTranslationRef$1;
100
101
 
101
- export { alpha as default };
102
+ export { alpha as default, orgTranslationRef };
102
103
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { catalogIndexRouteRef } from './routes';\nimport { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';\n\n/** @alpha */\nconst EntityGroupProfileCard = EntityCardBlueprint.make({\n name: 'group-profile',\n params: {\n type: 'info',\n filter: { kind: 'group' },\n loader: async () =>\n import('./components/Cards/Group/GroupProfile/GroupProfileCard').then(\n m => <m.GroupProfileCard />,\n ),\n },\n});\n\n/** @alpha */\nconst EntityMembersListCard = EntityCardBlueprint.makeWithOverrides({\n name: 'members-list',\n config: {\n schema: {\n initialRelationAggregation: z =>\n z.enum(['direct', 'aggregated']).optional(),\n showAggregateMembersToggle: z => z.boolean().optional(),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n filter: { kind: 'group' },\n loader: async () =>\n import('./components/Cards/Group/MembersList/MembersListCard').then(\n m => (\n <m.MembersListCard\n relationAggregation={config.initialRelationAggregation}\n showAggregateMembersToggle={config.showAggregateMembersToggle}\n />\n ),\n ),\n });\n },\n});\n\n/** @alpha */\nconst EntityOwnershipCard = EntityCardBlueprint.makeWithOverrides({\n name: 'ownership',\n config: {\n schema: {\n initialRelationAggregation: z =>\n z.enum(['direct', 'aggregated']).optional(),\n showAggregateMembersToggle: z => z.boolean().optional(),\n ownedKinds: z => z.array(z.string()).optional(),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n filter: { kind: { $in: ['group', 'user'] } },\n loader: async () =>\n import('./components/Cards/OwnershipCard/OwnershipCard').then(m => (\n <m.OwnershipCard\n relationAggregation={config.initialRelationAggregation}\n hideRelationsToggle={\n config.showAggregateMembersToggle === undefined\n ? undefined\n : !config.showAggregateMembersToggle\n }\n entityFilterKind={\n config.ownedKinds ?? ['Component', 'API', 'System', 'Resource']\n }\n />\n )),\n });\n },\n});\n\n/** @alpha */\nconst EntityUserProfileCard = EntityCardBlueprint.makeWithOverrides({\n name: 'user-profile',\n config: {\n schema: {\n maxRelations: z => z.number().optional(),\n hideIcons: z => z.boolean().default(false),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n type: 'info',\n filter: { kind: 'user' },\n loader: async () =>\n import('./components/Cards/User/UserProfileCard/UserProfileCard').then(\n m => (\n <m.UserProfileCard\n maxRelations={config.maxRelations}\n hideIcons={config.hideIcons}\n />\n ),\n ),\n });\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'org',\n info: { packageJson: () => import('../package.json') },\n extensions: [\n EntityGroupProfileCard,\n EntityMembersListCard,\n EntityOwnershipCard,\n EntityUserProfileCard,\n ],\n externalRoutes: {\n catalogIndex: catalogIndexRouteRef,\n },\n});\n\nexport { orgTranslationRef } from './translation';\n"],"names":[],"mappings":";;;;;;AAqBA,MAAM,sBAAA,GAAyB,oBAAoB,IAAA,CAAK;AAAA,EACtD,IAAA,EAAM,eAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,MAAA;AAAA,IACN,MAAA,EAAQ,EAAE,IAAA,EAAM,OAAA,EAAQ;AAAA,IACxB,MAAA,EAAQ,YACN,OAAO,+DAAwD,CAAA,CAAE,IAAA;AAAA,MAC/D,CAAA,CAAA,qBAAK,GAAA,CAAC,CAAA,CAAE,gBAAA,EAAF,EAAmB;AAAA;AAC3B;AAEN,CAAC,CAAA;AAGD,MAAM,qB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pB;AAEJ,KACH,CAAA;AAAA,EACH;AACF,CAAC,CAAA;AAGD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,KAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,UAAA,EAAY;AAAA,IACV,sBAAA;AAAA,IACA,qBAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,YAAA,EAAc;AAAA;AAElB,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { catalogIndexRouteRef } from './routes';\nimport { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';\n\n/** @alpha */\nconst EntityGroupProfileCard = EntityCardBlueprint.make({\n name: 'group-profile',\n params: {\n type: 'info',\n filter: { kind: 'group' },\n loader: async () =>\n import('./components/Cards/Group/GroupProfile/GroupProfileCard').then(\n m => <m.GroupProfileCard />,\n ),\n },\n});\n\n/** @alpha */\nconst EntityMembersListCard = EntityCardBlueprint.makeWithOverrides({\n name: 'members-list',\n config: {\n schema: {\n initialRelationAggregation: z =>\n z.enum(['direct', 'aggregated']).optional(),\n showAggregateMembersToggle: z => z.boolean().optional(),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n filter: { kind: 'group' },\n loader: async () =>\n import('./components/Cards/Group/MembersList/MembersListCard').then(\n m => (\n <m.MembersListCard\n relationAggregation={config.initialRelationAggregation}\n showAggregateMembersToggle={config.showAggregateMembersToggle}\n />\n ),\n ),\n });\n },\n});\n\n/** @alpha */\nconst EntityOwnershipCard = EntityCardBlueprint.makeWithOverrides({\n name: 'ownership',\n config: {\n schema: {\n initialRelationAggregation: z =>\n z.enum(['direct', 'aggregated']).optional(),\n showAggregateMembersToggle: z => z.boolean().optional(),\n ownedKinds: z => z.array(z.string()).optional(),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n filter: { kind: { $in: ['group', 'user'] } },\n loader: async () =>\n import('./components/Cards/OwnershipCard/OwnershipCard').then(m => (\n <m.OwnershipCard\n relationAggregation={config.initialRelationAggregation}\n hideRelationsToggle={\n config.showAggregateMembersToggle === undefined\n ? undefined\n : !config.showAggregateMembersToggle\n }\n entityFilterKind={\n config.ownedKinds ?? ['Component', 'API', 'System', 'Resource']\n }\n />\n )),\n });\n },\n});\n\n/** @alpha */\nconst EntityUserProfileCard = EntityCardBlueprint.makeWithOverrides({\n name: 'user-profile',\n config: {\n schema: {\n maxRelations: z => z.number().optional(),\n hideIcons: z => z.boolean().default(false),\n },\n },\n factory(originalFactory, { config }) {\n return originalFactory({\n type: 'info',\n filter: { kind: 'user' },\n loader: async () =>\n import('./components/Cards/User/UserProfileCard/UserProfileCard').then(\n m => (\n <m.UserProfileCard\n maxRelations={config.maxRelations}\n hideIcons={config.hideIcons}\n />\n ),\n ),\n });\n },\n});\n\n/** @alpha */\nexport default createFrontendPlugin({\n pluginId: 'org',\n info: { packageJson: () => import('../package.json') },\n extensions: [\n EntityGroupProfileCard,\n EntityMembersListCard,\n EntityOwnershipCard,\n EntityUserProfileCard,\n ],\n externalRoutes: {\n catalogIndex: catalogIndexRouteRef,\n },\n});\n\nimport { orgTranslationRef as _orgTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-org` instead.\n */\nexport const orgTranslationRef = _orgTranslationRef;\n"],"names":["_org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AA,EACA,OAAA,CAAQ,eAAA,EAAiB,EAAE,MAAA,EAAO,EAAG;AACnC,IAAA,OAAO,eAAA,CAAgB;AAAA,MACrB,IAAA,EAAM,MAAA;AAAA,MACN,MAAA,EAAQ,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,MACvB,MAAA,EAAQ,YACN,OAAO,gEAAyD,CAAA,CAAE,IAAA;AAAA,QAChE,CAAA,CAAA,qBACE,GAAA;AAAA,UAAC,CAAA,CAAE,eAAA;AAAA,UAAF;AAAA,YACC,cAAc,MAAA,CAAO,YAAA;AAAA,YACrB,WAAW,MAAA,CAAO;AAAA;AAAA;AACpB;AAEJ,KACH,CAAA;AAAA,EACH;AACF,CAAC,CAAA;AAGD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,KAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,UAAA,EAAY;AAAA,IACV,sBAAA;AAAA,IACA,qBAAA;AAAA,IACA,mBAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,YAAA,EAAc;AAAA;AAElB,CAAC,CAAA;AAQM,MAAM,iBAAA,GAAoBA;;;;"}
@@ -1,14 +1,13 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { stringifyEntityRef, RELATION_PARENT_OF, RELATION_CHILD_OF, ANNOTATION_LOCATION, ANNOTATION_EDIT_URL } from '@backstage/catalog-model';
3
- import { Link, InfoCard, Avatar } from '@backstage/core-components';
4
- import Box from '@material-ui/core/Box';
3
+ import { Link } from '@backstage/core-components';
5
4
  import IconButton from '@material-ui/core/IconButton';
6
5
  import List from '@material-ui/core/List';
7
6
  import ListItem from '@material-ui/core/ListItem';
8
7
  import ListItemIcon from '@material-ui/core/ListItemIcon';
9
8
  import ListItemText from '@material-ui/core/ListItemText';
10
9
  import Tooltip from '@material-ui/core/Tooltip';
11
- import { catalogApiRef, useEntity, getEntityRelations, EntityRefLinks } from '@backstage/plugin-catalog-react';
10
+ import { catalogApiRef, useEntity, getEntityRelations, EntityInfoCard, EntityRefLinks } from '@backstage/plugin-catalog-react';
12
11
  import { useCallback } from 'react';
13
12
  import { useApi, alertApiRef } from '@backstage/core-plugin-api';
14
13
  import AccountTreeIcon from '@material-ui/icons/AccountTree';
@@ -24,6 +23,7 @@ import { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common
24
23
  import { useTranslationRef } from '@backstage/frontend-plugin-api';
25
24
  import { orgTranslationRef } from '../../../../translation.esm.js';
26
25
  import { makeStyles } from '@material-ui/core/styles';
26
+ import { Text, Box, Flex, Avatar } from '@backstage/ui';
27
27
 
28
28
  const useStyles = makeStyles((theme) => ({
29
29
  container: {
@@ -37,11 +37,20 @@ const useStyles = makeStyles((theme) => ({
37
37
  marginLeft: theme.spacing(0.5)
38
38
  }
39
39
  }));
40
- const CardTitle = (props) => /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", children: [
41
- /* @__PURE__ */ jsx(GroupIcon, { fontSize: "inherit" }),
42
- /* @__PURE__ */ jsx(Box, { ml: 1, children: props.title })
40
+ const CardTitle = (props) => /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", children: [
41
+ /* @__PURE__ */ jsx(
42
+ Avatar,
43
+ {
44
+ size: "small",
45
+ purpose: "decoration",
46
+ name: props.title,
47
+ src: props.pictureSrc || ""
48
+ }
49
+ ),
50
+ props.title
43
51
  ] });
44
52
  const GroupProfileCard = (props) => {
53
+ const { showLinks } = props;
45
54
  const catalogApi = useApi(catalogApiRef);
46
55
  const alertApi = useApi(alertApiRef);
47
56
  const { entity: group } = useEntity();
@@ -94,13 +103,11 @@ const GroupProfileCard = (props) => {
94
103
  children: /* @__PURE__ */ jsx(EditIcon, {})
95
104
  }
96
105
  );
97
- return /* @__PURE__ */ jsx(
98
- InfoCard,
106
+ return /* @__PURE__ */ jsxs(
107
+ EntityInfoCard,
99
108
  {
100
- title: /* @__PURE__ */ jsx(CardTitle, { title: displayName }),
101
- subheader: description,
102
- variant: props.variant,
103
- action: /* @__PURE__ */ jsxs(Fragment, { children: [
109
+ title: /* @__PURE__ */ jsx(CardTitle, { title: displayName, pictureSrc: profile?.picture }),
110
+ headerActions: /* @__PURE__ */ jsxs(Fragment, { children: [
104
111
  allowRefresh && canRefresh && /* @__PURE__ */ jsx(
105
112
  IconButton,
106
113
  {
@@ -112,9 +119,9 @@ const GroupProfileCard = (props) => {
112
119
  ),
113
120
  infoCardAction
114
121
  ] }),
115
- children: /* @__PURE__ */ jsxs(Box, { className: classes.container, children: [
116
- /* @__PURE__ */ jsx(Avatar, { displayName, picture: profile?.picture }),
117
- /* @__PURE__ */ jsxs(List, { className: classes.list, children: [
122
+ children: [
123
+ description && /* @__PURE__ */ jsx(Text, { color: "secondary", children: description }),
124
+ /* @__PURE__ */ jsx(Box, { p: "2", children: /* @__PURE__ */ jsxs(List, { className: classes.list, children: [
118
125
  /* @__PURE__ */ jsxs(ListItem, { children: [
119
126
  /* @__PURE__ */ jsx(ListItemIcon, { children: /* @__PURE__ */ jsx(Tooltip, { title: t("groupProfileCard.listItemTitle.entityRef"), children: /* @__PURE__ */ jsx(PermIdentityIcon, {}) }) }),
120
127
  /* @__PURE__ */ jsx(
@@ -167,9 +174,9 @@ const GroupProfileCard = (props) => {
167
174
  }
168
175
  )
169
176
  ] }),
170
- props?.showLinks && /* @__PURE__ */ jsx(LinksGroup, { links })
171
- ] })
172
- ] })
177
+ showLinks && /* @__PURE__ */ jsx(LinksGroup, { links })
178
+ ] }) })
179
+ ]
173
180
  }
174
181
  );
175
182
  };
@@ -1 +1 @@
1
- {"version":3,"file":"GroupProfileCard.esm.js","sources":["../../../../../src/components/Cards/Group/GroupProfile/GroupProfileCard.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 ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n GroupEntity,\n RELATION_CHILD_OF,\n RELATION_PARENT_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport {\n Avatar,\n InfoCard,\n InfoCardVariants,\n Link,\n} from '@backstage/core-components';\nimport Box from '@material-ui/core/Box';\nimport IconButton from '@material-ui/core/IconButton';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport {\n EntityRefLinks,\n catalogApiRef,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { useCallback } from 'react';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport AccountTreeIcon from '@material-ui/icons/AccountTree';\nimport Alert from '@material-ui/lab/Alert';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport EditIcon from '@material-ui/icons/Edit';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport PermIdentityIcon from '@material-ui/icons/PermIdentity';\nimport { LinksGroup } from '../../Meta';\nimport { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';\nimport { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport { orgTranslationRef } from '../../../../translation';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles(theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n gap: theme.spacing(1),\n padding: theme.spacing(1),\n },\n list: {\n padding: 0,\n marginLeft: theme.spacing(0.5),\n },\n}));\n\nconst CardTitle = (props: { title: string }) => (\n <Box display=\"flex\" alignItems=\"center\">\n <GroupIcon fontSize=\"inherit\" />\n <Box ml={1}>{props.title}</Box>\n </Box>\n);\n\n/** @public */\nexport const GroupProfileCard = (props: {\n variant?: InfoCardVariants;\n showLinks?: boolean;\n}) => {\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const { entity: group } = useEntity<GroupEntity>();\n const { allowed: canRefresh } = useEntityPermission(\n catalogEntityRefreshPermission,\n );\n const { t } = useTranslationRef(orgTranslationRef);\n const classes = useStyles();\n\n const refreshEntity = useCallback(async () => {\n await catalogApi.refreshEntity(stringifyEntityRef(group));\n alertApi.post({\n message: 'Refresh scheduled',\n severity: 'info',\n display: 'transient',\n });\n }, [catalogApi, alertApi, group]);\n\n if (!group) {\n return (\n <Alert severity=\"error\">{t('groupProfileCard.groupNotFound')}</Alert>\n );\n }\n\n const {\n metadata: { name, description, title, annotations, links },\n spec: { profile },\n } = group;\n\n const childRelations = getEntityRelations(group, RELATION_PARENT_OF, {\n kind: 'Group',\n });\n const parentRelations = getEntityRelations(group, RELATION_CHILD_OF, {\n kind: 'group',\n });\n\n const entityLocation = annotations?.[ANNOTATION_LOCATION];\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n\n const entityMetadataEditUrl =\n group.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n const displayName = profile?.displayName ?? title ?? name;\n const emailHref = profile?.email ? `mailto:${profile.email}` : '#';\n const infoCardAction = entityMetadataEditUrl ? (\n <IconButton\n aria-label={t('groupProfileCard.editIconButtonTitle')}\n title={t('groupProfileCard.editIconButtonTitle')}\n component={Link}\n to={entityMetadataEditUrl}\n >\n <EditIcon />\n </IconButton>\n ) : (\n <IconButton\n aria-label={t('groupProfileCard.editIconButtonTitle')}\n disabled\n title={t('groupProfileCard.editIconButtonTitle')}\n >\n <EditIcon />\n </IconButton>\n );\n\n return (\n <InfoCard\n title={<CardTitle title={displayName} />}\n subheader={description}\n variant={props.variant}\n action={\n <>\n {allowRefresh && canRefresh && (\n <IconButton\n aria-label={t('groupProfileCard.refreshIconButtonAriaLabel')}\n title={t('groupProfileCard.refreshIconButtonTitle')}\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n {infoCardAction}\n </>\n }\n >\n <Box className={classes.container}>\n <Avatar displayName={displayName} picture={profile?.picture} />\n <List className={classes.list}>\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.entityRef')}>\n <PermIdentityIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={stringifyEntityRef(group)}\n secondary={t('groupProfileCard.listItemTitle.entityRef')}\n />\n </ListItem>\n {profile?.email && (\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.email')}>\n <EmailIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={<Link to={emailHref}>{profile.email}</Link>}\n secondary={t('groupProfileCard.listItemTitle.email')}\n />\n </ListItem>\n )}\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.parentGroup')}>\n <AccountTreeIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n parentRelations.length ? (\n <EntityRefLinks\n entityRefs={parentRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary={t('groupProfileCard.listItemTitle.parentGroup')}\n />\n </ListItem>\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.childGroups')}>\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n childRelations.length ? (\n <EntityRefLinks\n entityRefs={childRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary={t('groupProfileCard.listItemTitle.childGroups')}\n />\n </ListItem>\n {props?.showLinks && <LinksGroup links={links} />}\n </List>\n </Box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AAA,EAAgB,CAAA,EACnB,CAAA,EACF,CAAA;AAAA,4BACA,GAAA;AAAA,cAAC,YAAA;AAAA,cAAA;AAAA,gBACC,OAAA,EACE,gBAAgB,MAAA,mBACd,GAAA;AAAA,kBAAC,cAAA;AAAA,kBAAA;AAAA,oBACC,UAAA,EAAY,eAAA;AAAA,oBACZ,WAAA,EAAY;AAAA;AAAA,iBACd,GAEA,KAAA;AAAA,gBAGJ,SAAA,EAAW,EAAE,4CAA4C;AAAA;AAAA;AAC3D,WAAA,EACF,CAAA;AAAA,+BACC,QAAA,EAAA,EACC,QAAA,EAAA;AAAA,4BAAA,GAAA,CAAC,YAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,OAAA,EAAA,EAAQ,KAAA,EAAO,CAAA,CAAE,4CAA4C,CAAA,EAC5D,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,CAAA,EACb,CAAA,EACF,CAAA;AAAA,4BACA,GAAA;AAAA,cAAC,YAAA;AAAA,cAAA;AAAA,gBACC,OAAA,EACE,eAAe,MAAA,mBACb,GAAA;AAAA,kBAAC,cAAA;AAAA,kBAAA;AAAA,oBACC,UAAA,EAAY,cAAA;AAAA,oBACZ,WAAA,EAAY;AAAA;AAAA,iBACd,GAEA,KAAA;AAAA,gBAGJ,SAAA,EAAW,EAAE,4CAA4C;AAAA;AAAA;AAC3D,WAAA,EACF,CAAA;AAAA,UACC,KAAA,EAAO,SAAA,oBAAa,GAAA,CAAC,UAAA,EAAA,EAAW,KAAA,EAAc;AAAA,SAAA,EACjD;AAAA,OAAA,EACF;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"GroupProfileCard.esm.js","sources":["../../../../../src/components/Cards/Group/GroupProfile/GroupProfileCard.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 ANNOTATION_EDIT_URL,\n ANNOTATION_LOCATION,\n GroupEntity,\n RELATION_CHILD_OF,\n RELATION_PARENT_OF,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { Link } from '@backstage/core-components';\nimport IconButton from '@material-ui/core/IconButton';\nimport List from '@material-ui/core/List';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemIcon from '@material-ui/core/ListItemIcon';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport Tooltip from '@material-ui/core/Tooltip';\nimport {\n EntityInfoCard,\n EntityRefLinks,\n catalogApiRef,\n getEntityRelations,\n useEntity,\n} from '@backstage/plugin-catalog-react';\nimport { useCallback } from 'react';\nimport { alertApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport AccountTreeIcon from '@material-ui/icons/AccountTree';\nimport Alert from '@material-ui/lab/Alert';\nimport CachedIcon from '@material-ui/icons/Cached';\nimport EditIcon from '@material-ui/icons/Edit';\nimport EmailIcon from '@material-ui/icons/Email';\nimport GroupIcon from '@material-ui/icons/Group';\nimport PermIdentityIcon from '@material-ui/icons/PermIdentity';\nimport { LinksGroup } from '../../Meta';\nimport { useEntityPermission } from '@backstage/plugin-catalog-react/alpha';\nimport { catalogEntityRefreshPermission } from '@backstage/plugin-catalog-common/alpha';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport { orgTranslationRef } from '../../../../translation';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Avatar, Flex, Box, Text } from '@backstage/ui';\n\nconst useStyles = makeStyles(theme => ({\n container: {\n display: 'flex',\n flexWrap: 'wrap',\n gap: theme.spacing(1),\n padding: theme.spacing(1),\n },\n list: {\n padding: 0,\n marginLeft: theme.spacing(0.5),\n },\n}));\n\nconst CardTitle = (props: { title: string; pictureSrc?: string }) => (\n <Flex align=\"center\" gap=\"2\">\n <Avatar\n size=\"small\"\n purpose=\"decoration\"\n name={props.title}\n src={props.pictureSrc || ''}\n />\n {props.title}\n </Flex>\n);\n\n/** @public */\nexport const GroupProfileCard = (props: { showLinks?: boolean }) => {\n const { showLinks } = props;\n const catalogApi = useApi(catalogApiRef);\n const alertApi = useApi(alertApiRef);\n const { entity: group } = useEntity<GroupEntity>();\n const { allowed: canRefresh } = useEntityPermission(\n catalogEntityRefreshPermission,\n );\n const { t } = useTranslationRef(orgTranslationRef);\n const classes = useStyles();\n\n const refreshEntity = useCallback(async () => {\n await catalogApi.refreshEntity(stringifyEntityRef(group));\n alertApi.post({\n message: 'Refresh scheduled',\n severity: 'info',\n display: 'transient',\n });\n }, [catalogApi, alertApi, group]);\n\n if (!group) {\n return (\n <Alert severity=\"error\">{t('groupProfileCard.groupNotFound')}</Alert>\n );\n }\n\n const {\n metadata: { name, description, title, annotations, links },\n spec: { profile },\n } = group;\n\n const childRelations = getEntityRelations(group, RELATION_PARENT_OF, {\n kind: 'Group',\n });\n const parentRelations = getEntityRelations(group, RELATION_CHILD_OF, {\n kind: 'group',\n });\n\n const entityLocation = annotations?.[ANNOTATION_LOCATION];\n const allowRefresh =\n entityLocation?.startsWith('url:') || entityLocation?.startsWith('file:');\n\n const entityMetadataEditUrl =\n group.metadata.annotations?.[ANNOTATION_EDIT_URL];\n\n const displayName = profile?.displayName ?? title ?? name;\n const emailHref = profile?.email ? `mailto:${profile.email}` : '#';\n const infoCardAction = entityMetadataEditUrl ? (\n <IconButton\n aria-label={t('groupProfileCard.editIconButtonTitle')}\n title={t('groupProfileCard.editIconButtonTitle')}\n component={Link}\n to={entityMetadataEditUrl}\n >\n <EditIcon />\n </IconButton>\n ) : (\n <IconButton\n aria-label={t('groupProfileCard.editIconButtonTitle')}\n disabled\n title={t('groupProfileCard.editIconButtonTitle')}\n >\n <EditIcon />\n </IconButton>\n );\n\n return (\n <EntityInfoCard\n title={<CardTitle title={displayName} pictureSrc={profile?.picture} />}\n headerActions={\n <>\n {allowRefresh && canRefresh && (\n <IconButton\n aria-label={t('groupProfileCard.refreshIconButtonAriaLabel')}\n title={t('groupProfileCard.refreshIconButtonTitle')}\n onClick={refreshEntity}\n >\n <CachedIcon />\n </IconButton>\n )}\n {infoCardAction}\n </>\n }\n >\n {description && <Text color=\"secondary\">{description}</Text>}\n <Box p=\"2\">\n <List className={classes.list}>\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.entityRef')}>\n <PermIdentityIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={stringifyEntityRef(group)}\n secondary={t('groupProfileCard.listItemTitle.entityRef')}\n />\n </ListItem>\n {profile?.email && (\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.email')}>\n <EmailIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={<Link to={emailHref}>{profile.email}</Link>}\n secondary={t('groupProfileCard.listItemTitle.email')}\n />\n </ListItem>\n )}\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.parentGroup')}>\n <AccountTreeIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n parentRelations.length ? (\n <EntityRefLinks\n entityRefs={parentRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary={t('groupProfileCard.listItemTitle.parentGroup')}\n />\n </ListItem>\n <ListItem>\n <ListItemIcon>\n <Tooltip title={t('groupProfileCard.listItemTitle.childGroups')}>\n <GroupIcon />\n </Tooltip>\n </ListItemIcon>\n <ListItemText\n primary={\n childRelations.length ? (\n <EntityRefLinks\n entityRefs={childRelations}\n defaultKind=\"Group\"\n />\n ) : (\n 'N/A'\n )\n }\n secondary={t('groupProfileCard.listItemTitle.childGroups')}\n />\n </ListItem>\n {showLinks && <LinksGroup links={links} />}\n </List>\n </Box>\n </Ent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