@tiposaurio/guido-lib
Version:
87 lines (86 loc) • 2.82 kB
TypeScript
import { QueryList, TemplateRef, AfterContentChecked, EventEmitter, OnInit, OnDestroy } from '@angular/core';
import { ConfigNames, AppStepConfig } from './step-config';
export declare class AppStepTitleDirective {
templateRef: TemplateRef<any>;
constructor(templateRef: TemplateRef<any>);
}
export declare class AppStepContentDirective {
templateRef: TemplateRef<any>;
constructor(templateRef: TemplateRef<any>);
}
export declare class AppStepDirective {
id: string;
title: string;
icon: string;
/**
* Guarda Cualquier dato. Creado por el Equipo Lamb.
*/
data: any;
disabled: boolean;
isValidStep: boolean;
validStep: string | boolean;
titleTemplate: AppStepTitleDirective;
contentTemplate: AppStepContentDirective;
}
export interface AppStepChangeEvent {
/**
* Id de la pestaña actualmente activa.
*/
activeId: string;
/**
* Id de la pestaña recién seleccionada.
*/
nextId: string;
/**
* data guardada en la pestaña actualmente activa.
*/
activeData: any;
/**
* Función que evitará el cambio de pertaña si se llama.
*/
preventDefault: () => void;
}
export declare class AppStepGroupComponent implements OnInit, AfterContentChecked, OnDestroy {
private config;
justifyClass: string;
hideContent: boolean;
steps: QueryList<AppStepDirective>;
/**
* Id del step que saldrá activado por defecto.
*/
activeId: string;
/**
* Personalizar el nombre 'Anterior | siguiente y Finalizar'
* Formato de variable : objecto
* Ej. configNames: object = {buttonBack: 'Regresar', buttonNext: 'Grabar', buttonFinish: 'Fin'}
*/
iConfigNames: ConfigNames;
configNames: ConfigNames;
/**
* Cuando cambia de step se destruira el contenido anterior o solo se oculatará?
*/
destroyOnHide: boolean;
/**
* Emite cuando hay cambios de steps.
*/
stepChange: EventEmitter<AppStepChangeEvent>;
onComplete: EventEmitter<any>;
justify: 'start' | 'center' | 'end' | 'fill' | 'justified';
onSelect(stepId: string): void;
constructor(config: AppStepConfig);
ngOnInit(): void;
orientation: 'horizontal' | 'vertical';
type: 'stepss' | 'pills';
ngAfterContentChecked(): void;
private getStepById;
back(): void;
next(): void;
complete(): void;
current(stepId: string): void;
private getStepIdSplice;
readonly hidePrevious: boolean;
readonly hideNext: boolean;
hideLineRight(stepId: any): boolean;
ngOnDestroy(): void;
}
export declare const APP_STEPS_COMPONENTS: (typeof AppStepTitleDirective | typeof AppStepDirective | typeof AppStepGroupComponent)[];