catalog-react: migrate to use exports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
## API Report File for "@backstage/plugin-catalog-react"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { ResourcePermission } from '@backstage/plugin-permission-common';
|
||||
|
||||
// @alpha
|
||||
export function isOwnerOf(owner: Entity, entity: Entity): boolean;
|
||||
|
||||
// @alpha
|
||||
export function useEntityPermission(
|
||||
permission: ResourcePermission<'catalog-entity'>,
|
||||
): {
|
||||
loading: boolean;
|
||||
allowed: boolean;
|
||||
error?: Error;
|
||||
};
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -20,7 +20,6 @@ import { Overrides } from '@material-ui/core/styles/overrides';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { ResourcePermission } from '@backstage/plugin-permission-common';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { StyleRules } from '@material-ui/core/styles/withStyles';
|
||||
@@ -474,9 +473,6 @@ export function InspectEntityDialog(props: {
|
||||
onClose: () => void;
|
||||
}): JSX.Element | null;
|
||||
|
||||
// @alpha
|
||||
export function isOwnerOf(owner: Entity, entity: Entity): boolean;
|
||||
|
||||
// @public (undocumented)
|
||||
export function MockEntityListContextProvider<
|
||||
T extends DefaultEntityFilters = DefaultEntityFilters,
|
||||
@@ -538,15 +534,6 @@ export function useEntityOwnership(): {
|
||||
isOwnedEntity: (entity: Entity) => boolean;
|
||||
};
|
||||
|
||||
// @alpha
|
||||
export function useEntityPermission(
|
||||
permission: ResourcePermission<'catalog-entity'>,
|
||||
): {
|
||||
loading: boolean;
|
||||
allowed: boolean;
|
||||
error?: Error;
|
||||
};
|
||||
|
||||
// @public
|
||||
export function useEntityTypeFilter(): {
|
||||
loading: boolean;
|
||||
|
||||
@@ -6,10 +6,21 @@
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.esm.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"alphaTypes": "dist/index.alpha.d.ts"
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
".": "./src/index.ts",
|
||||
"./alpha": "./src/alpha.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"src/index.ts"
|
||||
],
|
||||
"alpha": [
|
||||
"src/alpha.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"backstage": {
|
||||
"role": "web-library"
|
||||
@@ -24,7 +35,7 @@
|
||||
"backstage"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "backstage-cli package build --experimental-type-build",
|
||||
"build": "backstage-cli package build",
|
||||
"lint": "backstage-cli package lint",
|
||||
"test": "backstage-cli package test",
|
||||
"prepack": "backstage-cli package prepack",
|
||||
@@ -78,7 +89,6 @@
|
||||
"react-test-renderer": "^16.13.1"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"alpha"
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2023 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { isOwnerOf } from './utils';
|
||||
export { useEntityPermission } from './hooks/useEntityPermission';
|
||||
@@ -38,4 +38,3 @@ export { useRelatedEntities } from './useRelatedEntities';
|
||||
export { useStarredEntities } from './useStarredEntities';
|
||||
export { useStarredEntity } from './useStarredEntity';
|
||||
export { useEntityOwnership } from './useEntityOwnership';
|
||||
export { useEntityPermission } from './useEntityPermission';
|
||||
|
||||
@@ -31,9 +31,5 @@ export { entityRouteParams, entityRouteRef } from './routes';
|
||||
export * from './testUtils';
|
||||
export * from './types';
|
||||
export * from './overridableComponents';
|
||||
export {
|
||||
getEntityRelations,
|
||||
getEntitySourceLocation,
|
||||
isOwnerOf,
|
||||
} from './utils';
|
||||
export { getEntityRelations, getEntitySourceLocation } from './utils';
|
||||
export type { EntitySourceLocation } from './utils';
|
||||
|
||||
Reference in New Issue
Block a user