@backstage/plugin-catalog-react 2.1.0-next.2 → 2.1.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 +27 -0
- package/dist/alpha.d.ts +111 -30
- package/dist/alpha.esm.js +9 -1
- package/dist/alpha.esm.js.map +1 -1
- package/dist/components/EntityDataTable/EntityDataTable.esm.js +49 -0
- package/dist/components/EntityDataTable/EntityDataTable.esm.js.map +1 -0
- package/dist/components/EntityDataTable/columnFactories.esm.js +119 -0
- package/dist/components/EntityDataTable/columnFactories.esm.js.map +1 -0
- package/dist/components/EntityDataTable/presets.esm.js +43 -0
- package/dist/components/EntityDataTable/presets.esm.js.map +1 -0
- package/dist/components/EntityRelationCard/EntityRelationCard.esm.js +65 -0
- package/dist/components/EntityRelationCard/EntityRelationCard.esm.js.map +1 -0
- package/dist/index.d.ts +93 -1
- package/dist/index.esm.js +1 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/translation.esm.js +3 -0
- package/dist/translation.esm.js.map +1 -1
- package/package.json +24 -24
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c548a0f: Added `EntityDataTable`, `EntityRelationCard`, `entityDataTableColumns`, `entityColumnPresets`, and related types as alpha exports. These replace `EntityTable` and `RelatedEntitiesCard` (from `@backstage/plugin-catalog`) respectively, providing a unified BUI-based pattern for entity table cards.
|
|
8
|
+
- 4d58894: Added `aliases` and `contentOrder` fields to `EntityContentGroupDefinition`, allowing groups to declare alias IDs and control the sort order of their content items.
|
|
9
|
+
- d14b6e0: Exported `useEntityRefLink` hook that returns a function for generating entity page URLs from entity references.
|
|
10
|
+
- 0be2541: Promoted the plugin's translation ref to the stable package entry point. It was previously only available through the alpha entry point.
|
|
11
|
+
- c6080eb: Added `EntityInfoCard` component to `@backstage/plugin-catalog-react` as a BUI-based card wrapper for entity page cards.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- a49a40d: Updated dependency `zod` to `^3.25.76 || ^4.0.0` & migrated to `/v3` or `/v4` imports.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @backstage/ui@0.13.0
|
|
18
|
+
- @backstage/core-compat-api@0.5.9
|
|
19
|
+
- @backstage/core-plugin-api@1.12.4
|
|
20
|
+
- @backstage/core-components@0.18.8
|
|
21
|
+
- @backstage/frontend-plugin-api@0.15.0
|
|
22
|
+
- @backstage/catalog-client@1.14.0
|
|
23
|
+
- @backstage/frontend-test-utils@0.5.1
|
|
24
|
+
- @backstage/plugin-permission-react@0.4.41
|
|
25
|
+
- @backstage/filter-predicates@0.1.1
|
|
26
|
+
- @backstage/plugin-permission-common@0.9.7
|
|
27
|
+
- @backstage/catalog-model@1.7.7
|
|
28
|
+
- @backstage/integration-react@1.2.16
|
|
29
|
+
|
|
3
30
|
## 2.1.0-next.2
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { FilterPredicate } from '@backstage/filter-predicates';
|
|
|
6
6
|
import { Entity } from '@backstage/catalog-model';
|
|
7
7
|
import { IconLinkVerticalProps } from '@backstage/core-components';
|
|
8
8
|
import { ResourcePermission } from '@backstage/plugin-permission-common';
|
|
9
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
|
+
import { ColumnConfig, TableItem } from '@backstage/ui';
|
|
9
11
|
|
|
10
12
|
/**
|
|
11
13
|
* Returns true if the `owner` argument is a direct owner on the `entity` argument.
|
|
@@ -323,7 +325,113 @@ declare function convertLegacyEntityContentExtension(LegacyExtension: ComponentT
|
|
|
323
325
|
defaultTitle?: [Error: `Use the 'title' override instead`];
|
|
324
326
|
}): ExtensionDefinition;
|
|
325
327
|
|
|
328
|
+
/**
|
|
329
|
+
* A thin wrapper around the
|
|
330
|
+
* {@link @backstage/plugin-permission-react#usePermission} hook which uses the
|
|
331
|
+
* current entity in context to make an authorization request for the given
|
|
332
|
+
* {@link @backstage/plugin-catalog-common#CatalogEntityPermission}.
|
|
333
|
+
*
|
|
334
|
+
* Note: this hook blocks the permission request until the entity has loaded in
|
|
335
|
+
* context. If you have the entityRef and need concurrent requests, use the
|
|
336
|
+
* `usePermission` hook directly.
|
|
337
|
+
* @alpha
|
|
338
|
+
*/
|
|
339
|
+
declare function useEntityPermission(permission: ResourcePermission<'catalog-entity'>): {
|
|
340
|
+
loading: boolean;
|
|
341
|
+
allowed: boolean;
|
|
342
|
+
error?: Error;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @alpha
|
|
347
|
+
*/
|
|
348
|
+
type EntityTableColumnTitleProps = {
|
|
349
|
+
translationKey: 'name' | 'system' | 'owner' | 'type' | 'lifecycle' | 'namespace' | 'description' | 'tags' | 'targets' | 'title' | 'label' | 'domain';
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* @alpha
|
|
353
|
+
*/
|
|
354
|
+
declare const EntityTableColumnTitle: ({ translationKey, }: EntityTableColumnTitleProps) => "System" | "Title" | "Domain" | "Lifecycle" | "Namespace" | "Owner" | "Tags" | "Type" | "Name" | "Description" | "Targets" | "Label";
|
|
355
|
+
|
|
356
|
+
/** @public */
|
|
357
|
+
type EntityRow = Entity & TableItem;
|
|
358
|
+
/** @public */
|
|
359
|
+
interface EntityColumnConfig extends ColumnConfig<EntityRow> {
|
|
360
|
+
sortValue?: (entity: EntityRow) => string;
|
|
361
|
+
}
|
|
362
|
+
/** @public */
|
|
363
|
+
declare const columnFactories: Readonly<{
|
|
364
|
+
createEntityRefColumn(options: {
|
|
365
|
+
defaultKind?: string;
|
|
366
|
+
isRowHeader?: boolean;
|
|
367
|
+
}): EntityColumnConfig;
|
|
368
|
+
createEntityRelationColumn(options: {
|
|
369
|
+
id: string;
|
|
370
|
+
translationKey: "owner" | "system" | "domain";
|
|
371
|
+
relation: string;
|
|
372
|
+
defaultKind?: string;
|
|
373
|
+
filter?: {
|
|
374
|
+
kind: string;
|
|
375
|
+
};
|
|
376
|
+
}): EntityColumnConfig;
|
|
377
|
+
createOwnerColumn(): EntityColumnConfig;
|
|
378
|
+
createSystemColumn(): EntityColumnConfig;
|
|
379
|
+
createDomainColumn(): EntityColumnConfig;
|
|
380
|
+
createMetadataDescriptionColumn(): EntityColumnConfig;
|
|
381
|
+
createSpecTypeColumn(): EntityColumnConfig;
|
|
382
|
+
createSpecLifecycleColumn(): EntityColumnConfig;
|
|
383
|
+
}>;
|
|
384
|
+
|
|
385
|
+
/** @public */
|
|
386
|
+
interface EntityDataTableProps {
|
|
387
|
+
columnConfig: EntityColumnConfig[];
|
|
388
|
+
data: Entity[];
|
|
389
|
+
loading?: boolean;
|
|
390
|
+
error?: Error;
|
|
391
|
+
emptyState?: ReactNode;
|
|
392
|
+
}
|
|
393
|
+
/** @public */
|
|
394
|
+
declare function EntityDataTable(props: EntityDataTableProps): react_jsx_runtime.JSX.Element;
|
|
395
|
+
|
|
326
396
|
/** @alpha */
|
|
397
|
+
declare const entityColumnPresets: {
|
|
398
|
+
readonly component: {
|
|
399
|
+
readonly columns: EntityColumnConfig[];
|
|
400
|
+
readonly helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component";
|
|
401
|
+
};
|
|
402
|
+
readonly resource: {
|
|
403
|
+
readonly columns: EntityColumnConfig[];
|
|
404
|
+
readonly helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource";
|
|
405
|
+
};
|
|
406
|
+
readonly system: {
|
|
407
|
+
readonly columns: EntityColumnConfig[];
|
|
408
|
+
readonly helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system";
|
|
409
|
+
};
|
|
410
|
+
readonly domain: {
|
|
411
|
+
readonly columns: EntityColumnConfig[];
|
|
412
|
+
readonly helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain";
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
/** @public */
|
|
417
|
+
interface EntityRelationCardProps {
|
|
418
|
+
title: string;
|
|
419
|
+
relationType: string;
|
|
420
|
+
entityKind?: string;
|
|
421
|
+
columnConfig: EntityColumnConfig[];
|
|
422
|
+
emptyState?: {
|
|
423
|
+
message: string;
|
|
424
|
+
helpLink?: string;
|
|
425
|
+
};
|
|
426
|
+
className?: string;
|
|
427
|
+
}
|
|
428
|
+
/** @public */
|
|
429
|
+
declare function EntityRelationCard(props: EntityRelationCardProps): react_jsx_runtime.JSX.Element;
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* @alpha
|
|
433
|
+
* @deprecated Import from `@backstage/plugin-catalog-react` instead.
|
|
434
|
+
*/
|
|
327
435
|
declare const catalogReactTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"catalog-react", {
|
|
328
436
|
readonly "catalogFilter.title": "Filters";
|
|
329
437
|
readonly "catalogFilter.buttonTitle": "Filters";
|
|
@@ -407,6 +515,7 @@ declare const catalogReactTranslationRef: _backstage_frontend_plugin_api.Transla
|
|
|
407
515
|
readonly "entityTableColumnTitle.owner": "Owner";
|
|
408
516
|
readonly "entityTableColumnTitle.lifecycle": "Lifecycle";
|
|
409
517
|
readonly "entityTableColumnTitle.targets": "Targets";
|
|
518
|
+
readonly "entityRelationCard.emptyHelpLinkTitle": "Learn how to change this.";
|
|
410
519
|
readonly "missingAnnotationEmptyState.title": "Missing Annotation";
|
|
411
520
|
readonly "missingAnnotationEmptyState.readMore": "Read more";
|
|
412
521
|
readonly "missingAnnotationEmptyState.annotationYaml": "Add the annotation to your {{entityKind}} YAML as shown in the highlighted example below:";
|
|
@@ -414,33 +523,5 @@ declare const catalogReactTranslationRef: _backstage_frontend_plugin_api.Transla
|
|
|
414
523
|
readonly "missingAnnotationEmptyState.generateDescription_other": "The annotations {{annotations}} are missing. You need to add the annotations to your {{entityKind}} if you want to enable this tool.";
|
|
415
524
|
}>;
|
|
416
525
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
* {@link @backstage/plugin-permission-react#usePermission} hook which uses the
|
|
420
|
-
* current entity in context to make an authorization request for the given
|
|
421
|
-
* {@link @backstage/plugin-catalog-common#CatalogEntityPermission}.
|
|
422
|
-
*
|
|
423
|
-
* Note: this hook blocks the permission request until the entity has loaded in
|
|
424
|
-
* context. If you have the entityRef and need concurrent requests, use the
|
|
425
|
-
* `usePermission` hook directly.
|
|
426
|
-
* @alpha
|
|
427
|
-
*/
|
|
428
|
-
declare function useEntityPermission(permission: ResourcePermission<'catalog-entity'>): {
|
|
429
|
-
loading: boolean;
|
|
430
|
-
allowed: boolean;
|
|
431
|
-
error?: Error;
|
|
432
|
-
};
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* @alpha
|
|
436
|
-
*/
|
|
437
|
-
type EntityTableColumnTitleProps = {
|
|
438
|
-
translationKey: 'name' | 'system' | 'owner' | 'type' | 'lifecycle' | 'namespace' | 'description' | 'tags' | 'targets' | 'title' | 'label' | 'domain';
|
|
439
|
-
};
|
|
440
|
-
/**
|
|
441
|
-
* @alpha
|
|
442
|
-
*/
|
|
443
|
-
declare const EntityTableColumnTitle: ({ translationKey, }: EntityTableColumnTitleProps) => "System" | "Title" | "Domain" | "Lifecycle" | "Namespace" | "Owner" | "Tags" | "Type" | "Name" | "Description" | "Targets" | "Label";
|
|
444
|
-
|
|
445
|
-
export { CatalogFilterBlueprint, EntityCardBlueprint, EntityContentBlueprint, EntityContentLayoutBlueprint, EntityContextMenuItemBlueprint, EntityHeaderBlueprint, EntityIconLinkBlueprint, EntityTableColumnTitle, catalogReactTranslationRef, convertLegacyEntityCardExtension, convertLegacyEntityContentExtension, defaultEntityContentGroupDefinitions, defaultEntityContentGroups, isOwnerOf, useEntityPermission };
|
|
446
|
-
export type { EntityCardType, EntityContentGroupDefinitions, EntityContentLayoutProps, EntityContextMenuItemParams, EntityTableColumnTitleProps, UseProps };
|
|
526
|
+
export { CatalogFilterBlueprint, EntityCardBlueprint, EntityContentBlueprint, EntityContentLayoutBlueprint, EntityContextMenuItemBlueprint, EntityDataTable, EntityHeaderBlueprint, EntityIconLinkBlueprint, EntityRelationCard, EntityTableColumnTitle, catalogReactTranslationRef, convertLegacyEntityCardExtension, convertLegacyEntityContentExtension, defaultEntityContentGroupDefinitions, defaultEntityContentGroups, entityColumnPresets, columnFactories as entityDataTableColumns, isOwnerOf, useEntityPermission };
|
|
527
|
+
export type { EntityCardType, EntityColumnConfig, EntityContentGroupDefinitions, EntityContentLayoutProps, EntityContextMenuItemParams, EntityDataTableProps, EntityRelationCardProps, EntityRow, EntityTableColumnTitleProps, UseProps };
|
package/dist/alpha.esm.js
CHANGED
|
@@ -8,8 +8,16 @@ export { EntityContextMenuItemBlueprint } from './alpha/blueprints/EntityContext
|
|
|
8
8
|
export { EntityIconLinkBlueprint } from './alpha/blueprints/EntityIconLinkBlueprint.esm.js';
|
|
9
9
|
export { convertLegacyEntityCardExtension } from './alpha/converters/convertLegacyEntityCardExtension.esm.js';
|
|
10
10
|
export { convertLegacyEntityContentExtension } from './alpha/converters/convertLegacyEntityContentExtension.esm.js';
|
|
11
|
-
|
|
11
|
+
import { catalogReactTranslationRef as catalogReactTranslationRef$1 } from './translation.esm.js';
|
|
12
12
|
export { isOwnerOf } from './utils/isOwnerOf.esm.js';
|
|
13
13
|
export { useEntityPermission } from './hooks/useEntityPermission.esm.js';
|
|
14
14
|
export { EntityTableColumnTitle } from './components/EntityTable/TitleColumn.esm.js';
|
|
15
|
+
export { EntityDataTable } from './components/EntityDataTable/EntityDataTable.esm.js';
|
|
16
|
+
export { columnFactories as entityDataTableColumns } from './components/EntityDataTable/columnFactories.esm.js';
|
|
17
|
+
export { entityColumnPresets } from './components/EntityDataTable/presets.esm.js';
|
|
18
|
+
export { EntityRelationCard } from './components/EntityRelationCard/EntityRelationCard.esm.js';
|
|
19
|
+
|
|
20
|
+
const catalogReactTranslationRef = catalogReactTranslationRef$1;
|
|
21
|
+
|
|
22
|
+
export { catalogReactTranslationRef };
|
|
15
23
|
//# sourceMappingURL=alpha.esm.js.map
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './blueprints';\nexport * from './converters';\nimport { catalogReactTranslationRef as _catalogReactTranslationRef } from '../translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-catalog-react` instead.\n */\nexport const catalogReactTranslationRef = _catalogReactTranslationRef;\nexport { isOwnerOf } from '../utils/isOwnerOf';\nexport { useEntityPermission } from '../hooks/useEntityPermission';\nexport * from '../components/EntityTable/TitleColumn';\nexport * from '../components/EntityDataTable';\nexport * from '../components/EntityRelationCard';\n"],"names":["_catalogReactTranslationRef"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBO,MAAM,0BAAA,GAA6BA;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { stringifyEntityRef } from '@backstage/catalog-model';
|
|
3
|
+
import { useTable, Table } from '@backstage/ui';
|
|
4
|
+
import { useMemo, useCallback } from 'react';
|
|
5
|
+
|
|
6
|
+
function EntityDataTable(props) {
|
|
7
|
+
const { columnConfig, data, loading, error, emptyState } = props;
|
|
8
|
+
const tableData = useMemo(
|
|
9
|
+
() => data.map((entity) => ({
|
|
10
|
+
...entity,
|
|
11
|
+
id: stringifyEntityRef(entity)
|
|
12
|
+
})),
|
|
13
|
+
[data]
|
|
14
|
+
);
|
|
15
|
+
const sortFn = useCallback(
|
|
16
|
+
(items, sort) => {
|
|
17
|
+
const column = columnConfig.find((c) => c.id === sort.column);
|
|
18
|
+
if (!column?.sortValue) {
|
|
19
|
+
return items;
|
|
20
|
+
}
|
|
21
|
+
const getValue = column.sortValue;
|
|
22
|
+
const direction = sort.direction === "descending" ? -1 : 1;
|
|
23
|
+
return [...items].sort(
|
|
24
|
+
(a, b) => getValue(a).localeCompare(getValue(b)) * direction
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
[columnConfig]
|
|
28
|
+
);
|
|
29
|
+
const { tableProps } = useTable({
|
|
30
|
+
mode: "complete",
|
|
31
|
+
data: tableData,
|
|
32
|
+
sortFn,
|
|
33
|
+
paginationOptions: { pageSize: tableData.length || 1 }
|
|
34
|
+
});
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
Table,
|
|
37
|
+
{
|
|
38
|
+
columnConfig,
|
|
39
|
+
...tableProps,
|
|
40
|
+
loading,
|
|
41
|
+
error,
|
|
42
|
+
emptyState,
|
|
43
|
+
pagination: { type: "none" }
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { EntityDataTable };
|
|
49
|
+
//# sourceMappingURL=EntityDataTable.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityDataTable.esm.js","sources":["../../../src/components/EntityDataTable/EntityDataTable.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { Table, useTable } from '@backstage/ui';\nimport { useCallback, useMemo, ReactNode } from 'react';\nimport { EntityRow, EntityColumnConfig } from './columnFactories';\nimport { SortDescriptor } from '@backstage/ui';\n\n/** @public */\nexport interface EntityDataTableProps {\n columnConfig: EntityColumnConfig[];\n data: Entity[];\n loading?: boolean;\n error?: Error;\n emptyState?: ReactNode;\n}\n\n/** @public */\nexport function EntityDataTable(props: EntityDataTableProps) {\n const { columnConfig, data, loading, error, emptyState } = props;\n\n const tableData: EntityRow[] = useMemo(\n () =>\n data.map(entity => ({\n ...entity,\n id: stringifyEntityRef(entity),\n })),\n [data],\n );\n\n const sortFn = useCallback(\n (items: EntityRow[], sort: SortDescriptor) => {\n const column = columnConfig.find(c => c.id === sort.column);\n if (!column?.sortValue) {\n return items;\n }\n const getValue = column.sortValue;\n const direction = sort.direction === 'descending' ? -1 : 1;\n return [...items].sort(\n (a, b) => getValue(a).localeCompare(getValue(b)) * direction,\n );\n },\n [columnConfig],\n );\n\n const { tableProps } = useTable({\n mode: 'complete',\n data: tableData,\n sortFn,\n paginationOptions: { pageSize: tableData.length || 1 },\n });\n\n return (\n <Table\n columnConfig={columnConfig}\n {...tableProps}\n loading={loading}\n error={error}\n emptyState={emptyState}\n pagination={{ type: 'none' }}\n />\n );\n}\n"],"names":[],"mappings":";;;;;AAgCO,SAAS,gBAAgB,KAAA,EAA6B;AAC3D,EAAA,MAAM,EAAE,YAAA,EAAc,IAAA,EAAM,OAAA,EAAS,KAAA,EAAO,YAAW,GAAI,KAAA;AAE3D,EAAA,MAAM,SAAA,GAAyB,OAAA;AAAA,IAC7B,MACE,IAAA,CAAK,GAAA,CAAI,CAAA,MAAA,MAAW;AAAA,MAClB,GAAG,MAAA;A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F, RELATION_OWNED_BY } from '@backstage/catalog-model';
|
|
3
|
+
import { CellText, Column, Cell } from '@backstage/ui';
|
|
4
|
+
import { EntityRefLink } from '../EntityRefLink/EntityRefLink.esm.js';
|
|
5
|
+
import { EntityRefLinks } from '../EntityRefLink/EntityRefLinks.esm.js';
|
|
6
|
+
import { humanizeEntityRef } from '../EntityRefLink/humanize.esm.js';
|
|
7
|
+
import { EntityTableColumnTitle } from '../EntityTable/TitleColumn.esm.js';
|
|
8
|
+
import { getEntityRelations } from '../../utils/getEntityRelations.esm.js';
|
|
9
|
+
|
|
10
|
+
const columnFactories = Object.freeze({
|
|
11
|
+
createEntityRefColumn(options) {
|
|
12
|
+
const isRowHeader = options.isRowHeader ?? true;
|
|
13
|
+
return {
|
|
14
|
+
id: "name",
|
|
15
|
+
label: "Name",
|
|
16
|
+
header: () => /* @__PURE__ */ jsx(Column, { id: "name", isRowHeader, allowsSorting: true, children: /* @__PURE__ */ jsx(EntityTableColumnTitle, { translationKey: "name" }) }),
|
|
17
|
+
isRowHeader,
|
|
18
|
+
isSortable: true,
|
|
19
|
+
cell: (entity) => /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(
|
|
20
|
+
EntityRefLink,
|
|
21
|
+
{
|
|
22
|
+
entityRef: entity,
|
|
23
|
+
defaultKind: options.defaultKind,
|
|
24
|
+
title: entity.metadata?.title
|
|
25
|
+
}
|
|
26
|
+
) }),
|
|
27
|
+
sortValue: (entity) => entity.metadata?.title || humanizeEntityRef(entity, { defaultKind: options.defaultKind })
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
createEntityRelationColumn(options) {
|
|
31
|
+
return {
|
|
32
|
+
id: options.id,
|
|
33
|
+
label: options.id.charAt(0).toUpperCase() + options.id.slice(1),
|
|
34
|
+
header: () => /* @__PURE__ */ jsx(Column, { id: options.id, allowsSorting: true, children: /* @__PURE__ */ jsx(EntityTableColumnTitle, { translationKey: options.translationKey }) }),
|
|
35
|
+
isSortable: true,
|
|
36
|
+
cell: (entity) => /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(
|
|
37
|
+
EntityRefLinks,
|
|
38
|
+
{
|
|
39
|
+
entityRefs: getEntityRelations(
|
|
40
|
+
entity,
|
|
41
|
+
options.relation,
|
|
42
|
+
options.filter
|
|
43
|
+
),
|
|
44
|
+
defaultKind: options.defaultKind
|
|
45
|
+
}
|
|
46
|
+
) }),
|
|
47
|
+
sortValue: (entity) => getEntityRelations(entity, options.relation, options.filter).map((r) => humanizeEntityRef(r, { defaultKind: options.defaultKind })).join(", ")
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
createOwnerColumn() {
|
|
51
|
+
return columnFactories.createEntityRelationColumn({
|
|
52
|
+
id: "owner",
|
|
53
|
+
translationKey: "owner",
|
|
54
|
+
relation: RELATION_OWNED_BY,
|
|
55
|
+
defaultKind: "group"
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
createSystemColumn() {
|
|
59
|
+
return columnFactories.createEntityRelationColumn({
|
|
60
|
+
id: "system",
|
|
61
|
+
translationKey: "system",
|
|
62
|
+
relation: RELATION_PART_OF,
|
|
63
|
+
defaultKind: "system",
|
|
64
|
+
filter: { kind: "system" }
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
createDomainColumn() {
|
|
68
|
+
return columnFactories.createEntityRelationColumn({
|
|
69
|
+
id: "domain",
|
|
70
|
+
translationKey: "domain",
|
|
71
|
+
relation: RELATION_PART_OF,
|
|
72
|
+
defaultKind: "domain",
|
|
73
|
+
filter: { kind: "domain" }
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
createMetadataDescriptionColumn() {
|
|
77
|
+
return {
|
|
78
|
+
id: "description",
|
|
79
|
+
label: "Description",
|
|
80
|
+
header: () => /* @__PURE__ */ jsx(Column, { id: "description", allowsSorting: true, children: /* @__PURE__ */ jsx(EntityTableColumnTitle, { translationKey: "description" }) }),
|
|
81
|
+
isSortable: true,
|
|
82
|
+
cell: (entity) => /* @__PURE__ */ jsx(CellText, { title: entity.metadata.description ?? "" }),
|
|
83
|
+
sortValue: (entity) => entity.metadata.description ?? ""
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
createSpecTypeColumn() {
|
|
87
|
+
return {
|
|
88
|
+
id: "type",
|
|
89
|
+
label: "Type",
|
|
90
|
+
header: () => /* @__PURE__ */ jsx(Column, { id: "type", allowsSorting: true, children: /* @__PURE__ */ jsx(EntityTableColumnTitle, { translationKey: "type" }) }),
|
|
91
|
+
isSortable: true,
|
|
92
|
+
cell: (entity) => /* @__PURE__ */ jsx(
|
|
93
|
+
CellText,
|
|
94
|
+
{
|
|
95
|
+
title: entity.spec?.type ?? ""
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
sortValue: (entity) => entity.spec?.type ?? ""
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
createSpecLifecycleColumn() {
|
|
102
|
+
return {
|
|
103
|
+
id: "lifecycle",
|
|
104
|
+
label: "Lifecycle",
|
|
105
|
+
header: () => /* @__PURE__ */ jsx(Column, { id: "lifecycle", allowsSorting: true, children: /* @__PURE__ */ jsx(EntityTableColumnTitle, { translationKey: "lifecycle" }) }),
|
|
106
|
+
isSortable: true,
|
|
107
|
+
cell: (entity) => /* @__PURE__ */ jsx(
|
|
108
|
+
CellText,
|
|
109
|
+
{
|
|
110
|
+
title: entity.spec?.lifecycle ?? ""
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
sortValue: (entity) => entity.spec?.lifecycle ?? ""
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export { columnFactories };
|
|
119
|
+
//# sourceMappingURL=columnFactories.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columnFactories.esm.js","sources":["../../../src/components/EntityDataTable/columnFactories.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport { Cell, CellText, Column, ColumnConfig, TableItem } from '@backstage/ui';\nimport {\n EntityRefLink,\n EntityRefLinks,\n humanizeEntityRef,\n} from '../EntityRefLink';\nimport { EntityTableColumnTitle } from '../EntityTable/TitleColumn';\nimport { getEntityRelations } from '../../utils';\n\n/** @public */\nexport type EntityRow = Entity & TableItem;\n\n/** @public */\nexport interface EntityColumnConfig extends ColumnConfig<EntityRow> {\n sortValue?: (entity: EntityRow) => string;\n}\n\n/** @public */\nexport const columnFactories = Object.freeze({\n createEntityRefColumn(options: {\n defaultKind?: string;\n isRowHeader?: boolean;\n }): EntityColumnConfig {\n const isRowHeader = options.isRowHeader ?? true;\n return {\n id: 'name',\n label: 'Name',\n header: () => (\n <Column id=\"name\" isRowHeader={isRowHeader} allowsSorting>\n <EntityTableColumnTitle translationKey=\"name\" />\n </Column>\n ),\n isRowHeader,\n isSortable: true,\n cell: entity => (\n <Cell>\n <EntityRefLink\n entityRef={entity}\n defaultKind={options.defaultKind}\n title={entity.metadata?.title}\n />\n </Cell>\n ),\n sortValue: entity =>\n entity.metadata?.title ||\n humanizeEntityRef(entity, { defaultKind: options.defaultKind }),\n };\n },\n\n createEntityRelationColumn(options: {\n id: string;\n translationKey: 'owner' | 'system' | 'domain';\n relation: string;\n defaultKind?: string;\n filter?: { kind: string };\n }): EntityColumnConfig {\n return {\n id: options.id,\n label: options.id.charAt(0).toUpperCase() + options.id.slice(1),\n header: () => (\n <Column id={options.id} allowsSorting>\n <EntityTableColumnTitle translationKey={options.translationKey} />\n </Column>\n ),\n isSortable: true,\n cell: entity => (\n <Cell>\n <EntityRefLinks\n entityRefs={getEntityRelations(\n entity,\n options.relation,\n options.filter,\n )}\n defaultKind={options.defaultKind}\n />\n </Cell>\n ),\n sortValue: entity =>\n getEntityRelations(entity, options.relation, options.filter)\n .map(r => humanizeEntityRef(r, { defaultKind: options.defaultKind }))\n .join(', '),\n };\n },\n\n createOwnerColumn(): EntityColumnConfig {\n return columnFactories.createEntityRelationColumn({\n id: 'owner',\n translationKey: 'owner',\n relation: RELATION_OWNED_BY,\n defaultKind: 'group',\n });\n },\n\n createSystemColumn(): EntityColumnConfig {\n return columnFactories.createEntityRelationColumn({\n id: 'system',\n translationKey: 'system',\n relation: RELATION_PART_OF,\n defaultKind: 'system',\n filter: { kind: 'system' },\n });\n },\n\n createDomainColumn(): EntityColumnConfig {\n return columnFactories.createEntityRelationColumn({\n id: 'domain',\n translationKey: 'domain',\n relation: RELATION_PART_OF,\n defaultKind: 'domain',\n filter: { kind: 'domain' },\n });\n },\n\n createMetadataDescriptionColumn(): EntityColumnConfig {\n return {\n id: 'description',\n label: 'Description',\n header: () => (\n <Column id=\"description\" allowsSorting>\n <EntityTableColumnTitle translationKey=\"description\" />\n </Column>\n ),\n isSortable: true,\n cell: entity => <CellText title={entity.metadata.description ?? ''} />,\n sortValue: entity => entity.metadata.description ?? '',\n };\n },\n\n createSpecTypeColumn(): EntityColumnConfig {\n return {\n id: 'type',\n label: 'Type',\n header: () => (\n <Column id=\"type\" allowsSorting>\n <EntityTableColumnTitle translationKey=\"type\" />\n </Column>\n ),\n isSortable: true,\n cell: entity => (\n <CellText\n title={\n (entity.spec as Record<string, string> | undefined)?.type ?? ''\n }\n />\n ),\n sortValue: entity =>\n (entity.spec as Record<string, string> | undefined)?.type ?? '',\n };\n },\n\n createSpecLifecycleColumn(): EntityColumnConfig {\n return {\n id: 'lifecycle',\n label: 'Lifecycle',\n header: () => (\n <Column id=\"lifecycle\" allowsSorting>\n <EntityTableColumnTitle translationKey=\"lifecycle\" />\n </Column>\n ),\n isSortable: true,\n cell: entity => (\n <CellText\n title={\n (entity.spec as Record<string, string> | undefined)?.lifecycle ?? ''\n }\n />\n ),\n sortValue: entity =>\n (entity.spec as Record<string, string> | undefined)?.lifecycle ?? '',\n };\n },\n});\n"],"names":[],"mappings":";;;;;;;;;AAuCO,MAAM,eAAA,GAAkB,OAAO,MAAA,CAAO;AAAA,EAC3C,sBAAsB,OAAA,EAGC;AACrB,IAAA,MAAM,WAAA,GAAc,QAAQ,WAAA,IAAe,IAAA;AAC3C,IAAA,OAAO;AAAA,MACL,EAAA,EAAI,MAAA;AAAA,MACJ,KAAA,EAAO,MAAA;AAAA,MACP,MAAA,EAAQ,sBACN,GAAA,CAAC,MAAA,EAAA,EAAO,EAAA,EAAG,MAAA,EAAO,WAAA,EAA0B,aAAA,EAAa,IAAA,EACvD,QAAA,kBAAA,GAAA,CAAC,sBAAA,EAAA,EAAuB,cAAA,EAAe,QAAO,CAAA,EAChD,CAAA;AAAA,MAEF,WAAA;AAAA,MACA,UAAA,EAAY,IAAA;AAAA,MACZ,IAAA,EAAM,CAAA,MAAA,qBACJ,GAAA,CAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA;AAAA,QAAC,aAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAW,MAAA;AAAA,UACX,aAAa,OAAA,CAAQ,WAAA;AAAA,UACrB,KAAA,EAAO,OAAO,QAAA,EAAU;AAAA;AAAA,OAC1B,EACF,CAAA;AAAA,MAEF,SAAA,EAAW,CAAA,MAAA,KACT,MAAA,CAAO,QAAA,EAAU,KAAA,IACjB,iBAAA,CAAkB,MAAA,EAAQ,EAAE,WAAA,EAAa,OAAA,CAAQ,WAAA,EAAa;AAAA,KAClE;AAAA,EACF,CAAA;AAAA,EAEA,2BAA2B,OAAA,EAMJ;AACrB,IAAA,OAAO;AAAA,MACL,IAAI,OAAA,CAAQ,EAAA;AAAA,MACZ,KAAA,E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AA,CAAC,sBAAA,EAAA,EAAuB,cAAA,EAAe,MAAA,EAAO,CAAA,EAChD,CAAA;AAAA,MAEF,UAAA,EAAY,IAAA;AAAA,MACZ,MAAM,CAAA,MAAA,qBACJ,GAAA;AAAA,QAAC,QAAA;AAAA,QAAA;AAAA,UACC,KAAA,EACG,MAAA,CAAO,IAAA,EAA6C,IAAA,IAAQ;AAAA;AAAA,OAEjE;AAAA,MAEF,SAAA,EAAW,CAAA,MAAA,KACR,MAAA,CAAO,IAAA,EAA6C,IAAA,IAAQ;AAAA,KACjE;AAAA,EACF,CAAA;AAAA,EAEA,yBAAA,GAAgD;AAC9C,IAAA,OAAO;AAAA,MACL,EAAA,EAAI,WAAA;AAAA,MACJ,KAAA,EAAO,WAAA;AAAA,MACP,MAAA,EAAQ,sBACN,GAAA,CAAC,MAAA,EAAA,EAAO,EAAA,EAAG,WAAA,EAAY,aAAA,EAAa,IAAA,EAClC,QAAA,kBAAA,GAAA,CAAC,sBAAA,EAAA,EAAuB,cAAA,EAAe,WAAA,EAAY,CAAA,EACrD,CAAA;AAAA,MAEF,UAAA,EAAY,IAAA;AAAA,MACZ,MAAM,CAAA,MAAA,qBACJ,GAAA;AAAA,QAAC,QAAA;AAAA,QAAA;AAAA,UACC,KAAA,EACG,MAAA,CAAO,IAAA,EAA6C,SAAA,IAAa;AAAA;AAAA,OAEtE;AAAA,MAEF,SAAA,EAAW,CAAA,MAAA,KACR,MAAA,CAAO,IAAA,EAA6C,SAAA,IAAa;AAAA,KACtE;AAAA,EACF;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { columnFactories } from './columnFactories.esm.js';
|
|
2
|
+
|
|
3
|
+
const entityColumnPresets = {
|
|
4
|
+
component: {
|
|
5
|
+
columns: [
|
|
6
|
+
columnFactories.createEntityRefColumn({ defaultKind: "component" }),
|
|
7
|
+
columnFactories.createOwnerColumn(),
|
|
8
|
+
columnFactories.createSpecTypeColumn(),
|
|
9
|
+
columnFactories.createSpecLifecycleColumn(),
|
|
10
|
+
columnFactories.createMetadataDescriptionColumn()
|
|
11
|
+
],
|
|
12
|
+
helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component"
|
|
13
|
+
},
|
|
14
|
+
resource: {
|
|
15
|
+
columns: [
|
|
16
|
+
columnFactories.createEntityRefColumn({ defaultKind: "resource" }),
|
|
17
|
+
columnFactories.createOwnerColumn(),
|
|
18
|
+
columnFactories.createSpecTypeColumn(),
|
|
19
|
+
columnFactories.createSpecLifecycleColumn(),
|
|
20
|
+
columnFactories.createMetadataDescriptionColumn()
|
|
21
|
+
],
|
|
22
|
+
helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource"
|
|
23
|
+
},
|
|
24
|
+
system: {
|
|
25
|
+
columns: [
|
|
26
|
+
columnFactories.createEntityRefColumn({ defaultKind: "system" }),
|
|
27
|
+
columnFactories.createOwnerColumn(),
|
|
28
|
+
columnFactories.createMetadataDescriptionColumn()
|
|
29
|
+
],
|
|
30
|
+
helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system"
|
|
31
|
+
},
|
|
32
|
+
domain: {
|
|
33
|
+
columns: [
|
|
34
|
+
columnFactories.createEntityRefColumn({ defaultKind: "domain" }),
|
|
35
|
+
columnFactories.createOwnerColumn(),
|
|
36
|
+
columnFactories.createMetadataDescriptionColumn()
|
|
37
|
+
],
|
|
38
|
+
helpLink: "https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { entityColumnPresets };
|
|
43
|
+
//# sourceMappingURL=presets.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.esm.js","sources":["../../../src/components/EntityDataTable/presets.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 { columnFactories, EntityColumnConfig } from './columnFactories';\n\n/** @alpha */\nexport const entityColumnPresets = {\n component: {\n columns: [\n columnFactories.createEntityRefColumn({ defaultKind: 'component' }),\n columnFactories.createOwnerColumn(),\n columnFactories.createSpecTypeColumn(),\n columnFactories.createSpecLifecycleColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n ] as EntityColumnConfig[],\n helpLink:\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component',\n },\n resource: {\n columns: [\n columnFactories.createEntityRefColumn({ defaultKind: 'resource' }),\n columnFactories.createOwnerColumn(),\n columnFactories.createSpecTypeColumn(),\n columnFactories.createSpecLifecycleColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n ] as EntityColumnConfig[],\n helpLink:\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource',\n },\n system: {\n columns: [\n columnFactories.createEntityRefColumn({ defaultKind: 'system' }),\n columnFactories.createOwnerColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n ] as EntityColumnConfig[],\n helpLink:\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system',\n },\n domain: {\n columns: [\n columnFactories.createEntityRefColumn({ defaultKind: 'domain' }),\n columnFactories.createOwnerColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n ] as EntityColumnConfig[],\n helpLink:\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-domain',\n },\n} as const;\n"],"names":[],"mappings":";;AAmBO,MAAM,mBAAA,GAAsB;AAAA,EACjC,SAAA,EAAW;AAAA,IACT,OAAA,EAAS;AAAA,MACP,eAAA,CAAgB,qBAAA,CAAsB,EAAE,WAAA,EAAa,aAAa,CAAA;AAAA,MAClE,gBAAgB,iBAAA,EAAkB;AAAA,MAClC,gBAAgB,oBAAA,EAAqB;AAAA,MACrC,gBAAgB,yBAAA,EAA0B;AAAA,MAC1C,gBAAgB,+BAAA;AAAgC,KAClD;AAAA,IACA,QAAA,EACE;AAAA,GACJ;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,eAAA,CAAgB,qBAAA,CAAsB,EAAE,WAAA,EAAa,YAAY,CAAA;AAAA,MACjE,gBAAgB,iBAAA,EAAkB;AAAA,MAClC,gBAAgB,oBAAA,EAAqB;AAAA,MACrC,gBAAgB,yBAAA,EAA0B;AAAA,MAC1C,gBAAgB,+BAAA;AAAgC,KAClD;AAAA,IACA,QAAA,EACE;AAAA,GACJ;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS;AAAA,MACP,eAAA,CAAgB,qBAAA,CAAsB,EAAE,WAAA,EAAa,UAAU,CAAA;AAAA,MAC/D,gBAAgB,iBAAA,EAAkB;AAAA,MAClC,gBAAgB,+BAAA;AAAgC,KAClD;AAAA,IACA,QAAA,EACE;AAAA,GACJ;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS;AAAA,MACP,eAAA,CAAgB,qBAAA,CAAsB,EAAE,WAAA,EAAa,UAAU,CAAA;AAAA,MAC/D,gBAAgB,iBAAA,EAAkB;AAAA,MAClC,gBAAgB,+BAAA;AAAgC,KAClD;AAAA,IACA,QAAA,EACE;AAAA;AAEN;;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Alert, Text, Link } from '@backstage/ui';
|
|
3
|
+
import { useTranslationRef } from '@backstage/frontend-plugin-api';
|
|
4
|
+
import { EntityInfoCard } from '../EntityInfoCard/EntityInfoCard.esm.js';
|
|
5
|
+
import { EntityDataTable } from '../EntityDataTable/EntityDataTable.esm.js';
|
|
6
|
+
import '@backstage/catalog-model';
|
|
7
|
+
import '../EntityRefLink/EntityRefLink.esm.js';
|
|
8
|
+
import 'react';
|
|
9
|
+
import 'lodash/get';
|
|
10
|
+
import { catalogReactTranslationRef } from '../../translation.esm.js';
|
|
11
|
+
import '../EntityDataTable/presets.esm.js';
|
|
12
|
+
import { useEntity } from '../../hooks/useEntity.esm.js';
|
|
13
|
+
import '../../hooks/useEntityListProvider.esm.js';
|
|
14
|
+
import 'react-use/esm/useAsync';
|
|
15
|
+
import 'lodash/isEqual';
|
|
16
|
+
import 'lodash/sortBy';
|
|
17
|
+
import '@backstage/core-plugin-api';
|
|
18
|
+
import '../../api.esm.js';
|
|
19
|
+
import { useRelatedEntities } from '../../hooks/useRelatedEntities.esm.js';
|
|
20
|
+
import 'react-use/esm/useObservable';
|
|
21
|
+
import '../../apis/EntityPresentationApi/EntityPresentationApi.esm.js';
|
|
22
|
+
import '../../apis/StarredEntitiesApi/StarredEntitiesApi.esm.js';
|
|
23
|
+
import 'zen-observable';
|
|
24
|
+
|
|
25
|
+
function EntityRelationCard(props) {
|
|
26
|
+
const {
|
|
27
|
+
title,
|
|
28
|
+
relationType,
|
|
29
|
+
entityKind,
|
|
30
|
+
columnConfig,
|
|
31
|
+
emptyState,
|
|
32
|
+
className
|
|
33
|
+
} = props;
|
|
34
|
+
const { t } = useTranslationRef(catalogReactTranslationRef);
|
|
35
|
+
const { entity } = useEntity();
|
|
36
|
+
const { entities, loading, error } = useRelatedEntities(entity, {
|
|
37
|
+
type: relationType,
|
|
38
|
+
kind: entityKind
|
|
39
|
+
});
|
|
40
|
+
return /* @__PURE__ */ jsx(EntityInfoCard, { title, className, children: error ? /* @__PURE__ */ jsx(Alert, { status: "warning", icon: true, title: error.message, role: "status" }) : /* @__PURE__ */ jsx(
|
|
41
|
+
EntityDataTable,
|
|
42
|
+
{
|
|
43
|
+
columnConfig,
|
|
44
|
+
data: entities ?? [],
|
|
45
|
+
loading,
|
|
46
|
+
emptyState: emptyState && /* @__PURE__ */ jsxs(Text, { as: "p", children: [
|
|
47
|
+
emptyState.message,
|
|
48
|
+
" ",
|
|
49
|
+
emptyState.helpLink && /* @__PURE__ */ jsx(
|
|
50
|
+
Link,
|
|
51
|
+
{
|
|
52
|
+
href: emptyState.helpLink,
|
|
53
|
+
target: "_blank",
|
|
54
|
+
rel: "noopener noreferrer",
|
|
55
|
+
variant: "body-medium",
|
|
56
|
+
children: t("entityRelationCard.emptyHelpLinkTitle")
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] })
|
|
60
|
+
}
|
|
61
|
+
) });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { EntityRelationCard };
|
|
65
|
+
//# sourceMappingURL=EntityRelationCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityRelationCard.esm.js","sources":["../../../src/components/EntityRelationCard/EntityRelationCard.tsx"],"sourcesContent":["/*\n * Copyright 2026 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 { Alert, Link, Text } from '@backstage/ui';\nimport { useTranslationRef } from '@backstage/frontend-plugin-api';\nimport { EntityInfoCard } from '../EntityInfoCard';\nimport { EntityDataTable } from '../EntityDataTable';\nimport { EntityColumnConfig } from '../EntityDataTable/columnFactories';\nimport { useEntity, useRelatedEntities } from '../../hooks';\nimport { catalogReactTranslationRef } from '../../translation';\n\n/** @public */\nexport interface EntityRelationCardProps {\n title: string;\n relationType: string;\n entityKind?: string;\n columnConfig: EntityColumnConfig[];\n emptyState?: {\n message: string;\n helpLink?: string;\n };\n className?: string;\n}\n\n/** @public */\nexport function EntityRelationCard(props: EntityRelationCardProps) {\n const {\n title,\n relationType,\n entityKind,\n columnConfig,\n emptyState,\n className,\n } = props;\n const { t } = useTranslationRef(catalogReactTranslationRef);\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n return (\n <EntityInfoCard title={title} className={className}>\n {error ? (\n <Alert status=\"warning\" icon title={error.message} role=\"status\" />\n ) : (\n <EntityDataTable\n columnConfig={columnConfig}\n data={entities ?? []}\n loading={loading}\n emptyState={\n emptyState && (\n <Text as=\"p\">\n {emptyState.message}{' '}\n {emptyState.helpLink && (\n <Link\n href={emptyState.helpLink}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n variant=\"body-medium\"\n >\n {t('entityRelationCard.emptyHelpLinkTitle')}\n </Link>\n )}\n </Text>\n )\n }\n />\n )}\n </EntityInfoCard>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAsCO,SAAS,mBAAmB,KAAA,EAAgC;AACjE,EAAA,MAAM;AAAA,IACJ,KAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,KAAA;AACJ,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,iBAAA,CAAkB,0BAA0B,CAAA;AAC1D,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,EAAE,QAAA,EAAU,OAAA,EAAS,KAAA,EAAM,GAAI,mBAAmB,MAAA,EAAQ;AAAA,IAC9D,IAAA,EAAM,YAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACP,CAAA;AAED,EAAA,2BACG,cAAA,EAAA,EAAe,KAAA,EAAc,SAAA,EAC3B,QAAA,EAAA,KAAA,uBACE,KAAA,EAAA,EAAM,MAAA,EAAO,SAAA,EAAU,IAAA,EAAI,MAAC,KAAA,EAAO,KAAA,CAAM,OAAA,EAAS,IAAA,EAAK,UAAS,CAAA,mBAEjE,GAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,YAAA;AAAA,MACA,IAAA,EAAM,YAAY,EAAC;AAAA,MACnB,OAAA;AAAA,MACA,UAAA,EACE,UAAA,oBACE,IAAA,CAAC,IAAA,EAAA,EAAK,IAAG,GAAA,EACN,QAAA,EAAA;AAAA,QAAA,UAAA,CAAW,OAAA;AAAA,QAAS,GAAA;AAAA,QACpB,WAAW,QAAA,oBACV,GAAA;AAAA,UAAC,IAAA;AAAA,UAAA;AAAA,YACC,MAAM,UAAA,CAAW,QAAA;AAAA,YACjB,MAAA,EAAO,QAAA;AAAA,YACP,GAAA,EAAI,qBAAA;AAAA,YACJ,OAAA,EAAQ,aAAA;AAAA,YAEP,YAAE,uCAAuC;AAAA;AAAA;AAC5C,OAAA,EAEJ;AAAA;AAAA,GAGN,EAEJ,CAAA;AAEJ;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1040,5 +1040,97 @@ declare function MockEntityListContextProvider<T extends DefaultEntityFilters =
|
|
|
1040
1040
|
*/
|
|
1041
1041
|
declare const EntityListContext: react.Context<EntityListContextProps<any> | undefined>;
|
|
1042
1042
|
|
|
1043
|
-
|
|
1043
|
+
/** @public */
|
|
1044
|
+
declare const catalogReactTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"catalog-react", {
|
|
1045
|
+
readonly "catalogFilter.title": "Filters";
|
|
1046
|
+
readonly "catalogFilter.buttonTitle": "Filters";
|
|
1047
|
+
readonly "entityKindPicker.title": "Kind";
|
|
1048
|
+
readonly "entityKindPicker.errorMessage": "Failed to load entity kinds";
|
|
1049
|
+
readonly "entityLifecyclePicker.title": "Lifecycle";
|
|
1050
|
+
readonly "entityNamespacePicker.title": "Namespace";
|
|
1051
|
+
readonly "entityOwnerPicker.title": "Owner";
|
|
1052
|
+
readonly "entityProcessingStatusPicker.title": "Processing Status";
|
|
1053
|
+
readonly "entityTagPicker.title": "Tags";
|
|
1054
|
+
readonly "entityPeekAheadPopover.title": "Drill into the entity to see all of the tags.";
|
|
1055
|
+
readonly "entityPeekAheadPopover.entityCardActionsAriaLabel": "Show";
|
|
1056
|
+
readonly "entityPeekAheadPopover.entityCardActionsTitle": "Show details";
|
|
1057
|
+
readonly "entityPeekAheadPopover.emailCardAction.title": "Email {{email}}";
|
|
1058
|
+
readonly "entityPeekAheadPopover.emailCardAction.ariaLabel": "Email";
|
|
1059
|
+
readonly "entityPeekAheadPopover.emailCardAction.subTitle": "mailto {{email}}";
|
|
1060
|
+
readonly "entitySearchBar.placeholder": "Search";
|
|
1061
|
+
readonly "entityTypePicker.title": "Type";
|
|
1062
|
+
readonly "entityTypePicker.errorMessage": "Failed to load entity types";
|
|
1063
|
+
readonly "entityTypePicker.optionAllTitle": "all";
|
|
1064
|
+
readonly "favoriteEntity.addToFavorites": "Add to favorites";
|
|
1065
|
+
readonly "favoriteEntity.removeFromFavorites": "Remove from favorites";
|
|
1066
|
+
readonly "inspectEntityDialog.title": "Entity Inspector";
|
|
1067
|
+
readonly "inspectEntityDialog.closeButtonTitle": "Close";
|
|
1068
|
+
readonly "inspectEntityDialog.tabsAriaLabel": "Inspector options";
|
|
1069
|
+
readonly "inspectEntityDialog.ancestryPage.title": "Ancestry";
|
|
1070
|
+
readonly "inspectEntityDialog.ancestryPage.description": "This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where {{processorsLink}} child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations.";
|
|
1071
|
+
readonly "inspectEntityDialog.ancestryPage.processorsLink": "processors emitted";
|
|
1072
|
+
readonly "inspectEntityDialog.colocatedPage.title": "Colocated";
|
|
1073
|
+
readonly "inspectEntityDialog.colocatedPage.description": "These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).";
|
|
1074
|
+
readonly "inspectEntityDialog.colocatedPage.alertNoLocation": "Entity had no location information.";
|
|
1075
|
+
readonly "inspectEntityDialog.colocatedPage.alertNoEntity": "There were no other entities on this location.";
|
|
1076
|
+
readonly "inspectEntityDialog.colocatedPage.locationHeader": "At the same location";
|
|
1077
|
+
readonly "inspectEntityDialog.colocatedPage.originHeader": "At the same origin";
|
|
1078
|
+
readonly "inspectEntityDialog.jsonPage.title": "Entity as JSON";
|
|
1079
|
+
readonly "inspectEntityDialog.jsonPage.description": "This is the raw entity data as received from the catalog, on JSON form.";
|
|
1080
|
+
readonly "inspectEntityDialog.overviewPage.title": "Overview";
|
|
1081
|
+
readonly "inspectEntityDialog.overviewPage.metadata.title": "Metadata";
|
|
1082
|
+
readonly "inspectEntityDialog.overviewPage.labels": "Labels";
|
|
1083
|
+
readonly "inspectEntityDialog.overviewPage.status.title": "Status";
|
|
1084
|
+
readonly "inspectEntityDialog.overviewPage.identity.title": "Identity";
|
|
1085
|
+
readonly "inspectEntityDialog.overviewPage.annotations": "Annotations";
|
|
1086
|
+
readonly "inspectEntityDialog.overviewPage.tags": "Tags";
|
|
1087
|
+
readonly "inspectEntityDialog.overviewPage.relation.title": "Relations";
|
|
1088
|
+
readonly "inspectEntityDialog.yamlPage.title": "Entity as YAML";
|
|
1089
|
+
readonly "inspectEntityDialog.yamlPage.description": "This is the raw entity data as received from the catalog, on YAML form.";
|
|
1090
|
+
readonly "inspectEntityDialog.tabNames.json": "Raw JSON";
|
|
1091
|
+
readonly "inspectEntityDialog.tabNames.yaml": "Raw YAML";
|
|
1092
|
+
readonly "inspectEntityDialog.tabNames.overview": "Overview";
|
|
1093
|
+
readonly "inspectEntityDialog.tabNames.ancestry": "Ancestry";
|
|
1094
|
+
readonly "inspectEntityDialog.tabNames.colocated": "Colocated";
|
|
1095
|
+
readonly "unregisterEntityDialog.title": "Are you sure you want to unregister this entity?";
|
|
1096
|
+
readonly "unregisterEntityDialog.cancelButtonTitle": "Cancel";
|
|
1097
|
+
readonly "unregisterEntityDialog.deleteButtonTitle": "Delete Entity";
|
|
1098
|
+
readonly "unregisterEntityDialog.deleteEntitySuccessMessage": "Removed entity {{entityName}}";
|
|
1099
|
+
readonly "unregisterEntityDialog.onlyDeleteStateTitle": "This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.";
|
|
1100
|
+
readonly "unregisterEntityDialog.errorStateTitle": "Internal error: Unknown state";
|
|
1101
|
+
readonly "unregisterEntityDialog.bootstrapState.title": "You cannot unregister this entity, since it originates from a protected Backstage configuration (location \"{{location}}\"). If you believe this is in error, please contact the {{appTitle}} integrator.";
|
|
1102
|
+
readonly "unregisterEntityDialog.bootstrapState.advancedDescription": "You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.";
|
|
1103
|
+
readonly "unregisterEntityDialog.bootstrapState.advancedOptions": "Advanced Options";
|
|
1104
|
+
readonly "unregisterEntityDialog.unregisterState.title": "This action will unregister the following entities:";
|
|
1105
|
+
readonly "unregisterEntityDialog.unregisterState.description": "To undo, just re-register the entity in {{appTitle}}.";
|
|
1106
|
+
readonly "unregisterEntityDialog.unregisterState.subTitle": "Located at the following location:";
|
|
1107
|
+
readonly "unregisterEntityDialog.unregisterState.advancedDescription": "You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.";
|
|
1108
|
+
readonly "unregisterEntityDialog.unregisterState.advancedOptions": "Advanced Options";
|
|
1109
|
+
readonly "unregisterEntityDialog.unregisterState.unregisterButtonTitle": "Unregister Location";
|
|
1110
|
+
readonly "userListPicker.defaultOrgName": "Company";
|
|
1111
|
+
readonly "userListPicker.orgFilterAllLabel": "All";
|
|
1112
|
+
readonly "userListPicker.personalFilter.title": "Personal";
|
|
1113
|
+
readonly "userListPicker.personalFilter.ownedLabel": "Owned";
|
|
1114
|
+
readonly "userListPicker.personalFilter.starredLabel": "Starred";
|
|
1115
|
+
readonly "entityTableColumnTitle.name": "Name";
|
|
1116
|
+
readonly "entityTableColumnTitle.type": "Type";
|
|
1117
|
+
readonly "entityTableColumnTitle.label": "Label";
|
|
1118
|
+
readonly "entityTableColumnTitle.title": "Title";
|
|
1119
|
+
readonly "entityTableColumnTitle.description": "Description";
|
|
1120
|
+
readonly "entityTableColumnTitle.system": "System";
|
|
1121
|
+
readonly "entityTableColumnTitle.namespace": "Namespace";
|
|
1122
|
+
readonly "entityTableColumnTitle.domain": "Domain";
|
|
1123
|
+
readonly "entityTableColumnTitle.tags": "Tags";
|
|
1124
|
+
readonly "entityTableColumnTitle.owner": "Owner";
|
|
1125
|
+
readonly "entityTableColumnTitle.lifecycle": "Lifecycle";
|
|
1126
|
+
readonly "entityTableColumnTitle.targets": "Targets";
|
|
1127
|
+
readonly "entityRelationCard.emptyHelpLinkTitle": "Learn how to change this.";
|
|
1128
|
+
readonly "missingAnnotationEmptyState.title": "Missing Annotation";
|
|
1129
|
+
readonly "missingAnnotationEmptyState.readMore": "Read more";
|
|
1130
|
+
readonly "missingAnnotationEmptyState.annotationYaml": "Add the annotation to your {{entityKind}} YAML as shown in the highlighted example below:";
|
|
1131
|
+
readonly "missingAnnotationEmptyState.generateDescription_one": "The annotation {{annotations}} is missing. You need to add the annotation to your {{entityKind}} if you want to enable this tool.";
|
|
1132
|
+
readonly "missingAnnotationEmptyState.generateDescription_other": "The annotations {{annotations}} are missing. You need to add the annotations to your {{entityKind}} if you want to enable this tool.";
|
|
1133
|
+
}>;
|
|
1134
|
+
|
|
1135
|
+
export { AsyncEntityProvider, CatalogAutocomplete, CatalogFilterLayout, DefaultFilters, EntityAutocompletePicker, EntityDisplayName, EntityErrorFilter, EntityInfoCard, EntityKindFilter, EntityKindPicker, EntityLifecycleFilter, EntityLifecyclePicker, EntityListContext, EntityListProvider, EntityNamespaceFilter, EntityNamespacePicker, EntityOrderFilter, EntityOrphanFilter, EntityOwnerFilter, EntityOwnerPicker, EntityPeekAheadPopover, EntityProcessingStatusPicker, EntityProvider, EntityRefLink, EntityRefLinks, EntitySearchBar, EntityTable, EntityTagFilter, EntityTagPicker, EntityTextFilter, EntityTypeFilter, EntityTypePicker, EntityUserFilter, FavoriteEntity, InspectEntityDialog, MissingAnnotationEmptyState, MockEntityListContextProvider, MockStarredEntitiesApi, UnregisterEntityDialog, UserListFilter, UserListPicker, catalogApiRef, catalogReactTranslationRef, columnFactories, defaultEntityPresentation, entityPresentationApiRef, entityRouteParams, entityRouteRef, getEntityRelations, getEntitySourceLocation, humanizeEntityRef, starredEntitiesApiRef, useAsyncEntity, useEntity, useEntityList, useEntityOwnership, useEntityPresentation, useEntityRefLink, useEntityTypeFilter, useRelatedEntities, useStarredEntities, useStarredEntity };
|
|
1044
1136
|
export type { AllowedEntityFilters, AsyncEntityProviderProps, BackstageOverrides, CatalogAutocompleteProps, CatalogReactComponentsNameToClassKey, CatalogReactEntityAutocompletePickerClassKey, CatalogReactEntityDisplayNameClassKey, CatalogReactEntityLifecyclePickerClassKey, CatalogReactEntityNamespacePickerClassKey, CatalogReactEntityOwnerPickerClassKey, CatalogReactEntityProcessingStatusPickerClassKey, CatalogReactEntitySearchBarClassKey, CatalogReactEntityTagPickerClassKey, CatalogReactUserListPickerClassKey, DefaultEntityFilters, DefaultFiltersProps, EntityAutocompletePickerProps, EntityDisplayNameProps, EntityFilter, EntityInfoCardProps, EntityKindPickerProps, EntityListContextProps, EntityListPagination, EntityListProviderProps, EntityLoadingStatus, EntityNamespacePickerProps, EntityOwnerPickerProps, EntityPeekAheadPopoverProps, EntityPresentationApi, EntityProviderProps, EntityRefLinkProps, EntityRefLinksProps, EntityRefPresentation, EntityRefPresentationSnapshot, EntityRouteParamsOptions, EntitySourceLocation, EntityTableProps, EntityTagPickerProps, EntityTypePickerProps, FavoriteEntityProps, FixedWidthFormControlLabelClassKey, MissingAnnotationEmptyStateClassKey, PaginationMode, StarredEntitiesApi, UnregisterEntityDialogProps, UserListFilterKind, UserListPickerProps };
|
package/dist/index.esm.js
CHANGED
|
@@ -43,4 +43,5 @@ export { getEntityRelations } from './utils/getEntityRelations.esm.js';
|
|
|
43
43
|
export { getEntitySourceLocation } from './utils/getEntitySourceLocation.esm.js';
|
|
44
44
|
import '@backstage/catalog-model';
|
|
45
45
|
export { EntityListContext, MockEntityListContextProvider } from './deprecated.esm.js';
|
|
46
|
+
export { catalogReactTranslationRef } from './translation.esm.js';
|
|
46
47
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/translation.esm.js
CHANGED
|
@@ -143,6 +143,9 @@ const catalogReactTranslationRef = createTranslationRef({
|
|
|
143
143
|
label: "Label",
|
|
144
144
|
domain: "Domain"
|
|
145
145
|
},
|
|
146
|
+
entityRelationCard: {
|
|
147
|
+
emptyHelpLinkTitle: "Learn how to change this."
|
|
148
|
+
},
|
|
146
149
|
missingAnnotationEmptyState: {
|
|
147
150
|
title: "Missing Annotation",
|
|
148
151
|
readMore: "Read more",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2024 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 catalogReactTranslationRef = createTranslationRef({\n id: 'catalog-react',\n messages: {\n catalogFilter: {\n title: 'Filters',\n buttonTitle: 'Filters',\n },\n entityKindPicker: {\n title: 'Kind',\n errorMessage: 'Failed to load entity kinds',\n },\n entityLifecyclePicker: {\n title: 'Lifecycle',\n },\n entityNamespacePicker: {\n title: 'Namespace',\n },\n entityOwnerPicker: {\n title: 'Owner',\n },\n entityProcessingStatusPicker: {\n title: 'Processing Status',\n },\n entityTagPicker: {\n title: 'Tags',\n },\n entityPeekAheadPopover: {\n title: 'Drill into the entity to see all of the tags.',\n emailCardAction: {\n title: 'Email {{email}}',\n subTitle: 'mailto {{email}}',\n ariaLabel: 'Email',\n },\n entityCardActionsAriaLabel: 'Show',\n entityCardActionsTitle: 'Show details',\n },\n entitySearchBar: {\n placeholder: 'Search',\n },\n entityTypePicker: {\n title: 'Type',\n errorMessage: 'Failed to load entity types',\n optionAllTitle: 'all',\n },\n favoriteEntity: {\n addToFavorites: 'Add to favorites',\n removeFromFavorites: 'Remove from favorites',\n },\n inspectEntityDialog: {\n title: 'Entity Inspector',\n closeButtonTitle: 'Close',\n ancestryPage: {\n title: 'Ancestry',\n description:\n 'This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where {{processorsLink}} child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations.',\n processorsLink: 'processors emitted',\n },\n colocatedPage: {\n title: 'Colocated',\n description:\n 'These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).',\n alertNoLocation: 'Entity had no location information.',\n alertNoEntity: 'There were no other entities on this location.',\n locationHeader: 'At the same location',\n originHeader: 'At the same origin',\n },\n jsonPage: {\n title: 'Entity as JSON',\n description:\n 'This is the raw entity data as received from the catalog, on JSON form.',\n },\n overviewPage: {\n title: 'Overview',\n relation: {\n title: 'Relations',\n },\n status: {\n title: 'Status',\n },\n identity: {\n title: 'Identity',\n },\n metadata: {\n title: 'Metadata',\n },\n annotations: 'Annotations',\n labels: 'Labels',\n tags: 'Tags',\n },\n yamlPage: {\n title: 'Entity as YAML',\n description:\n 'This is the raw entity data as received from the catalog, on YAML form.',\n },\n tabNames: {\n overview: 'Overview',\n ancestry: 'Ancestry',\n colocated: 'Colocated',\n json: 'Raw JSON',\n yaml: 'Raw YAML',\n },\n tabsAriaLabel: 'Inspector options',\n },\n unregisterEntityDialog: {\n title: 'Are you sure you want to unregister this entity?',\n cancelButtonTitle: 'Cancel',\n deleteButtonTitle: 'Delete Entity',\n deleteEntitySuccessMessage: 'Removed entity {{entityName}}',\n bootstrapState: {\n title:\n 'You cannot unregister this entity, since it originates from a protected Backstage configuration (location \"{{location}}\"). If you believe this is in error, please contact the {{appTitle}} integrator.',\n advancedDescription:\n 'You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.',\n advancedOptions: 'Advanced Options',\n },\n onlyDeleteStateTitle:\n 'This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.',\n unregisterState: {\n title: 'This action will unregister the following entities:',\n subTitle: 'Located at the following location:',\n description: 'To undo, just re-register the entity in {{appTitle}}.',\n unregisterButtonTitle: 'Unregister Location',\n advancedOptions: 'Advanced Options',\n advancedDescription:\n 'You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.',\n },\n errorStateTitle: 'Internal error: Unknown state',\n },\n userListPicker: {\n defaultOrgName: 'Company',\n personalFilter: {\n title: 'Personal',\n ownedLabel: 'Owned',\n starredLabel: 'Starred',\n },\n orgFilterAllLabel: 'All',\n },\n entityTableColumnTitle: {\n name: 'Name',\n system: 'System',\n owner: 'Owner',\n type: 'Type',\n lifecycle: 'Lifecycle',\n namespace: 'Namespace',\n description: 'Description',\n tags: 'Tags',\n targets: 'Targets',\n title: 'Title',\n label: 'Label',\n domain: 'Domain',\n },\n missingAnnotationEmptyState: {\n title: 'Missing Annotation',\n readMore: 'Read more',\n annotationYaml:\n 'Add the annotation to your {{entityKind}} YAML as shown in the highlighted example below:',\n generateDescription_one:\n 'The annotation {{annotations}} is missing. You need to add the annotation to your {{entityKind}} if you want to enable this tool.',\n generateDescription_other:\n 'The annotations {{annotations}} are missing. You need to add the annotations to your {{entityKind}} if you want to enable this tool.',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,6BAA6B,oBAAA,CAAqB;AAAA,EAC7D,EAAA,EAAI,eAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,aAAA,EAAe;AAAA,MACb,KAAA,EAAO,SAAA;AAAA,MACP,WAAA,EAAa;AAAA,KACf;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,KAAA,EAAO,MAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,qBAAA,EAAuB;AAAA,MACrB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,qBAAA,EAAuB;AAAA,MACrB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,iBAAA,EAAmB;AAAA,MACjB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,4BAAA,EAA8B;AAAA,MAC5B,KAAA,EAAO;AAAA,KACT;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,KAAA,EAAO;AAAA,KACT;AAAA,IACA,sBAAA,EAAwB;AAAA,MACtB,KAAA,EAAO,+CAAA;AAAA,MACP,eAAA,EAAiB;AAAA,QACf,KAAA,EAAO,iBAAA;AAAA,QACP,QAAA,EAAU,kBAAA;AAAA,QACV,SAAA,EAAW;AAAA,OACb;AAAA,MACA,0BAAA,EAA4B,MAAA;AAAA,MAC5B,sBAAA,EAAwB;AAAA,KAC1B;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,WAAA,EAAa;AAAA,KACf;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,KAAA,EAAO,MAAA;AAAA,MACP,YAAA,EAAc,6BAAA;AAAA,MACd,cAAA,EAAgB;AAAA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EAAO,oBAAA;AAAA,MACP,QAAA,EAAU,WAAA;AAAA,MACV,cAAA,EACE,2FAAA;AAAA,MACF,uBAAA,EACE,mIAAA;AAAA,MACF,yBAAA,EACE;AAAA;AACJ;AAEJ,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport const catalogReactTranslationRef = createTranslationRef({\n id: 'catalog-react',\n messages: {\n catalogFilter: {\n title: 'Filters',\n buttonTitle: 'Filters',\n },\n entityKindPicker: {\n title: 'Kind',\n errorMessage: 'Failed to load entity kinds',\n },\n entityLifecyclePicker: {\n title: 'Lifecycle',\n },\n entityNamespacePicker: {\n title: 'Namespace',\n },\n entityOwnerPicker: {\n title: 'Owner',\n },\n entityProcessingStatusPicker: {\n title: 'Processing Status',\n },\n entityTagPicker: {\n title: 'Tags',\n },\n entityPeekAheadPopover: {\n title: 'Drill into the entity to see all of the tags.',\n emailCardAction: {\n title: 'Email {{email}}',\n subTitle: 'mailto {{email}}',\n ariaLabel: 'Email',\n },\n entityCardActionsAriaLabel: 'Show',\n entityCardActionsTitle: 'Show details',\n },\n entitySearchBar: {\n placeholder: 'Search',\n },\n entityTypePicker: {\n title: 'Type',\n errorMessage: 'Failed to load entity types',\n optionAllTitle: 'all',\n },\n favoriteEntity: {\n addToFavorites: 'Add to favorites',\n removeFromFavorites: 'Remove from favorites',\n },\n inspectEntityDialog: {\n title: 'Entity Inspector',\n closeButtonTitle: 'Close',\n ancestryPage: {\n title: 'Ancestry',\n description:\n 'This is the ancestry of entities above the current one - as in, the chain(s) of entities down to the current one, where {{processorsLink}} child entities that ultimately led to the current one existing. Note that this is a completely different mechanism from relations.',\n processorsLink: 'processors emitted',\n },\n colocatedPage: {\n title: 'Colocated',\n description:\n 'These are the entities that are colocated with this entity - as in, they originated from the same data source (e.g. came from the same YAML file), or from the same origin (e.g. the originally registered URL).',\n alertNoLocation: 'Entity had no location information.',\n alertNoEntity: 'There were no other entities on this location.',\n locationHeader: 'At the same location',\n originHeader: 'At the same origin',\n },\n jsonPage: {\n title: 'Entity as JSON',\n description:\n 'This is the raw entity data as received from the catalog, on JSON form.',\n },\n overviewPage: {\n title: 'Overview',\n relation: {\n title: 'Relations',\n },\n status: {\n title: 'Status',\n },\n identity: {\n title: 'Identity',\n },\n metadata: {\n title: 'Metadata',\n },\n annotations: 'Annotations',\n labels: 'Labels',\n tags: 'Tags',\n },\n yamlPage: {\n title: 'Entity as YAML',\n description:\n 'This is the raw entity data as received from the catalog, on YAML form.',\n },\n tabNames: {\n overview: 'Overview',\n ancestry: 'Ancestry',\n colocated: 'Colocated',\n json: 'Raw JSON',\n yaml: 'Raw YAML',\n },\n tabsAriaLabel: 'Inspector options',\n },\n unregisterEntityDialog: {\n title: 'Are you sure you want to unregister this entity?',\n cancelButtonTitle: 'Cancel',\n deleteButtonTitle: 'Delete Entity',\n deleteEntitySuccessMessage: 'Removed entity {{entityName}}',\n bootstrapState: {\n title:\n 'You cannot unregister this entity, since it originates from a protected Backstage configuration (location \"{{location}}\"). If you believe this is in error, please contact the {{appTitle}} integrator.',\n advancedDescription:\n 'You have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.',\n advancedOptions: 'Advanced Options',\n },\n onlyDeleteStateTitle:\n 'This entity does not seem to originate from a registered location. You therefore only have the option to delete it outright from the catalog.',\n unregisterState: {\n title: 'This action will unregister the following entities:',\n subTitle: 'Located at the following location:',\n description: 'To undo, just re-register the entity in {{appTitle}}.',\n unregisterButtonTitle: 'Unregister Location',\n advancedOptions: 'Advanced Options',\n advancedDescription:\n 'You also have the option to delete the entity itself from the catalog. Note that this should only be done if you know that the catalog file has been deleted at, or moved from, its origin location. If that is not the case, the entity will reappear shortly as the next refresh round is performed by the catalog.',\n },\n errorStateTitle: 'Internal error: Unknown state',\n },\n userListPicker: {\n defaultOrgName: 'Company',\n personalFilter: {\n title: 'Personal',\n ownedLabel: 'Owned',\n starredLabel: 'Starred',\n },\n orgFilterAllLabel: 'All',\n },\n entityTableColumnTitle: {\n name: 'Name',\n system: 'System',\n owner: 'Owner',\n type: 'Type',\n lifecycle: 'Lifecycle',\n namespace: 'Namespace',\n description: 'Description',\n tags: 'Tags',\n targets: 'Targets',\n title: 'Title',\n label: 'Label',\n domain: 'Domain',\n },\n entityRelationCard: {\n emptyHelpLinkTitle: 'Learn how to change this.',\n },\n missingAnnotationEmptyState: {\n title: 'Missing Annotation',\n readMore: 'Read more',\n annotationYaml:\n 'Add the annotation to your {{entityKind}} YAML as shown in the highlighted example below:',\n generateDescription_one:\n 'The annotation {{annotations}} is missing. You need to add the annotation to your {{entityKind}} if you want to enable this tool.',\n generateDescription_other:\n 'The annotations {{annotations}} are missing. You need to add the annotations to your {{entityKind}} if you want to enable this tool.',\n },\n },\n});\n"],"names":[],"mappings":";;AAmBO,MAAM,6BAA6B,oBAAA,CAAqB;AAAA,EAC7D,EAAA,EAAI,eAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,aAAA,EAAe;AAAA,MACb,KAAA,EAAO,SAAA;AAAA,MACP,WAAA,EAAa;AAAA,KACf;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,KAAA,EAAO,MAAA;AAAA,MACP,YAAA,EAAc;AAAA,KAChB;AAAA,IACA,qBAAA,EAAuB;AAAA,MACrB,KAAA,EAAO;AAAA,KACT;AAAA,I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iB;AAAA,KACnB;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,cAAA,EAAgB,SAAA;AAAA,MAChB,cAAA,EAAgB;AAAA,QACd,KAAA,EAAO,UAAA;AAAA,QACP,UAAA,EAAY,OAAA;AAAA,QACZ,YAAA,EAAc;AAAA,OAChB;AAAA,MACA,iBAAA,EAAmB;AAAA,KACrB;AAAA,IACA,sBAAA,EAAwB;AAAA,MACtB,IAAA,EAAM,MAAA;AAAA,MACN,MAAA,EAAQ,QAAA;AAAA,MACR,KAAA,EAAO,OAAA;AAAA,MACP,IAAA,EAAM,MAAA;AAAA,MACN,SAAA,EAAW,WAAA;AAAA,MACX,SAAA,EAAW,WAAA;AAAA,MACX,WAAA,EAAa,aAAA;AAAA,MACb,IAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAS,SAAA;AAAA,MACT,KAAA,EAAO,OAAA;AAAA,MACP,KAAA,EAAO,OAAA;AAAA,MACP,MAAA,EAAQ;AAAA,KACV;AAAA,IACA,kBAAA,EAAoB;AAAA,MAClB,kBAAA,EAAoB;AAAA,KACtB;AAAA,IACA,2BAAA,EAA6B;AAAA,MAC3B,KAAA,EAAO,oBAAA;AAAA,MACP,QAAA,EAAU,WAAA;AAAA,MACV,cAAA,EACE,2FAAA;AAAA,MACF,uBAAA,EACE,mIAAA;AAAA,MACF,yBAAA,EACE;AAAA;AACJ;AAEJ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-react",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "A frontend library that helps other Backstage plugins interact with the catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -73,21 +73,21 @@
|
|
|
73
73
|
"test": "backstage-cli package test"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@backstage/catalog-client": "1.14.0
|
|
77
|
-
"@backstage/catalog-model": "1.7.
|
|
78
|
-
"@backstage/core-compat-api": "0.5.9
|
|
79
|
-
"@backstage/core-components": "0.18.8
|
|
80
|
-
"@backstage/core-plugin-api": "1.12.4
|
|
81
|
-
"@backstage/errors": "1.2.7",
|
|
82
|
-
"@backstage/filter-predicates": "0.1.
|
|
83
|
-
"@backstage/frontend-plugin-api": "0.15.0
|
|
84
|
-
"@backstage/integration-react": "1.2.16
|
|
85
|
-
"@backstage/plugin-catalog-common": "1.1.8",
|
|
86
|
-
"@backstage/plugin-permission-common": "0.9.
|
|
87
|
-
"@backstage/plugin-permission-react": "0.4.41
|
|
88
|
-
"@backstage/types": "1.2.2",
|
|
89
|
-
"@backstage/ui": "0.13.0
|
|
90
|
-
"@backstage/version-bridge": "1.0.12",
|
|
76
|
+
"@backstage/catalog-client": "^1.14.0",
|
|
77
|
+
"@backstage/catalog-model": "^1.7.7",
|
|
78
|
+
"@backstage/core-compat-api": "^0.5.9",
|
|
79
|
+
"@backstage/core-components": "^0.18.8",
|
|
80
|
+
"@backstage/core-plugin-api": "^1.12.4",
|
|
81
|
+
"@backstage/errors": "^1.2.7",
|
|
82
|
+
"@backstage/filter-predicates": "^0.1.1",
|
|
83
|
+
"@backstage/frontend-plugin-api": "^0.15.0",
|
|
84
|
+
"@backstage/integration-react": "^1.2.16",
|
|
85
|
+
"@backstage/plugin-catalog-common": "^1.1.8",
|
|
86
|
+
"@backstage/plugin-permission-common": "^0.9.7",
|
|
87
|
+
"@backstage/plugin-permission-react": "^0.4.41",
|
|
88
|
+
"@backstage/types": "^1.2.2",
|
|
89
|
+
"@backstage/ui": "^0.13.0",
|
|
90
|
+
"@backstage/version-bridge": "^1.0.12",
|
|
91
91
|
"@material-ui/core": "^4.12.2",
|
|
92
92
|
"@material-ui/icons": "^4.9.1",
|
|
93
93
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
"zen-observable": "^0.10.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@backstage/cli": "0.36.0
|
|
105
|
-
"@backstage/core-app-api": "1.19.6
|
|
106
|
-
"@backstage/frontend-test-utils": "0.5.1
|
|
107
|
-
"@backstage/plugin-catalog-common": "1.1.8",
|
|
108
|
-
"@backstage/plugin-scaffolder-common": "2.0.0
|
|
109
|
-
"@backstage/test-utils": "1.7.16
|
|
104
|
+
"@backstage/cli": "^0.36.0",
|
|
105
|
+
"@backstage/core-app-api": "^1.19.6",
|
|
106
|
+
"@backstage/frontend-test-utils": "^0.5.1",
|
|
107
|
+
"@backstage/plugin-catalog-common": "^1.1.8",
|
|
108
|
+
"@backstage/plugin-scaffolder-common": "^2.0.0",
|
|
109
|
+
"@backstage/test-utils": "^1.7.16",
|
|
110
110
|
"@testing-library/dom": "^10.0.0",
|
|
111
111
|
"@testing-library/jest-dom": "^6.0.0",
|
|
112
112
|
"@testing-library/react": "^16.0.0",
|
|
@@ -117,10 +117,10 @@
|
|
|
117
117
|
"react-dom": "^18.0.2",
|
|
118
118
|
"react-router-dom": "^6.30.2",
|
|
119
119
|
"react-test-renderer": "^16.13.1",
|
|
120
|
-
"zod": "^3.25.76"
|
|
120
|
+
"zod": "^3.25.76 || ^4.0.0"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
|
-
"@backstage/frontend-test-utils": "0.5.1
|
|
123
|
+
"@backstage/frontend-test-utils": "^0.5.1",
|
|
124
124
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
125
125
|
"react": "^17.0.0 || ^18.0.0",
|
|
126
126
|
"react-dom": "^17.0.0 || ^18.0.0",
|