@openshift-console/dynamic-plugin-sdk
Version:
Based on the concept of [webpack module federation](https://webpack.js.org/concepts/module-federation/), dynamic plugins are loaded and interpreted from remote sources at runtime. The standard way to deliver and expose dynamic plugins to Console is throug
56 lines (55 loc) • 2.32 kB
TypeScript
import * as React from 'react';
import { Extension, ExtensionDeclaration, CodeRef } from '../types';
import { AccessReviewResourceAttributes } from './console-types';
export declare type AddAction = ExtensionDeclaration<'dev-console.add/action', {
/** ID used to identify the action. */
id: string;
/** IDs used to identify the action groups the action would belong to. */
groupId?: string;
/** The label of the action */
label: string;
/** The description of the action. */
description: string;
/** The href to navigate to. */
href: string;
/** The perspective display icon. */
icon?: CodeRef<React.ReactNode>;
/** Optional access review to control visibility / enablement of the action. */
accessReview?: AccessReviewResourceAttributes[];
}>;
export declare type AddActionGroup = ExtensionDeclaration<'dev-console.add/action-group', {
/** ID used to identify the action group. */
id: string;
/** The title of the action group */
name: string;
/** ID of action group before which this group should be placed */
insertBefore?: string;
/** ID of action group after which this group should be placed */
insertAfter?: string;
}>;
export declare const isAddAction: (e: Extension<any>) => e is ExtensionDeclaration<"dev-console.add/action", {
/** ID used to identify the action. */
id: string;
/** IDs used to identify the action groups the action would belong to. */
groupId?: string;
/** The label of the action */
label: string;
/** The description of the action. */
description: string;
/** The href to navigate to. */
href: string;
/** The perspective display icon. */
icon?: CodeRef<React.ReactNode>;
/** Optional access review to control visibility / enablement of the action. */
accessReview?: AccessReviewResourceAttributes[];
}>;
export declare const isAddActionGroup: (e: Extension<any>) => e is ExtensionDeclaration<"dev-console.add/action-group", {
/** ID used to identify the action group. */
id: string;
/** The title of the action group */
name: string;
/** ID of action group before which this group should be placed */
insertBefore?: string;
/** ID of action group after which this group should be placed */
insertAfter?: string;
}>;