/*!
*
* Wijmo Library 5.20251.40
* https://developer.mescius.com/wijmo
*
* Copyright(c) MESCIUS inc. All rights reserved.
*
* Licensed under the End-User License Agreement For MESCIUS Wijmo Software.
* us.sales@mescius.com
* https://developer.mescius.com/wijmo/licensing
*
*/
/**
* {@module wijmo.react.grid.multirow}
* Contains React components for the wijmo.grid.multirow module.
*/
/**
*
*/
export declare var ___keepComment: any;
import { WjRef, WjForwardRefExoticComponent } from 'wijmo/wijmo.react.base';
import * as wjcCore from 'wijmo/wijmo';
import * as wjcGridMultirow from 'wijmo/wijmo.grid.multirow';
import * as wjcGrid from 'wijmo/wijmo.grid';
import * as wjGrid from 'wijmo/wijmo.react.grid';
export declare type MultiRowInputs = wjGrid.FlexGridInputs & {
centerHeadersVertically?: boolean;
collapsedHeaders?: boolean | null;
headerLayoutDefinition?: any[] | null;
layoutDefinition?: any[];
multiRowGroupHeaders?: boolean;
recordViewRange?: wjcGrid.CellRange;
showHeaderCollapseButton?: boolean;
};
export declare type MultiRowEvents = wjGrid.FlexGridEvents & {
collapsedHeadersChanged?: wjcCore.IEventHandler;
collapsedHeadersChanging?: wjcCore.IEventHandler;
};
export declare const MultiRowMeta: {
inputs: string[];
events: string[];
};
export declare type MultiRowProps = MultiRowInputs & MultiRowEvents;
export declare type MultiRowRef = WjRef;
/**
* React component for the {@link wijmo.grid.multirow.MultiRow} control.
*
* The multi-row component may contain
* the following child components:
* {@link wijmo.react.grid.multirow.MultiRowCellGroup}
* and {@link wijmo.react.grid.multirow.MultiRowCellTemplate}.
*
* The component supports all properties and events of the pure JavaScript {@link wijmo.grid.multirow.MultiRow} 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.
*/
export declare const MultiRow: WjForwardRefExoticComponent;
export declare type MultiRowCellInputs = wjGrid.FlexGridColumnInputs & {
col?: number;
colspan?: number;
row?: number;
rowspan?: number;
children?: any;
};
export declare type MultiRowCellEvents = wjGrid.FlexGridColumnEvents & {};
export declare const MultiRowCellMeta: {
inputs: string[];
events: string[];
};
export declare type MultiRowCellProps = MultiRowCellInputs & MultiRowCellEvents;
export declare type MultiRowCellRef = WjRef;
/**
* React component for the {@link wijmo.grid.multirow.MultiRowCell} class.
*
* The multi-row-cell component should be contained in
* a {@link wijmo.react.grid.multirow.MultiRowCellGroup} component.
*
* The multi-row-cell component may contain
* a {@link wijmo.react.grid.multirow.MultiRowCellTemplate} child component.
*
* The component supports all properties and events of the pure JavaScript {@link wijmo.grid.multirow.MultiRowCell} 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 const MultiRowCell: WjForwardRefExoticComponent;
export declare type MultiRowCellGroupInputs = MultiRowCellInputs & {};
export declare type MultiRowCellGroupEvents = MultiRowCellEvents & {};
export declare const MultiRowCellGroupMeta: {
inputs: string[];
events: string[];
};
export declare type MultiRowCellGroupProps = MultiRowCellGroupInputs & MultiRowCellGroupEvents;
export declare type MultiRowCellGroupRef = WjRef;
/**
* React component for the {@link wijmo.grid.multirow.MultiRowCellGroup} class.
*
* The multi-row-cell-group component should be contained in
* a {@link wijmo.react.grid.multirow.MultiRow} component.
*
* The multi-row-cell-group component may contain
* a {@link wijmo.react.grid.multirow.MultiRowCell} child component.
*
* The component supports all properties and events of the pure JavaScript {@link wijmo.grid.multirow.MultiRowCellGroup} 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 const MultiRowCellGroup: WjForwardRefExoticComponent;
export declare type MultiRowCellTemplateInputs = wjGrid.FlexGridCellTemplateInputs & {
template?: MultiRowCellTemplateRender;
};
export declare type MultiRowCellTemplateEvents = wjGrid.FlexGridCellTemplateEvents & {};
export declare const MultiRowCellTemplateMeta: {
inputs: string[];
events: any[];
};
export declare type MultiRowCellTemplateProps = MultiRowCellTemplateInputs & MultiRowCellTemplateEvents;
export declare type MultiRowCellTemplateRef = WjRef;
/**
* React component for the {@link MultiRow} cell templates.
*
* The MultiRowCellTemplate component defines a template for a certain
* cell type in {@link MultiRow}. The template element must contain a cellType property that
* specifies the {@link wijmo.react.grid.CellTemplateType}. Depending on the template's cell type,
* the MultiRowCellTemplate element must be a child
* of either {@link wijmo.react.grid.multirow.MultiRow}
* or {@link wijmo.react.grid.multirow.MultiRowCell} components.
*
* Column-specific cell templates must be contained in MultiRowCell
* components, and cells that are not column-specific (like row header or top left cells)
* must be contained in the MultiRow component.
*
* The content of cells is defined using the templaterender 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 MultiRowCell}, {@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 MultiRow} control with templates for row header cells and, regular
* and column header cells of the Country column:
*
* ```html
*
*
* context.row.index + 1 } />
* '...' } />
*
*
*
* {
* return
*
* {context.col.header}
*
* }
* }
* />
* {
* return
*
* {context.item.country}
*
* } }
* />
*
*
*
*
* ```
*
* The MultiRowCellTemplate directive supports the following properties:
*
*
*
cellType
*
* The CellTemplateType value defining the type of cell to which the template is applied.
*
*
autoSizeRows
*
* Indicates whether the cell template will increase grid's default row height
* to accomodate cells content. Defaults to true.
*
*
cellOverflow
*
* Defines the style.overflow property value for cells.
*
*
forceFullEdit
*
* For cell edit templates, indicates whether cell editing forcibly starts in full edit mode,
* regardless of how the editing was initiated. In full edit mode pressing cursor keys don't finish editing.
* Defaults to true.
*
*
*
* The cellType attribute takes any of the following enumerated values:
*
* Cell
*
* Defines a regular (data) cell template. Must be a child of the {@link wijmo.react.grid.multirow.MultiRowCell} component.
* For example, this cell template shows flags in the cells of Country column:
*
* ```html
*
* {
* return
*
* {context.item.country}
*
* }
* }
* />
*
* ```
*
* CellEdit
*
* Defines a template for a cell in edit mode. Must be a child of the {@link wijmo.react.grid.multirow.MultiRowCell} component.
* This cell type has an additional context.value property. It contains the
* original cell value before editing, and the updated value after editing.
*
* For example, here is a template that uses the Wijmo {@link InputNumber} control as an editor
* for the "Sales" column:
* ```html
*
* {
* return
* context.value = inpNum.value
* } />
* }
* }
* />
*
* ```
*
* ColumnHeader
*
* Defines a template for a column header cell. Must be a child of the {@link wijmo.react.grid.multirow.MultiRowCell} component.
* For example, this template adds an image to the header of the "Country" column:
*
* ```html
*
* {
* return
*
* {context.col.header}
*
* }
* }
* />
*
* ```
*
* RowHeader
*
* Defines a template for a row header cell. Must be a child of the {@link wijmo.react.grid.multirow.MultiRow} component.
* For example, this template shows row indices in the row headers:
*
* ```html
*
* context.row.index / context.row.grid.rowsPerItem + 1 } />
*
* ```
*
* Note that this template is applied to a row header cell, even if it is in a row that is
* in edit mode. In order to provide an edit-mode version of a row header cell with alternate
* content, define the RowHeaderEdit template.
*
* RowHeaderEdit
*
* Defines a template for a row header cell in edit mode. Must be a child of the
* {@link wijmo.react.grid.multirow.MultiRow} component. For example, this template shows dots in the header
* of rows being edited:
*
* ```html
*
* '...' } />
*
* ```
*
* Use the following RowHeaderEdit template to add the standard edit-mode indicator to cells where
* the RowHeader template applies:
*
* ```html
*
* '\u270e\ufe0e' } />
*
* ```
*
* TopLeft
*
* Defines a template for the top left cell. Must be a child of the {@link wijmo.react.grid.multirow.MultiRow} component.
* For example, this template shows a down/right glyph in the top-left cell of the grid:
*
* ```html
*
* {
* return
* } }
* />
*
* ```
*
* GroupHeader
*
* Defines a template for a group header cell in a {@link GroupRow}. Must be a child of
* the {@link wijmo.react.grid.multirow.MultiRowCell} component.
*
* The context.row property contains an instance of the GroupRow class. If the grouping comes
* from {@link CollectionView}, the context.item property references the {@link CollectionViewGroup} object.
*
* For example, this template uses a checkbox element as an expand/collapse toggle:
*
* ```html
*
* {
* return
*
* context.row.isCollapsed = e.target.checked as boolean
* } />
* {context.item.name} ({context.item.items.length} items)
*
* }
* }
* />
*
* ```
*
* Group
*
* Defines a template for a regular cell (not a group header) in a {@link GroupRow}. Must be a child of the
* {@link wijmo.react.grid.multirow.MultiRowCell} component. This cell type has an additional context.value
* property. In cases where columns have the aggregate property specified, it contains the unformatted
* aggregate value.
*
* For example, this template shows aggregate's value and kind for group row cells in the "Sales"
* column:
*
* ```html
*
* {
* return
* Average: {wjcCore.Globalize.formatNumber(context.value, 'N0')}
*
* }
* }
* />
*
* ```
*
* NewCellTemplate
*
* Defines a cell in a new row template. Must be a child of the {@link wijmo.react.grid.multirow.MultiRowCell} component.
* Note that the context.item property is undefined for this type of a cell.
* For example, this cell template shows a placeholder in the Date column's cell in the "new row" item:
*
* ```html
*
* 'Enter a date here' } />
*
* ```
*/
export declare const MultiRowCellTemplate: WjForwardRefExoticComponent;
export declare class ReactMultiRowCellTemplate extends wjGrid.ReactFlexGridCellTemplate {
}
export interface IMultiRowCellTemplateContext extends wjGrid.ICellTemplateContext {
col: wjcGridMultirow.MultiRowCell;
row: wjcGridMultirow._MultiRow | wjcGridMultirow._MultiGroupRow;
}
export declare type MultiRowCellTemplateRender = (context: IMultiRowCellTemplateContext) => any;