UNPKG

@omnia/foundation

Version:

Provide omnia foundation typings and tooling work on client side for omnia extension

80 lines (69 loc) 2.54 kB
// Type definitions for intro.js 2.0 // Project: https://github.com/usablica/intro.js // Definitions by: Maxime Fabre <https://github.com/anahkiasen/> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Edited by Omnia Foundation declare namespace IntroJs { interface Step { intro?: string; element?: string|HTMLElement|Element; position?: string; order?: number; parentTab?: string; selectorQuery?: string; } interface Options { nextLabel?: string; prevLabel?: string; skipLabel?: string; doneLabel?: string; tooltipPosition?: string; tooltipClass?: string; highlightClass?: string; exitOnEsc?: boolean; exitOnOverlayClick?: boolean; showStepNumbers?: boolean; keyboardNavigation?: boolean; showButtons?: boolean; showBullets?: boolean; showProgress?: boolean; scrollToElement?: boolean; overlayOpacity?: number; positionPrecedence?: string[]; disableInteraction?: boolean; hintPosition?: string; hintButtonLabel?: string; steps?: Step[]; } interface IntroJs { start(): IntroJs; exit(): IntroJs; clone(): IntroJs; goToStep(step: number): IntroJs; nextStep(): IntroJs; previousStep(): IntroJs; refresh(): IntroJs; setOption(option: string, value: string|number|boolean): IntroJs; setOptions(options: Options): IntroJs; onexit(callback: Function): IntroJs; showstep(currentStep: Step): IntroJs; onbeforechange(callback: (currentStep: Step) => any): IntroJs; onafterchange(callback: (currentStep: Step) => any): IntroJs; onchange(callback: (that: any, resetStepElement: any, next: any) => any): IntroJs; oncomplete(callback: Function): IntroJs; addHints(): IntroJs; onhintsadded(callback: Function): IntroJs; onhintclick(callback: (hintElement: HTMLElement, item: Step, stepId: number) => any): IntroJs; onhintclose(callback: (stepId: number) => any): IntroJs; setIntroLayerByCurrentElement(): IntroJs; } interface Factory { (): IntroJs; (element: HTMLElement): IntroJs; (querySelector: string): IntroJs; } } declare var introJs: IntroJs.Factory; declare module 'intro.js' { export = IntroJs; }