@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
165 lines (164 loc) • 5.72 kB
TypeScript
import { OnChanges, SimpleChanges, Type } from '@angular/core';
import { Strings } from '../../../generated/strings';
import { ActionContainer } from '../containers/action-container';
import * as i0 from "@angular/core";
/**
* Defines the model of an action item including which renderer to use.
* The consumer can provide an array of these to the action bar 'actions' attribute.
*/
export declare class ActionItem {
readonly renderer: Type<any>;
protected busyTargets: any[];
actionId: string;
/**
* CSS class for icon to be displayed with the ActionItem.
*/
iconClass: string;
/**
* Name of action item to be read out by screen reader.
*/
name: string;
/**
* Label to be displayed for the ActionItem.
*/
text: string;
/**
* Fixed pixel width to be used for the ActionItem.
*/
width: number;
/**
* Flag set to indicate the ActionItem is currently in the busy state (defaults to false).
*/
busy: boolean;
/**
* Flag set to indicate whether or not the ActionItem is enabled (defaults to true).
*/
enabled: boolean;
/**
* Flag set to indicate whether or not the ActionItem is toggled (defaults to false).
*/
toggled: boolean;
/**
* Flag set to indicate whether or not the ActionItem is hidden (defaults to false).
*/
hidden: boolean;
/**
* The target object for the ActionItem.
*/
target: any;
/**
* The parent ActionContainer of the ActionItem.
*/
container: ActionContainer;
/**
* Flag set to indicate whether or not the ActionItem can be run (defaults to false and set to true once added to a container).
*/
ready: boolean;
/**
* Flag set to indicate whether or not the ActionItem should have a pop-out
*/
popOutEnabled: boolean;
/**
* URL for the pop-out window if the Flag popOutEnabled is True
*/
popOutUrl: string;
/**
* Title for the pop-out window
*/
popOutTitle: string;
/**
* Constructor for ActionItem.
* @param renderer The renderer instance used with the ActionItem.
*/
constructor(renderer: Type<any>);
/**
* Method to set the state of the ActionItem.
* @param target The target object to be used by the ActionItem.
* @param container The ActionContainer to place the ActionItem in.
*/
setActionState(target: any, container: ActionContainer): void;
/**
* Sets the target and container of the ActionItem to null.
*/
clearActionState(): void;
/**
* Adds the ActionItem to the given container and sets the ActionItem target. Sets ready to true.
* @param target Target object to be used by the ActionItem.
* @param container ActionContainer to set as the parent of the ActionItem.
*/
addedToContainer(target: any, container: ActionContainer): void;
/**
* Removes the ActionItem from its current container and sets ready to false.
*/
removedFromContainer(): void;
protected getTargetUniqueReference(target: any): any;
}
/**
* The base class for the components that actually renders actions.
* This is refereed to by the 'renderer' property of ActionItem
* Internally it is used by the DynamicActionItemComponent to create an action item
*
*/
export declare class ActionItemRendererComponent<T extends ActionItem> {
item: T;
itemChanged(item: T): void;
}
/**
* Provides the ability to add action items from html best for simple scenarios without a complex command model
*/
export declare abstract class ActionItemComponent implements OnChanges {
protected logSourceName: string;
strings: Strings;
actionId: string;
/**
* Flag set to hide the ActionItemComponent. True for hidden, false otherwise.
*/
hidden: boolean;
/**
* Flag set to enable or disable the ActionItemComponent. True for enabled, false for disabled.
*/
enabled: boolean;
/**
* Flag set to indicate if ActionItemComponent is currently toggled. True for toggled, false if not.
*/
toggled: boolean;
/**
* Label to be displayed for the ActionItem.
*/
text: string;
/**
* Name of action item to be read out by screen reader.
*/
name: string;
/**
* CSS class for icon to be displayed with the ActionItem.
*/
iconClass: string;
/**
* Flag to show the pop-out button on the ActionItemComponent. True for enabling pop-out, false if not
*/
popOutEnabled: boolean;
/**
* URL for the pop-out window if the Flag popOutEnabled is True
*/
popOutUrl: string;
/**
* Title for the pop-out window
*/
popOutTitle: string;
/**
* ActionItem object associated with this ActionItemComponent.
*/
action: ActionItem;
/**
* Constructor for ActionItemComponent.
*/
constructor();
protected abstract createActionItem(): ActionItem;
/**
* Callback method run after default change detector has executed.
*/
ngOnChanges(changes: SimpleChanges): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ActionItemComponent, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ActionItemComponent, never, never, { "actionId": "actionId"; "hidden": "hidden"; "enabled": "enabled"; "toggled": "toggled"; "text": "text"; "name": "name"; "iconClass": "iconClass"; "popOutEnabled": "popOutEnabled"; "popOutUrl": "popOutUrl"; "popOutTitle": "popOutTitle"; }, {}, never, never, false, never>;
}