nscomponentsreact
Version:
React Wrapper Components for NSComponents
155 lines (154 loc) • 7.8 kB
TypeScript
import * as React from 'react';
import '../../generated/css/nsComponent.min.css';
import '../../generated/css/nsGrid.min.css';
import NSBaseReactComponent from '../base/nsBaseReactComponent';
import { INSGridSetting, INSGridColumn, INSGridCascadeFunction, INSGridRendererComponentInstance, INSGridGroupRendererComponentInstance, INSGridHeaderRendererComponentInstance, INSGridToolTipRendererComponentInstance, INSGridExtraRowHeaderRendererComponentInstance, INSGridEditorCustomComponentInstance, INSGridDetailRendererComponent } from "./interfaces";
export interface INSGridReactSettings extends INSGridSetting {
setting?: INSGridSetting;
containerStyle?: any;
[propName: string]: any;
}
export declare class NSGridReact extends NSBaseReactComponent<INSGridReactSettings, any> {
props: INSGridReactSettings;
state: any;
static readonly GRID_RENDERED = "gridRendered";
static readonly MULTI_SELECTION_EDITORS_TEXT = "TEXT";
static readonly MULTI_SELECTION_EDITORS_TEXTAREA = "TEXTAREA";
static readonly GRID_TYPE_HIERARCHICAL = "hierarchical";
static readonly GRID_TYPE_GROUP = "group";
static readonly GRID_TYPE_NORMAL = "normal";
static readonly GRID_TYPE_MASTER_DETAIL = "masterdetail";
static readonly PAGINATION_TYPE_SCROLL = "scroll";
static readonly PAGINATION_TYPE_PAGES = "pages";
static readonly PAGINATION_MODE_AUTO = "auto";
static readonly PAGINATION_MODE_MANUAL = "manual";
static readonly RESPONSIVE_MODE_STACK = "stack";
static readonly RESPONSIVE_MODE_COLUMN_TOGGLE = "columnToggle";
static readonly ADVANCED_FILTER_TEXT = "text";
static readonly ADVANCED_FILTER_NUMBER = "number";
static readonly ADVANCED_FILTER_LIST = "list";
static readonly MULTICOLUMN_KEY_SHIFT = "shift";
static readonly MULTICOLUMN_KEY_CTRL = "ctrl";
static readonly MULTICOLUMN_KEY_ALT = "alt";
static readonly NAVIGATION_UP = "up";
static readonly NAVIGATION_DOWN = "down";
static readonly EDITOR_EDITTYPE_CELL = "cell";
static readonly EDITOR_EDITTYPE_ROW = "row";
static readonly EDITOR_EDITING_SINGLECLICK = "singleClick";
static readonly EDITOR_EDITING_DOUBLECLICK = "doubleClick";
static readonly EDITOR_EDITING_NOCLICK = "noClick";
static readonly EDITOR_TYPE_TEXT = "text";
static readonly EDITOR_TYPE_TEXTAREA = "textArea";
static readonly EDITOR_TYPE_CUSTOM = "custom";
private __nsGrid;
private __container;
private __setting;
private __dataSource;
private __nsUtil;
private __arrEvents;
private __hasInitialized;
private __hasGridDataSource;
private __hasDestroyed;
private __objCustomComponent;
private __masterDetailRendererInstance;
private updateCallbacksOnUpdate;
private instanceCount;
private hasPortalUpdated;
constructor(props: INSGridReactSettings, state: any);
componentDidMount(): void;
shouldComponentUpdate(nextProps: any, nextState: any): boolean;
private processProps;
componentWillUnmount(): void;
render(): React.JSX.Element;
setHeightOffset(offset: number): void;
deviceViewChanged(conditionTrue: boolean, queryIndex?: number, query?: string): void;
setGridState(data: any): void;
getGridState(): any;
setColumn(arrColumns: INSGridColumn[]): void;
dataSource(source?: any[], isReset?: boolean): any[];
setContextMenuSetting(contextMenuSetting: any): void;
getOrignalItem(item: any): void;
addRows(source: any[]): void;
removeRows(arrIndex: any[]): void;
groupBy(groupByField: string): void;
expandAll(): void;
collapseAll(): void;
expandCollapseByRow(element: any, rowIndex: number): void;
getRowInfo(row: any): any;
getCellInfo(cell: any): any;
getItemInfo(objItem: any): any;
getItemInfoByKeyField(keyFieldValue: string): any;
cascadeValues(event: any, callBack: INSGridCascadeFunction): void;
setFontSize(fontSize: number): void;
addColumn(objColumn: INSGridColumn): void;
changeDeviceView(conditionTrue: boolean): void;
hideColumn(column: INSGridColumn): boolean;
showColumn(column: INSGridColumn): boolean;
swapColumns(sourceColumn: INSGridColumn, destinationColumn: INSGridColumn): boolean;
moveColumn(column: INSGridColumn, toIndex: number): boolean;
sortBy(column: INSGridColumn, isAscending: boolean): void;
autoResizeColumn(column: INSGridColumn): void;
updateRowByIndex(index: number): void;
updateRowByKeyField(keyFieldValue: any): void;
updateCellByIndex(index: number, dataField: string): void;
updateCellByKeyField(keyFieldValue: any, dataField: string): void;
updateItemInDataSource(item: any): void;
getGroupedSource(): any[];
setSelectedItems(arrItems: any[]): void;
addSelectedItems(arrItems: any[]): void;
removeSelectedItems(arrItems: any[]): void;
setSelectedItem(item: any): void;
setSelectedIndexes(arrSelectedIndex: number[]): void;
getSelectedIndex(): number;
getSelectedItem(): any;
getSelectedIndexes(): number[];
getSelectedItems(): any[];
deselectAll(): void;
filter(filter: any, setting: any, enableHighlighting?: boolean, recordLimit?: number): void;
resetFilters(): void;
getFilteredData(): any[];
highlightText(dataField: string, text: string): void;
unHighlightText(): void;
fixFixedHeader(): void;
scrollToIndex(selectedIndex: number, animationRequired?: boolean): void;
setNoDataMessage(message: string): void;
renderHeaderExtraRows(): void;
editByIndex(index: any, dataField?: string): void;
editByKeyField(keyFieldValue: any, dataField?: string): void;
editByItem(item: any, dataField?: string): void;
editStopByIndex(index: any, dataField?: string, isCancel?: boolean): void;
editStopByKeyField(keyFieldValue: any, dataField?: string, isCancel?: boolean): void;
editStopByItem(item: any, dataField?: string, isCancel?: boolean): void;
getEditorInstances(element?: any, dataField?: string): any[];
setStyle(styleProp: string, value: any): void;
setFocus(isFocus: boolean): void;
hasFocus(): boolean;
setTheme(theme: string): void;
changeProperty(propertyName: string, value: any): void;
getRendererComponentInstance(columnName: string, rowIndex: number): INSGridRendererComponentInstance | null;
getGroupRendererComponentInstance(columnName: string, rowIndex: number): INSGridGroupRendererComponentInstance | null;
getHeaderRendererComponentInstance(columnName: string): INSGridHeaderRendererComponentInstance | null;
getToolTipRendererComponentInstance(columnName: string, rowIndex: number): INSGridToolTipRendererComponentInstance | null;
getExtraRowHeaderRendererComponentInstance(columnName: string, rowIndex: number): INSGridExtraRowHeaderRendererComponentInstance | null;
getEditorComponentInstance(columnName: string, rowIndex: number): INSGridEditorCustomComponentInstance | null;
getDetailComponentInstance(rowIndex: number): INSGridDetailRendererComponent | null;
getGrid(): any;
private __setColumn;
private __setColumnObject;
private __customEditor;
private __renderer;
private __groupRenderer;
private __headerRenderer;
private __toolTipRenderer;
private __extraRowHeaderRenderer;
private __getComponent;
private createUpdatedPortal;
private __initializeCompInObject;
private __processMasterDetailSetting;
private __customDetailComponent;
private __getStyleForContainer;
private __addEvents;
private __eventListener;
private __emitRendererComponentCreated;
private __emitDetailComponentCreated;
}