@backstage/plugin-catalog-react 0.0.0-nightly-20260326031748 → 0.0.0-nightly-20260328031417
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 +12 -10
- package/dist/components/EntityDataTable/EntityDataTable.esm.js +2 -3
- package/dist/components/EntityDataTable/EntityDataTable.esm.js.map +1 -1
- package/dist/components/EntityInfoCard/EntityInfoCard.esm.js +14 -1
- package/dist/components/EntityInfoCard/EntityInfoCard.esm.js.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20260328031417
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 51aacae: Fixed a UI flicker in the catalog entity list where changing a filter would briefly flash stale data before showing the new results.
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- @backstage/
|
|
12
|
-
- @backstage/
|
|
13
|
-
- @backstage/core-
|
|
14
|
-
- @backstage/
|
|
15
|
-
- @backstage/
|
|
8
|
+
- eba2f61: Fixed `EntityInfoCard` header overflowing on narrow screens.
|
|
9
|
+
- 0416216: Fixed entity relation cards (e.g., "Has components") only showing one entity at a time by using `paginationOptions: { type: 'none' }` instead of deriving page size from data length.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
- @backstage/ui@0.0.0-nightly-20260328031417
|
|
12
|
+
- @backstage/frontend-plugin-api@0.0.0-nightly-20260328031417
|
|
13
|
+
- @backstage/core-components@0.0.0-nightly-20260328031417
|
|
14
|
+
- @backstage/core-compat-api@0.0.0-nightly-20260328031417
|
|
15
|
+
- @backstage/core-plugin-api@0.0.0-nightly-20260328031417
|
|
16
|
+
- @backstage/frontend-test-utils@0.0.0-nightly-20260328031417
|
|
17
|
+
- @backstage/integration-react@0.0.0-nightly-20260328031417
|
|
16
18
|
- @backstage/catalog-client@1.14.0
|
|
17
19
|
- @backstage/catalog-model@1.7.7
|
|
18
20
|
- @backstage/errors@1.2.7
|
|
@@ -21,7 +23,7 @@
|
|
|
21
23
|
- @backstage/version-bridge@1.0.12
|
|
22
24
|
- @backstage/plugin-catalog-common@1.1.8
|
|
23
25
|
- @backstage/plugin-permission-common@0.9.7
|
|
24
|
-
- @backstage/plugin-permission-react@0.0.0-nightly-
|
|
26
|
+
- @backstage/plugin-permission-react@0.0.0-nightly-20260328031417
|
|
25
27
|
|
|
26
28
|
## 2.1.1-next.0
|
|
27
29
|
|
|
@@ -30,7 +30,7 @@ function EntityDataTable(props) {
|
|
|
30
30
|
mode: "complete",
|
|
31
31
|
data: tableData,
|
|
32
32
|
sortFn,
|
|
33
|
-
paginationOptions: {
|
|
33
|
+
paginationOptions: { type: "none" }
|
|
34
34
|
});
|
|
35
35
|
return /* @__PURE__ */ jsx(
|
|
36
36
|
Table,
|
|
@@ -39,8 +39,7 @@ function EntityDataTable(props) {
|
|
|
39
39
|
...tableProps,
|
|
40
40
|
loading,
|
|
41
41
|
error,
|
|
42
|
-
emptyState
|
|
43
|
-
pagination: { type: "none" }
|
|
42
|
+
emptyState
|
|
44
43
|
}
|
|
45
44
|
);
|
|
46
45
|
}
|
|
@@ -1 +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: {
|
|
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: { type: 'none' },\n });\n\n return (\n <Table\n columnConfig={columnConfig}\n {...tableProps}\n loading={loading}\n error={error}\n emptyState={emptyState}\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;AAAA,MACH,EAAA,EAAI,mBAAmB,MAAM;AAAA,KAC/B,CAAE,CAAA;AAAA,IACJ,CAAC,IAAI;AAAA,GACP;AAEA,EAAA,MAAM,MAAA,GAAS,WAAA;AAAA,IACb,CAAC,OAAoB,IAAA,KAAyB;AAC5C,MAAA,MAAM,SAAS,YAAA,CAAa,IAAA,CAAK,OAAK,CAAA,CAAE,EAAA,KAAO,KAAK,MAAM,CAAA;AAC1D,MAAA,IAAI,CAAC,QAAQ,SAAA,EAAW;AACtB,QAAA,OAAO,KAAA;AAAA,MACT;AACA,MAAA,MAAM,WAAW,MAAA,CAAO,SAAA;AACxB,MAAA,MAAM,SAAA,GAAY,IAAA,CAAK,SAAA,KAAc,YAAA,GAAe,EAAA,GAAK,CAAA;AACzD,MAAA,OAAO,CAAC,GAAG,KAAK,CAAA,CAAE,IAAA;AAAA,QAChB,CAAC,CAAA,EAAG,CAAA,KAAM,QAAA,CAAS,CAAC,EAAE,aAAA,CAAc,QAAA,CAAS,CAAC,CAAC,CAAA,GAAI;AAAA,OACrD;AAAA,IACF,CAAA;AAAA,IACA,CAAC,YAAY;AAAA,GACf;AAEA,EAAA,MAAM,EAAE,UAAA,EAAW,GAAI,QAAA,CAAS;AAAA,IAC9B,IAAA,EAAM,UAAA;AAAA,IACN,IAAA,EAAM,SAAA;AAAA,IACN,MAAA;AAAA,IACA,iBAAA,EAAmB,EAAE,IAAA,EAAM,MAAA;AAAO,GACnC,CAAA;AAED,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,YAAA;AAAA,MACC,GAAG,UAAA;AAAA,MACJ,OAAA;AAAA,MACA,KAAA;AAAA,MACA;AAAA;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -7,6 +7,10 @@ const useStyles = makeStyles({
|
|
|
7
7
|
root: {
|
|
8
8
|
height: "100%"
|
|
9
9
|
},
|
|
10
|
+
title: {
|
|
11
|
+
minWidth: 0,
|
|
12
|
+
overflow: "hidden"
|
|
13
|
+
},
|
|
10
14
|
footer: {
|
|
11
15
|
display: "flex",
|
|
12
16
|
justifyContent: "flex-end"
|
|
@@ -17,7 +21,16 @@ function EntityInfoCard(props) {
|
|
|
17
21
|
const classes = useStyles();
|
|
18
22
|
return /* @__PURE__ */ jsxs(Card, { className: classNames(classes.root, className), children: [
|
|
19
23
|
title && /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(Flex, { justify: "between", align: "center", children: [
|
|
20
|
-
/* @__PURE__ */ jsx(
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
Text,
|
|
26
|
+
{
|
|
27
|
+
as: "h3",
|
|
28
|
+
variant: "title-x-small",
|
|
29
|
+
weight: "bold",
|
|
30
|
+
className: classes.title,
|
|
31
|
+
children: title
|
|
32
|
+
}
|
|
33
|
+
),
|
|
21
34
|
headerActions && /* @__PURE__ */ jsx(Flex, { align: "center", gap: "1", children: headerActions })
|
|
22
35
|
] }) }),
|
|
23
36
|
/* @__PURE__ */ jsx(CardBody, { children }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityInfoCard.esm.js","sources":["../../../src/components/EntityInfoCard/EntityInfoCard.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 { ReactNode } from 'react';\nimport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n Text,\n Flex,\n} from '@backstage/ui';\nimport { makeStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n },\n footer: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n});\n\n/** @public */\nexport interface EntityInfoCardProps {\n title?: ReactNode;\n headerActions?: ReactNode;\n footerActions?: ReactNode;\n children?: ReactNode;\n className?: string;\n}\n\n/** @public */\nexport function EntityInfoCard(props: EntityInfoCardProps) {\n const { title, headerActions, footerActions, children, className } = props;\n const classes = useStyles();\n\n return (\n <Card className={classNames(classes.root, className)}>\n {title && (\n <CardHeader>\n <Flex justify=\"between\" align=\"center\">\n <Text
|
|
1
|
+
{"version":3,"file":"EntityInfoCard.esm.js","sources":["../../../src/components/EntityInfoCard/EntityInfoCard.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 { ReactNode } from 'react';\nimport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n Text,\n Flex,\n} from '@backstage/ui';\nimport { makeStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\n\nconst useStyles = makeStyles({\n root: {\n height: '100%',\n },\n title: {\n minWidth: 0,\n overflow: 'hidden',\n },\n footer: {\n display: 'flex',\n justifyContent: 'flex-end',\n },\n});\n\n/** @public */\nexport interface EntityInfoCardProps {\n title?: ReactNode;\n headerActions?: ReactNode;\n footerActions?: ReactNode;\n children?: ReactNode;\n className?: string;\n}\n\n/** @public */\nexport function EntityInfoCard(props: EntityInfoCardProps) {\n const { title, headerActions, footerActions, children, className } = props;\n const classes = useStyles();\n\n return (\n <Card className={classNames(classes.root, className)}>\n {title && (\n <CardHeader>\n <Flex justify=\"between\" align=\"center\">\n <Text\n as=\"h3\"\n variant=\"title-x-small\"\n weight=\"bold\"\n className={classes.title}\n >\n {title}\n </Text>\n {headerActions && (\n <Flex align=\"center\" gap=\"1\">\n {headerActions}\n </Flex>\n )}\n </Flex>\n </CardHeader>\n )}\n <CardBody>{children}</CardBody>\n {footerActions && (\n <CardFooter className={classes.footer}>{footerActions}</CardFooter>\n )}\n </Card>\n );\n}\n"],"names":[],"mappings":";;;;;AA4BA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,IAAA,EAAM;AAAA,IACJ,MAAA,EAAQ;AA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",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20260328031417",
|
|
4
4
|
"description": "A frontend library that helps other Backstage plugins interact with the catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -75,18 +75,18 @@
|
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@backstage/catalog-client": "1.14.0",
|
|
77
77
|
"@backstage/catalog-model": "1.7.7",
|
|
78
|
-
"@backstage/core-compat-api": "0.0.0-nightly-
|
|
79
|
-
"@backstage/core-components": "0.0.0-nightly-
|
|
80
|
-
"@backstage/core-plugin-api": "0.0.0-nightly-
|
|
78
|
+
"@backstage/core-compat-api": "0.0.0-nightly-20260328031417",
|
|
79
|
+
"@backstage/core-components": "0.0.0-nightly-20260328031417",
|
|
80
|
+
"@backstage/core-plugin-api": "0.0.0-nightly-20260328031417",
|
|
81
81
|
"@backstage/errors": "1.2.7",
|
|
82
82
|
"@backstage/filter-predicates": "0.1.1",
|
|
83
|
-
"@backstage/frontend-plugin-api": "0.0.0-nightly-
|
|
84
|
-
"@backstage/integration-react": "0.0.0-nightly-
|
|
83
|
+
"@backstage/frontend-plugin-api": "0.0.0-nightly-20260328031417",
|
|
84
|
+
"@backstage/integration-react": "0.0.0-nightly-20260328031417",
|
|
85
85
|
"@backstage/plugin-catalog-common": "1.1.8",
|
|
86
86
|
"@backstage/plugin-permission-common": "0.9.7",
|
|
87
|
-
"@backstage/plugin-permission-react": "0.0.0-nightly-
|
|
87
|
+
"@backstage/plugin-permission-react": "0.0.0-nightly-20260328031417",
|
|
88
88
|
"@backstage/types": "1.2.2",
|
|
89
|
-
"@backstage/ui": "0.0.0-nightly-
|
|
89
|
+
"@backstage/ui": "0.0.0-nightly-20260328031417",
|
|
90
90
|
"@backstage/version-bridge": "1.0.12",
|
|
91
91
|
"@material-ui/core": "^4.12.2",
|
|
92
92
|
"@material-ui/icons": "^4.9.1",
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
"zen-observable": "^0.10.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@backstage/cli": "0.0.0-nightly-
|
|
105
|
-
"@backstage/core-app-api": "0.0.0-nightly-
|
|
106
|
-
"@backstage/frontend-test-utils": "0.0.0-nightly-
|
|
104
|
+
"@backstage/cli": "0.0.0-nightly-20260328031417",
|
|
105
|
+
"@backstage/core-app-api": "0.0.0-nightly-20260328031417",
|
|
106
|
+
"@backstage/frontend-test-utils": "0.0.0-nightly-20260328031417",
|
|
107
107
|
"@backstage/plugin-catalog-common": "1.1.8",
|
|
108
108
|
"@backstage/plugin-scaffolder-common": "2.0.0",
|
|
109
|
-
"@backstage/test-utils": "0.0.0-nightly-
|
|
109
|
+
"@backstage/test-utils": "0.0.0-nightly-20260328031417",
|
|
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",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"zod": "^3.25.76 || ^4.0.0"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
|
-
"@backstage/frontend-test-utils": "0.0.0-nightly-
|
|
123
|
+
"@backstage/frontend-test-utils": "0.0.0-nightly-20260328031417",
|
|
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",
|