export type GridComponentRef = (() => void);
export interface INSGridCascadeFunction {
    (control: any, childControl: any, item: any, dataField: string, cellIndex: number, colItem: any, childCell: any, row: any): void;
}
export interface INSGridFilterRendererFunction {
    (colItem: INSGridColumn, colIndex: number, cell: any, row: any): any;
}
export interface INSGridAdvancedFilterHandler {
    (dataField: string, nsPopUp: any, advancedFilterSetting: any, rendererID: string, enableApply: boolean, createApplySectionCallback: any, advanceFilterGridCallback: any, removePopUpCallback: any): void;
}
export interface INSGridGroupRendererFunction {
    (item: any, dataField: string, index: number, colIndex: number, row: any, arrChildren: any[], childrenCount: number, arrFlatChildren: any[], groupLevel: number): string | any;
}
export interface INSGridItemRendererFunction {
    (item: any, dataField: string, index: number, colIndex: number, row: any): string | any;
}
export interface INSGridLabelFunction {
    (item: any, dataField: string, colItem: INSGridColumn): string;
}
export interface INSGridToolTipRendererFunction {
    (item: any, dataField: string, index: number, colIndex: number, row: any): string;
}
export interface INSGridTemplateSetDataFunction {
    (cellElement: any, item: any, dataField: string, colItem: INSGridColumn, row: any): void;
}
export interface INSGridHeaderRendererFunction {
    (colItem: INSGridColumn, colIndex: number): string | any;
}
export interface INSGridExtraRowHeaderRendererFunction {
    (dataField: string, colItem: INSGridColumn, arrFilteredGroupedSource: any[], rowIndex: number, colIndex: number, extraHeaderCell: any, extraHeaderRow: any): string | any;
}
export interface INSGridContextMenuProviderFunction {
    (item: any, colIndex: number, rowIndex: number): any;
}
export interface INSGridPaginationFetchRecordFunction {
    (fromRecord: number, toRecord: number, pageSize: number): void;
}
export interface INSGridFilterFunction {
    (item: any, filter: any, setting: any, isHierarchical: boolean, childField: string, parentItem: any): any;
}
export interface INSGridHierarchyFilterChildrenFunction {
    (item: any, index: number, isMatch: boolean, filter: any, setting: any, parentItem: any): boolean;
}
export interface INSGridRowMoverDropEndHandlerFunction {
    (row: any, targetTable: any, targetRow: any): any;
}
export interface INSGridEditorValidatorFunction {
    (element: any, value: any): boolean;
}
export interface INSGridEditorIsCellEditableFunction {
    (colItem: INSGridColumn, item: any, colIndex: number, row: any, rowIndex: number): boolean;
}
export interface INSGridEditorAPICommitChangesFunction {
    (): void;
}
export interface INSGridEditorAPICancelChangesFunction {
    (): void;
}
export interface INSGridOnDemandChildFetchCallbackFunction {
    (item: any, rowIndex: number, rowLevel: number, event: any): void;
}
export interface INSEventDispatcherFunction {
    (eventType: string, data: any, param: any, bubbles?: boolean, cancelable?: boolean): void;
}
export interface INSGridCustomClassSetting {
    outerContainer?: string;
    titleBar?: string;
    headerRow?: string;
    headerCell?: string;
    filterRow?: string;
    filterCell?: string;
    bodyRow?: string;
    firstBodyColumn?: string;
    nonFirstBodyColumn?: string;
}
export interface INSGridMultiCellSelectionSetting {
    scrollableElement?: any;
    enableFillHandle?: boolean;
    enableKeyboardNavigation?: boolean;
    enableCopy?: boolean;
    enablePaste?: boolean;
    cellClass?: string;
    areaClass?: string;
    areaClassLeft?: string;
    areaClassRight?: string;
    areaClassTop?: string;
    areaClassBottom?: string;
}
export interface INSGridFilterSetting {
    filterRenderer?: INSGridFilterRendererFunction;
    filterTemplate?: string;
    enableAdvancedFilter?: boolean;
    advancedFilterType?: string;
    advancedFilterHandler?: INSGridAdvancedFilterHandler;
    advancedFilterPopUpPos?: string;
    [propName: string]: any;
}
export interface INSGridColumnCustomIcon {
    menu?: string;
    filter?: string;
    sortAscending?: string;
    sortDescending?: string;
    columnMove?: string;
}
export interface INSGridCustomIcon extends INSGridColumnCustomIcon {
    exportButton?: string;
    rowExpanded?: string;
    rowCollapsed?: string;
}
export interface INSGridEditorSetting {
    editType?: string;
    clickType?: string;
    stopEditingOnGridFocusOut?: boolean;
    enableMultipleEdit?: boolean;
}
export interface INSGridColumnEditorSetting {
    type?: string;
    params?: any;
    customEditor?: any;
    validator?: INSGridEditorValidatorFunction;
    isCellEditableCallback?: INSGridEditorIsCellEditableFunction;
}
export interface INSGridMasterDetailSetting {
    hasChildField?: string;
    hasChildCallback?: (item: any) => void;
    detailColumns?: INSGridColumn;
    detailDataSourceCallback: (params: any) => void;
    detailGridSetting?: INSGridColumnEditorSetting;
    gridRefreshEverytimeCallback?: (params: any) => boolean;
    gridHtmlCallback?: (params: any) => string;
    detailRenderer?: INSGridDetailRendererComponent | any;
    detailRendererParam?: any;
    detailHeight?: number;
}
export interface INSGridDetailRendererComponent {
    init: (params: INSGridDetailRendererComponentParam) => Promise<any>;
    getElement?: () => HTMLElement;
    elementAdded?: (params: INSGridDetailRendererComponentParam) => void;
    renderEverytime?: (params: INSGridDetailRendererComponentParam) => boolean;
    destroy?: () => void;
}
export interface INSGridDetailRendererComponentParam {
    masterData: any;
    container: HTMLElement;
    cell: HTMLTableCellElement;
    row: HTMLTableRowElement;
    rowIndex: number;
    [propName: string]: any;
}
export interface INSGridEditorCustomComponentSetting {
    cell: any;
    row: any;
    item: any;
    rowIndex: number;
    cellIndex: number;
    position: any;
    defaultValue: any;
    commitChanges: INSGridEditorAPICommitChangesFunction;
    cancelChanges: INSGridEditorAPICancelChangesFunction;
    validator: INSGridEditorValidatorFunction;
    setting: INSGridColumnEditorSetting;
    column: INSGridColumn;
    api: any;
}
export interface INSGridRendererComponentInstance {
    instance: INSGridRendererComponent | null;
    componentRef: GridComponentRef;
    item: any;
    index: number;
    colIndex: number;
    columnName: string;
}
export interface INSGridDetailRendererComponentInstance {
    instance: INSGridDetailRendererComponent | null;
    componentRef: GridComponentRef;
    param: INSGridDetailRendererComponentParam;
}
export interface INSGridRendererComponent {
    setData(item: any, dataField: string, index: number, colIndex: number, row: any): void;
}
export interface INSGridGroupRendererComponentInstance {
    instance: INSGridGroupRendererComponent | null;
    componentRef: GridComponentRef;
    item: any;
    index: number;
    colIndex: number;
    columnName: string;
}
export interface INSGridGroupRendererComponent {
    setData(item: any, dataField: string, index: number, colIndex: number, row: any, arrChildren: any[], childrenCount: number, arrFlatChildren: any[], groupLevel: number): void;
}
export interface INSGridHeaderRendererComponentInstance {
    instance: INSGridHeaderRendererComponent | null;
    componentRef: GridComponentRef;
    index: number;
    colItem: INSGridColumn;
    colIndex: number;
}
export interface INSGridHeaderRendererComponent {
    setData(colItem: INSGridColumn, colIndex: number): void;
}
export interface INSGridToolTipRendererComponentInstance {
    instance: INSGridToolTipRendererComponent | null;
    componentRef: GridComponentRef;
    item: any;
    index: number;
    colIndex: number;
    columnName: string;
}
export interface INSGridToolTipRendererComponent {
    setData(item: any, dataField: string, index: number, colIndex: number, row: any): void;
}
export interface INSGridExtraRowHeaderRendererComponentInstance {
    instance: INSGridExtraRowHeaderRendererComponent | null;
    componentRef: GridComponentRef;
    colItem: INSGridColumn;
    index: number;
    colIndex: number;
    columnName: string;
}
export interface INSGridExtraRowHeaderRendererComponent {
    setData(dataField: string, colItem: INSGridColumn, filteredDataSource: any[], index: number, colIndex: number, extraHeaderCell: any, extraHeaderRow: any): void;
}
export interface INSGridEditorCustomComponentInstance {
    instance: INSGridEditorCustomComponent | null;
    componentRef: any;
    setting: INSGridEditorCustomComponentSetting;
    colItem: INSGridColumn;
    index: number;
    colIndex: number;
    columnName: string | undefined;
}
export interface INSGridEditorCustomComponent {
    init(setting: INSGridEditorCustomComponentSetting): Promise<any> | void;
    getElement(): HTMLElement;
    elementAdded?(): void;
    handleKeyDown?(event: any, keyCode: any): void;
    getValue(): any;
    destroy?(): void;
    setFocus(): void;
    hasFocus?(): boolean;
    hasValueChanged?(currentValue: any): boolean;
    validate?(): boolean;
    isPopUp(): boolean;
    save?(): void;
    cancel?(): void;
    setPopUpWrapper?(popUpWrapper: any): void;
}
export interface INSGridColumn {
    dataField?: string;
    headerText?: string;
    width?: any;
    sortable?: boolean;
    sortDescending?: boolean;
    truncateToFit?: boolean;
    headerTruncateToFit?: boolean;
    sortField?: string;
    resizable?: boolean;
    draggable?: boolean;
    autoSize?: boolean;
    showMenu?: boolean;
    minWidth?: number;
    groupRenderer?: INSGridGroupRendererFunction;
    groupRendererComponent?: any;
    groupRendererComponentProps?: any;
    itemRenderer?: INSGridItemRendererFunction;
    itemRendererComponent?: any;
    itemRendererComponentProps?: any;
    template?: string;
    setData?: INSGridTemplateSetDataFunction;
    labelFunction?: INSGridLabelFunction;
    headerRenderer?: INSGridHeaderRendererFunction;
    headerRendererComponent?: any;
    headerRendererComponentProps?: any;
    headerTemplate?: string;
    toolTipField?: string;
    toolTipRenderer?: INSGridToolTipRendererFunction;
    toolTipRendererComponent?: any;
    toolTipRendererComponentProps?: any;
    extraRowHeaderRenderer?: INSGridExtraRowHeaderRendererFunction;
    extraRowHeaderRendererComponent?: any;
    extraRowHeaderRendererComponentProps?: any;
    priority?: number;
    hideable?: boolean;
    /*****filter related ***********/
    enableFilter?: boolean;
    filter?: INSGridFilterSetting;
    /*****editor related ***********/
    enableEditable?: boolean;
    editorSetting?: INSGridColumnEditorSetting;
    icons?: INSGridColumnCustomIcon;
    [propName: string]: any;
}
export interface INSGridSetting {
    nsTitle?: string;
    type?: string;
    context?: any;
    enableMouseHover?: boolean;
    enableMultipleSelection?: boolean;
    enableKeyboardNavigation?: boolean;
    enableColumnMouseHover?: boolean;
    childField?: string;
    rowKeyField?: string;
    groupByField?: string;
    columnMinWidth?: number;
    customScrollerRequired?: boolean;
    columnResizable?: boolean;
    columnDraggable?: boolean;
    columnSortable?: boolean;
    columnAutoSize?: boolean;
    enablePagination?: boolean;
    paginationType?: string;
    paginationMode?: boolean;
    enableAsyncLoadPagination?: boolean;
    pageSize?: number;
    totalRecords?: number;
    paginationFetchRecordCallBack?: INSGridPaginationFetchRecordFunction;
    enableContextMenu?: boolean;
    contextMenuProvider?: INSGridContextMenuProviderFunction;
    enableFilter?: boolean;
    filterFunction?: INSGridFilterFunction;
    hierarchyFilterChildrenFunction?: INSGridHierarchyFilterChildrenFunction;
    enableAdvancedFilter?: boolean;
    enableVirtualScroll?: boolean;
    enableDataRefreshOnScrollEnd?: boolean;
    dataRefreshfireDelay?: number;
    bottomPercentageForAddRows?: number;
    enableServerCall?: boolean;
    rowHeight?: number;
    enableExport?: boolean;
    exportFileName?: boolean;
    enableResponsive?: boolean;
    enableRowSelection?: boolean;
    enableCellSelection?: boolean;
    enableMultiCellSelection?: boolean;
    responsiveMode?: string;
    noDataMessage?: string;
    leftFixedColumn?: number;
    rightFixedColumn?: number;
    enableFixedColumnAnimation?: boolean;
    enableRowMove?: boolean;
    isSameTableMove?: boolean;
    rowMoverDropEndHandler?: INSGridRowMoverDropEndHandlerFunction;
    renderInCachedMode?: boolean;
    enableVariableRowHeight?: boolean;
    enableToolTipForTruncateText?: boolean;
    heightOffset?: number;
    enableMultiSort?: boolean;
    multiColumnKey?: string;
    dataSource?: any[];
    columns?: INSGridColumn[] | undefined;
    headerExtraRowCount?: number;
    customClass?: INSGridCustomClassSetting;
    theme?: string;
    showExpandCollapseIcon?: boolean;
    multiCellSelectionSetting?: INSGridMultiCellSelectionSetting;
    isSingleLevelGrouping?: boolean;
    multiLevelGroupColumn?: INSGridColumn | undefined;
    enableEditable?: boolean;
    editorSetting?: INSGridEditorSetting;
    isPopUp?: boolean;
    eventDispatcher?: INSEventDispatcherFunction;
    enableOnDemandHierarchy?: boolean;
    onDemandChildDetectionField?: string;
    onDemandChildFetchCallback?: INSGridOnDemandChildFetchCallbackFunction;
    icons?: INSGridCustomIcon;
    enableColumnSetting?: boolean;
    masterDetailSetting?: INSGridMasterDetailSetting;
    [propName: string]: any;
}
