@backstage/core-components 0.11.2 → 0.12.0-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 CHANGED
@@ -1,5 +1,36 @@
1
1
  # @backstage/core-components
2
2
 
3
+ ## 0.12.0-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b4fb5c8ecc: MissingAnnotationEmptyState now accepts either a string or an array of strings to support multiple missing annotations.
8
+ - Updated dependencies
9
+ - @backstage/config@1.0.4-next.0
10
+ - @backstage/core-plugin-api@1.1.0-next.0
11
+ - @backstage/errors@1.1.3-next.0
12
+ - @backstage/theme@0.2.16
13
+ - @backstage/version-bridge@1.0.1
14
+
15
+ ## 0.12.0-next.0
16
+
17
+ ### Minor Changes
18
+
19
+ - fb3733e446: **BREAKING**: Removed the `HomepageTimer` as it has been replaced by the `HeaderWorldClock` in the Home plugin and was deprecated over a year ago.
20
+
21
+ ### Patch Changes
22
+
23
+ - 5f695c219a: Set the `searchTooltip` to "Filter" to follow how the `searchPlaceholder` is set making this more consistent
24
+ - 7573b65232: Internal refactor of imports to avoid circular dependencies
25
+ - 858986f6b6: Disable base path workaround in `Link` component when React Router v6 stable is used.
26
+ - f905853ad6: Prefer using `Link` from `@backstage/core-components` rather than material-UI.
27
+ - Updated dependencies
28
+ - @backstage/core-plugin-api@1.1.0-next.0
29
+ - @backstage/config@1.0.4-next.0
30
+ - @backstage/errors@1.1.3-next.0
31
+ - @backstage/theme@0.2.16
32
+ - @backstage/version-bridge@1.0.1
33
+
3
34
  ## 0.11.2
4
35
 
5
36
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -576,7 +576,7 @@ declare function EmptyState(props: Props$h): JSX.Element;
576
576
  declare type EmptyStateImageClassKey = 'generalImg';
577
577
 
578
578
  declare type Props$g = {
579
- annotation: string;
579
+ annotation: string | string[];
580
580
  readMoreUrl?: string;
581
581
  };
582
582
  declare type MissingAnnotationEmptyStateClassKey = 'code';
@@ -1300,14 +1300,6 @@ declare type HeaderTabsProps = {
1300
1300
  */
1301
1301
  declare function HeaderTabs(props: HeaderTabsProps): JSX.Element;
1302
1302
 
1303
- /**
1304
- * Please use the HeaderWorldClock in the home plugin
1305
- *
1306
- * @public
1307
- * @deprecated in favor of the HeaderWorldClock which is found in the to home plugin
1308
- */
1309
- declare function HomepageTimer(_props: {}): JSX.Element | null;
1310
-
1311
1303
  declare type ItemCardProps = {
1312
1304
  description?: string;
1313
1305
  tags?: string[];
@@ -2051,4 +2043,4 @@ declare type BackstageOverrides = Overrides & {
2051
2043
  [Name in keyof BackstageComponentsNameToClassKey]?: Partial<StyleRules<BackstageComponentsNameToClassKey[Name]>>;
2052
2044
  };
2053
2045
 
2054
- 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, HeaderActionMenu, HeaderActionMenuItem, HeaderActionMenuProps, 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 };
2046
+ 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, HeaderActionMenu, HeaderActionMenuItem, HeaderActionMenuProps, HeaderClassKey, HeaderIconLinkRow, HeaderIconLinkRowClassKey, HeaderLabel, HeaderLabelClassKey, HeaderTabs, HeaderTabsClassKey, HelpIcon, 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
@@ -9,8 +9,8 @@ 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 classNames from 'classnames';
12
- import Link$1 from '@material-ui/core/Link';
13
- import { Link as Link$2, useSearchParams, useLocation, useResolvedPath as useResolvedPath$1, resolvePath } from 'react-router-dom';
12
+ import MaterialLink from '@material-ui/core/Link';
13
+ import { Link as Link$1, createRoutesFromChildren, Route as Route$1, useSearchParams, useLocation, useResolvedPath as useResolvedPath$1, resolvePath } from 'react-router-dom';
14
14
  import { trimEnd, isEqual, orderBy, isMatch, transform } from 'lodash';
15
15
  import Tooltip from '@material-ui/core/Tooltip';
16
16
  import CopyIcon from '@material-ui/icons/FileCopy';
@@ -96,15 +96,6 @@ import BottomNavigation from '@material-ui/core/BottomNavigation';
96
96
  import Drawer from '@material-ui/core/Drawer';
97
97
  import MenuIcon from '@material-ui/icons/Menu';
98
98
  import BottomNavigationAction from '@material-ui/core/BottomNavigationAction';
99
- import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
100
- import ArrowDropUpIcon from '@material-ui/icons/ArrowDropUp';
101
- import Badge from '@material-ui/core/Badge';
102
- import TextField from '@material-ui/core/TextField';
103
- import ArrowRightIcon from '@material-ui/icons/ArrowRight';
104
- import SearchIcon from '@material-ui/icons/Search';
105
- import Collapse from '@material-ui/core/Collapse';
106
- import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';
107
- import ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos';
108
99
  import Tab from '@material-ui/core/Tab';
109
100
  import Tabs$1 from '@material-ui/core/Tabs';
110
101
  import AddBox from '@material-ui/icons/AddBox';
@@ -125,6 +116,15 @@ import NavigateBeforeIcon from '@material-ui/icons/NavigateBefore';
125
116
  import NavigateNextIcon from '@material-ui/icons/NavigateNext';
126
117
  import useWindowSize from 'react-use/lib/useWindowSize';
127
118
  import { Sparklines, SparklinesLine } from 'react-sparklines';
119
+ import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
120
+ import ArrowDropUpIcon from '@material-ui/icons/ArrowDropUp';
121
+ import Badge from '@material-ui/core/Badge';
122
+ import TextField from '@material-ui/core/TextField';
123
+ import ArrowRightIcon from '@material-ui/icons/ArrowRight';
124
+ import SearchIcon from '@material-ui/icons/Search';
125
+ import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';
126
+ import ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos';
127
+ import Collapse from '@material-ui/core/Collapse';
128
128
  import MicDropSvgUrl from './layout/ErrorPage/mic-drop.svg';
129
129
  import MaterialBreadcrumbs from '@material-ui/core/Breadcrumbs';
130
130
  import MoreVert from '@material-ui/icons/MoreVert';
@@ -216,6 +216,13 @@ function Avatar(props) {
216
216
  }, displayName && extractInitials(displayName));
217
217
  }
218
218
 
219
+ function isReactRouterBeta() {
220
+ const [obj] = createRoutesFromChildren(/* @__PURE__ */ React.createElement(Route$1, {
221
+ index: true,
222
+ element: /* @__PURE__ */ React.createElement("div", null)
223
+ }));
224
+ return !obj.index;
225
+ }
219
226
  const useStyles$R = makeStyles(
220
227
  {
221
228
  visuallyHidden: {
@@ -276,7 +283,7 @@ const Link = React.forwardRef(
276
283
  ({ onClick, noTrack, ...props }, ref) => {
277
284
  const classes = useStyles$R();
278
285
  const analytics = useAnalytics();
279
- const to = useResolvedPath(props.to);
286
+ const to = isReactRouterBeta() ? useResolvedPath(props.to) : props.to;
280
287
  const linkText = getNodeText(props.children) || to;
281
288
  const external = isExternalUri(to);
282
289
  const newWindow = external && !!/^https?:/.exec(to);
@@ -286,7 +293,7 @@ const Link = React.forwardRef(
286
293
  analytics.captureEvent("click", linkText, { attributes: { to } });
287
294
  }
288
295
  };
289
- return external ? /* @__PURE__ */ React.createElement(Link$1, {
296
+ return external ? /* @__PURE__ */ React.createElement(MaterialLink, {
290
297
  ...newWindow ? { target: "_blank", rel: "noopener" } : {},
291
298
  ...props,
292
299
  ref,
@@ -295,10 +302,10 @@ const Link = React.forwardRef(
295
302
  className: classNames(classes.externalLink, props.className)
296
303
  }, props.children, /* @__PURE__ */ React.createElement("span", {
297
304
  className: classes.visuallyHidden
298
- }, ", Opens in a new window")) : /* @__PURE__ */ React.createElement(Link$1, {
305
+ }, ", Opens in a new window")) : /* @__PURE__ */ React.createElement(MaterialLink, {
299
306
  ...props,
300
307
  ref,
301
- component: Link$2,
308
+ component: Link$1,
302
309
  to,
303
310
  onClick: handleClick
304
311
  });
@@ -391,13 +398,13 @@ function CreateButton(props) {
391
398
  return null;
392
399
  }
393
400
  return isXSScreen ? /* @__PURE__ */ React.createElement(IconButton, {
394
- component: Link$2,
401
+ component: Link$1,
395
402
  color: "primary",
396
403
  title,
397
404
  size: "small",
398
405
  to
399
406
  }, /* @__PURE__ */ React.createElement(AddCircleOutline, null)) : /* @__PURE__ */ React.createElement(Button$1, {
400
- component: Link$2,
407
+ component: Link$1,
401
408
  variant: "contained",
402
409
  color: "primary",
403
410
  to
@@ -1038,7 +1045,7 @@ function EmptyState(props) {
1038
1045
  }) : missing.customImage));
1039
1046
  }
1040
1047
 
1041
- const COMPONENT_YAML = `apiVersion: backstage.io/v1alpha1
1048
+ const COMPONENT_YAML_TEMPLATE = `apiVersion: backstage.io/v1alpha1
1042
1049
  kind: Component
1043
1050
  metadata:
1044
1051
  name: example
@@ -1049,6 +1056,11 @@ spec:
1049
1056
  type: website
1050
1057
  lifecycle: production
1051
1058
  owner: user:guest`;
1059
+ const ANNOTATION_REGEXP = /^.*ANNOTATION.*$/m;
1060
+ const ANNOTATION_YAML = COMPONENT_YAML_TEMPLATE.match(ANNOTATION_REGEXP)[0];
1061
+ const ANNOTATION_LINE = COMPONENT_YAML_TEMPLATE.split("\n").findIndex(
1062
+ (line) => ANNOTATION_REGEXP.test(line)
1063
+ );
1052
1064
  const useStyles$J = makeStyles(
1053
1065
  (theme) => ({
1054
1066
  code: {
@@ -1059,24 +1071,35 @@ const useStyles$J = makeStyles(
1059
1071
  }),
1060
1072
  { name: "BackstageMissingAnnotationEmptyState" }
1061
1073
  );
1074
+ function generateLineNumbers(lineCount) {
1075
+ return Array.from(Array(lineCount + 1).keys(), (i) => i + ANNOTATION_LINE);
1076
+ }
1077
+ function generateComponentYaml(annotations) {
1078
+ const annotationYaml = annotations.map((ann) => ANNOTATION_YAML.replace("ANNOTATION", ann)).join("\n");
1079
+ return COMPONENT_YAML_TEMPLATE.replace(ANNOTATION_YAML, annotationYaml);
1080
+ }
1081
+ function generateDescription(annotations) {
1082
+ const isSingular = annotations.length <= 1;
1083
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, "The ", isSingular ? "annotation" : "annotations", " ", annotations.map((ann) => /* @__PURE__ */ React.createElement("code", null, ann)).reduce((prev, curr) => /* @__PURE__ */ React.createElement(React.Fragment, null, prev, ", ", curr)), " ", isSingular ? "is" : "are", " missing. You need to add the", " ", isSingular ? "annotation" : "annotations", " to your component if you want to enable this tool.");
1084
+ }
1062
1085
  function MissingAnnotationEmptyState(props) {
1063
1086
  const { annotation, readMoreUrl } = props;
1087
+ const annotations = Array.isArray(annotation) ? annotation : [annotation];
1064
1088
  const url = readMoreUrl || "https://backstage.io/docs/features/software-catalog/well-known-annotations";
1065
1089
  const classes = useStyles$J();
1066
- const description = /* @__PURE__ */ React.createElement(React.Fragment, null, "The ", /* @__PURE__ */ React.createElement("code", null, annotation), " annotation is missing. You need to add the annotation to your component if you want to enable this tool.");
1067
1090
  return /* @__PURE__ */ React.createElement(EmptyState, {
1068
1091
  missing: "field",
1069
1092
  title: "Missing Annotation",
1070
- description,
1093
+ description: generateDescription(annotations),
1071
1094
  action: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Typography, {
1072
1095
  variant: "body1"
1073
1096
  }, "Add the annotation to your component YAML as shown in the highlighted example below:"), /* @__PURE__ */ React.createElement("div", {
1074
1097
  className: classes.code
1075
1098
  }, /* @__PURE__ */ React.createElement(CodeSnippet, {
1076
- text: COMPONENT_YAML.replace("ANNOTATION", annotation),
1099
+ text: generateComponentYaml(annotations),
1077
1100
  language: "yaml",
1078
1101
  showLineNumbers: true,
1079
- highlightedNumbers: [6, 7],
1102
+ highlightedNumbers: generateLineNumbers(annotations.length),
1080
1103
  customStyle: { background: "inherit", fontSize: "115%" }
1081
1104
  })), /* @__PURE__ */ React.createElement(Button$1, {
1082
1105
  color: "primary",
@@ -1562,19 +1585,17 @@ function IconLinkVertical({
1562
1585
  }) {
1563
1586
  const classes = useIconStyles();
1564
1587
  if (disabled) {
1565
- return /* @__PURE__ */ React.createElement(Link$1, {
1588
+ return /* @__PURE__ */ React.createElement("div", {
1566
1589
  title,
1567
- className: classNames(classes.link, classes.disabled),
1568
- underline: "none"
1590
+ className: classNames(classes.link, classes.disabled)
1569
1591
  }, icon, /* @__PURE__ */ React.createElement("span", {
1570
1592
  className: classes.label
1571
1593
  }, label));
1572
1594
  }
1573
- return /* @__PURE__ */ React.createElement(Link$1, {
1595
+ return /* @__PURE__ */ React.createElement(Link, {
1574
1596
  title,
1575
1597
  className: classNames(classes.link, classes[color]),
1576
1598
  to: href,
1577
- component: Link,
1578
1599
  onClick
1579
1600
  }, icon, /* @__PURE__ */ React.createElement("span", {
1580
1601
  className: classes.label
@@ -4286,7 +4307,7 @@ const WorkaroundNavLink = React.forwardRef(function WorkaroundNavLinkWithRef({
4286
4307
  isActive = locationPathname.startsWith(`${toPathname}/`);
4287
4308
  }
4288
4309
  const ariaCurrent = isActive ? ariaCurrentProp : void 0;
4289
- return /* @__PURE__ */ React.createElement(Link$2, {
4310
+ return /* @__PURE__ */ React.createElement(Link$1, {
4290
4311
  ...rest,
4291
4312
  to,
4292
4313
  ref,
@@ -4601,10 +4622,8 @@ function IntroCard(props) {
4601
4622
  variant: "subtitle2"
4602
4623
  }, text), /* @__PURE__ */ React.createElement("div", {
4603
4624
  className: classes.introDismiss
4604
- }, /* @__PURE__ */ React.createElement(Link$1, {
4605
- component: "button",
4625
+ }, /* @__PURE__ */ React.createElement(IconButton, {
4606
4626
  onClick: handleClose,
4607
- underline: "none",
4608
4627
  className: classes.introDismissLink
4609
4628
  }, /* @__PURE__ */ React.createElement(CloseIcon, {
4610
4629
  className: classes.introDismissIcon
@@ -5331,7 +5350,9 @@ function Table(props) {
5331
5350
  }, subtitle)),
5332
5351
  data: typeof data === "function" ? data : tableData,
5333
5352
  style: { width: "100%" },
5334
- localization: { toolbar: { searchPlaceholder: "Filter" } },
5353
+ localization: {
5354
+ toolbar: { searchPlaceholder: "Filter", searchTooltip: "Filter" }
5355
+ },
5335
5356
  ...restProps
5336
5357
  }));
5337
5358
  }
@@ -6038,63 +6059,6 @@ function HeaderLabel(props) {
6038
6059
  }, content) : content));
6039
6060
  }
6040
6061
 
6041
- const timeFormat = {
6042
- hour: "2-digit",
6043
- minute: "2-digit"
6044
- };
6045
- function getTimes(configApi) {
6046
- const d = new Date();
6047
- const lang = window.navigator.language;
6048
- const clocks = [];
6049
- if (!configApi.has("homepage.clocks")) {
6050
- return clocks;
6051
- }
6052
- const clockConfigs = configApi.getConfigArray("homepage.clocks");
6053
- for (const clock of clockConfigs) {
6054
- if (clock.has("label") && clock.has("timezone")) {
6055
- let label = clock.getString("label");
6056
- const options = {
6057
- timeZone: clock.getString("timezone"),
6058
- ...timeFormat
6059
- };
6060
- try {
6061
- new Date().toLocaleString(lang, options);
6062
- } catch (e) {
6063
- console.warn(
6064
- `The timezone ${options.timeZone} is invalid. Defaulting to GMT`
6065
- );
6066
- options.timeZone = "GMT";
6067
- label = "GMT";
6068
- }
6069
- const time = d.toLocaleTimeString(lang, options);
6070
- clocks.push({ time, label });
6071
- }
6072
- }
6073
- return clocks;
6074
- }
6075
- function HomepageTimer(_props) {
6076
- const configApi = useApi(configApiRef);
6077
- const defaultTimes = [];
6078
- const [clocks, setTimes] = React.useState(defaultTimes);
6079
- React.useEffect(() => {
6080
- setTimes(getTimes(configApi));
6081
- const intervalId = setInterval(() => {
6082
- setTimes(getTimes(configApi));
6083
- }, 1e3);
6084
- return () => {
6085
- clearInterval(intervalId);
6086
- };
6087
- }, [configApi]);
6088
- if (clocks.length !== 0) {
6089
- return /* @__PURE__ */ React.createElement(React.Fragment, null, clocks.map((clock) => /* @__PURE__ */ React.createElement(HeaderLabel, {
6090
- label: clock.label,
6091
- value: clock.time,
6092
- key: clock.label
6093
- })));
6094
- }
6095
- return null;
6096
- }
6097
-
6098
6062
  const styles$1 = (theme) => createStyles({
6099
6063
  root: {
6100
6064
  color: theme.palette.common.white,
@@ -7024,5 +6988,5 @@ function CardTab(props) {
7024
6988
  });
7025
6989
  }
7026
6990
 
7027
- 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, HeaderActionMenu, 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 };
6991
+ 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, HeaderActionMenu, HeaderIconLinkRow, HeaderLabel, HeaderTabs, HelpIcon, 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 };
7028
6992
  //# sourceMappingURL=index.esm.js.map