@backstage/core-components 0.8.10 → 0.9.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 +14 -0
- package/dist/index.esm.js +7 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- af5eaa87f4: **BREAKING**: Removed deprecated `auth0AuthApiRef`, `oauth2ApiRef`, `samlAuthApiRef` and `oidcAuthApiRef` as these APIs are too generic to be useful. Instructions for how to migrate can be found at [https://backstage.io/docs/api/deprecations#generic-auth-api-refs](https://backstage.io/docs/api/deprecations#generic-auth-api-refs).
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 64b430f80d: chore(deps): bump `react-text-truncate` from 0.17.0 to 0.18.0
|
|
12
|
+
- bb2bb36651: Updated usage of `StorageApi` to use `snapshot` method instead of `get`
|
|
13
|
+
- 689840dcbe: Added ability for SidebarSubmenuItem to handle external links correctly via the "to" prop
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @backstage/core-plugin-api@0.8.0
|
|
16
|
+
|
|
3
17
|
## 0.8.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.esm.js
CHANGED
|
@@ -9,7 +9,7 @@ import { makeStyles, createStyles, useTheme, darken, lighten, withStyles, styled
|
|
|
9
9
|
import MaterialAvatar from '@material-ui/core/Avatar';
|
|
10
10
|
import Button$1 from '@material-ui/core/Button';
|
|
11
11
|
import Link$1 from '@material-ui/core/Link';
|
|
12
|
-
import { Link as Link$2, useSearchParams, useLocation, useResolvedPath, resolvePath
|
|
12
|
+
import { Link as Link$2, useSearchParams, useLocation, useResolvedPath, resolvePath } from 'react-router-dom';
|
|
13
13
|
import Tooltip from '@material-ui/core/Tooltip';
|
|
14
14
|
import CopyIcon from '@material-ui/icons/FileCopy';
|
|
15
15
|
import useCopyToClipboard from 'react-use/lib/useCopyToClipboard';
|
|
@@ -774,16 +774,16 @@ const DismissableBanner = (props) => {
|
|
|
774
774
|
const classes = useStyles$N();
|
|
775
775
|
const storageApi = useApi(storageApiRef);
|
|
776
776
|
const notificationsStore = storageApi.forBucket("notifications");
|
|
777
|
-
const rawDismissedBanners = (_a = notificationsStore.
|
|
777
|
+
const rawDismissedBanners = (_a = notificationsStore.snapshot("dismissedBanners").value) != null ? _a : [];
|
|
778
778
|
const [dismissedBanners, setDismissedBanners] = useState(new Set(rawDismissedBanners));
|
|
779
779
|
const observedItems = useObservable(notificationsStore.observe$("dismissedBanners"));
|
|
780
780
|
useEffect(() => {
|
|
781
781
|
var _a2;
|
|
782
|
-
if (observedItems == null ? void 0 : observedItems.
|
|
783
|
-
const currentValue = (_a2 = observedItems == null ? void 0 : observedItems.
|
|
782
|
+
if (observedItems == null ? void 0 : observedItems.value) {
|
|
783
|
+
const currentValue = (_a2 = observedItems == null ? void 0 : observedItems.value) != null ? _a2 : [];
|
|
784
784
|
setDismissedBanners(new Set(currentValue));
|
|
785
785
|
}
|
|
786
|
-
}, [observedItems == null ? void 0 : observedItems.
|
|
786
|
+
}, [observedItems == null ? void 0 : observedItems.value]);
|
|
787
787
|
const handleClick = () => {
|
|
788
788
|
notificationsStore.set("dismissedBanners", [...dismissedBanners, id]);
|
|
789
789
|
};
|
|
@@ -3485,8 +3485,7 @@ const SidebarSubmenuItem = (props) => {
|
|
|
3485
3485
|
className: classes.dropdownArrow
|
|
3486
3486
|
})), dropdownItems && showDropDown && /* @__PURE__ */ React.createElement("div", {
|
|
3487
3487
|
className: classes.dropdown
|
|
3488
|
-
}, dropdownItems.map((object, key) => /* @__PURE__ */ React.createElement(Link
|
|
3489
|
-
component: NavLink,
|
|
3488
|
+
}, dropdownItems.map((object, key) => /* @__PURE__ */ React.createElement(Link, {
|
|
3490
3489
|
to: object.to,
|
|
3491
3490
|
underline: "none",
|
|
3492
3491
|
className: classes.dropdownItem,
|
|
@@ -3499,8 +3498,7 @@ const SidebarSubmenuItem = (props) => {
|
|
|
3499
3498
|
}
|
|
3500
3499
|
return /* @__PURE__ */ React.createElement("div", {
|
|
3501
3500
|
className: classes.itemContainer
|
|
3502
|
-
}, /* @__PURE__ */ React.createElement(Link
|
|
3503
|
-
component: NavLink,
|
|
3501
|
+
}, /* @__PURE__ */ React.createElement(Link, {
|
|
3504
3502
|
to,
|
|
3505
3503
|
underline: "none",
|
|
3506
3504
|
className: classNames(classes.item, isActive ? classes.selected : void 0),
|