UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

615 lines (420 loc) 17.6 kB
import { GridColumnDataType } from './grid-column-data-type'; import { ColumnPinningPosition } from './column-pinning-position'; import { IgcFilteringOperand } from './igc-filtering-operand'; import { IgcSortingStrategy } from './igc-sorting-strategy'; import { IgcSummaryTemplateContext } from './igc-summary-template-context'; import { IgcRenderFunction } from './common'; import { IgcCellTemplateContext } from './igc-cell-template-context'; import { IgcColumnTemplateContext } from './igc-column-template-context'; import { IgcColumnPipeArgs } from './igc-column-pipe-args'; import { IgcColumnEditorOptions } from './igc-column-editor-options'; import { IgcFilteringExpressionsTree } from './igc-filtering-expressions-tree'; import { EventEmitterMixin, LitElement, Constructor, AbstractConstructor } from './common'; /* jsonAPIManageCollectionInMarkup */ /* blazorElement */ /* contentParent: ColumnGroup */ /* wcElementTag: igc-column */ /* additionalIdentifier: Field */ /* blazorIndirectRender */ /** * **Ignite UI for Angular Column** - * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid#columns-configuration) * The Ignite UI Column is used within an `igx-grid` element to define what data the column will show. Features such as sorting, * filtering & editing are enabled at the column level. You can also provide a template containing custom content inside * the column using `ng-template` which will be used for all cells within the column. */ export declare class IgcColumnComponent extends EventEmitterMixin<IgcColumnComponentEventMap, Constructor<LitElement>>(LitElement) { /* blazorSuppress */ static readonly tagName: string; /* blazorSuppress */ static register(): void; /** * Sets/gets the `field` value. */ public set field(value: string); public get field(): string; /** * Sets/gets whether to merge cells in this column. */ public set merge(value: boolean); public get merge(): boolean; /** * Sets/gets the `header` value. */ public set header(value: string); public get header(): string; /** * Sets/gets the `title` value. */ public set title(value: string); public get title(): string; /** * Sets/gets whether the column is sortable. * Default value is `false`. */ public set sortable(value: boolean); public get sortable(): boolean; /** * Returns if the column is selectable. */ public set selectable(value: boolean); public get selectable(): boolean; /** * Sets/gets whether the column is groupable. * Default value is `false`. */ public set groupable(value: boolean); public get groupable(): boolean; /** * Gets whether the column is editable. * Default value is `false`. */ public set editable(value: boolean); public get editable(): boolean; /** * Sets/gets whether the column is filterable. * Default value is `true`. */ public set filterable(value: boolean); public get filterable(): boolean; /** * Sets/gets whether the column is resizable. * Default value is `false`. */ public set resizable(value: boolean); public get resizable(): boolean; /** * Sets/gets whether the column header is included in autosize logic. * Useful when template for a column header is sized based on parent, for example a default `div`. * Default value is `false`. */ public set autosizeHeader(value: boolean); public get autosizeHeader(): boolean; /** * Gets a value indicating whether the summary for the column is enabled. */ public set hasSummary(value: boolean); public get hasSummary(): boolean; /** * Gets whether the column is hidden. */ public set hidden(value: boolean); public get hidden(): boolean; /** * Returns if the column is selected. */ public set selected(value: boolean); public get selected(): boolean; /** * Gets whether the hiding is disabled. */ public set disableHiding(value: boolean); public get disableHiding(): boolean; /** * Gets whether the pinning is disabled. */ public set disablePinning(value: boolean); public get disablePinning(): boolean; /** * Gets the `width` of the column. */ public set width(value: string); public get width(): string; /** * Sets/gets the maximum `width` of the column. */ public set maxWidth(value: string); public get maxWidth(): string; /** * Sets/gets the class selector of the column header. */ public set headerClasses(value: string); public get headerClasses(): string; /** * Sets conditional style properties on the column header. * Similar to `ngStyle` it accepts an object literal where the keys are * the style properties and the value is the expression to be evaluated. */ public set headerStyles(value: any); public get headerStyles(): any; /** * Sets/gets the class selector of the column group header. */ public set headerGroupClasses(value: string); public get headerGroupClasses(): string; /** * Sets conditional style properties on the column header group wrapper. * Similar to `ngStyle` it accepts an object literal where the keys are * the style properties and the value is the expression to be evaluated. */ public set headerGroupStyles(value: any); public get headerGroupStyles(): any; /* treatAsRef */ /** * Sets a conditional class selector of the column cells. * Accepts an object literal, containing key-value pairs, * where the key is the name of the CSS class, while the * value is either a callback function that returns a boolean, * or boolean, like so: */ public set cellClasses(value: any); public get cellClasses(): any; /* treatAsRef */ /** * Sets conditional style properties on the column cells. * Similar to `ngStyle` it accepts an object literal where the keys are * the style properties and the value is the expression to be evaluated. * As with `cellClasses` it accepts a callback function. */ public set cellStyles(value: any); public get cellStyles(): any; /* blazorAlternateType: CellValueFormatterEventHandler */ /* blazorOnlyScript */ /** * Applies display format to cell values in the column. Does not modify the underlying data. */ public set formatter(value: any); public get formatter(): any; /* blazorAlternateType: SummaryValueFormatterEventHandler */ /* blazorOnlyScript */ /* forceCastDelegate */ /** * The summaryFormatter is used to format the display of the column summaries. * In this example, we check to see if the column name is OrderDate, and then provide a method as the summaryFormatter * to change the locale for the dates to 'fr-FR'. The summaries with the count key are skipped so they are displayed as numbers. */ public set summaryFormatter(value: any); public get summaryFormatter(): any; /** * Sets/gets whether the column filtering should be case sensitive. * Default value is `true`. */ public set filteringIgnoreCase(value: boolean); public get filteringIgnoreCase(): boolean; /** * Sets/gets whether the column sorting should be case sensitive. * Default value is `true`. */ public set sortingIgnoreCase(value: boolean); public get sortingIgnoreCase(): boolean; /** * Sets/gets whether the column is `searchable`. * Default value is `true`. */ public set searchable(value: boolean); public get searchable(): boolean; /** * Sets/gets the data type of the column values. * Default value is `string`. */ public set dataType(value: GridColumnDataType); public get dataType(): GridColumnDataType; /** * Row index where the current field should end. * The amount of rows between rowStart and rowEnd will determine the amount of spanning rows to that field */ public set rowEnd(value: number); public get rowEnd(): number; /** * Column index where the current field should end. * The amount of columns between colStart and colEnd will determine the amount of spanning columns to that field */ public set colEnd(value: number); public get colEnd(): number; /** * Row index from which the field is starting. */ public set rowStart(value: number); public get rowStart(): number; /** * Column index from which the field is starting. */ public set colStart(value: number); public get colStart(): number; /** * Sets/gets custom properties provided in additional template context. */ public set additionalTemplateContext(value: any); public get additionalTemplateContext(): any; /** * Sets/gets the minimum `width` of the column. * Default value is `88`; */ public set minWidth(value: string); public get minWidth(): string; /** * Gets the column index. */ public get index(): number; /* mustCoerceToInt */ /** * Gets the pinning position of the column. */ public set pinningPosition(value: ColumnPinningPosition); public get pinningPosition(): ColumnPinningPosition; /** * Gets whether the column is `pinned`. */ public set pinned(value: boolean); public get pinned(): boolean; /* treatAsRef */ /** * Gets the column `summaries`. */ public set summaries(value: any); public get summaries(): any; /** * Sets/gets the summary operands to exclude from display. * Accepts an array of string keys representing the summary types to disable, such as 'Min', 'Max', 'Count' etc. */ public set disabledSummaries(value: string[]); public get disabledSummaries(): string[]; /** * Gets the column `filters`. */ public set filters(value: IgcFilteringOperand); public get filters(): IgcFilteringOperand; /** * Gets the column `sortStrategy`. */ public set sortStrategy(value: IgcSortingStrategy); public get sortStrategy(): IgcSortingStrategy; /** * Returns a reference to the `summaryTemplate`. */ public set summaryTemplate(value: IgcRenderFunction<IgcSummaryTemplateContext>); public get summaryTemplate(): IgcRenderFunction<IgcSummaryTemplateContext>; /** * Returns a reference to the `bodyTemplate`. */ public set bodyTemplate(value: IgcRenderFunction<IgcCellTemplateContext>); public get bodyTemplate(): IgcRenderFunction<IgcCellTemplateContext>; /** * Returns a reference to the header template. */ public set headerTemplate(value: IgcRenderFunction<IgcColumnTemplateContext>); public get headerTemplate(): IgcRenderFunction<IgcColumnTemplateContext>; /** * Returns a reference to the inline editor template. */ public set inlineEditorTemplate(value: IgcRenderFunction<IgcCellTemplateContext>); public get inlineEditorTemplate(): IgcRenderFunction<IgcCellTemplateContext>; /** * Returns a reference to the validation error template. */ public set errorTemplate(value: IgcRenderFunction<IgcCellTemplateContext>); public get errorTemplate(): IgcRenderFunction<IgcCellTemplateContext>; /** * Returns a reference to the `filterCellTemplate`. */ public set filterCellTemplate(value: IgcRenderFunction<IgcColumnTemplateContext>); public get filterCellTemplate(): IgcRenderFunction<IgcColumnTemplateContext>; /** * Gets the column visible index. * If the column is not visible, returns `-1`. */ public get visibleIndex(): number; /* blazorCSSuppress - Blazor doesn't carry over the ColumnType interface + should translate as static bool value */ /** * Returns a boolean indicating if the column is a `ColumnGroup`. */ public get columnGroup(): boolean; /* blazorCSSuppress - Blazor doesn't carry over the ColumnType interface + should translate as static bool value */ /** * Returns a boolean indicating if the column is a `ColumnLayout` for multi-row layout. */ public get columnLayout(): boolean; /** * Returns a boolean indicating if the column is a child of a `ColumnLayout` for multi-row layout. */ public get columnLayoutChild(): boolean; /** * A list containing all the child columns under this column (if any). * Empty without children or if this column is not Group or Layout. */ public get childColumns(): IgcColumnComponent[]; /** * Returns the level of the column in a column group. * Returns `0` if the column doesn't have a `parent`. */ public get level(): number; /** * Indicates whether the column will be visible when its parent is collapsed. */ public set visibleWhenCollapsed(value: boolean); public get visibleWhenCollapsed(): boolean; /* mustSetInCodePlatforms: WebComponents;Blazor;React */ /** */ public set pipeArgs(value: IgcColumnPipeArgs); public get pipeArgs(): IgcColumnPipeArgs; /** * Pass optional properties for the default column editors. */ public set editorOptions(value: IgcColumnEditorOptions); public get editorOptions(): IgcColumnEditorOptions; /** * Returns the filteringExpressionsTree of the column. */ public get filteringExpressionsTree(): IgcFilteringExpressionsTree; /* alternateName: parentColumn */ /* blazorAlternateType: object */ // We need that because Blazor cannot handle the type correctly. /** * Sets/gets the parent column. */ public set parent(value: IgcColumnComponent); public get parent(): IgcColumnComponent; /** * Returns a reference to the top level parent column. */ public get topLevelParent(): IgcColumnComponent; /** * Pins the column in the specified position at the provided index in that pinned area. * Defaults to index `0` if not provided, or to the initial index in the pinned area. * Returns `true` if the column is successfully pinned. Returns `false` if the column cannot be pinned. * Column cannot be pinned if: * - Is already pinned * - index argument is out of range */ public pin(index?: number, pinningPosition?: ColumnPinningPosition): boolean; /** * Unpins the column and place it at the provided index in the unpinned area. * Defaults to index `0` if not provided, or to the initial index in the unpinned area. * Returns `true` if the column is successfully unpinned. Returns `false` if the column cannot be unpinned. * Column cannot be unpinned if: * - Is already unpinned * - index argument is out of range */ public unpin(index?: number): boolean; /** * Moves a column to the specified visible index. * If passed index is invalid, or if column would receive a different visible index after moving, moving is not performed. * If passed index would move the column to a different column group. moving is not performed. */ public move(index: number): void; /** * Autosize the column to the longest currently visible cell value, including the header cell. * @param byHeaderOnly Set if column should be autosized based only on the header content. */ public autosize(byHeaderOnly?: boolean): void; } export declare interface IgcColumnComponentEventMap { /** * Emitted when the column is hidden or shown. */ hiddenChange: CustomEvent<boolean>; /** * Emitted when the column expanded or collapsed. */ expandedChange: CustomEvent<boolean>; /** * Emitted when the column width changes. */ widthChange: CustomEvent<string>; /** * Emitted when the column is pinned/unpinned. */ pinnedChange: CustomEvent<boolean>; }