UNPKG

@syncfusion/ej2-documenteditor

Version:

Feature-rich document editor control with built-in support for context menu, options pane and dialogs.

73 lines (72 loc) 3.68 kB
import { RibbonTabType } from '../../document-editor/base/ribbon-types'; import { RibbonTabModel, RibbonGroupModel, Ribbon } from '@syncfusion/ej2-ribbon'; import { RibbonGroupInfo, RibbonItemInfo } from './ribbon-interfaces'; import { DocumentEditorContainer } from '../document-editor-container'; /** * Helper class for Ribbon operations * @private */ export declare class RibbonHelper { /** * Gets the ribbon tab ID from the RibbonTabType. * @param {string | RibbonTabType} tabType - The ribbon tab type. * @param {string} containerId - The container element ID. * @returns {string} The tab ID. */ static getTabId(tabType: string | RibbonTabType, containerId: string): string; /** * Gets the default tab ID for predefined tab types. * @param {RibbonTabType} tabType - The ribbon tab type. * @param {string} containerId - The container element ID. * @returns {string} The default tab ID. */ static getDefaultTabId(tabType: RibbonTabType, containerId: string): string; /** * Gets the group ID from string or RibbonGroupInfo. * @param {string | RibbonGroupInfo} groupId - The group identifier or info. * @param {RibbonTabModel[]} tabs - The ribbon tabs. * @param {string} containerId - The container element ID. * @returns {string} The group ID. */ static getGroupId(groupId: string | RibbonGroupInfo, tabs: RibbonTabModel[], containerId: string): string; /** * Gets the group model from a tab based on group information. * @param {RibbonGroupInfo} groupInfo - The group information. * @param {RibbonTabModel[]} tabs - The ribbon tabs. * @param {string} containerId - The container element ID. * @returns {RibbonGroupModel} The group model, or undefined if not found. */ static findGroup(groupInfo: RibbonGroupInfo, tabs: RibbonTabModel[], containerId: string): RibbonGroupModel; /** * Finds a tab by ID in the tabs collection. * @param {RibbonTabModel[]} tabs - The tabs collection. * @param {string} tabId - The tab ID. * @returns {RibbonTabModel} The found tab, or undefined. */ static findTab(tabs: RibbonTabModel[], tabId: string): RibbonTabModel; /** * Gets the collection ID from a group based on group information. * @param {RibbonGroupInfo} groupInfo - The group information. * @param {RibbonTabModel[]} tabs - The ribbon tabs. * @param {string} containerId - The container element ID. * @returns {string} The collection ID, or empty string if not found. */ static getCollectionIdFromGroup(groupInfo: RibbonGroupInfo, tabs: RibbonTabModel[], containerId: string): string; static getCollectionIdFromItem(groupInfo: RibbonGroupInfo, container: DocumentEditorContainer, itemId?: string): string; /** * Gets the item IDs from a group based on item information. * @param {RibbonItemInfo} itemInfo - The item information. * @param {DocumentEditorContainer} container - The DocumentEditorContainer instance. * @returns {string[]} Array of item IDs. */ static getItemIdsFromGroup(itemInfo: RibbonItemInfo, container: DocumentEditorContainer): string[]; /** * Updates the toggle state of a ribbon button * @param {Ribbon} ribbonObj - The ribbon object instance to update * @param {string} buttonId - The unique identifier of the button to toggle * @param {boolean} isActive - Boolean value indicating whether the button should be in active/pressed state * @returns {void} * @private */ static updateToggleButtonState(ribbonObj: Ribbon, buttonId: string, isActive: boolean): void; }