/*! * * Wijmo Library 5.20221.857 * http://wijmo.com/ * * Copyright(c) GrapeCity, Inc. All rights reserved. * * Licensed under the GrapeCity Commercial License. * sales@wijmo.com * wijmo.com/products/wijmo-5/license/ * */ /** * {@module wijmo.react.grid} * Contains React components for the wijmo.grid module. */ /** * */ export declare var ___keepComment: any; import { ComponentBase } from '@grapecity/wijmo.react.base'; import * as React from 'react'; import * as wjcCore from '@grapecity/wijmo'; import * as wjcGrid from '@grapecity/wijmo.grid'; import * as wjcInteropGrid from '@grapecity/wijmo.interop.grid'; /** * Represents a cell template types enumeration. */ export import CellTemplateType = wjcInteropGrid.GridCellTemplateType; /** * React component for the {@link wijmo.grid.FlexGrid} control. * * The flex-grid component may contain * the following child components: * {@link wijmo.react.grid.detail.FlexGridDetail} * , {@link wijmo.react.grid.filter.FlexGridFilter} * , {@link wijmo.react.grid.immutable.ImmutabilityProvider} * , {@link wijmo.react.grid.FlexGridColumn} * , {@link wijmo.react.grid.FlexGridColumnGroup} * and {@link wijmo.react.grid.FlexGridCellTemplate}. * * The component supports all properties and events of the pure JavaScript {@link wijmo.grid.FlexGrid} control it represents. * * The component includes an initialized event that is raised when the control is initialized after it is added to the page. * You can use this event to perform further initialization in addition to setting properties in JSX. * The signature of the handler function is the same as any other Wijmo event handlers. * * The example below shows how to instantiate and initialize a * {@link wijmo.grid.FlexGrid} control in JSX: * *
<Wj.FlexGrid
* autoGenerateColumns={ false }
* columns={[
* { binding: 'name', header: 'Name' },
* { binding: 'sales', header: 'Sales', format: 'c0' },
* { binding: 'expenses', header: 'Expenses', format: 'c0' },
* { binding: 'active', header: 'Active' },
* { binding: 'date', header: 'Date' }
* ]}
* itemsSource={ this.state.data } />
*
* The code sets the autoGenerateColumns property to false, then
* sets the columns property, and finally sets the itemsSource
* property. This order is important, it prevents the grid from automatically
* generating the columns.
*/
export declare class FlexGrid extends ComponentBase {
props: {
template?: any;
children?: any;
isDisabled?: any;
tabOrder?: any;
newRowAtTop?: any;
allowAddNew?: any;
allowDelete?: any;
allowDragging?: any;
allowMerging?: any;
allowResizing?: any;
allowSorting?: any;
allowPinning?: any;
autoScroll?: any;
autoRowHeights?: any;
autoSizeMode?: any;
autoGenerateColumns?: any;
autoSearch?: any;
caseSensitiveSearch?: any;
quickAutoSize?: any;
bigCheckboxes?: any;
childItemsPath?: any;
groupHeaderFormat?: any;
headersVisibility?: any;
showSelectedHeaders?: any;
showMarquee?: any;
showPlaceholders?: any;
itemFormatter?: any;
isReadOnly?: any;
imeEnabled?: any;
mergeManager?: any;
selectionMode?: any;
showGroups?: any;
showSort?: any;
showDropDown?: any;
showAlternatingRows?: any;
showErrors?: any;
alternatingRowStep?: any;
itemValidator?: any;
validateEdits?: any;
treeIndent?: any;
itemsSource?: any;
autoClipboard?: any;
expandSelectionOnCopyPaste?: any;
frozenRows?: any;
frozenColumns?: any;
cloneFrozenCells?: any;
deferResizing?: any;
sortRowIndex?: any;
editColumnIndex?: any;
stickyHeaders?: any;
preserveSelectedState?: any;
preserveOutlineState?: any;
preserveWhiteSpace?: any;
keyActionTab?: any;
keyActionEnter?: any;
rowHeaderPath?: any;
virtualizationThreshold?: any;
anchorCursor?: any;
lazyRender?: any;
refreshOnEdit?: any;
copyHeaders?: any;
columnGroups?: any;
initialized?: any;
gotFocus?: any;
lostFocus?: any;
refreshing?: any;
refreshed?: any;
invalidInput?: any;
beginningEdit?: any;
cellEditEnded?: any;
cellEditEnding?: any;
prepareCellForEdit?: any;
formatItem?: any;
resizingColumn?: any;
resizedColumn?: any;
autoSizingColumn?: any;
autoSizedColumn?: any;
draggingColumn?: any;
draggingColumnOver?: any;
draggedColumn?: any;
sortingColumn?: any;
sortedColumn?: any;
pinningColumn?: any;
pinnedColumn?: any;
resizingRow?: any;
resizedRow?: any;
autoSizingRow?: any;
autoSizedRow?: any;
draggingRow?: any;
draggingRowOver?: any;
draggedRow?: any;
deletingRow?: any;
deletedRow?: any;
loadingRows?: any;
loadedRows?: any;
rowEditStarting?: any;
rowEditStarted?: any;
rowEditEnding?: any;
rowEditEnded?: any;
rowAdded?: any;
groupCollapsedChanging?: any;
groupCollapsedChanged?: any;
columnGroupCollapsedChanging?: any;
columnGroupCollapsedChanged?: any;
itemsSourceChanging?: any;
itemsSourceChanged?: any;
selectionChanging?: any;
selectionChanged?: any;
scrollPositionChanged?: any;
updatingView?: any;
updatedView?: any;
updatingLayout?: any;
updatedLayout?: any;
pasting?: any;
pasted?: any;
pastingCell?: any;
pastedCell?: any;
copying?: any;
copied?: any;
[key: string]: any;
};
constructor(props: any);
protected _createControl(): any;
}
/**
* React component for the {@link wijmo.grid.Column} class.
*
* The flex-grid-column component should be contained in
* a {@link wijmo.react.grid.FlexGrid} component.
*
* The flex-grid-column component may contain
* a {@link wijmo.react.grid.FlexGridCellTemplate} child component.
*
* The component supports all properties and events of the pure JavaScript {@link wijmo.grid.Column} class it represents.
*
* The component includes an initialized event that is raised when the control is initialized after it is added to the page.
* You can use this event to perform further initialization in addition to setting properties in JSX.
* The signature of the handler function is the same as any other Wijmo event handlers.
*/
export declare class FlexGridColumn extends ComponentBase {
props: {
template?: any;
children?: any;
name?: any;
dataMap?: any;
dataType?: any;
binding?: any;
sortMemberPath?: any;
format?: any;
cellTemplate?: any;
header?: any;
width?: any;
maxLength?: any;
minWidth?: any;
maxWidth?: any;
align?: any;
allowDragging?: any;
allowSorting?: any;
allowResizing?: any;
allowMerging?: any;
aggregate?: any;
isReadOnly?: any;
cssClass?: any;
cssClassAll?: any;
isContentHtml?: any;
isSelected?: any;
visible?: any;
wordWrap?: any;
multiLine?: any;
mask?: any;
inputType?: any;
isRequired?: any;
showDropDown?: any;
dataMapEditor?: any;
dropDownCssClass?: any;
quickAutoSize?: any;
editor?: any;
initialized?: any;
[key: string]: any;
};
_parentProp: string;
constructor(props: any);
protected _initParent(): void;
}
/**
* React component for the {@link wijmo.grid.ColumnGroup} class.
*
* The flex-grid-column-group component should be contained in
* one of the following components:
* {@link wijmo.react.grid.FlexGrid}
* or {@link wijmo.react.grid.FlexGridColumnGroup}.
*
* The flex-grid-column-group component may contain
* the following child components:
* {@link wijmo.react.grid.FlexGridColumnGroup}
* and {@link wijmo.react.grid.FlexGridCellTemplate}.
*
* The component supports all properties and events of the pure JavaScript {@link wijmo.grid.ColumnGroup} class it represents.
*
* The component includes an initialized event that is raised when the control is initialized after it is added to the page.
* You can use this event to perform further initialization in addition to setting properties in JSX.
* The signature of the handler function is the same as any other Wijmo event handlers.
*/
export declare class FlexGridColumnGroup extends ComponentBase {
props: {
template?: any;
children?: any;
name?: any;
dataMap?: any;
dataType?: any;
binding?: any;
sortMemberPath?: any;
format?: any;
cellTemplate?: any;
header?: any;
width?: any;
maxLength?: any;
minWidth?: any;
maxWidth?: any;
align?: any;
allowDragging?: any;
allowSorting?: any;
allowResizing?: any;
allowMerging?: any;
aggregate?: any;
isReadOnly?: any;
cssClass?: any;
cssClassAll?: any;
isContentHtml?: any;
isSelected?: any;
visible?: any;
wordWrap?: any;
multiLine?: any;
mask?: any;
inputType?: any;
isRequired?: any;
showDropDown?: any;
dataMapEditor?: any;
dropDownCssClass?: any;
quickAutoSize?: any;
editor?: any;
collapseTo?: any;
isCollapsed?: any;
initialized?: any;
[key: string]: any;
};
_parentProp: string;
constructor(props: any);
}
interface ICellTemplateInfoReact extends wjcInteropGrid.ICellTemplateInfo {
template: CellTemplateRender;
}
interface ICellRenderingInfoReact extends wjcInteropGrid.ICellRenderingInfo {
templateContext: ICellTemplateInfoReact;
}
export declare class DirectiveCellFactory extends wjcInteropGrid.DirectiveCellFactoryBase {
private readonly _renderedCells;
private _isViewUpdated;
constructor(gridComponent: ComponentBase, grid: wjcGrid.FlexGrid);
protected shouldInstantiate(cellInfo: wjcInteropGrid.ICellRenderingInfo): boolean;
protected renderTemplate(cellInfo: ICellRenderingInfoReact, initNew: boolean): void;
protected disposeTemplate(cell: HTMLElement, templateCache: wjcInteropGrid.ICellTemplateCache, templateContext: ICellTemplateInfoReact): void;
protected clearCell(cell: HTMLElement): void;
protected applyImmediately(cellInfo: ICellRenderingInfoReact): void;
protected flushPendingEvents(control: wjcCore.Control): void;
protected getEditorFocusFlag(): boolean;
protected setEditorFocusFlag(value: boolean): void;
private _renderCell;
private _addRenderedCell;
private _removeRenderedCell;
private _reRenderCells;
private _gridCmpBeforeDidUpdate;
private _gridCmpAfterDidUpdate;
private _gridCmpRendered;
private _gridViewUpdated;
}
export interface ICellTemplateContext {
row: wjcGrid.Row;
col: wjcGrid.Column;
item: any;
value: any;
values: any;
}
export declare type CellTemplateRender = (context: ICellTemplateContext) => any;
/**
* React component for the {@link FlexGrid} cell templates.
*
* The FlexGridCellTemplate component defines a template for a certain
* cell type in {@link FlexGrid}. The template element must contain a cellType property that
* specifies the {@link wijmo.react.grid.CellTemplateType}. Depending on the template's cell type,
* the FlexGridCellTemplate element must be a child
* of either {@link wijmo.react.grid.FlexGrid}
* or {@link wijmo.react.grid.FlexGridColumn} components.
*
* Column-specific cell templates must be contained in FlexGridColumn
* components, and cells that are not column-specific (like row header or top left cells)
* must be contained in the FlexGrid component.
*
* The content of cells is defined using the template render prop, which receives
* a render function that should return a virtual element tree representing the cell content.
* The function has the context parameter where the data context of each certain cell is
* passed. This is an object with the col, row, and item properties,
* which refer to the {@link Column}, {@link Row}, and Row.dataItem objects pertaining to the cell.
*
* For cell types like Group and CellEdit, an additional value
* context property containing an unformatted cell value is provided.
*
* For example, here is a
* {@link FlexGrid} control with templates for row header cells and, regular
* and column header cells of the Country column:
*
* ```html
*
*
* {context.col.header}
*
* {context.item.country}
*
* {context.item.country}
*
* {context.col.header}
*