UNPKG

@omnia/fx

Version:

Provide Omnia Fx typings and tooling for clientside Omnia development.

46 lines (45 loc) 1.81 kB
import { AnchorLinkRoute, TokenBasedRouteStateData, IMessageBusSubscriptionHandler } from "../models"; import { TokenBasedRouter } from "./TokenBasedRouter"; import { VueComponentBase } from "./VueComponentBase"; interface AnchorLinkConfiguration { validate(anchorName: string): boolean; trigger?(options: AnchorLinkTriggerOptions): void; cancel?(): void; } interface AnchorLinkTriggerOptions { scrollIntoView(): boolean; } declare class InternalAnchorLinkRouter extends TokenBasedRouter<AnchorLinkRoute, TokenBasedRouteStateData> { static readonly token = "anchor"; private readonly topic; private triggered; private silent; private observerExecutors; constructor(); protected buildContextPath(routeContext: AnchorLinkRoute): string; protected resolveRouteFromPath(path: string): AnchorLinkRoute; subscribe: (config: AnchorLinkConfiguration) => IMessageBusSubscriptionHandler; silentNavigate: (anchorName: string) => void; clearRoute: () => void; private useConfiguration; private scrollToElement; private onMutationObserved; } export declare class AnchorLink { static readonly disabledWrapperClass = "AnchorLink_Disabled_Wrapper"; router: InternalAnchorLinkRouter; private disabled; constructor(); initInheritedState(currentComponent: VueComponentBase): void; get tokenExistsOnUrl(): boolean; get enabled(): boolean; disable(): void; clear(): void; subscribe(config: AnchorLinkConfiguration): IMessageBusSubscriptionHandler; silentNavigate(anchorName: string): void; static combine(path: string, anchorName: string): string | null; static split(path: string): string[]; static transformToDefaultFormat(value: string): string; private static removeTrailingSlash; } export {};