/** Core */ import { ComponentFramework } from "cmf.core/src/core"; /** Wizard Receiver interface definition */ import { Wizardable } from "./commandDef"; /** Dependencies */ import { WizardStepDef } from "../../wizardStep/wizardStepDef"; import { WizardBag } from "../wizardBag"; import { PageBag } from "../../page/pageBag"; import { ModalViewInstance } from "../../modalView/modalView"; import { Comments } from "../../comments/comments"; /** Angular2 */ import * as ng from "@angular/core"; export declare const WIZARD_BAG: Symbol; export declare const WIZARD_RESULTS: Symbol; /** * The Wizard Receiver class implementing the WizardAble interface * The receiver object owns the method that is called by the command's execute method. */ export declare class WizardReceiver implements Wizardable { private bag; private pageBag; private framework; private element; private stepCommentsQueryList; private initEvent; private finishEvent; private closeEvent; private activateStepEvent; private modalInstance; constructor(bag: WizardBag, pageBag: PageBag, framework: ComponentFramework, element: ng.ElementRef, stepCommentsQueryList: ng.QueryList, initEvent: ng.EventEmitter, finishEvent: ng.EventEmitter, closeEvent: ng.EventEmitter, activateStepEvent: ng.EventEmitter, modalInstance: ModalViewInstance); /** * Wizard current step (has some logic which is not desirable) */ readonly currentStep: WizardStepDef; /** * This is a simple auxiliary method to create a closure around the callback to maintain the event that triggered the event. * This allows not passing objects around maintaining private members that allow checking the event when the callback is called by the client. */ private buildCallBack; /** * Will trigger the an event where all wizard consumers will be able to append their async loading operations while the * screen is blocked by the progress indicator */ private triggerWizardEvent; /** * This is a generic Callback implementation that is called by the wizard consumer. Since the consumer passes by an operation, the callback awaits its execution * and then clears the progress indicator. This way, consumers can concentrate in defining their own sync or async operations while the wizard callback deals with the wizard state */ private performWizardGenericCallback; /** * Defines what the current step is based on the currentIndex defined by Concrete commands and then activates a step by calling the activate step hook that clients can listen to. */ private defineStep; /** * Activates a step visually. Hook has already been called by the defineStep */ private activateStep; /** * Validates a step. First waits, calls validation, calls a pass statement or fail statement depending on the validation result and then stops waiting */ private validateStep; /** * Starts the wizard by defining a validation context for all steps that have validation rules. * The start has a hook that clients can listen to and perform their own loading tasks. */ start(validationContext: string): Promise; /** * Moves to the next step visible step. Sometimes validation may be skipped, for instance, when showing the results step where we are not interested in re-validation the last step * before proceeding to the results step. We need to do a next but not perform the validation because it was already performed in the finish */ next(performValidation?: boolean): Promise; /** * Goes back to the previous step */ back(): Promise; /** * Validate comments component */ private validateComments; /** * Finishes the wizard and invokes the finish hook so clients can implement their final logic for finishing the wizard. */ finish(): Promise; /** * Jumps to a specific step */ jumpTo(wizardStepToJump: WizardStepDef, performValidation?: boolean): Promise; /** * Reactivates wizard after an invalidation - so the wizard can start all over again */ activate(): Promise; /** * Invalidates the whole wizard, when no further actions should be possible */ invalidate(): Promise; /** * Closes the wizard */ close(): Promise; /** * Cancels the wizard. Similar to close except it requires a confirmation first. */ cancel(): Promise; /** * Jumps to the Results step without performing any step validation */ jumpToResults(): Promise; }