UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

75 lines (74 loc) 2.22 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Observable } from 'rxjs'; import { ColumnBase } from '../columns/column-base'; /** * The type of the [`resizable`](slug:api_grid_gridcomponent#toc-resizable) property. [See example](slug:resizing_columns_grid#constrained-mode) * * The possible values are: * * * `constrained` - Adjacent columns resize only up to their outer borders. * * `unconstrained` - Columns are resized relative to the entire component. * * ```html * <kendo-grid [kendoGridBinding]="gridData" [height]="370" resizable="constrained"> * <kendo-grid-column field="ProductID" title="ID"> </kendo-grid-column> * ... * </kendo-grid> * ``` */ export type ResizeMode = 'unconstrained' | 'constrained'; /** * The returned type of the [`columnResize`](slug:api_grid_gridcomponent#toc-columnresize) event. */ export interface ColumnResizeArgs { /** * The resized column. */ column: ColumnBase; /** * The new width (in pixels) of the column. */ newWidth?: number; /** * The actual width (in pixels) of the column prior to resizing. */ oldWidth: number; } /** * @hidden */ export type ActionType = 'start' | 'resizeColumn' | 'resizeTable' | 'end' | 'autoFitComplete' | 'triggerAutoFit'; /** * @hidden */ export interface ColumnResizeAction { columns: Array<ColumnBase>; delta?: number; deltaPercent?: number; locked?: boolean; resizedColumns?: Array<ColumnResizeArgs>; type: ActionType; widths?: Array<Array<number>>; } /** * @hidden */ export interface AutoFitInfo { column: ColumnBase; headerIndex: number; index: number; isLastInSpan: boolean; isParentSpan: boolean; level: number; } /** * @hidden */ export type AutoFitObservable = Observable<Array<number>>; /** * @hidden */ export type AutoFitFn = (columns: Array<AutoFitInfo>) => AutoFitObservable;