igniteui-react-grids
Version:
Ignite UI React grid components.
498 lines (493 loc) • 17.8 kB
TypeScript
import * as React from 'react';
import { CellContentHorizontalAlignment } from "./CellContentHorizontalAlignment";
import { CellContentVerticalAlignment } from "./CellContentVerticalAlignment";
import { TextCellLineBreakMode } from "./TextCellLineBreakMode";
import { IgrDataBindingEventArgs } from "./igr-data-binding-event-args";
import { IgrCellStyleRequestedEventArgs } from "./igr-cell-style-requested-event-args";
import { CellPropertyAnimationType } from "./CellPropertyAnimationType";
import { DefinitionBase } from "./DefinitionBase";
import { IgrGridConditionalStyleCollection } from './igr-grid-conditional-style-collection';
import { IgrGridConditionalStyle } from './igr-grid-conditional-style';
import { ContentChildrenManager } from "igniteui-react-core";
/**
* Base class for various definition types for the grid.
*/
export declare abstract class IgrDefinitionBase<P extends IIgrDefinitionBaseProps = IIgrDefinitionBaseProps> extends React.Component<P, {}> {
protected createImplementation(): DefinitionBase;
protected _implementation: any;
protected mounted: boolean;
get nativeElement(): HTMLElement;
/**
* @hidden
*/
get i(): DefinitionBase; /**
* @hidden
*/
static _createFromInternal(internal: any): IgrDefinitionBase;
constructor(props: P);
componentDidMount(): void;
protected onImplementationCreated(): void;
protected _contentChildrenManager: ContentChildrenManager;
protected _initializeAdapters(): void;
protected _updateAdapters(): void;
protected __p: string;
protected _hasUserValues: Set<string>;
protected get hasUserValues(): Set<string>;
protected __m(propertyName: string): void;
protected _stylingContainer: any;
protected _stylingParent: any;
protected _inStyling: boolean;
protected _styling(container: any, component: any, parent?: any): void;
private _renderer;
private _provideRenderer;
shouldComponentUpdate(nextProps: any, nextState: any): boolean;
render(): React.DetailedReactHTMLElement<{
children: any[];
}, HTMLElement>;
/**
* Gets or sets the background color to use.
*/
get background(): string;
set background(v: string);
private _conditionalStyles;
private _actualConditionalStyles;
get actualConditionalStyles(): IgrGridConditionalStyle[];
private _contentConditionalStyles;
get contentConditionalStyles(): IgrGridConditionalStyle[];
private _conditionalStylesAdapter;
/**
* Gets the style key information to use for judging when a property will be set later by a style
*/
get conditionalStyles(): IgrGridConditionalStyleCollection;
/**
* Gets or sets the background color to use.
*/
get border(): string;
set border(v: string);
/**
* Gets or sets the background color to use.
*/
get activationBorder(): string;
set activationBorder(v: string);
/**
* Gets or sets the error border color to use.
*/
get errorBorder(): string;
set errorBorder(v: string);
/**
* Gets the actual border color that will be used.
*/
get actualBorder(): string;
set actualBorder(v: string);
/**
* Gets or sets the amount of left border to use for the cell content for this column.
*/
get borderLeftWidth(): number;
set borderLeftWidth(v: number);
/**
* Gets or sets the amount of top border to use for the cell content for this column.
*/
get borderTopWidth(): number;
set borderTopWidth(v: number);
/**
* Gets or sets the amount of right border to use for the cell content of this column.
*/
get borderRightWidth(): number;
set borderRightWidth(v: number);
/**
* Gets or sets the amount of bottom border to use for the cell content of this column.
*/
get borderBottomWidth(): number;
set borderBottomWidth(v: number);
/**
* Gets or sets the amount of left activation border to use for the cell content for this column.
*/
get activationBorderLeftWidth(): number;
set activationBorderLeftWidth(v: number);
/**
* Gets or sets the amount of top activation border to use for the cell content for this column.
*/
get activationBorderTopWidth(): number;
set activationBorderTopWidth(v: number);
/**
* Gets or sets the amount of right activation border to use for the cell content of this column.
*/
get activationBorderRightWidth(): number;
set activationBorderRightWidth(v: number);
/**
* Gets or sets the amount of bottom activation border to use for the cell content of this column.
*/
get activationBorderBottomWidth(): number;
set activationBorderBottomWidth(v: number);
get errorBorderLeftWidth(): number;
set errorBorderLeftWidth(v: number);
get errorBorderTopWidth(): number;
set errorBorderTopWidth(v: number);
get errorBorderRightWidth(): number;
set errorBorderRightWidth(v: number);
get errorBorderBottomWidth(): number;
set errorBorderBottomWidth(v: number);
/**
* Gets the actual background color that will be used.
*/
get actualBackground(): string;
set actualBackground(v: string);
/**
* Gets the actual background color that will be used.
*/
get actualActivationBorder(): string;
set actualActivationBorder(v: string);
/**
* Gets the actual error border color that will be used.
*/
get actualErrorBorder(): string;
set actualErrorBorder(v: string);
/**
* Gets or sets the background color for content that sticks to the top of the grid.
*/
get stickyRowBackground(): string;
set stickyRowBackground(v: string);
/**
* Gets the actual background color for content that sticks to the top of the grid.
*/
get actualStickyRowBackground(): string;
set actualStickyRowBackground(v: string);
/**
* Gets or sets the background color for cells belonging to rows marked as pinned.
*/
get pinnedRowBackground(): string;
set pinnedRowBackground(v: string);
/**
* Gets the actual background color for cells belonging to rows marked as pinned.
*/
get actualPinnedRowBackground(): string;
set actualPinnedRowBackground(v: string);
/**
* Gets or sets the color for the last row in the sticky row area.
*/
get lastStickyRowBackground(): string;
set lastStickyRowBackground(v: string);
/**
* Gets the actual color for the last row in the sticky row area.
*/
get actualLastStickyRowBackground(): string;
set actualLastStickyRowBackground(v: string);
/**
* Gets or sets the opacity of the content.
*/
get contentOpacity(): number;
set contentOpacity(v: number);
/**
* Gets or sets the horizontal alignment to use for the cell content.
*/
get horizontalAlignment(): CellContentHorizontalAlignment;
set horizontalAlignment(v: CellContentHorizontalAlignment);
/**
* Gets or sets the vertical alignment to use for the cell content.
*/
get verticalAlignment(): CellContentVerticalAlignment;
set verticalAlignment(v: CellContentVerticalAlignment);
/**
* Gets or sets the line breaking mode to use if text is present in the cell.
*/
get lineBreakMode(): TextCellLineBreakMode;
set lineBreakMode(v: TextCellLineBreakMode);
/**
* Gets the actual line break mode which will be used if text is present in the cell.
*/
get actualLineBreakMode(): TextCellLineBreakMode;
set actualLineBreakMode(v: TextCellLineBreakMode);
/**
* Gets or sets the color to use for displaying text.
*/
get textColor(): string;
set textColor(v: string);
/**
* Gets the actual color used for displaying text.
*/
get actualTextColor(): string;
set actualTextColor(v: string);
/**
* Gets or sets whether the bar is supported.
*/
get isBarSupported(): boolean;
set isBarSupported(v: boolean);
/**
* Gets or sets the color to use for value bars.
*/
get barBackground(): string;
set barBackground(v: string);
/**
* Gets the actual color used for value bars.
*/
get actualBarBackground(): string;
set actualBarBackground(v: string);
/**
* Gets or sets the Outline color to use for value bars.
*/
get barOutline(): string;
set barOutline(v: string);
/**
* Gets the actual Outline color used for value bars.
*/
get actualBarOutline(): string;
set actualBarOutline(v: string);
/**
* Gets or sets the stroke thickness to use for value bars.
*/
get barStrokeThickness(): number;
set barStrokeThickness(v: number);
/**
* Gets the actual stroke thickness used for value bars.
*/
get actualBarStrokeThickness(): number;
set actualBarStrokeThickness(v: number);
/**
* Gets or sets the stroke thickness to use for value bars.
*/
get barCornerRadius(): number;
set barCornerRadius(v: number);
/**
* Gets the actual stroke thickness used for value bars.
*/
get actualBarCornerRadius(): number;
set actualBarCornerRadius(v: number);
/**
* Gets or sets the color to use for displaying text.
*/
get pinnedRowOpacity(): number;
set pinnedRowOpacity(v: number);
/**
* Gets or sets the color to use for displaying text.
*/
get actualPinnedRowOpacity(): number;
set actualPinnedRowOpacity(v: number);
get textStyle(): string;
set textStyle(v: string);
get isBarRequired(): boolean;
findByName(name: string): any;
transitionStyleOut(style: IgrGridConditionalStyle): void;
transitionStyleIn(style: IgrGridConditionalStyle): void;
isStyleTransitioningOut(style: IgrGridConditionalStyle): boolean;
setNamedValue(valueName: string, animationType: CellPropertyAnimationType, value: any): void;
/**
* Returns if this definition has named value.
*/
hasNamedValues(): boolean;
/**
* Returns if this definition has a named value with a given name.
* @param valueName * The named value name to check for.
*/
hasNamedValue(valueName: string): boolean;
/**
* Removes the named value from this definition by name.
* @param valueName * The named value name to remove.
*/
removeNamedValue(valueName: string): void;
/**
* Gets the value for a named value from this definition.
* @param valueName * The named value name to check for.
*/
getNamedValue(valueName: string): any;
private _dataBinding;
private _dataBinding_wrapped;
/**
* Called when a cell is data binding.
*/
get dataBinding(): (s: IgrDefinitionBase, e: IgrDataBindingEventArgs) => void;
set dataBinding(ev: (s: IgrDefinitionBase, e: IgrDataBindingEventArgs) => void);
private _dataBound;
private _dataBound_wrapped;
/**
* Called when a cell has been data bound.
*/
get dataBound(): (s: IgrDefinitionBase, e: IgrDataBindingEventArgs) => void;
set dataBound(ev: (s: IgrDefinitionBase, e: IgrDataBindingEventArgs) => void);
private _cellStyleKeyRequested;
private _cellStyleKeyRequested_wrapped;
/**
* Called when the style key for a cell is needed. Used for recycling the cell.
*/
get cellStyleKeyRequested(): (s: IgrDefinitionBase, e: IgrCellStyleRequestedEventArgs) => void;
set cellStyleKeyRequested(ev: (s: IgrDefinitionBase, e: IgrCellStyleRequestedEventArgs) => void);
}
export interface IIgrDefinitionBaseProps {
children?: React.ReactNode;
/**
* Gets or sets the background color to use.
*/
background?: string;
/**
* Gets or sets the background color to use.
*/
border?: string;
/**
* Gets or sets the background color to use.
*/
activationBorder?: string;
/**
* Gets or sets the error border color to use.
*/
errorBorder?: string;
/**
* Gets the actual border color that will be used.
*/
actualBorder?: string;
/**
* Gets or sets the amount of left border to use for the cell content for this column.
*/
borderLeftWidth?: number | string;
/**
* Gets or sets the amount of top border to use for the cell content for this column.
*/
borderTopWidth?: number | string;
/**
* Gets or sets the amount of right border to use for the cell content of this column.
*/
borderRightWidth?: number | string;
/**
* Gets or sets the amount of bottom border to use for the cell content of this column.
*/
borderBottomWidth?: number | string;
/**
* Gets or sets the amount of left activation border to use for the cell content for this column.
*/
activationBorderLeftWidth?: number | string;
/**
* Gets or sets the amount of top activation border to use for the cell content for this column.
*/
activationBorderTopWidth?: number | string;
/**
* Gets or sets the amount of right activation border to use for the cell content of this column.
*/
activationBorderRightWidth?: number | string;
/**
* Gets or sets the amount of bottom activation border to use for the cell content of this column.
*/
activationBorderBottomWidth?: number | string;
errorBorderLeftWidth?: number | string;
errorBorderTopWidth?: number | string;
errorBorderRightWidth?: number | string;
errorBorderBottomWidth?: number | string;
/**
* Gets the actual background color that will be used.
*/
actualBackground?: string;
/**
* Gets the actual background color that will be used.
*/
actualActivationBorder?: string;
/**
* Gets the actual error border color that will be used.
*/
actualErrorBorder?: string;
/**
* Gets or sets the background color for content that sticks to the top of the grid.
*/
stickyRowBackground?: string;
/**
* Gets the actual background color for content that sticks to the top of the grid.
*/
actualStickyRowBackground?: string;
/**
* Gets or sets the background color for cells belonging to rows marked as pinned.
*/
pinnedRowBackground?: string;
/**
* Gets the actual background color for cells belonging to rows marked as pinned.
*/
actualPinnedRowBackground?: string;
/**
* Gets or sets the color for the last row in the sticky row area.
*/
lastStickyRowBackground?: string;
/**
* Gets the actual color for the last row in the sticky row area.
*/
actualLastStickyRowBackground?: string;
/**
* Gets or sets the opacity of the content.
*/
contentOpacity?: number | string;
/**
* Gets or sets the horizontal alignment to use for the cell content.
*/
horizontalAlignment?: CellContentHorizontalAlignment | string;
/**
* Gets or sets the vertical alignment to use for the cell content.
*/
verticalAlignment?: CellContentVerticalAlignment | string;
/**
* Gets or sets the line breaking mode to use if text is present in the cell.
*/
lineBreakMode?: TextCellLineBreakMode | string;
/**
* Gets the actual line break mode which will be used if text is present in the cell.
*/
actualLineBreakMode?: TextCellLineBreakMode | string;
/**
* Gets or sets the color to use for displaying text.
*/
textColor?: string;
/**
* Gets the actual color used for displaying text.
*/
actualTextColor?: string;
/**
* Gets or sets whether the bar is supported.
*/
isBarSupported?: boolean | string;
/**
* Gets or sets the color to use for value bars.
*/
barBackground?: string;
/**
* Gets the actual color used for value bars.
*/
actualBarBackground?: string;
/**
* Gets or sets the Outline color to use for value bars.
*/
barOutline?: string;
/**
* Gets the actual Outline color used for value bars.
*/
actualBarOutline?: string;
/**
* Gets or sets the stroke thickness to use for value bars.
*/
barStrokeThickness?: number | string;
/**
* Gets the actual stroke thickness used for value bars.
*/
actualBarStrokeThickness?: number | string;
/**
* Gets or sets the stroke thickness to use for value bars.
*/
barCornerRadius?: number | string;
/**
* Gets the actual stroke thickness used for value bars.
*/
actualBarCornerRadius?: number | string;
/**
* Gets or sets the color to use for displaying text.
*/
pinnedRowOpacity?: number | string;
/**
* Gets or sets the color to use for displaying text.
*/
actualPinnedRowOpacity?: number | string;
textStyle?: string;
/**
* Called when a cell is data binding.
*/
dataBinding?: (s: IgrDefinitionBase, e: IgrDataBindingEventArgs) => void;
/**
* Called when a cell has been data bound.
*/
dataBound?: (s: IgrDefinitionBase, e: IgrDataBindingEventArgs) => void;
/**
* Called when the style key for a cell is needed. Used for recycling the cell.
*/
cellStyleKeyRequested?: (s: IgrDefinitionBase, e: IgrCellStyleRequestedEventArgs) => void;
}