@backstage/core-components 0.9.5-next.0 → 0.9.5
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/dist/index.d.ts +109 -28
- package/dist/index.esm.js +75 -25
- package/dist/index.esm.js.map +1 -1
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @backstage/core-components
|
|
2
2
|
|
|
3
|
+
## 0.9.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feb4e8de07: Fix EntityPage tab scrolling overflow bug on Firefox
|
|
8
|
+
- 65840b17be: Fix issue where right arrow icon was incorrectly added to side bar items without a sub-menu
|
|
9
|
+
- de593ec78f: Updated dependency `react-text-truncate` to `^0.19.0`.
|
|
10
|
+
- 8f7b1835df: Updated dependency `msw` to `^0.41.0`.
|
|
11
|
+
- 6968b65ba1: Updated dependency `@react-hookz/web` to `^14.0.0`.
|
|
12
|
+
- ee2cd642c5: Updated dependency `rc-progress` to `3.3.3`.
|
|
13
|
+
- 96d1e01641: Accessibility updates:
|
|
14
|
+
|
|
15
|
+
- Added `aria-label` to the `Select` component
|
|
16
|
+
- Changed heading level used in the header of `Table` component
|
|
17
|
+
|
|
18
|
+
- 7d355c4b3f: Fix the missing filter in the toolbar when passing a custom component in the core-components Table
|
|
19
|
+
- 1cf9caecd6: fix Sidebar Contexts deprecation message
|
|
20
|
+
- bff65e6958: The `SidebarPinStateContext` and `SidebarContext` have been deprecated and will be removed in a future release. Instead, use `<SidebarPinStateProvider>` + `useSidebarPinState()` and/or `<SidebarOpenStateProvider>` + `useSidebarOpenState()`.
|
|
21
|
+
|
|
22
|
+
This was done to ensure that sidebar state can be shared successfully across components exported by different packages, regardless of what version of this package is resolved and installed for each individual package.
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
- @backstage/core-plugin-api@1.0.3
|
|
26
|
+
|
|
27
|
+
## 0.9.5-next.2
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- ee2cd642c5: Updated dependency `rc-progress` to `3.3.3`.
|
|
32
|
+
- 1cf9caecd6: fix Sidebar Contexts deprecation message
|
|
33
|
+
|
|
34
|
+
## 0.9.5-next.1
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- feb4e8de07: Fix EntityPage tab scrolling overflow bug on Firefox
|
|
39
|
+
- 8f7b1835df: Updated dependency `msw` to `^0.41.0`.
|
|
40
|
+
- bff65e6958: The `SidebarPinStateContext` and `SidebarContext` have been deprecated and will be removed in a future release. Instead, use `<SidebarPinStateProvider>` + `useSidebarPinState()` and/or `<SidebarOpenStateProvider>` + `useSidebarOpenState()`.
|
|
41
|
+
|
|
42
|
+
This was done to ensure that sidebar state can be shared successfully across components exported by different packages, regardless of what version of this package is resolved and installed for each individual package.
|
|
43
|
+
|
|
44
|
+
- Updated dependencies
|
|
45
|
+
- @backstage/core-plugin-api@1.0.3-next.0
|
|
46
|
+
|
|
3
47
|
## 0.9.5-next.0
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1421,17 +1421,6 @@ declare const sidebarConfig: {
|
|
|
1421
1421
|
mobileSidebarHeight: number;
|
|
1422
1422
|
};
|
|
1423
1423
|
declare const SIDEBAR_INTRO_LOCAL_STORAGE = "@backstage/core/sidebar-intro-dismissed";
|
|
1424
|
-
/**
|
|
1425
|
-
* Types for the `SidebarContext`
|
|
1426
|
-
*/
|
|
1427
|
-
declare type SidebarContextType = {
|
|
1428
|
-
isOpen: boolean;
|
|
1429
|
-
setOpen: (open: boolean) => void;
|
|
1430
|
-
};
|
|
1431
|
-
/**
|
|
1432
|
-
* Context whether the `Sidebar` is open
|
|
1433
|
-
*/
|
|
1434
|
-
declare const SidebarContext: React.Context<SidebarContextType>;
|
|
1435
1424
|
|
|
1436
1425
|
/** @public */
|
|
1437
1426
|
declare type SidebarClassKey = 'drawer' | 'drawerOpen';
|
|
@@ -1552,16 +1541,6 @@ declare type SidebarSubmenuProps = {
|
|
|
1552
1541
|
declare const SidebarSubmenu: (props: SidebarSubmenuProps) => JSX.Element;
|
|
1553
1542
|
|
|
1554
1543
|
declare type SidebarPageClassKey = 'root';
|
|
1555
|
-
/**
|
|
1556
|
-
* Type of `SidebarPinStateContext`
|
|
1557
|
-
*
|
|
1558
|
-
* @public
|
|
1559
|
-
*/
|
|
1560
|
-
declare type SidebarPinStateContextType = {
|
|
1561
|
-
isPinned: boolean;
|
|
1562
|
-
toggleSidebarPinState: () => any;
|
|
1563
|
-
isMobile?: boolean;
|
|
1564
|
-
};
|
|
1565
1544
|
/**
|
|
1566
1545
|
* Props for SidebarPage
|
|
1567
1546
|
*
|
|
@@ -1570,12 +1549,6 @@ declare type SidebarPinStateContextType = {
|
|
|
1570
1549
|
declare type SidebarPageProps = {
|
|
1571
1550
|
children?: React__default.ReactNode;
|
|
1572
1551
|
};
|
|
1573
|
-
/**
|
|
1574
|
-
* Contains the state on how the `Sidebar` is rendered
|
|
1575
|
-
*
|
|
1576
|
-
* @public
|
|
1577
|
-
*/
|
|
1578
|
-
declare const SidebarPinStateContext: React__default.Context<SidebarPinStateContextType>;
|
|
1579
1552
|
declare function SidebarPage(props: SidebarPageProps): JSX.Element;
|
|
1580
1553
|
/**
|
|
1581
1554
|
* This hook provides a react ref to the main content.
|
|
@@ -1679,6 +1652,114 @@ declare type IntroCardProps = {
|
|
|
1679
1652
|
declare function IntroCard(props: IntroCardProps): JSX.Element;
|
|
1680
1653
|
declare function SidebarIntro(_props: {}): JSX.Element | null;
|
|
1681
1654
|
|
|
1655
|
+
/**
|
|
1656
|
+
* Types for the `SidebarContext`
|
|
1657
|
+
*
|
|
1658
|
+
* @public @deprecated
|
|
1659
|
+
* Use `SidebarOpenState` instead.
|
|
1660
|
+
*/
|
|
1661
|
+
declare type SidebarContextType = {
|
|
1662
|
+
isOpen: boolean;
|
|
1663
|
+
setOpen: (open: boolean) => void;
|
|
1664
|
+
};
|
|
1665
|
+
/**
|
|
1666
|
+
* The open state of the sidebar.
|
|
1667
|
+
*
|
|
1668
|
+
* @public
|
|
1669
|
+
*/
|
|
1670
|
+
declare type SidebarOpenState = {
|
|
1671
|
+
/**
|
|
1672
|
+
* Whether or not the sidebar is open and full-width. When `false`, the
|
|
1673
|
+
* sidebar is "closed" and typically only shows icons with no text.
|
|
1674
|
+
*/
|
|
1675
|
+
isOpen: boolean;
|
|
1676
|
+
/**
|
|
1677
|
+
* A function to set whether or not the sidebar is open. Pass `true` to open
|
|
1678
|
+
* the sidebar. Pass `false` to close it.
|
|
1679
|
+
*/
|
|
1680
|
+
setOpen: (open: boolean) => void;
|
|
1681
|
+
};
|
|
1682
|
+
/**
|
|
1683
|
+
* Context whether the `Sidebar` is open
|
|
1684
|
+
*
|
|
1685
|
+
* @public @deprecated
|
|
1686
|
+
* Use `<SidebarOpenStateProvider>` + `useSidebarOpenState()` instead.
|
|
1687
|
+
*/
|
|
1688
|
+
declare const LegacySidebarContext: React__default.Context<SidebarContextType>;
|
|
1689
|
+
/**
|
|
1690
|
+
* Provides context for reading and updating sidebar state.
|
|
1691
|
+
*
|
|
1692
|
+
* @public
|
|
1693
|
+
*/
|
|
1694
|
+
declare const SidebarOpenStateProvider: ({ children, value, }: {
|
|
1695
|
+
children: ReactNode;
|
|
1696
|
+
value: SidebarOpenState;
|
|
1697
|
+
}) => JSX.Element;
|
|
1698
|
+
/**
|
|
1699
|
+
* Hook to read and update the sidebar's open state, which controls whether or
|
|
1700
|
+
* not the sidebar is open and full-width, or closed and only displaying icons.
|
|
1701
|
+
*
|
|
1702
|
+
* @public
|
|
1703
|
+
*/
|
|
1704
|
+
declare const useSidebarOpenState: () => SidebarOpenState;
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Type of `SidebarPinStateContext`
|
|
1708
|
+
*
|
|
1709
|
+
* @public @deprecated
|
|
1710
|
+
* Use `SidebarPinState` instead.
|
|
1711
|
+
*/
|
|
1712
|
+
declare type SidebarPinStateContextType = {
|
|
1713
|
+
isPinned: boolean;
|
|
1714
|
+
toggleSidebarPinState: () => any;
|
|
1715
|
+
isMobile?: boolean;
|
|
1716
|
+
};
|
|
1717
|
+
/**
|
|
1718
|
+
* The pin state of the sidebar.
|
|
1719
|
+
*
|
|
1720
|
+
* @public
|
|
1721
|
+
*/
|
|
1722
|
+
declare type SidebarPinState = {
|
|
1723
|
+
/**
|
|
1724
|
+
* Whether or not the sidebar is pinned to the `open` state. When `isPinned`
|
|
1725
|
+
* is `false`, the sidebar opens and closes on hover. When `true`, the
|
|
1726
|
+
* sidebar is permanently opened, regardless of user interaction.
|
|
1727
|
+
*/
|
|
1728
|
+
isPinned: boolean;
|
|
1729
|
+
/**
|
|
1730
|
+
* A function to toggle the pin state of the sidebar.
|
|
1731
|
+
*/
|
|
1732
|
+
toggleSidebarPinState: () => any;
|
|
1733
|
+
/**
|
|
1734
|
+
* Whether or not the sidebar is or should be rendered in a mobile-optimized
|
|
1735
|
+
* way.
|
|
1736
|
+
*/
|
|
1737
|
+
isMobile?: boolean;
|
|
1738
|
+
};
|
|
1739
|
+
/**
|
|
1740
|
+
* Contains the state on how the `Sidebar` is rendered
|
|
1741
|
+
*
|
|
1742
|
+
* @public @deprecated
|
|
1743
|
+
* Use `<SidebarPinStateContextProvider>` + `useSidebarPinState()` instead.
|
|
1744
|
+
*/
|
|
1745
|
+
declare const LegacySidebarPinStateContext: React__default.Context<SidebarPinStateContextType>;
|
|
1746
|
+
/**
|
|
1747
|
+
* Provides state for how the `Sidebar` is rendered
|
|
1748
|
+
*
|
|
1749
|
+
* @public
|
|
1750
|
+
*/
|
|
1751
|
+
declare const SidebarPinStateProvider: ({ children, value, }: {
|
|
1752
|
+
children: ReactNode;
|
|
1753
|
+
value: SidebarPinStateContextType;
|
|
1754
|
+
}) => JSX.Element;
|
|
1755
|
+
/**
|
|
1756
|
+
* Hook to read and update sidebar pin state, which controls whether or not the
|
|
1757
|
+
* sidebar is pinned open.
|
|
1758
|
+
*
|
|
1759
|
+
* @public
|
|
1760
|
+
*/
|
|
1761
|
+
declare const useSidebarPinState: () => SidebarPinState;
|
|
1762
|
+
|
|
1682
1763
|
declare type SignInProviderConfig = {
|
|
1683
1764
|
id: string;
|
|
1684
1765
|
title: string;
|
|
@@ -1901,4 +1982,4 @@ declare type BackstageOverrides = Overrides & {
|
|
|
1901
1982
|
[Name in keyof BackstageComponentsNameToClassKey]?: Partial<StyleRules<BackstageComponentsNameToClassKey[Name]>>;
|
|
1902
1983
|
};
|
|
1903
1984
|
|
|
1904
|
-
export { AlertDisplay, AlertDisplayProps, Avatar, AvatarClassKey, AvatarProps, BackstageContentClassKey, BackstageOverrides, BoldHeaderClassKey, BottomLink, BottomLinkClassKey, BottomLinkProps, Breadcrumbs, BreadcrumbsClickableTextClassKey, BreadcrumbsStyledBoxClassKey, BrokenImageIcon, Button, ButtonProps, CardActionsTopRightClassKey, CardTab, CardTabClassKey, CatalogIcon, ChatIcon, ClosedDropdownClassKey, CodeSnippet, CodeSnippetProps, Content, ContentHeader, ContentHeaderClassKey, CopyTextButton, CopyTextButtonProps, CreateButton, CreateButtonProps, CustomProviderClassKey, DashboardIcon, DependencyGraph, DependencyGraphDefaultLabelClassKey, DependencyGraphDefaultNodeClassKey, DependencyGraphEdgeClassKey, DependencyGraphNodeClassKey, DependencyGraphProps, types_d as DependencyGraphTypes, DismissableBanner, DismissableBannerClassKey, DismissbleBannerClassKey, DocsIcon, EmailIcon, EmptyState, EmptyStateClassKey, EmptyStateImageClassKey, ErrorBoundary, ErrorBoundaryProps, ErrorPage, ErrorPageClassKey, ErrorPanel, ErrorPanelClassKey, ErrorPanelProps, FeatureCalloutCircleClassKey, FeatureCalloutCircular, FiltersContainerClassKey, Gauge, GaugeCard, GaugeCardClassKey, GaugeClassKey, GaugeProps, GaugePropsGetColor, GaugePropsGetColorOptions, GitHubIcon, GroupIcon, Header, HeaderClassKey, HeaderIconLinkRow, HeaderIconLinkRowClassKey, HeaderLabel, HeaderLabelClassKey, HeaderTabs, HeaderTabsClassKey, HelpIcon, HomepageTimer, HorizontalScrollGrid, HorizontalScrollGridClassKey, IconLinkVerticalClassKey, IconLinkVerticalProps, IdentityProviders, InfoCard, InfoCardClassKey, InfoCardVariants, IntroCard, ItemCard, ItemCardGrid, ItemCardGridClassKey, ItemCardGridProps, ItemCardHeader, ItemCardHeaderClassKey, ItemCardHeaderProps, Lifecycle, LifecycleClassKey, LinearGauge, Link, LinkProps, LogViewer, LogViewerClassKey, LogViewerProps, LoginRequestListItemClassKey, MarkdownContent, MarkdownContentClassKey, MetadataTableCellClassKey, MetadataTableListClassKey, MetadataTableListItemClassKey, MetadataTableTitleCellClassKey, MicDropClassKey, MissingAnnotationEmptyState, MissingAnnotationEmptyStateClassKey, MobileSidebar, MobileSidebarProps, OAuthRequestDialog, OAuthRequestDialogClassKey, OpenedDropdownClassKey, OverflowTooltip, OverflowTooltipClassKey, Page, PageClassKey, PageWithHeader, Progress, ProxiedSignInPage, ProxiedSignInPageProps, ResponseErrorPanel, ResponseErrorPanelClassKey, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, SelectClassKey, SelectInputBaseClassKey, SelectItem, SelectedItems, Sidebar, SidebarClassKey, SidebarContext, SidebarContextType, SidebarDivider, SidebarDividerClassKey, SidebarExpandButton, SidebarGroup, SidebarGroupProps, SidebarIntro, SidebarIntroClassKey, SidebarItem, SidebarItemClassKey, SidebarOptions, SidebarPage, SidebarPageClassKey, SidebarPageProps, SidebarPinStateContext, SidebarPinStateContextType, SidebarProps, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, SidebarSpaceClassKey, SidebarSpacer, SidebarSpacerClassKey, SidebarSubmenu, SidebarSubmenuItem, SidebarSubmenuItemDropdownItem, SidebarSubmenuItemProps, SidebarSubmenuProps, SignInPage, SignInPageClassKey, SignInProviderConfig, SimpleStepper, SimpleStepperFooterClassKey, SimpleStepperStep, SimpleStepperStepClassKey, StatusAborted, StatusClassKey, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, StructuredMetadataTableListClassKey, StructuredMetadataTableNestedListClassKey, SubmenuOptions, SubvalueCell, SubvalueCellClassKey, SupportButton, SupportButtonClassKey, SupportConfig, SupportItem, SupportItemLink, Tab, TabBarClassKey, TabClassKey, TabIconClassKey, TabbedCard, TabbedCardClassKey, TabbedLayout, Table, TableClassKey, TableColumn, TableFilter, TableFiltersClassKey, TableHeaderClassKey, TableProps, TableState, TableToolbarClassKey, Tabs, TabsClassKey, TrendLine, UserIcon, UserIdentity, WarningIcon, WarningPanel, WarningPanelClassKey, sidebarConfig, useContent, useQueryParamState, useSupportConfig };
|
|
1985
|
+
export { AlertDisplay, AlertDisplayProps, Avatar, AvatarClassKey, AvatarProps, BackstageContentClassKey, BackstageOverrides, BoldHeaderClassKey, BottomLink, BottomLinkClassKey, BottomLinkProps, Breadcrumbs, BreadcrumbsClickableTextClassKey, BreadcrumbsStyledBoxClassKey, BrokenImageIcon, Button, ButtonProps, CardActionsTopRightClassKey, CardTab, CardTabClassKey, CatalogIcon, ChatIcon, ClosedDropdownClassKey, CodeSnippet, CodeSnippetProps, Content, ContentHeader, ContentHeaderClassKey, CopyTextButton, CopyTextButtonProps, CreateButton, CreateButtonProps, CustomProviderClassKey, DashboardIcon, DependencyGraph, DependencyGraphDefaultLabelClassKey, DependencyGraphDefaultNodeClassKey, DependencyGraphEdgeClassKey, DependencyGraphNodeClassKey, DependencyGraphProps, types_d as DependencyGraphTypes, DismissableBanner, DismissableBannerClassKey, DismissbleBannerClassKey, DocsIcon, EmailIcon, EmptyState, EmptyStateClassKey, EmptyStateImageClassKey, ErrorBoundary, ErrorBoundaryProps, ErrorPage, ErrorPageClassKey, ErrorPanel, ErrorPanelClassKey, ErrorPanelProps, FeatureCalloutCircleClassKey, FeatureCalloutCircular, FiltersContainerClassKey, Gauge, GaugeCard, GaugeCardClassKey, GaugeClassKey, GaugeProps, GaugePropsGetColor, GaugePropsGetColorOptions, GitHubIcon, GroupIcon, Header, HeaderClassKey, HeaderIconLinkRow, HeaderIconLinkRowClassKey, HeaderLabel, HeaderLabelClassKey, HeaderTabs, HeaderTabsClassKey, HelpIcon, HomepageTimer, HorizontalScrollGrid, HorizontalScrollGridClassKey, IconLinkVerticalClassKey, IconLinkVerticalProps, IdentityProviders, InfoCard, InfoCardClassKey, InfoCardVariants, IntroCard, ItemCard, ItemCardGrid, ItemCardGridClassKey, ItemCardGridProps, ItemCardHeader, ItemCardHeaderClassKey, ItemCardHeaderProps, Lifecycle, LifecycleClassKey, LinearGauge, Link, LinkProps, LogViewer, LogViewerClassKey, LogViewerProps, LoginRequestListItemClassKey, MarkdownContent, MarkdownContentClassKey, MetadataTableCellClassKey, MetadataTableListClassKey, MetadataTableListItemClassKey, MetadataTableTitleCellClassKey, MicDropClassKey, MissingAnnotationEmptyState, MissingAnnotationEmptyStateClassKey, MobileSidebar, MobileSidebarProps, OAuthRequestDialog, OAuthRequestDialogClassKey, OpenedDropdownClassKey, OverflowTooltip, OverflowTooltipClassKey, Page, PageClassKey, PageWithHeader, Progress, ProxiedSignInPage, ProxiedSignInPageProps, ResponseErrorPanel, ResponseErrorPanelClassKey, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, SelectClassKey, SelectInputBaseClassKey, SelectItem, SelectedItems, Sidebar, SidebarClassKey, LegacySidebarContext as SidebarContext, SidebarContextType, SidebarDivider, SidebarDividerClassKey, SidebarExpandButton, SidebarGroup, SidebarGroupProps, SidebarIntro, SidebarIntroClassKey, SidebarItem, SidebarItemClassKey, SidebarOpenState, SidebarOpenStateProvider, SidebarOptions, SidebarPage, SidebarPageClassKey, SidebarPageProps, SidebarPinState, LegacySidebarPinStateContext as SidebarPinStateContext, SidebarPinStateContextType, SidebarPinStateProvider, SidebarProps, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, SidebarSpaceClassKey, SidebarSpacer, SidebarSpacerClassKey, SidebarSubmenu, SidebarSubmenuItem, SidebarSubmenuItemDropdownItem, SidebarSubmenuItemProps, SidebarSubmenuProps, SignInPage, SignInPageClassKey, SignInProviderConfig, SimpleStepper, SimpleStepperFooterClassKey, SimpleStepperStep, SimpleStepperStepClassKey, StatusAborted, StatusClassKey, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, StructuredMetadataTableListClassKey, StructuredMetadataTableNestedListClassKey, SubmenuOptions, SubvalueCell, SubvalueCellClassKey, SupportButton, SupportButtonClassKey, SupportConfig, SupportItem, SupportItemLink, Tab, TabBarClassKey, TabClassKey, TabIconClassKey, TabbedCard, TabbedCardClassKey, TabbedLayout, Table, TableClassKey, TableColumn, TableFilter, TableFiltersClassKey, TableHeaderClassKey, TableProps, TableState, TableToolbarClassKey, Tabs, TabsClassKey, TrendLine, UserIcon, UserIdentity, WarningIcon, WarningPanel, WarningPanelClassKey, sidebarConfig, useContent, useQueryParamState, useSidebarOpenState, useSidebarPinState, useSupportConfig };
|
package/dist/index.esm.js
CHANGED
|
@@ -91,6 +91,7 @@ import qs from 'qs';
|
|
|
91
91
|
import MuiBrokenImageIcon from '@material-ui/icons/BrokenImage';
|
|
92
92
|
import { Helmet } from 'react-helmet';
|
|
93
93
|
import { useLocation as useLocation$1, useNavigate, useParams, useRoutes, matchRoutes } from 'react-router';
|
|
94
|
+
import { createVersionedContext, createVersionedValueMap } from '@backstage/version-bridge';
|
|
94
95
|
import BottomNavigation from '@material-ui/core/BottomNavigation';
|
|
95
96
|
import Drawer from '@material-ui/core/Drawer';
|
|
96
97
|
import MenuIcon from '@material-ui/icons/Menu';
|
|
@@ -3055,11 +3056,6 @@ const makeSidebarSubmenuConfig = (customSubmenuConfig) => ({
|
|
|
3055
3056
|
...customSubmenuConfig
|
|
3056
3057
|
});
|
|
3057
3058
|
const SIDEBAR_INTRO_LOCAL_STORAGE = "@backstage/core/sidebar-intro-dismissed";
|
|
3058
|
-
const SidebarContext = createContext({
|
|
3059
|
-
isOpen: false,
|
|
3060
|
-
setOpen: () => {
|
|
3061
|
-
}
|
|
3062
|
-
});
|
|
3063
3059
|
const SidebarConfigContext = createContext({
|
|
3064
3060
|
sidebarConfig,
|
|
3065
3061
|
submenuConfig
|
|
@@ -3085,6 +3081,35 @@ const LocalStorage = {
|
|
|
3085
3081
|
}
|
|
3086
3082
|
};
|
|
3087
3083
|
|
|
3084
|
+
const defaultSidebarPinStateContext = {
|
|
3085
|
+
isPinned: true,
|
|
3086
|
+
toggleSidebarPinState: () => {
|
|
3087
|
+
},
|
|
3088
|
+
isMobile: false
|
|
3089
|
+
};
|
|
3090
|
+
const LegacySidebarPinStateContext = createContext(defaultSidebarPinStateContext);
|
|
3091
|
+
const VersionedSidebarPinStateContext = createVersionedContext("sidebar-pin-state-context");
|
|
3092
|
+
const SidebarPinStateProvider = ({
|
|
3093
|
+
children,
|
|
3094
|
+
value
|
|
3095
|
+
}) => /* @__PURE__ */ React.createElement(LegacySidebarPinStateContext.Provider, {
|
|
3096
|
+
value
|
|
3097
|
+
}, /* @__PURE__ */ React.createElement(VersionedSidebarPinStateContext.Provider, {
|
|
3098
|
+
value: createVersionedValueMap({ 1: value })
|
|
3099
|
+
}, children));
|
|
3100
|
+
const useSidebarPinState = () => {
|
|
3101
|
+
const versionedPinStateContext = useContext(VersionedSidebarPinStateContext);
|
|
3102
|
+
const legacyPinStateContext = useContext(LegacySidebarPinStateContext);
|
|
3103
|
+
if (versionedPinStateContext === void 0) {
|
|
3104
|
+
return legacyPinStateContext || defaultSidebarPinStateContext;
|
|
3105
|
+
}
|
|
3106
|
+
const pinStateContext = versionedPinStateContext.atVersion(1);
|
|
3107
|
+
if (pinStateContext === void 0) {
|
|
3108
|
+
throw new Error("No context found for version 1.");
|
|
3109
|
+
}
|
|
3110
|
+
return pinStateContext;
|
|
3111
|
+
};
|
|
3112
|
+
|
|
3088
3113
|
const useStyles$n = makeStyles((theme) => ({
|
|
3089
3114
|
root: {
|
|
3090
3115
|
width: "100%",
|
|
@@ -3105,12 +3130,6 @@ const useStyles$n = makeStyles((theme) => ({
|
|
|
3105
3130
|
}
|
|
3106
3131
|
}
|
|
3107
3132
|
}), { name: "BackstageSidebarPage" });
|
|
3108
|
-
const SidebarPinStateContext = createContext({
|
|
3109
|
-
isPinned: true,
|
|
3110
|
-
toggleSidebarPinState: () => {
|
|
3111
|
-
},
|
|
3112
|
-
isMobile: false
|
|
3113
|
-
});
|
|
3114
3133
|
const PageContext = createContext({
|
|
3115
3134
|
content: {
|
|
3116
3135
|
contentRef: void 0
|
|
@@ -3131,7 +3150,7 @@ function SidebarPage(props) {
|
|
|
3131
3150
|
const isMobile = useMediaQuery((theme) => theme.breakpoints.down("xs"), { noSsr: true });
|
|
3132
3151
|
const toggleSidebarPinState = () => setIsPinned(!isPinned);
|
|
3133
3152
|
const classes = useStyles$n({ isPinned, sidebarConfig });
|
|
3134
|
-
return /* @__PURE__ */ React.createElement(
|
|
3153
|
+
return /* @__PURE__ */ React.createElement(SidebarPinStateProvider, {
|
|
3135
3154
|
value: {
|
|
3136
3155
|
isPinned,
|
|
3137
3156
|
toggleSidebarPinState,
|
|
@@ -3152,6 +3171,34 @@ function useContent() {
|
|
|
3152
3171
|
return { focusContent, contentRef: content == null ? void 0 : content.contentRef };
|
|
3153
3172
|
}
|
|
3154
3173
|
|
|
3174
|
+
const defaultSidebarOpenStateContext = {
|
|
3175
|
+
isOpen: false,
|
|
3176
|
+
setOpen: () => {
|
|
3177
|
+
}
|
|
3178
|
+
};
|
|
3179
|
+
const LegacySidebarContext = createContext(defaultSidebarOpenStateContext);
|
|
3180
|
+
const VersionedSidebarContext = createVersionedContext("sidebar-open-state-context");
|
|
3181
|
+
const SidebarOpenStateProvider = ({
|
|
3182
|
+
children,
|
|
3183
|
+
value
|
|
3184
|
+
}) => /* @__PURE__ */ React.createElement(LegacySidebarContext.Provider, {
|
|
3185
|
+
value
|
|
3186
|
+
}, /* @__PURE__ */ React.createElement(VersionedSidebarContext.Provider, {
|
|
3187
|
+
value: createVersionedValueMap({ 1: value })
|
|
3188
|
+
}, children));
|
|
3189
|
+
const useSidebarOpenState = () => {
|
|
3190
|
+
const versionedOpenStateContext = useContext(VersionedSidebarContext);
|
|
3191
|
+
const legacyOpenStateContext = useContext(LegacySidebarContext);
|
|
3192
|
+
if (versionedOpenStateContext === void 0) {
|
|
3193
|
+
return legacyOpenStateContext || defaultSidebarOpenStateContext;
|
|
3194
|
+
}
|
|
3195
|
+
const openStateContext = versionedOpenStateContext.atVersion(1);
|
|
3196
|
+
if (openStateContext === void 0) {
|
|
3197
|
+
throw new Error("No context found for version 1.");
|
|
3198
|
+
}
|
|
3199
|
+
return openStateContext;
|
|
3200
|
+
};
|
|
3201
|
+
|
|
3155
3202
|
const useStyles$m = makeStyles((theme) => ({
|
|
3156
3203
|
root: {
|
|
3157
3204
|
flexGrow: 0,
|
|
@@ -3194,7 +3241,7 @@ const MobileSidebarGroup = (props) => {
|
|
|
3194
3241
|
};
|
|
3195
3242
|
const SidebarGroup = (props) => {
|
|
3196
3243
|
const { children, to, label, icon, value } = props;
|
|
3197
|
-
const { isMobile } =
|
|
3244
|
+
const { isMobile } = useSidebarPinState();
|
|
3198
3245
|
return isMobile ? /* @__PURE__ */ React.createElement(MobileSidebarGroup, {
|
|
3199
3246
|
to,
|
|
3200
3247
|
label,
|
|
@@ -3294,7 +3341,7 @@ const MobileSidebar = (props) => {
|
|
|
3294
3341
|
sidebarGroups = sortSidebarGroupsForPriority(sidebarGroups);
|
|
3295
3342
|
}
|
|
3296
3343
|
const shouldShowGroupChildren = selectedMenuItemIndex >= 0 && !sidebarGroups[selectedMenuItemIndex].props.to;
|
|
3297
|
-
return /* @__PURE__ */ React.createElement(
|
|
3344
|
+
return /* @__PURE__ */ React.createElement(SidebarOpenStateProvider, {
|
|
3298
3345
|
value: { isOpen: true, setOpen: () => {
|
|
3299
3346
|
} }
|
|
3300
3347
|
}, /* @__PURE__ */ React.createElement(MobileSidebarContext.Provider, {
|
|
@@ -3365,7 +3412,7 @@ const DesktopSidebar = (props) => {
|
|
|
3365
3412
|
const isSmallScreen = useMediaQuery((theme) => theme.breakpoints.down("md"), { noSsr: true });
|
|
3366
3413
|
const [state, setState] = useState(0 /* Closed */);
|
|
3367
3414
|
const hoverTimerRef = useRef();
|
|
3368
|
-
const { isPinned, toggleSidebarPinState } =
|
|
3415
|
+
const { isPinned, toggleSidebarPinState } = useSidebarPinState();
|
|
3369
3416
|
const handleOpen = () => {
|
|
3370
3417
|
if (isPinned || disableExpandOnHover) {
|
|
3371
3418
|
return;
|
|
@@ -3412,7 +3459,7 @@ const DesktopSidebar = (props) => {
|
|
|
3412
3459
|
return /* @__PURE__ */ React.createElement("nav", {
|
|
3413
3460
|
style: {},
|
|
3414
3461
|
"aria-label": "sidebar nav"
|
|
3415
|
-
}, /* @__PURE__ */ React.createElement(A11ySkipSidebar, null), /* @__PURE__ */ React.createElement(
|
|
3462
|
+
}, /* @__PURE__ */ React.createElement(A11ySkipSidebar, null), /* @__PURE__ */ React.createElement(SidebarOpenStateProvider, {
|
|
3416
3463
|
value: { isOpen, setOpen }
|
|
3417
3464
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
3418
3465
|
className: classes.root,
|
|
@@ -3436,7 +3483,7 @@ const Sidebar = (props) => {
|
|
|
3436
3483
|
const sidebarConfig = makeSidebarConfig((_a = props.sidebarOptions) != null ? _a : {});
|
|
3437
3484
|
const submenuConfig = makeSidebarSubmenuConfig((_b = props.submenuOptions) != null ? _b : {});
|
|
3438
3485
|
const { children, disableExpandOnHover, openDelayMs, closeDelayMs } = props;
|
|
3439
|
-
const { isMobile } =
|
|
3486
|
+
const { isMobile } = useSidebarPinState();
|
|
3440
3487
|
return isMobile ? /* @__PURE__ */ React.createElement(MobileSidebar, null, children) : /* @__PURE__ */ React.createElement(SidebarConfigContext.Provider, {
|
|
3441
3488
|
value: { sidebarConfig, submenuConfig }
|
|
3442
3489
|
}, /* @__PURE__ */ React.createElement(DesktopSidebar, {
|
|
@@ -3663,7 +3710,7 @@ const useStyles$i = makeStyles((theme) => ({
|
|
|
3663
3710
|
}
|
|
3664
3711
|
}), { name: "BackstageSidebarSubmenu" });
|
|
3665
3712
|
const SidebarSubmenu = (props) => {
|
|
3666
|
-
const { isOpen } =
|
|
3713
|
+
const { isOpen } = useSidebarOpenState();
|
|
3667
3714
|
const { sidebarConfig, submenuConfig } = useContext(SidebarConfigContext);
|
|
3668
3715
|
const left = isOpen ? sidebarConfig.drawerWidthOpen : sidebarConfig.drawerWidthClosed;
|
|
3669
3716
|
const classes = useStyles$i({ left, submenuConfig });
|
|
@@ -3914,7 +3961,7 @@ const SidebarItemBase = forwardRef((props, ref) => {
|
|
|
3914
3961
|
} = props;
|
|
3915
3962
|
const { sidebarConfig } = useContext(SidebarConfigContext);
|
|
3916
3963
|
const classes = useMemoStyles(sidebarConfig);
|
|
3917
|
-
const { isOpen } =
|
|
3964
|
+
const { isOpen } = useSidebarOpenState();
|
|
3918
3965
|
const divStyle = !isOpen && hasSubmenu ? { display: "flex", marginLeft: "24px" } : {};
|
|
3919
3966
|
const displayItemIcon = /* @__PURE__ */ React.createElement("div", {
|
|
3920
3967
|
style: divStyle
|
|
@@ -4107,7 +4154,7 @@ const SidebarScrollWrapper = styled("div")(({ theme }) => {
|
|
|
4107
4154
|
const SidebarExpandButton = () => {
|
|
4108
4155
|
const { sidebarConfig } = useContext(SidebarConfigContext);
|
|
4109
4156
|
const classes = useMemoStyles(sidebarConfig);
|
|
4110
|
-
const { isOpen, setOpen } =
|
|
4157
|
+
const { isOpen, setOpen } = useSidebarOpenState();
|
|
4111
4158
|
const isSmallScreen = useMediaQuery((theme) => theme.breakpoints.down("md"), { noSsr: true });
|
|
4112
4159
|
if (isSmallScreen) {
|
|
4113
4160
|
return null;
|
|
@@ -4207,7 +4254,7 @@ const starredIntroText = `Fun fact! As you explore all the awesome plugins in Ba
|
|
|
4207
4254
|
Keep an eye out for the little star icon (\u2B50) next to the plugin name and give it a click!`;
|
|
4208
4255
|
const recentlyViewedIntroText = "And your recently viewed plugins will pop up here!";
|
|
4209
4256
|
function SidebarIntro(_props) {
|
|
4210
|
-
const { isOpen } =
|
|
4257
|
+
const { isOpen } = useSidebarOpenState();
|
|
4211
4258
|
const defaultValue = {
|
|
4212
4259
|
starredItemsDismissed: false,
|
|
4213
4260
|
recentlyViewedItemsDismissed: false
|
|
@@ -4281,7 +4328,8 @@ const useStyles$d = makeStyles((theme) => ({
|
|
|
4281
4328
|
tabsWrapper: {
|
|
4282
4329
|
gridArea: "pageSubheader",
|
|
4283
4330
|
backgroundColor: theme.palette.background.paper,
|
|
4284
|
-
paddingLeft: theme.spacing(3)
|
|
4331
|
+
paddingLeft: theme.spacing(3),
|
|
4332
|
+
minWidth: 0
|
|
4285
4333
|
},
|
|
4286
4334
|
defaultTab: {
|
|
4287
4335
|
padding: theme.spacing(3, 3),
|
|
@@ -4693,6 +4741,7 @@ function Table(props) {
|
|
|
4693
4741
|
initialState,
|
|
4694
4742
|
emptyContent,
|
|
4695
4743
|
onStateChange,
|
|
4744
|
+
components,
|
|
4696
4745
|
...restProps
|
|
4697
4746
|
} = props;
|
|
4698
4747
|
const tableClasses = useTableStyles();
|
|
@@ -4819,7 +4868,8 @@ function Table(props) {
|
|
|
4819
4868
|
components: {
|
|
4820
4869
|
Header: StyledMTableHeader,
|
|
4821
4870
|
Toolbar,
|
|
4822
|
-
Body
|
|
4871
|
+
Body,
|
|
4872
|
+
...components
|
|
4823
4873
|
},
|
|
4824
4874
|
options: { ...defaultOptions, ...options },
|
|
4825
4875
|
columns: MTColumns,
|
|
@@ -5580,7 +5630,7 @@ const useStyles$1 = makeStyles(() => ({
|
|
|
5580
5630
|
}), { name: "BackstagePage" });
|
|
5581
5631
|
function Page(props) {
|
|
5582
5632
|
const { themeId, children } = props;
|
|
5583
|
-
const { isMobile } =
|
|
5633
|
+
const { isMobile } = useSidebarPinState();
|
|
5584
5634
|
const classes = useStyles$1({ isMobile });
|
|
5585
5635
|
return /* @__PURE__ */ React.createElement(ThemeProvider, {
|
|
5586
5636
|
theme: (baseTheme) => ({
|
|
@@ -6380,5 +6430,5 @@ function CardTab(props) {
|
|
|
6380
6430
|
});
|
|
6381
6431
|
}
|
|
6382
6432
|
|
|
6383
|
-
export { AlertDisplay, Avatar, BottomLink, Breadcrumbs, BrokenImageIcon, Button, CardTab, CatalogIcon, ChatIcon, CodeSnippet, Content, ContentHeader, CopyTextButton, CreateButton, DashboardIcon, DependencyGraph, types as DependencyGraphTypes, DismissableBanner, DocsIcon, EmailIcon, EmptyState, ErrorBoundary, ErrorPage, ErrorPanel, FeatureCalloutCircular, Gauge, GaugeCard, GitHubIcon, GroupIcon, Header, HeaderIconLinkRow, HeaderLabel, HeaderTabs, HelpIcon, HomepageTimer, HorizontalScrollGrid, InfoCard, IntroCard, ItemCard, ItemCardGrid, ItemCardHeader, Lifecycle, LinearGauge, Link, LogViewer, MarkdownContent, MissingAnnotationEmptyState, MobileSidebar, OAuthRequestDialog, OverflowTooltip, Page, PageWithHeader, Progress, ProxiedSignInPage, ResponseErrorPanel, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, Sidebar, SidebarContext, SidebarDivider, SidebarExpandButton, SidebarGroup, SidebarIntro, SidebarItem, SidebarPage, SidebarPinStateContext, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, SidebarSpacer, SidebarSubmenu, SidebarSubmenuItem, SignInPage, SimpleStepper, SimpleStepperStep, StatusAborted, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, SubvalueCell, SupportButton, TabbedCard, TabbedLayout, Table, Tabs, TrendLine, UserIcon, UserIdentity, WarningIcon, WarningPanel, sidebarConfig, useContent, useQueryParamState, useSupportConfig };
|
|
6433
|
+
export { AlertDisplay, Avatar, BottomLink, Breadcrumbs, BrokenImageIcon, Button, CardTab, CatalogIcon, ChatIcon, CodeSnippet, Content, ContentHeader, CopyTextButton, CreateButton, DashboardIcon, DependencyGraph, types as DependencyGraphTypes, DismissableBanner, DocsIcon, EmailIcon, EmptyState, ErrorBoundary, ErrorPage, ErrorPanel, FeatureCalloutCircular, Gauge, GaugeCard, GitHubIcon, GroupIcon, Header, HeaderIconLinkRow, HeaderLabel, HeaderTabs, HelpIcon, HomepageTimer, HorizontalScrollGrid, InfoCard, IntroCard, ItemCard, ItemCardGrid, ItemCardHeader, Lifecycle, LinearGauge, Link, LogViewer, MarkdownContent, MissingAnnotationEmptyState, MobileSidebar, OAuthRequestDialog, OverflowTooltip, Page, PageWithHeader, Progress, ProxiedSignInPage, ResponseErrorPanel, RoutedTabs, SIDEBAR_INTRO_LOCAL_STORAGE, SelectComponent as Select, Sidebar, LegacySidebarContext as SidebarContext, SidebarDivider, SidebarExpandButton, SidebarGroup, SidebarIntro, SidebarItem, SidebarOpenStateProvider, SidebarPage, LegacySidebarPinStateContext as SidebarPinStateContext, SidebarPinStateProvider, SidebarScrollWrapper, SidebarSearchField, SidebarSpace, SidebarSpacer, SidebarSubmenu, SidebarSubmenuItem, SignInPage, SimpleStepper, SimpleStepperStep, StatusAborted, StatusError, StatusOK, StatusPending, StatusRunning, StatusWarning, StructuredMetadataTable, SubvalueCell, SupportButton, TabbedCard, TabbedLayout, Table, Tabs, TrendLine, UserIcon, UserIdentity, WarningIcon, WarningPanel, sidebarConfig, useContent, useQueryParamState, useSidebarOpenState, useSidebarPinState, useSupportConfig };
|
|
6384
6434
|
//# sourceMappingURL=index.esm.js.map
|