import type { ActionsRendererOptions, ActionsSize } from '../../../types/cell-action.types'; import type { BuiltInRendererDefinition } from '../../../types/built-in-renderer.types'; import type { IconRenderer } from '../../../icons/icon-renderer'; import type { ResolvedAction } from './action-resolver'; /** * Row-scoped commands in a cell — buttons, an overflow menu, or both. * * ### Why the DOM carries only ids * A button stores its action's `id` and nothing else. The click handler * re-resolves the declaration from the column and re-runs every predicate * against current data, so an action that became invisible or disabled between * paint and click cannot be invoked from a stale button. Parking the callback * on the element would also retain it for as long as the element lives, which * in a recycled viewport is a leak with no upper bound. * * ### Why no listeners here * `GridCore` delegates one click listener on the grid root. A viewport can hold * an actions cell in every visible row; per-button listeners would be * re-attached on every scroll, sort and column reorder. Same reason the * `button` renderer and the boolean checkbox are wired that way. * * ### Repainting * Actions are resolved from **row data**, but the Virtual DOM decides whether * to repaint a cell from the column's own value. An action that mutates the row * must call `params.actions.refresh()`, which repaints the row and re-resolves * every predicate — that is what turns Archive into Unarchive on the row that * was just archived. * * @packageDocumentation */ /** Marks an action control so the delegated click handler can find it. */ export declare const CELL_ACTION_ATTR = "data-cell-action"; /** Marks the overflow trigger. Carries the column's `group`, for symmetry. */ export declare const CELL_ACTION_MENU_ATTR = "data-cell-action-menu"; /** Root class of a rendered actions cell. */ export declare const ACTIONS_ROOT_CLASS = "pg-actions"; /** * Builds one action control. * * A real `