UNPKG

ag-grid-enterprise

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

70 lines (69 loc) 3.43 kB
import type { AgBaseComponent, AgComponentSelector, AgCoreBeanCollection, BaseEvents, BaseProperties, IPropertiesService } from 'ag-stack'; import { AgComponentStub } from 'ag-stack'; import type { _AgWidgetSelectorType } from 'ag-grid-community'; type GroupItem<TBeanCollection> = AgBaseComponent<TBeanCollection> | HTMLElement; type Align = 'start' | 'end' | 'center' | 'stretch'; type GroupDirection = 'horizontal' | 'vertical'; export interface AgGroupComponentParams<TBeanCollection> { title?: string; enabled?: boolean; suppressEnabledCheckbox?: boolean; suppressOpenCloseIcons?: boolean; suppressToggleExpandOnEnableChange?: boolean; cssIdentifier?: string; items?: GroupItem<TBeanCollection>[]; alignItems?: Align; direction?: GroupDirection; onEnableChange?: (enabled: boolean) => void; onExpandedChange?: (expanded: boolean) => void; expanded?: boolean; useToggle?: boolean; suppressKeyboardNavigation?: boolean; } type AgGroupComponentEvent = 'expanded' | 'collapsed' | 'enableChange'; export declare class AgGroupComponent<TBeanCollection extends AgCoreBeanCollection<TProperties, TGlobalEvents, TCommon, TPropertiesService>, TProperties extends BaseProperties, TGlobalEvents extends BaseEvents, TCommon, TPropertiesService extends IPropertiesService<TProperties, TCommon>, TComponentSelectorType extends string> extends AgComponentStub<TBeanCollection, TProperties, TGlobalEvents, TCommon, TPropertiesService, TComponentSelectorType, AgGroupComponentEvent> { private readonly params; private items; private readonly cssIdentifier; private enabled; private expanded; private suppressEnabledCheckbox; private readonly suppressToggleExpandOnEnableChange; private alignItems; private readonly useToggle; private eToggle?; private eTitleBar?; private readonly eToolbar; private readonly cbGroupEnabled; readonly eContainer: HTMLElement; constructor(params?: AgGroupComponentParams<TBeanCollection>); postConstruct(): void; private refreshChildDisplay; isExpanded(): boolean; setAlignItems(alignment: AgGroupComponentParams<TBeanCollection>['alignItems']): this; toggleGroupExpand(expanded?: boolean, silent?: boolean): this; addItems(items: GroupItem<TBeanCollection>[]): void; prependItem(item: GroupItem<TBeanCollection>): void; addItem(item: GroupItem<TBeanCollection>): void; updateItems(newItems: GroupItem<TBeanCollection>[]): void; setDirection(direction: GroupDirection): this; private insertItem; hideItem(hide: boolean, index: number): void; getItemIndex(item: GroupItem<TBeanCollection>): number | -1; setTitle(title: string): this; addTitleBarWidget(el: Element): this; addCssClassToTitleBar(cssClass: string): void; private dispatchEnableChangeEvent; setEnabled(enabled: boolean, skipToggle?: boolean, skipExpand?: boolean): this; isEnabled(): boolean; onEnableChange(callbackFn: (enabled: boolean) => void): this; onExpandedChange(callbackFn: (expanded: boolean) => void): this; hideEnabledCheckbox(hide: boolean): this; hideOpenCloseIcons(hide: boolean): this; private refreshDisabledStyles; private setupTitleBar; private createDefaultTitleBar; private createToggleTitleBar; } export declare const AgGroupComponentSelector: AgComponentSelector<_AgWidgetSelectorType>; export {};