@backstage/plugin-catalog-react 1.8.0 → 1.8.1-next.1
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 +24 -0
- package/alpha/package.json +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.esm.js +8 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 1.8.1-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- aa3feedce10a: Allow specifying screen size when catalog filters are hidden in drawer
|
|
8
|
+
|
|
9
|
+
## 1.8.1-next.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @backstage/core-components@0.13.4-next.0
|
|
15
|
+
- @backstage/core-plugin-api@1.5.3
|
|
16
|
+
- @backstage/catalog-client@1.4.3
|
|
17
|
+
- @backstage/catalog-model@1.4.1
|
|
18
|
+
- @backstage/errors@1.2.1
|
|
19
|
+
- @backstage/integration@1.5.1
|
|
20
|
+
- @backstage/theme@0.4.1
|
|
21
|
+
- @backstage/types@1.1.0
|
|
22
|
+
- @backstage/version-bridge@1.0.4
|
|
23
|
+
- @backstage/plugin-catalog-common@1.0.15
|
|
24
|
+
- @backstage/plugin-permission-common@0.7.7
|
|
25
|
+
- @backstage/plugin-permission-react@0.4.14
|
|
26
|
+
|
|
3
27
|
## 1.8.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ declare const CatalogFilterLayout: {
|
|
|
63
63
|
}): JSX.Element;
|
|
64
64
|
Filters: (props: {
|
|
65
65
|
children: React.ReactNode;
|
|
66
|
+
options?: {
|
|
67
|
+
drawerBreakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
68
|
+
drawerAnchor?: 'left' | 'right' | 'top' | 'bottom';
|
|
69
|
+
};
|
|
66
70
|
}) => JSX.Element;
|
|
67
71
|
Content: (props: {
|
|
68
72
|
children: React.ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -85,12 +85,16 @@ class MockStarredEntitiesApi {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
const Filters = (props) => {
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
var _a, _b;
|
|
89
|
+
const isScreenSmallerThanBreakpoint = useMediaQuery(
|
|
90
|
+
(theme2) => {
|
|
91
|
+
var _a2, _b2;
|
|
92
|
+
return theme2.breakpoints.down((_b2 = (_a2 = props.options) == null ? void 0 : _a2.drawerBreakpoint) != null ? _b2 : "md");
|
|
93
|
+
}
|
|
90
94
|
);
|
|
91
95
|
const theme = useTheme();
|
|
92
96
|
const [filterDrawerOpen, setFilterDrawerOpen] = useState(false);
|
|
93
|
-
return
|
|
97
|
+
return isScreenSmallerThanBreakpoint ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
94
98
|
Button,
|
|
95
99
|
{
|
|
96
100
|
style: { marginTop: theme.spacing(1), marginLeft: theme.spacing(1) },
|
|
@@ -103,7 +107,7 @@ const Filters = (props) => {
|
|
|
103
107
|
{
|
|
104
108
|
open: filterDrawerOpen,
|
|
105
109
|
onClose: () => setFilterDrawerOpen(false),
|
|
106
|
-
anchor: "left",
|
|
110
|
+
anchor: (_b = (_a = props.options) == null ? void 0 : _a.drawerAnchor) != null ? _b : "left",
|
|
107
111
|
disableAutoFocus: true,
|
|
108
112
|
keepMounted: true,
|
|
109
113
|
variant: "temporary"
|