UNPKG

@nstudio/nativescript-coachmarks

Version:

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

91 lines (90 loc) 2.79 kB
import { Observable } from '@nativescript/core'; export interface ICoachMarkOptions { enableContinueLabel?: boolean; enableSkipButton?: boolean; continueLabelText?: string; skipButtonText?: string; animationDuration?: number; continueLocation?: number; lblSpacing?: number; cutoutRadius?: number; maskColor?: any; maxLblWidth?: number; persist?: boolean; } 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; closeOnCutOutTap?: boolean; } export interface ICONTINUE_LOCATION { TOP: number; CENTER: number; BOTTOM: number; } export declare class CoachMark { position: any; caption: string; shape: number; labelPosition: number; labelAlignment: number; showArrow: boolean; closeOnCutOutTap?: boolean; static SHAPES: ICoachMarkShape; static LABEL_POSITIONS: ICoachMarkLabelPosition; static LABEL_ALIGNMENTS: ICoachMarkLabelAlignment; constructor(model?: ICoachMark); } export declare class CoachMarks { static APP_SETTINGS_KEY: string; static DEBUG: boolean; static CONTINUE_LOCATIONS: ICONTINUE_LOCATION; events: Observable; willNavigateEvent: any; navigateEvent: any; clickEvent: any; skipEvent: any; cleanupEvent: any; willCleanupEvent: any; static delegate: CoachMarksDelegateImpl; static start(marks: Array<CoachMark>, options?: ICoachMarkOptions, instance?: CoachMarks): void; static HAS_SHOWN(): boolean; static PERSIST(): void; static RESET(): void; initEvents(): void; } declare class CoachMarksDelegateImpl extends NSObject implements MPCoachMarksViewDelegate { static ObjCProtocols: { prototype: MPCoachMarksViewDelegate; }[]; owner: WeakRef<CoachMarks>; static initWithOwner(owner: WeakRef<CoachMarks>): CoachMarksDelegateImpl; coachMarksViewDidCleanup?(coachMarksView: MPCoachMarks): void; coachMarksViewDidClickedAtIndex?(coachMarksView: MPCoachMarks, index: number): void; coachMarksViewDidNavigateToIndex?(coachMarksView: MPCoachMarks, index: number): void; coachMarksViewSkipButtonClicked?(coachMarksView: MPCoachMarks): void; coachMarksViewWillCleanup?(coachMarksView: MPCoachMarks): void; coachMarksViewWillNavigateToIndex?(coachMarksView: MPCoachMarks, index: number): void; } export {};