import { Wizard } from './Wizard'; import { IWizard } from './IWizard'; import { IWizardPage } from './IWizardPage'; import * as vscode from 'vscode'; import { MessageMapping, Template, HandlerResponse, AsyncMessageCallback } from "./pageImpl"; import { WebviewWizardPage } from './WebviewWizardPage'; import { IWizardWorkflowManager } from './IWizardWorkflowManager'; import { IWizardPageRenderer } from './IWizardPageRenderer'; export declare class WebviewWizard extends Wizard implements IWizard { context: vscode.ExtensionContext; readyMapping: MessageMapping; backPressedMapping: MessageMapping; nextPressedMapping: MessageMapping; finishPressedMapping: MessageMapping; openFileDialogMapping: MessageMapping; validateMapping: MessageMapping; currentPage: IWizardPage | null; previousParameters: any; id: string; type: string; title: string; imageString: string | undefined; description: string | undefined; definition: WizardDefinition; initialData: Map; isDirty: boolean; constructor(id: string, type: string, context2: vscode.ExtensionContext, definition: WizardDefinition, initialData: Map); private createAndPostValidationTemplates; canFinishInternal(parameters: any): boolean; getActualPreviousPage(data: any): IWizardPage | null; getActualNextPage(data: any): IWizardPage | null; backImpl(callback: AsyncMessageCallback, parameters: any): Promise; templatesToHandlerResponse(templates: Template[], focus: boolean): HandlerResponse; nextImpl(callback: AsyncMessageCallback, parameters: any): Promise; finishImpl(data: any): Promise; openFileDialogMappingImpl(data: any): Promise; updateWizardPanelTitle(): void; close(): void; /** * This function will reload a page's headings, content, and button bar. * It WILL validate the page. * It WILL NOT include field validation in the templates sent to webview. * It WILL use the validation to update button bars. * * This function should only be called when a new page is first loaded, * either via the 'ready', 'next', or 'back' mappings. * * @param callback * @param parameters */ fireCurrentPageInitialTemplates(callback: AsyncMessageCallback, parameters: any): Promise; getCurrentPageHeadingsTemplates(parameters: any): Template[]; getDefaultWizardHeader(): string; getDefaultWizardPageHeader(): string; fireValidationTemplatesForCurrentPage(callback: AsyncMessageCallback, parameters: any, previousParams: any): Promise; getCurrentPageName(): string | undefined; getCurrentPageId(): string; getCurrentPageDescription(): string | undefined; getCurrentPageContent(parameters: any): string; getCurrentPage(): WebviewWizardPage | null; open(): void; addPages(): void; getUpdatedWizardControls(parameters: any): string; getUpdatedWizardControlsTemplate(parameters: any): Template; fireUpdatedButtonBar(callback: AsyncMessageCallback, parameters: any): Promise; getButtonBarHtml(parameters: any): string; getDisabledWizardControlsHtml(): string; getDisabledWizardControlsTemplates(): Template; getButtonBarHtmlImpl(hasPrevious: boolean, hasNext: boolean, canFinishNow: boolean): string; showDirtyState(def: WizardDefinition): boolean; } export declare function createButton(id: string | undefined, onclick: string | undefined, enabled: boolean, text: string): string; export declare type WizardPageValidator = (parameters: any, previousParameters?: any) => ValidatorResponse; export declare type AsyncWizardPageValidator = (parameters: any, previousParameters: any) => Promise[]; export declare type WizardPageFieldOptionProvider = (parameters?: any) => string[]; export interface WizardPageFieldOptionLabelProvider { getItems(parameters?: any): any; getValueItem?(item: any): string; getLabelItem(item: any): string; } export declare const UPDATE_TITLE: string; export declare enum SEVERITY { OTHER = 1, INFO = 2, WARN = 3, ERROR = 4 } export declare enum BUTTONS { PREVIOUS = 1, NEXT = 2, FINISH = 3 } export interface ButtonItem { id: BUTTONS; label: string; } export interface ValidatorResponseItem { template: Template; severity: SEVERITY; } export interface ValidatorResponse { items: ValidatorResponseItem[]; fieldRefresh?: Map; } export interface CompoundValidatorResponse { syncResponse: ValidatorResponse; asyncResponses: Promise[]; } export interface WizardDefinition { title: string; description?: string; bannerIconString?: string; hideWizardHeader?: boolean; pages: WizardPageDefinition[]; workflowManager?: IWizardWorkflowManager; renderer?: IWizardPageRenderer; buttons?: ButtonItem[]; showDirtyState?: boolean; } export interface WizardPageDefinition { id: string; title?: string; description?: string; hideWizardPageHeader?: boolean; fields: (WizardPageFieldDefinition | WizardPageSectionDefinition)[]; validator?: WizardPageValidator; asyncValidator?: AsyncWizardPageValidator; } export interface WizardPageSectionDefinition { id: string; label: string; description?: string; childFields: WizardPageFieldDefinition[]; } export declare function isWizardPageSectionDefinition(def: WizardPageFieldDefinition | WizardPageSectionDefinition): def is WizardPageSectionDefinition; export declare function isWizardPageFieldDefinition(def: WizardPageFieldDefinition | WizardPageSectionDefinition): def is WizardPageFieldDefinition; export interface WizardPageFieldDefinition { id: string; type: string; label: string; description?: string; initialValue?: string; placeholder?: string; focus?: boolean; executableJavascriptOnModification?: string; properties?: any; optionProvider?: WizardPageFieldOptionProvider | WizardPageFieldOptionLabelProvider; dialogOptions?: vscode.OpenDialogOptions; initialState?: FieldDefinitionState; } export interface FieldDefinitionState { enabled?: boolean; visible?: boolean; forceRefresh?: boolean; } //# sourceMappingURL=WebviewWizard.d.ts.map