@spartacus/storefront
Version:
Spartacus Storefront is a package that you can include in your application, which allows you to add default storefront features.
39 lines (38 loc) • 1.87 kB
TypeScript
import { OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { WindowRef } from '@spartacus/core';
import { Subscription } from 'rxjs';
import { BreakpointService } from '../../../../layout/breakpoint/breakpoint.service';
import { BREAKPOINT } from '../../../config';
import { KeyboardFocusConfig } from '../config';
import * as i0 from "@angular/core";
/**
* @deprecated since 4.2, refer to spartacus issues (#13762)
* Shared service for keyboard focus features called when the browser navigates.
*/
export declare class OnNavigateFocusService implements OnDestroy {
protected config: KeyboardFocusConfig;
protected router: Router;
protected breakpointService: BreakpointService;
protected winRef: WindowRef;
protected resetFocusOnNavigate: Subscription;
protected resetViewOnNavigate: Subscription;
constructor(config: KeyboardFocusConfig, router: Router, breakpointService: BreakpointService, winRef: WindowRef);
ngOnDestroy(): void;
/**
* Reads configuration and enables features based on flags set.
*/
initializeWithConfig(): void;
/**
* Resets focus back to body element in the DOM tree when a navigation is started.
* @param enable Enable or disable this feature. Set this to an array of BREAKPOINTS to enable for specified screen widths.
*/
setResetFocusOnNavigate(enable: boolean | BREAKPOINT[]): void;
/**
* Resets view back to body element in the DOM tree when a navigation is started.
* @param enable Enable or disable this feature. Set this to an array of BREAKPOINTS to enable for specified screen widths.
*/
setResetViewOnNavigate(enable: boolean | BREAKPOINT[]): void;
static ɵfac: i0.ɵɵFactoryDeclaration<OnNavigateFocusService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<OnNavigateFocusService>;
}