@syncfusion/ej2-gantt
Version:
Essential JS 2 Gantt Component
87 lines (86 loc) • 2.44 kB
TypeScript
import { Gantt } from './../base/gantt';
import { ContextMenu as Menu } from '@syncfusion/ej2-navigations';
/**
* The ContextMenu module is used to handle the context menu items & sub-menu items.
*
* @returns {void} .
*/
export declare class ContextMenu {
/**
* @private
*/
contextMenu: Menu;
private parent;
private ganttID;
private element;
private headerMenuItems;
private contentMenuItems;
private rowData;
segmentIndex: number;
private clickedPosition;
private targetElement;
private isEdit;
private isCntxtMenuDependencyDelete;
/**
* @private
*/
isOpen: boolean;
/**
* @private
*/
item: string;
private predecessors;
private hideItems;
private disableItems;
constructor(parent?: Gantt);
private addEventListener;
private reRenderContextMenu;
private render;
private contextMenuItemClick;
private splitTaskCall;
private mergeCall;
/**
* Calculates the date based on the clicked position on the Gantt chart's context menu.
*
* @param {HTMLElement} element - The HTML element used for determining the click position within the Gantt chart.
* @returns {Date} - Returns the calculated date based on the clicked position on the chart.
*
* The function determines the Gantt element's left position for both RTL and LTR layouts.
* It calculates the left position of the task and the click's position difference, adjusts the split task duration,
* and computes the final click date.
*/
private getClickedDate;
private contextMenuBeforeOpen;
private updateItemStatus;
private mergeItemVisiblity;
private updateItemVisibility;
private contextMenuOpen;
private getMenuItems;
private createItemModel;
private getLocale;
private buildDefaultItems;
private getIconCSS;
private getPredecessorsItems;
private headerContextMenuClick;
private headerContextMenuOpen;
private getDefaultItems;
/**
* To get ContextMenu module name.
*
* @returns {string} .
*/
getModuleName(): string;
private removeEventListener;
private contextMenuOnClose;
private revertItemStatus;
private resetItems;
private generateID;
private getKeyFromId;
/**
* To destroy the contextmenu module.
*
* @returns {void} .
* @private
*/
destroy(): void;
}