-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor history type definitions and update package versions
- Loading branch information
1 parent
fcfd42e
commit dfd30e6
Showing
43 changed files
with
1,074 additions
and
1,402 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,13 @@ | ||
import React from 'react'; | ||
import { QueryClient } from 'react-query'; | ||
import { NotificationCenterContextType } from './NotificationCenterProvider'; | ||
import { useAuthConfig } from './auth/AuthConfigProvider'; | ||
import { useAuth } from './auth/AuthProvider'; | ||
import { ShellAlerts, ShellHooks } from './hooks/useShellHooks'; | ||
import './index.css'; | ||
import { useConfigRetriever, useConfig, useDiscoveredViews, useLinkOpener, BuildtimeWebFinger, RuntimeWebFinger } from './initFederation/ConfigurationProviders'; | ||
import { useShellConfig } from './initFederation/ShellConfigProvider'; | ||
import { useShellThemeSelector } from './initFederation/ShellThemeSelectorProvider'; | ||
import { useDeployedApps } from './initFederation/UIListProvider'; | ||
import { useLanguage } from './navbar/lang'; | ||
import AlertProvider from './alerts/AlertProvider'; | ||
import { getAlertingAlertSelectors, getAuthenticationAlertSelectors, getBootstrapAlertSelectors, getDashboardingAlertSelectors, getIngressControllerAlertSelectors, getK8SMasterAlertSelectors, getLoggingAlertSelectors, getMonitoringAlertSelectors, getNetworksAlertSelectors, getNodesAlertSelectors, getPlatformAlertSelectors, getServicesAlertSelectors, getVolumesAlertSelectors, useAlerts, useHighestSeverityAlerts } from './alerts'; | ||
import { useHistory } from 'react-router'; | ||
import { UseQueryResult } from 'react-query'; | ||
export declare const queryClient: QueryClient; | ||
export type ShellTypes = { | ||
shellHooks: { | ||
useAuthConfig: typeof useAuthConfig; | ||
useAuth: typeof useAuth; | ||
useConfigRetriever: typeof useConfigRetriever; | ||
useDiscoveredViews: typeof useDiscoveredViews; | ||
useShellConfig: typeof useShellConfig; | ||
useLanguage: typeof useLanguage; | ||
useConfig: typeof useConfig; | ||
useLinkOpener: typeof useLinkOpener; | ||
useDeployedApps: typeof useDeployedApps; | ||
useShellThemeSelector: typeof useShellThemeSelector; | ||
}; | ||
shellAlerts: { | ||
AlertsProvider: typeof AlertProvider; | ||
hooks: { | ||
useAlerts: typeof useAlerts; | ||
useHighestSeverityAlerts: typeof useHighestSeverityAlerts; | ||
}; | ||
alertSelectors: { | ||
getPlatformAlertSelectors: typeof getPlatformAlertSelectors; | ||
getNodesAlertSelectors: typeof getNodesAlertSelectors; | ||
getVolumesAlertSelectors: typeof getVolumesAlertSelectors; | ||
getNetworksAlertSelectors: typeof getNetworksAlertSelectors; | ||
getServicesAlertSelectors: typeof getServicesAlertSelectors; | ||
getK8SMasterAlertSelectors: typeof getK8SMasterAlertSelectors; | ||
getBootstrapAlertSelectors: typeof getBootstrapAlertSelectors; | ||
getMonitoringAlertSelectors: typeof getMonitoringAlertSelectors; | ||
getAlertingAlertSelectors: typeof getAlertingAlertSelectors; | ||
getLoggingAlertSelectors: typeof getLoggingAlertSelectors; | ||
getDashboardingAlertSelectors: typeof getDashboardingAlertSelectors; | ||
getIngressControllerAlertSelectors: typeof getIngressControllerAlertSelectors; | ||
getAuthenticationAlertSelectors: typeof getAuthenticationAlertSelectors; | ||
}; | ||
}; | ||
export type FederatedAppProps = { | ||
shellHooks: ShellHooks; | ||
shellAlerts: ShellAlerts; | ||
}; | ||
declare global { | ||
interface Window { | ||
shellContexts: { | ||
ShellHistoryContext: React.Context<ReturnType<typeof useHistory> | null>; | ||
NotificationContext: React.Context<null | NotificationCenterContextType>; | ||
WebFingersContext: React.Context<null | UseQueryResult<BuildtimeWebFinger | RuntimeWebFinger<Record<string, unknown>>, unknown>[]>; | ||
}; | ||
shellHooks: ShellTypes['shellHooks']; | ||
shellAlerts: ShellTypes['shellAlerts']; | ||
} | ||
} | ||
export declare function WithInitFederationProviders({ children, }: { | ||
children: React.ReactNode; | ||
}): JSX.Element; | ||
export default function App(): JSX.Element; | ||
}): import("react/jsx-runtime").JSX.Element; | ||
export default function App(): import("react/jsx-runtime").JSX.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
ui/@mf-types/shell/compiled-types/src/hooks/useShellHooks.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { useAlerts, getPlatformAlertSelectors, getNodesAlertSelectors, getVolumesAlertSelectors, getNetworksAlertSelectors, getServicesAlertSelectors, getK8SMasterAlertSelectors, getBootstrapAlertSelectors, getMonitoringAlertSelectors, getAlertingAlertSelectors, getLoggingAlertSelectors, getDashboardingAlertSelectors, getIngressControllerAlertSelectors, getAuthenticationAlertSelectors, useHighestSeverityAlerts } from '../alerts'; | ||
import AlertProvider from '../alerts/AlertProvider'; | ||
import { useAuthConfig } from '../auth/AuthConfigProvider'; | ||
import { useAuth } from '../auth/AuthProvider'; | ||
import { useConfig, useConfigRetriever, useDiscoveredViews, useLinkOpener } from '../initFederation/ConfigurationProviders'; | ||
import { useShellConfig } from '../initFederation/ShellConfigProvider'; | ||
import { useShellThemeSelector } from '../initFederation/ShellThemeSelectorProvider'; | ||
import { useDeployedApps } from '../initFederation/UIListProvider'; | ||
import { useLanguage } from '../navbar/lang'; | ||
export type ShellHooks = { | ||
useAuthConfig: typeof useAuthConfig; | ||
useAuth: typeof useAuth; | ||
useConfigRetriever: typeof useConfigRetriever; | ||
useDiscoveredViews: typeof useDiscoveredViews; | ||
useShellConfig: typeof useShellConfig; | ||
useLanguage: typeof useLanguage; | ||
useConfig: typeof useConfig; | ||
useLinkOpener: typeof useLinkOpener; | ||
useDeployedApps: typeof useDeployedApps; | ||
useShellThemeSelector: typeof useShellThemeSelector; | ||
}; | ||
export type ShellAlerts = { | ||
AlertsProvider: typeof AlertProvider; | ||
alertHooks: { | ||
useAlerts: typeof useAlerts; | ||
useHighestSeverityAlerts: typeof useHighestSeverityAlerts; | ||
}; | ||
alertSelectors: { | ||
getPlatformAlertSelectors: typeof getPlatformAlertSelectors; | ||
getNodesAlertSelectors: typeof getNodesAlertSelectors; | ||
getVolumesAlertSelectors: typeof getVolumesAlertSelectors; | ||
getNetworksAlertSelectors: typeof getNetworksAlertSelectors; | ||
getServicesAlertSelectors: typeof getServicesAlertSelectors; | ||
getK8SMasterAlertSelectors: typeof getK8SMasterAlertSelectors; | ||
getBootstrapAlertSelectors: typeof getBootstrapAlertSelectors; | ||
getMonitoringAlertSelectors: typeof getMonitoringAlertSelectors; | ||
getAlertingAlertSelectors: typeof getAlertingAlertSelectors; | ||
getLoggingAlertSelectors: typeof getLoggingAlertSelectors; | ||
getDashboardingAlertSelectors: typeof getDashboardingAlertSelectors; | ||
getIngressControllerAlertSelectors: typeof getIngressControllerAlertSelectors; | ||
getAuthenticationAlertSelectors: typeof getAuthenticationAlertSelectors; | ||
}; | ||
}; | ||
export declare const shellHooks: ShellHooks; | ||
export declare const shellAlerts: ShellAlerts; |
Oops, something went wrong.