/** * Likes Modal * * Used to retrieve the likes for an object and display the likes using pagination */ export declare class ClaLikesModal { /** * The host element. */ element: HTMLElement; /** * Items to display per page. */ private ITEMS_PER_PAGE; /** * Items per column. */ private ITEMS_PER_COLUMN; /** * Maximum pagination items to show. */ private MAX_PAGES_TO_SHOW; /** * Current page. */ currentPage: number; /** * Total pages. */ totalPages: number; /** * Total likes. */ totalLikes: number; /** * List of people who liked. */ likers: any[]; /** * Whether the modal is open. */ isOpen: boolean; /** * The type of object that the component should retrieve likes for. */ objectType: string; /** * The ID of the object that the component should retrieve likes for. */ objectId: string; /** * This is used to update the `totalLikes` state. */ total: number; /** * Update `totalLikes` when component is loaded. * Pass the prop to the state */ componentWillLoad(): void; /** * Teleport the modal to the body after first render */ componentDidRender(): void; /** * Watch the `total` being changed * Update `totalLikes` when `total` changes to keep in sync * * @param {number} newValue New value */ protected onTotalChange(newValue: number): void; /** * Fetch the likers data * * @param offset The offset (or current position) */ private fetchData; /** * Handle page pagination click * * @param event Event * @param page Page */ private handlePageClick; /** * Close the modal */ private closeModal; /** * Get the likers per column * * @param {Number} index * @returns {Array} */ private getLikersByColumn; /** * Render the markup * * @returns {JSX} */ render(): any; }