smartwizard
Version:
A modern and accessible step wizard plugin for jQuery
40 lines (39 loc) • 1.52 kB
TypeScript
import { ContentDirection, StepEventArgs, LeaveStepEventArgs } from "./types";
/**
* Gets the current URL hash (including #).
*/
export declare function getUrlHash(): string;
/**
* Sets the URL hash without reloading the page.
*/
export declare function setUrlHash(hash: string): void;
/**
* Scrolls an element into view smoothly.
*/
export declare function scrollToView(element: JQuery): void;
/**
* Determines if a value is a function.
*/
export declare function isFunction(value: unknown): boolean;
/**
* Recursively merges `override` into a deep clone of `base`.
* Plain-object values are merged key-by-key; all other values are replaced.
*/
export declare function deepMerge<T extends object>(base: T, override: Partial<T>): T;
/**
* Finds the first matching descendant in one of the first two levels of children.
*/
export declare function getFirstDescendant(element: JQuery, selector: string): JQuery;
/**
* Gets the text direction from an element or falls back to document.
*/
export declare function getContentDirection(element: JQuery): ContentDirection;
/**
* Sets the text direction of an element.
*/
export declare function setContentDirection(element: JQuery, direction: ContentDirection): void;
/**
* Triggers a jQuery event and returns whether default was prevented.
*/
export declare function triggerEvent(element: JQuery, name: string, args?: StepEventArgs | LeaveStepEventArgs | any[]): boolean;
export declare function stopAnimations(...elements: JQuery<HTMLElement>[]): void;