import { JaqlRequest } from '../../../data-load/types.js'; import { ListOfPanelTypes } from '../../constants.js'; import { PivotTreeNode } from '../../types.js'; import { CellItem, DimensionMetadata, GlobalStyles, MeasureMetadata, Metadata, PluginConfig } from './types.js'; export declare class PluginService { /** * Handlers to apply for pivot cells * * @private * */ plugins: Array; /** @private global plugins config */ globalStyles?: GlobalStyles; /** @private */ jaql: JaqlRequest; /** * Object to store indexes for data groups */ private indexHelper; /** * Cache columns metadata after handling column tree node * * @private * */ columnsMetadata: Array<{ metadata: Array; type: Array; }>; metadataCache: Map; constructor(plugins: Array, jaql: JaqlRequest, globalStyles?: GlobalStyles); /** * Get array of panels by type * * @param {ListOfPanelTypes} jaqlPanel - type of panels to return measures|columns|rows * @returns {Array} row level of measures in column tree */ getJaqlPanels(jaqlPanel: ListOfPanelTypes): import("../../../data-load/types.js").JaqlPanel[]; /** * Calculate level of measures in column tree * * @returns {number} row level of measures in column tree */ getMeasuresLevel(): number; /** * Get count of row panels * * @returns {void} */ getRowsColumnLength(): number; /** * Get count of row panels * * @param {Array} types - array of types from current cell * @returns {void} */ getTotalTypes(types: Array): Array; /** * Calculate measure index and get panel metadata * * @param {number} index - measure index in row * @returns {MeasureMetadata} measure metadata */ getMeasureMetaByIndex(index: number): MeasureMetadata | undefined; resetRowStartFrom(): void; applyToColumns(columnTreeChildren: Array): void; /** * Apply plugins to columns values and cache metadata for measure handler * * @param {Array} columnTreeChildren - measure index in row * @param {object} indexes - measure index in row * @returns {void} */ private _applyToColumns; /** * Apply plugins to corner tree headers * * @param {any} cornerTree - measure index in row * @returns {void} */ applyToHeaders(cornerTree: PivotTreeNode): void; applyToRows(rowTreeChildren: Array): void; static getRowStartFromForPage(numberOfRows: number, numberOfMeasures: number, numberOfColumns: number): number; /** * Apply plugins to rows panels * * @param {Array} rowTreeChildren - measure index in row * @returns {void} */ private _applyToRows; /** * Apply plugins to value panels * * @param {Array} values - measure index in row * @param {object} rowData - row data * @param {Array} rowData.type - row types * @param {Array} rowData.metadata - metadata of current row * @param {object} indexes - parent indexes in tree * @param {number} indexes.rowIndex - current row index * @param {number} indexes.colIndex - colIndex of last row cell to calculate value cell index * @returns {void} */ applyToValues(values: Array, rowData: { type: Array; metadata: Array; }, indexes: { rowIndex: number; colIndex: number; }): void; /** * Add cell metadata to map for click/hover APIs * * @param {Metadata} metadata - cell metadata * @param {CellItem} cellItem - cell content * @param {number} rowIndex - cell row index * @param {number} colIndex - cell column index * @returns {void} */ addToMetadata(metadata: Metadata, cellItem: CellItem, rowIndex: number, colIndex: number): void; /** * Apply global config to cells * * @param {CellItem} item - cell item to update by plugin * @returns {void} */ applyGlobal(item: CellItem): void; /** * Apply plugins to rows panels * * @param {Metadata} metadata - cell metadata * @param {CellItem} item - cell item to update by plugin * @returns {void} */ apply(metadata: Metadata, item: CellItem): void; } export default PluginService;