UNPKG

@nstudio/nativescript-coachmarks

Version:

Display user coach marks with a couple of shape cutouts over an existing UI for NativeScript.

104 lines (103 loc) 2.75 kB
import { Observable, Color } from '@nativescript/core'; export interface ICoachMarkOptions { enableContinueLabel?: boolean; enableSkipButton?: boolean; continueLabelText?: string; skipButtonText?: string; animationDuration?: number; continueLocation?: number; lblSpacing?: number; lblTextColor?: Color | string; cutoutRadius?: number; maskColor?: any; maxLblWidth?: number; persist?: boolean; continueLabelTextColor?: Color | string; continueLabelBackgroundColor?: Color | string; continueLabelOffset?: { x?: number; y?: number; }; continueLabelSize?: { width?: number; height?: number; }; skipButtonTextColor?: Color | string; skipButtonBackgroundColor?: Color | string; skipButtonOffset?: { x?: number; y?: number; }; } export interface ICoachMarkShape { DEFAULT?: number; CIRCLE?: number; SQUARE?: number; } export interface ICoachMarkLabelPosition { BOTTOM?: number; LEFT?: number; TOP?: number; RIGHT?: number; RIGHT_BOTTOM?: number; } export interface ICoachMarkLabelAlignment { CENTER?: number; LEFT?: number; RIGHT?: number; } export interface ICoachMark { position?: any; caption?: string; shape?: number; labelPosition?: number; labelAlignment?: number; showArrow?: boolean; view?: any; } export interface ICONTINUE_LOCATION { TOP?: number; CENTER?: number; BOTTOM?: number; } export declare class CoachMark { position: { x: number; y: number; width: number; height: number; }; caption: string; shape: number; labelPosition: number; labelAlignment: number; showArrow: boolean; view: any; closeOnCutOutTap?: boolean; static SHAPES: ICoachMarkShape; static LABEL_POSITIONS: ICoachMarkLabelPosition; static LABEL_ALIGNMENTS: ICoachMarkLabelAlignment; constructor(model?: ICoachMark); } export declare class CoachMarks { static DEBUG: boolean; events: Observable; private _navigateEvent; private _clickEvent; private _cleanupEvent; private _showCase; private nextView; private marks; private _willNavigateEvent; private _willCleanupEvent; private _skipEvent; static CONTINUE_LOCATIONS: ICONTINUE_LOCATION; private _targets; setStyle(style: any): void; setTitle(title: string): void; setCaption(caption: any): void; setButton(buttonText: any): void; static start(marks: Array<CoachMark>, options?: ICoachMarkOptions, instance?: CoachMarks): void; startMarks(marks: Array<CoachMark>, options?: ICoachMarkOptions, instance?: CoachMarks): void; initEvents(): void; }