@@ -1,7 +1,21 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
'@backstage/plugin-techdocs': minor
|
||||
---
|
||||
|
||||
**BREAKING:**
|
||||
Table column utilities `createNameColumn`, `createOwnerColumn`, `createTypeColumn` as well as actions utilities `createCopyDocsUrlAction` and `createStarEntityAction` are no longer directly exported. Instead accessible through DocsTable and EntityListDocsTable.
|
||||
|
||||
Use as following:
|
||||
|
||||
```tsx
|
||||
DocsTable.columns.createNameColumn();
|
||||
DocsTable.columns.createOwnerColumn();
|
||||
DocsTable.columns.createTypeColumn();
|
||||
|
||||
DocsTable.actions.createCopyDocsUrlAction();
|
||||
DocsTable.actions.createStarEntityAction();
|
||||
```
|
||||
|
||||
- Renamed `DocsResultListItem` to `TechDocsSearchResultListItem`, leaving the old name in place as a deprecations.
|
||||
|
||||
- Renamed `TechDocsPage` to `TechDocsReaderPage`, leaving the old name in place as a deprecations.
|
||||
|
||||
@@ -47,7 +47,32 @@ export const DocsResultListItem: (
|
||||
) => JSX.Element;
|
||||
|
||||
// @public
|
||||
export const DocsTable: (props: DocsTableProps) => JSX.Element | null;
|
||||
export const DocsTable: {
|
||||
(props: DocsTableProps): JSX.Element | null;
|
||||
columns: {
|
||||
createNameColumn(): TableColumn<DocsTableRow>;
|
||||
createOwnerColumn(): TableColumn<DocsTableRow>;
|
||||
createTypeColumn(): TableColumn<DocsTableRow>;
|
||||
};
|
||||
actions: {
|
||||
createCopyDocsUrlAction(copyToClipboard: Function): (row: DocsTableRow) => {
|
||||
icon: () => JSX.Element;
|
||||
tooltip: string;
|
||||
onClick: () => any;
|
||||
};
|
||||
createStarEntityAction(
|
||||
isStarredEntity: Function,
|
||||
toggleStarredEntity: Function,
|
||||
): ({ entity }: DocsTableRow) => {
|
||||
cellStyle: {
|
||||
paddingLeft: string;
|
||||
};
|
||||
icon: () => JSX.Element;
|
||||
tooltip: string;
|
||||
onClick: () => any;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
export type DocsTableProps = {
|
||||
@@ -199,7 +224,10 @@ export type TechDocsCustomHomeProps = {
|
||||
|
||||
// @public
|
||||
export type TechDocsEntityMetadata = Entity & {
|
||||
locationMetadata?: LocationSpec;
|
||||
locationMetadata?: {
|
||||
type: string;
|
||||
target: string;
|
||||
};
|
||||
};
|
||||
|
||||
// @public
|
||||
|
||||
@@ -131,3 +131,6 @@ export const DocsTable = (props: DocsTableProps) => {
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
DocsTable.columns = columnFactories;
|
||||
DocsTable.actions = actionFactories;
|
||||
|
||||
Reference in New Issue
Block a user