mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-16 10:16:16 +01:00
Add extension points for source tree (#1816)
This change will add an extension point which allows to wrap the source tree. This is required in order to use a context provider e.g. to capture a selected file. Another extension point allows to add a row between the row of a file. In order to implement the extension points ui-extensions has now a wrapper property and passes the children of an extension point to implementing extension.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
import React from "react";
|
||||
import {
|
||||
File,
|
||||
Branch,
|
||||
IndexResources,
|
||||
Links,
|
||||
@@ -83,6 +84,31 @@ export type ReposSourcesEmptyActionbar = ExtensionPointDefinition<
|
||||
ReposSourcesEmptyActionbarExtension
|
||||
>;
|
||||
|
||||
export type ReposSourcesTreeWrapperProps = {
|
||||
repository: Repository;
|
||||
directory: File;
|
||||
baseUrl: string;
|
||||
revision: string;
|
||||
};
|
||||
|
||||
export type ReposSourcesTreeWrapperExtension = ExtensionPointDefinition<
|
||||
"repos.source.tree.wrapper",
|
||||
React.ComponentType<ReposSourcesTreeWrapperProps>
|
||||
>;
|
||||
|
||||
export type ReposSourcesTreeRowProps = {
|
||||
file: File;
|
||||
};
|
||||
|
||||
export type ReposSourcesTreeRowRightExtension = ExtensionPointDefinition<
|
||||
"repos.sources.tree.row.right",
|
||||
React.ComponentType<ReposSourcesTreeRowProps>
|
||||
>;
|
||||
export type ReposSourcesTreeRowAfterExtension = ExtensionPointDefinition<
|
||||
"repos.sources.tree.row.after",
|
||||
React.ComponentType<ReposSourcesTreeRowProps>
|
||||
>;
|
||||
|
||||
export type PrimaryNavigationLoginButtonProps = {
|
||||
links: Links;
|
||||
label: string;
|
||||
|
||||
Reference in New Issue
Block a user