pddl-gantt
Version:
Plan visualization for AI-Planning plans. The package includes HTML components for Gantt, swimlane and line plot visualization of plan originating from AI Planning solvers.
37 lines (36 loc) • 1.47 kB
TypeScript
import { Plan } from "pddl-workspace";
import { PlanView, PlanViewOptions, View } from "./PlanView";
import { DomainVizConfiguration } from "./DomainVizConfiguration";
export interface PlansViewOptions extends PlanViewOptions {
onPlanSelected?: (planIndex: number) => void;
}
/** Multiple-plan view. */
export declare class PlansView extends View {
private selectedPlan;
private plans;
private planViewsEl;
private planViews;
private readonly onPlanSelected?;
constructor(hostElement: HTMLDivElement, options: PlansViewOptions);
clear(): void;
/**
* Get `PlanView` for the plan at given `planIndex`
* @param planIndex plan index
* @throws when planIndex is out of range
*/
getView(planIndex: number): PlanView;
showPlans(plans: Plan[], planId?: number, configuration?: DomainVizConfiguration): void;
addPlan(plan: Plan, configuration?: DomainVizConfiguration): void;
private setSelectedPlan;
private createPlanSelectors;
private createPlanSelector;
private createPlanViews;
private addPlanView;
showSelectedPlan(selectedPlanIndex: number): void;
/**
* Ensures the plan selector with the given index is visible by scrolling the plan selectors div.
* @param planIndex plan selector to scroll to
*/
scrollPlanSelectorIntoView(planIndex: number): void;
}
export declare function createPlansView(hostElementId: string, options: PlansViewOptions): PlansView;