core-app-api,core-plugin-api: remove MUI dependencies
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-plugin-api': minor
|
||||
---
|
||||
|
||||
Removed the deprecated `OldIconComponent` type.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
'@backstage/core-plugin-api': patch
|
||||
---
|
||||
|
||||
Removed direct and transitive MUI dependencies.
|
||||
@@ -29,15 +29,10 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/app-defaults": "^0.1.3",
|
||||
"@backstage/core-components": "^0.8.3",
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/core-plugin-api": "^0.4.1",
|
||||
"@backstage/theme": "^0.2.14",
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@backstage/version-bridge": "^0.1.1",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@types/prop-types": "^15.7.3",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-router-dom": "6.0.0-beta.0",
|
||||
|
||||
@@ -49,7 +49,6 @@ import {
|
||||
SubRouteRef,
|
||||
ExternalRouteRef,
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { UserIdentity } from '@backstage/core-components';
|
||||
import { ApiFactoryRegistry, ApiResolver } from '../apis/system';
|
||||
import {
|
||||
childDiscoverer,
|
||||
@@ -360,7 +359,25 @@ export class AppManager implements BackstageApp {
|
||||
|
||||
// If the app hasn't configured a sign-in page, we just continue as guest.
|
||||
if (!SignInPageComponent) {
|
||||
this.appIdentityProxy.setTarget(UserIdentity.createGuest());
|
||||
this.appIdentityProxy.setTarget({
|
||||
getUserId: () => 'guest',
|
||||
getIdToken: async () => undefined,
|
||||
getProfile: () => ({
|
||||
email: 'guest@example.com',
|
||||
displayName: 'Guest',
|
||||
}),
|
||||
getProfileInfo: async () => ({
|
||||
email: 'guest@example.com',
|
||||
displayName: 'Guest',
|
||||
}),
|
||||
getBackstageIdentity: async () => ({
|
||||
type: 'user',
|
||||
userEntityRef: 'user:default/guest',
|
||||
ownershipEntityRefs: ['user:default/guest'],
|
||||
}),
|
||||
getCredentials: async () => ({}),
|
||||
signOut: async () => {},
|
||||
});
|
||||
|
||||
return (
|
||||
<RouterComponent>
|
||||
|
||||
@@ -16,7 +16,6 @@ import { ProfileInfo as ProfileInfo_2 } from '@backstage/core-plugin-api';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ReactElement } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { SvgIconProps } from '@material-ui/core';
|
||||
|
||||
// @public
|
||||
export type AlertApi = {
|
||||
@@ -616,9 +615,6 @@ export const oktaAuthApiRef: ApiRef<
|
||||
SessionApi
|
||||
>;
|
||||
|
||||
// @public @deprecated
|
||||
export type OldIconComponent = ComponentType<SvgIconProps>;
|
||||
|
||||
// @alpha
|
||||
export const oneloginAuthApiRef: ApiRef<
|
||||
OAuthApi &
|
||||
|
||||
@@ -30,10 +30,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.11",
|
||||
"@backstage/theme": "^0.2.14",
|
||||
"@backstage/types": "^0.1.1",
|
||||
"@backstage/version-bridge": "^0.1.1",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"history": "^5.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-router-dom": "6.0.0-beta.0",
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type { IconComponent, OldIconComponent } from './types';
|
||||
export type { IconComponent } from './types';
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import { ComponentType } from 'react';
|
||||
import { SvgIconProps } from '@material-ui/core';
|
||||
|
||||
/**
|
||||
* IconComponent is the common icon type used throughout Backstage when
|
||||
@@ -36,13 +35,3 @@ import { SvgIconProps } from '@material-ui/core';
|
||||
export type IconComponent = ComponentType<{
|
||||
fontSize?: 'default' | 'small' | 'large';
|
||||
}>;
|
||||
|
||||
/**
|
||||
* This exists for backwards compatibility with the old core package.
|
||||
* It's used in some parts of this package in order to smooth out the
|
||||
* migration, but it is not exported.
|
||||
*
|
||||
* @public
|
||||
* @deprecated This type will be removed, use {@link IconComponent} instead.
|
||||
*/
|
||||
export type OldIconComponent = ComponentType<SvgIconProps>;
|
||||
|
||||
@@ -310,7 +310,16 @@ export const EntityRefLink: React_2.ForwardRefExoticComponent<
|
||||
| 'children'
|
||||
| 'key'
|
||||
| 'id'
|
||||
| 'classes'
|
||||
| 'variant'
|
||||
| 'state'
|
||||
| 'href'
|
||||
| 'download'
|
||||
| 'hrefLang'
|
||||
| 'ping'
|
||||
| 'rel'
|
||||
| 'target'
|
||||
| 'type'
|
||||
| 'referrerPolicy'
|
||||
| 'defaultChecked'
|
||||
| 'defaultValue'
|
||||
| 'suppressContentEditableWarning'
|
||||
@@ -556,22 +565,13 @@ export const EntityRefLink: React_2.ForwardRefExoticComponent<
|
||||
| 'onTransitionEnd'
|
||||
| 'onTransitionEndCapture'
|
||||
| 'component'
|
||||
| 'variant'
|
||||
| 'classes'
|
||||
| 'innerRef'
|
||||
| 'download'
|
||||
| 'href'
|
||||
| 'hrefLang'
|
||||
| 'ping'
|
||||
| 'rel'
|
||||
| 'target'
|
||||
| 'type'
|
||||
| 'referrerPolicy'
|
||||
| 'noWrap'
|
||||
| 'gutterBottom'
|
||||
| 'paragraph'
|
||||
| 'align'
|
||||
| 'variantMapping'
|
||||
| 'state'
|
||||
| 'TypographyClasses'
|
||||
| 'entityRef'
|
||||
| 'defaultKind'
|
||||
|
||||
Reference in New Issue
Block a user