@engie-group/fluid-design-system
Version:
The Fluid Design System is ENGIE’s open-source library to create, build and deliver ENGIE digital services in a more efficient way.
57 lines (56 loc) • 1.99 kB
TypeScript
/**
* --------------------------------------------------------------------------
* NJ: sidebar.ts
* --------------------------------------------------------------------------
*/
import AbstractComponent from '../../globals/ts/abstract-component';
import { Core } from '../../globals/ts/enum';
export default class SidebarDeprecated extends AbstractComponent {
static readonly NAME = "nj-sidebar-deprecated";
static readonly DATA_KEY = "nj.sidebar-deprecated";
protected static readonly EVENT_KEY: string;
protected static readonly DATA_API_KEY = Core.KEY_PREFIX;
static hasInit: boolean;
static readonly CLASS_NAME: {
folding: string;
folded: string;
};
static readonly EVENT: {
show: string;
shown: string;
hide: string;
hidden: string;
clickDataApi: string;
};
protected static readonly DEFAULT_OPTIONS: {
folded: boolean;
};
private static readonly DEFAULT_TYPE;
protected static readonly SELECTOR: {
default: string;
actives: string;
dataToggle: string;
};
private isTransitioning;
private triggerArray;
private selector;
constructor(element: HTMLElement, options?: {});
toggle(): void;
open(): void;
close(): void;
setTransitioning(isTransitioning: boolean): void;
closeOnInteractOut: (e: any) => void;
dispose(): void;
addAriaAndExpandedClass(element: any, triggerArray: any): void;
private static getOptions;
static getTargetFromElement(element: any): Element | null;
static expandInterface(element: any, options: any): void;
static getInstance(element: HTMLElement): SidebarDeprecated;
static init(options?: {}): SidebarDeprecated[];
/**
* ------------------------------------------------------------------------
* Data Api implementation
* ------------------------------------------------------------------------
*/
private registerEvents;
}