UNPKG

@exadel/esl

Version:

Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components

50 lines (49 loc) 1.97 kB
import { ESLBaseElement } from '../../esl-base-element/core'; import type { ESLShareButtonConfig } from './esl-share-config'; export type { ESLShareListTagShape } from './esl-share-list.shape'; /** * ESLShareList * @author Dmytro Shovchko * * ESLShareList is a custom element to dynamically draw {@link ESLShareButton}s using simplified shared config */ export declare class ESLShareList extends ESLBaseElement { static is: string; static observedAttributes: string[]; /** Register {@link ESLShareList} component and dependent {@link ESLShareButton} */ static register(): void; /** Event to dispatch on change of {@link ESLShareList} */ SHARE_CHANGED_EVENT: string; /** Event to dispatch on {@link ESLShareList} ready state */ SHARE_READY_EVENT: string; /** * List of social networks or groups of them to display (all by default). * The value - a string containing the names of the buttons or groups (specified with * the prefix group:) separated by spaces. * @example "facebook reddit group:default" * */ list: string; /** @readonly Ready state marker */ ready: boolean; /** @returns config of buttons specified by the list attribute */ get buttonsConfig(): ESLShareButtonConfig[]; protected attributeChangedCallback(attrName: string, oldVal: string, newVal: string): void; protected connectedCallback(): void; /** Initializes the component */ protected init(force?: boolean): void; /** Updates the component if the buttons config was changed */ protected update(): void; /** Appends buttons to the component. */ protected buildContent(): void; /** Actions on complete init and ready component. */ private onReady; protected _onConfigChange(): void; } declare global { export interface ESLLibrary { ShareList: typeof ESLShareList; } export interface HTMLElementTagNameMap { 'esl-share-list': ESLShareList; } }