@backstage/plugin-catalog-react 1.7.1-next.1 → 1.8.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 +44 -0
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +21 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- eae0352d3864: Tables which use `EntityTableProps` now have an additional `tableOptions` prop which can be used to provide additional table options to these components.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/theme@0.4.1
|
|
13
|
+
- @backstage/errors@1.2.1
|
|
14
|
+
- @backstage/core-components@0.13.3
|
|
15
|
+
- @backstage/core-plugin-api@1.5.3
|
|
16
|
+
- @backstage/catalog-client@1.4.3
|
|
17
|
+
- @backstage/catalog-model@1.4.1
|
|
18
|
+
- @backstage/integration@1.5.1
|
|
19
|
+
- @backstage/types@1.1.0
|
|
20
|
+
- @backstage/version-bridge@1.0.4
|
|
21
|
+
- @backstage/plugin-catalog-common@1.0.15
|
|
22
|
+
- @backstage/plugin-permission-common@0.7.7
|
|
23
|
+
- @backstage/plugin-permission-react@0.4.14
|
|
24
|
+
|
|
25
|
+
## 1.8.0-next.2
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- eae0352d3864: Tables which use `EntityTableProps` now have an additional `tableOptions` prop which can be used to provide additional table options to these components.
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
- @backstage/theme@0.4.1-next.1
|
|
35
|
+
- @backstage/core-plugin-api@1.5.3-next.1
|
|
36
|
+
- @backstage/core-components@0.13.3-next.2
|
|
37
|
+
- @backstage/catalog-client@1.4.3-next.0
|
|
38
|
+
- @backstage/catalog-model@1.4.1-next.0
|
|
39
|
+
- @backstage/errors@1.2.1-next.0
|
|
40
|
+
- @backstage/integration@1.5.1-next.0
|
|
41
|
+
- @backstage/types@1.1.0
|
|
42
|
+
- @backstage/version-bridge@1.0.4
|
|
43
|
+
- @backstage/plugin-catalog-common@1.0.15-next.0
|
|
44
|
+
- @backstage/plugin-permission-common@0.7.7-next.0
|
|
45
|
+
- @backstage/plugin-permission-react@0.4.14-next.2
|
|
46
|
+
|
|
3
47
|
## 1.7.1-next.1
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { Observable } from '@backstage/types';
|
|
|
7
7
|
import React, { PropsWithChildren, ReactNode, ComponentProps } from 'react';
|
|
8
8
|
import * as _backstage_catalog_model from '@backstage/catalog-model';
|
|
9
9
|
import { Entity, CompoundEntityRef } from '@backstage/catalog-model';
|
|
10
|
-
import { LinkProps, InfoCardVariants, TableColumn } from '@backstage/core-components';
|
|
10
|
+
import { LinkProps, InfoCardVariants, TableColumn, TableOptions } from '@backstage/core-components';
|
|
11
11
|
import { IconButton } from '@material-ui/core';
|
|
12
12
|
import { Overrides } from '@material-ui/core/styles/overrides';
|
|
13
13
|
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
|
@@ -191,6 +191,7 @@ interface EntityTableProps<T extends Entity> {
|
|
|
191
191
|
entities: T[];
|
|
192
192
|
emptyContent?: ReactNode;
|
|
193
193
|
columns: TableColumn<T>[];
|
|
194
|
+
tableOptions?: TableOptions;
|
|
194
195
|
}
|
|
195
196
|
/**
|
|
196
197
|
* A general entity table component, that can be used for composing more
|
package/dist/index.esm.js
CHANGED
|
@@ -53,17 +53,23 @@ const starredEntitiesApiRef = createApiRef({
|
|
|
53
53
|
id: "catalog-react.starred-entities"
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
+
var __defProp$1 = Object.defineProperty;
|
|
57
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
58
|
+
var __publicField$1 = (obj, key, value) => {
|
|
59
|
+
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
60
|
+
return value;
|
|
61
|
+
};
|
|
56
62
|
class MockStarredEntitiesApi {
|
|
57
63
|
constructor() {
|
|
58
|
-
this
|
|
59
|
-
this
|
|
60
|
-
this
|
|
64
|
+
__publicField$1(this, "starredEntities", /* @__PURE__ */ new Set());
|
|
65
|
+
__publicField$1(this, "subscribers", /* @__PURE__ */ new Set());
|
|
66
|
+
__publicField$1(this, "observable", new ObservableImpl((subscriber) => {
|
|
61
67
|
subscriber.next(new Set(this.starredEntities));
|
|
62
68
|
this.subscribers.add(subscriber);
|
|
63
69
|
return () => {
|
|
64
70
|
this.subscribers.delete(subscriber);
|
|
65
71
|
};
|
|
66
|
-
});
|
|
72
|
+
}));
|
|
67
73
|
}
|
|
68
74
|
async toggleStarred(entityRef) {
|
|
69
75
|
if (!this.starredEntities.delete(entityRef)) {
|
|
@@ -154,6 +160,12 @@ function getEntitySourceLocation(entity, scmIntegrationsApi) {
|
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
|
|
163
|
+
var __defProp = Object.defineProperty;
|
|
164
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
165
|
+
var __publicField = (obj, key, value) => {
|
|
166
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
167
|
+
return value;
|
|
168
|
+
};
|
|
157
169
|
class EntityKindFilter {
|
|
158
170
|
constructor(value) {
|
|
159
171
|
this.value = value;
|
|
@@ -218,6 +230,7 @@ class EntityTextFilter {
|
|
|
218
230
|
}
|
|
219
231
|
class EntityOwnerFilter {
|
|
220
232
|
constructor(values) {
|
|
233
|
+
__publicField(this, "values");
|
|
221
234
|
this.values = values.reduce((fullRefs, ref) => {
|
|
222
235
|
try {
|
|
223
236
|
fullRefs.push(
|
|
@@ -1619,7 +1632,8 @@ const EntityTable = (props) => {
|
|
|
1619
1632
|
title,
|
|
1620
1633
|
emptyContent,
|
|
1621
1634
|
variant = "gridItem",
|
|
1622
|
-
columns
|
|
1635
|
+
columns,
|
|
1636
|
+
tableOptions = {}
|
|
1623
1637
|
} = props;
|
|
1624
1638
|
const classes = useStyles$a();
|
|
1625
1639
|
const tableStyle = {
|
|
@@ -1642,7 +1656,8 @@ const EntityTable = (props) => {
|
|
|
1642
1656
|
paging: false,
|
|
1643
1657
|
actionsColumnIndex: -1,
|
|
1644
1658
|
padding: "dense",
|
|
1645
|
-
draggable: false
|
|
1659
|
+
draggable: false,
|
|
1660
|
+
...tableOptions
|
|
1646
1661
|
},
|
|
1647
1662
|
data: entities
|
|
1648
1663
|
}
|