@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
128 lines (127 loc) • 4.46 kB
TypeScript
import { Injector, OnDestroy } from '@angular/core';
import { Observable } from 'rxjs';
import { BaseComponent } from '../../common/base.component';
import { WizardModel } from '../models/wizard-model';
import { WizardStepValidation } from '../models/wizard-step-validation';
import { WizardAsParent } from '../wizard-as-parent';
import { WizardNavigationInformation } from '../wizard-navigation-information';
import * as i0 from "@angular/core";
/**
* A base class for dynamically rendered wizard steps
*/
export declare abstract class WizardStepComponent<TModel extends WizardModel, TResourceStrings> extends BaseComponent<TResourceStrings> implements OnDestroy {
/**
* internal placeholder for the model
*/
private internalModel;
/**
* internal placeholder for the valid state
*/
private internalValid;
/**
* The navigation information instance referencing inside of WizardComponent class instance.
*/
navigationInformation: WizardNavigationInformation;
/**
* Tooltip to be displayed when "Next" button is disabled.
*/
nextButtonTooltip: string;
/**
* Gets the model for the wizard
*/
get model(): TModel;
/**
* @deprecated
* Whether or not the component is skipped.
* This is provided by the step component implementation,
* defaults to false.
*/
get skipped(): boolean;
/**
* Whether or not the component is disabled.
* A disabled step cannot update form fields and
* is read-only. A disabled step will be skipped
* automatically.
*
* This is provided by the step component implementation,
* defaults to false.
*/
get disabled(): boolean;
/**
* Whether or not the component can be skipped.
* This is provided by the step component implementation,
* defaults to false.
*/
get canBeSkipped(): boolean;
/**
* Whether or not the component is busy.
* A step is busy if it has progress that will be lost if
* the wizard navigates to a different step.
*
* This is provided by the step component implementation,
* defaults to false.
*/
get isBusy(): boolean;
/**
* Custom message provider by the wizard step when isBusy:true and user is trying to navigate away
* from the wizard step. If null, it uses the standard message.
*/
get busyMessage(): string;
/**
* Whether or not there should be padding around the component
*/
get padContents(): boolean;
/**
* Whether or not the component is valid.
*/
get valid(): boolean;
/**
* Observable that emits when this step wants to submit itself
*/
readonly submitted: Observable<void>;
private submittedSubject;
/**
* Observable that emits when the wizard model has changed
*/
readonly modelChanged: Observable<TModel>;
private modelChangedSubject;
/**
* Constructs a new instance of the WizardStepComponent
* @param injector The injector for the sme base component
* @param wizard (Optional) The parent wizard reference.
*/
constructor(injector: Injector, wizard?: WizardAsParent);
/**
* Angular Destroy life cycle hook
*/
ngOnDestroy(): void;
/**
* Observable handler for determining if the step is valid
* Override if you want to validate the entire step
*/
protected checkIsValid(): Observable<boolean>;
/**
* Called from the wizard when the model changes
*/
onWizardModelChanged(value: TModel): void;
/**
* Observable handler for determining if the step is valid
*/
validate(): Observable<WizardStepValidation>;
/**
* Submits the step to the wizard
*/
protected submit(): void;
/**
* Submits updated model to the wizard
*/
protected emitModelChanged(): void;
/**
* Gets if the step is currently valid
*/
protected getIsValid(): boolean;
static ɵfac: i0.ɵɵFactoryDeclaration<WizardStepComponent<any, any>, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<WizardStepComponent<any, any>, never, never, {}, {}, never, never, false, never>;
}
export declare abstract class GenericWizardStepComponent<TModel extends WizardModel> extends WizardStepComponent<TModel, any> {
}