import { BindingEventService } from '@slickgrid-universal/binding'; import { type CSSStyleDeclarationWritable } from '@slickgrid-universal/utils'; import Sortable from 'sortablejs/modular/sortable.core.esm.js'; import type { TrustedHTML } from 'trusted-types/lib'; import type { SelectionModel } from '../enums/index.js'; import type { GridOption as BaseGridOption, CellPosition, CellViewportRange, Column, ColumnMetadata, ColumnSort, CssStyleHash, CustomDataView, DOMEvent, DragPosition, DragRowMove, EditController, Editor, EditorConstructor, ElementPosition, Formatter, FormatterResultWithHtml, FormatterResultWithText, InteractionBase, ItemMetadata, MultiColumnSort, OnActivateChangedOptionsEventArgs, OnActiveCellChangedEventArgs, OnAddNewRowEventArgs, OnAfterSetColumnsEventArgs, OnAutosizeColumnsEventArgs, OnBeforeAppendCellEventArgs, OnBeforeCellEditorDestroyEventArgs, OnBeforeColumnsResizeEventArgs, OnBeforeEditCellEventArgs, OnBeforeFooterRowCellDestroyEventArgs, OnBeforeHeaderCellDestroyEventArgs, OnBeforeHeaderRowCellDestroyEventArgs, OnBeforeSetColumnsEventArgs, OnCellChangeEventArgs, OnCellCssStylesChangedEventArgs, OnClickEventArgs, OnColumnsDragEventArgs, OnColumnsEventArgs, OnColumnsReorderedEventArgs, OnColumnsResizeDblClickEventArgs, OnColumnsResizedEventArgs, OnCompositeEditorChangeEventArgs, OnContextMenuArgs, OnDblClickEventArgs, OnDragReplaceCellsEventArgs, OnFooterClickEventArgs, OnFooterContextMenuEventArgs, OnFooterRowCellRenderedEventArgs, OnHeaderCellRenderedEventArgs, OnHeaderClickEventArgs, OnHeaderContextMenuEventArgs, OnHeaderKeyDownEventArgs, OnHeaderMouseEventArgs, OnHeaderRowCellRenderedEventArgs, OnKeyDownEventArgs, OnPreHeaderClickEventArgs, OnPreHeaderContextMenuEventArgs, OnRenderedEventArgs, OnScrollEventArgs, OnSelectedRowsChangedEventArgs, OnSetOptionsEventArgs, OnValidationErrorEventArgs, PagingInfo, SingleColumnSort, SlickPlugin } from '../interfaces/index.js'; import { SlickDragExtendHandle, SlickEvent, SlickEventData, SlickRange, type BasePubSub, type SlickEditorLock } from './slickCore.js'; import type { SlickDataView } from './slickDataview.js'; /** * @license * (c) 2009-present Michael Leibman * michael{dot}leibman{at}gmail{dot}com * http://github.com/mleibman/slickgrid * * Distributed under MIT license. * All rights reserved. * * SlickGrid v5.1.0 * * NOTES: * Cell/row DOM manipulations are done directly bypassing JS DOM manipulation methods. * This increases the speed dramatically, * but can only be done safely because there are no event handlers * or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy() * and do proper cleanup. */ interface RowCaching { rowNode: HTMLElement[] | null; cellColSpans: Array; cellNodesByColumnIdx: HTMLElement[]; cellRenderQueue: any[]; } export declare class SlickGrid = Column, O extends BaseGridOption = BaseGridOption> { protected readonly container: HTMLElement | string; protected data: CustomDataView | TData[]; protected columns: C[]; protected readonly externalPubSub?: BasePubSub | undefined; onActiveCellChanged: SlickEvent; onActiveCellPositionChanged: SlickEvent<{ grid: SlickGrid; }>; onActivateChangedOptions: SlickEvent; onAddNewRow: SlickEvent; onAfterSetColumns: SlickEvent; onAutosizeColumns: SlickEvent; onBeforeAppendCell: SlickEvent; onBeforeCellEditorDestroy: SlickEvent; onBeforeColumnsResize: SlickEvent; onBeforeDestroy: SlickEvent<{ grid: SlickGrid; }>; onBeforeEditCell: SlickEvent; onBeforeFooterRowCellDestroy: SlickEvent; onBeforeHeaderCellDestroy: SlickEvent; onBeforeHeaderRowCellDestroy: SlickEvent; onBeforeRemoveCachedRow: SlickEvent<{ row: number; grid: SlickGrid; }>; onBeforeSetColumns: SlickEvent; onBeforeSort: SlickEvent; onBeforeUpdateColumns: SlickEvent; onAfterUpdateColumns: SlickEvent; onCellChange: SlickEvent; onCellCssStylesChanged: SlickEvent; onClick: SlickEvent; onColumnsReordered: SlickEvent; onColumnsDrag: SlickEvent; onColumnsResized: SlickEvent; onColumnsResizeDblClick: SlickEvent; onCompositeEditorChange: SlickEvent; onContextMenu: SlickEvent; onDblClick: SlickEvent; onDrag: SlickEvent; onDragInit: SlickEvent; onDragStart: SlickEvent; onDragEnd: SlickEvent; onFooterClick: SlickEvent; onFooterContextMenu: SlickEvent; onFooterRowCellRendered: SlickEvent; onHeaderCellRendered: SlickEvent; onHeaderClick: SlickEvent; onHeaderContextMenu: SlickEvent; onHeaderMouseEnter: SlickEvent; onHeaderMouseLeave: SlickEvent; onHeaderMouseOver: SlickEvent; onHeaderMouseOut: SlickEvent; onHeaderKeyDown: SlickEvent; onHeaderRowCellRendered: SlickEvent; onHeaderRowMouseEnter: SlickEvent; onHeaderRowMouseLeave: SlickEvent; onHeaderRowMouseOver: SlickEvent; onHeaderRowMouseOut: SlickEvent; onKeyDown: SlickEvent; onMouseEnter: SlickEvent; onMouseLeave: SlickEvent; onPreHeaderClick: SlickEvent; onPreHeaderContextMenu: SlickEvent; onRendered: SlickEvent; onScroll: SlickEvent; onSelectedRowsChanged: SlickEvent; onSetOptions: SlickEvent; onSort: SlickEvent; onValidationError: SlickEvent; onViewportChanged: SlickEvent<{ grid: SlickGrid; }>; onDragReplaceCells: SlickEvent; protected scrollbarDimensions?: { height: number; width: number; }; protected maxSupportedCssHeight: number; protected canvas: HTMLCanvasElement | null; protected canvas_context: CanvasRenderingContext2D | null; protected _options: O; protected _defaults: BaseGridOption; protected _columnDefaults: Partial; protected _columnResizeTimer?: any; protected _executionBlockTimer?: any; protected _flashCellTimer?: any; protected _highlightRowTimer?: any; protected th: number; protected h: number; protected ph: number; protected n: number; protected cj: number; protected page: number; protected offset: number; protected vScrollDir: number; protected _bindingEventService: BindingEventService; protected initialized: boolean; protected _container: HTMLElement; protected uid: string; protected dragReplaceEl: SlickDragExtendHandle; protected _focusSink: HTMLDivElement; protected _focusSink2: HTMLDivElement; protected _groupHeaders: HTMLDivElement[]; protected _headerScroller: HTMLDivElement[]; protected _headers: HTMLDivElement[]; protected _headerRows: HTMLDivElement[]; protected _headerRowScroller: HTMLDivElement[]; protected _headerRowSpacerL: HTMLDivElement; protected _headerRowSpacerR: HTMLDivElement; protected _footerRow: HTMLDivElement[]; protected _footerRowScroller: HTMLDivElement[]; protected _footerRowSpacerL: HTMLDivElement; protected _footerRowSpacerR: HTMLDivElement; protected _preHeaderPanel: HTMLDivElement; protected _preHeaderPanelScroller: HTMLDivElement; protected _preHeaderPanelSpacer: HTMLDivElement; protected _preHeaderPanelR: HTMLDivElement; protected _preHeaderPanelScrollerR: HTMLDivElement; protected _preHeaderPanelSpacerR: HTMLDivElement; protected _topHeaderPanel: HTMLDivElement; protected _topHeaderPanelScroller: HTMLDivElement; protected _topHeaderPanelSpacer: HTMLDivElement; protected _topPanelScrollers: HTMLDivElement[]; protected _topPanels: HTMLDivElement[]; protected _viewport: HTMLDivElement[]; protected _canvas: HTMLDivElement[]; protected _style?: HTMLStyleElement; protected _boundAncestors: HTMLElement[]; protected stylesheet?: { cssRules: Array<{ selectorText: string; }>; rules: Array<{ selectorText: string; }>; } | null; protected columnCssRulesL?: Array<{ selectorText: string; }>; protected columnCssRulesR?: Array<{ selectorText: string; }>; protected viewportH: number; protected viewportW: number; protected canvasWidth: number; protected canvasWidthL: number; protected canvasWidthR: number; protected headersWidth: number; protected headersWidthL: number; protected headersWidthR: number; protected viewportHasHScroll: boolean; protected viewportHasVScroll: boolean; protected headerColumnWidthDiff: number; protected headerColumnHeightDiff: number; protected cellWidthDiff: number; protected cellHeightDiff: number; protected absoluteColumnMinWidth: number; protected hasFrozenRows: boolean; protected frozenRowsHeight: number; protected actualFrozenRow: number; protected _prevFrozenColumnIdx: number; /** flag to indicate if invalid frozen alert has been shown already or not? This is to avoid showing it more than once */ protected _invalidfrozenAlerted: boolean; protected paneTopH: number; protected paneBottomH: number; protected viewportTopH: number; protected viewportBottomH: number; protected topPanelH: number; protected headerRowH: number; protected footerRowH: number; protected tabbingDirection: number; protected _activeCanvasNode: HTMLDivElement; protected _activeViewportNode: HTMLDivElement; protected activePosX: number; protected activePosY: number; protected activeRow: number; protected activeCell: number; protected activeCellNode: HTMLDivElement | null; protected currentEditor: Editor | null; protected serializedEditorValue: any; protected editController?: EditController; protected _prevDataLength: number; protected _prevInvalidatedRowsCount: number; protected _rowSpanIsCached: boolean; protected _colsWithRowSpanCache: { [colIdx: number]: Set; }; protected rowsCache: Record; protected renderedRows: number; protected numVisibleRows: number; protected prevScrollTop: number; protected scrollHeight: number; protected scrollTop: number; protected lastRenderedScrollTop: number; protected lastRenderedScrollLeft: number; protected prevScrollLeft: number; protected scrollLeft: number; protected selectionBottomRow: number; protected selectionRightCell: number; protected selectionModel?: SelectionModel; protected selectedRows: number[]; protected selectedRanges: SlickRange[]; protected plugins: SlickPlugin[]; protected cellCssClasses: CssStyleHash; protected columnsById: Record; protected visibleColumnsById: Record; protected sortColumns: ColumnSort[]; protected columnPosLeft: number[]; protected columnPosRight: number[]; protected pagingActive: boolean; protected pagingIsLastPage: boolean; protected scrollThrottle: { enqueue: () => void; dequeue: () => void; }; protected h_editorLoader?: any; protected h_postrender?: any; protected h_postrenderCleanup?: any; protected postProcessedRows: any; protected postProcessToRow: number; protected postProcessFromRow: number; protected postProcessedCleanupQueue: Array<{ actionType: string; groupId: number; node: HTMLElement | HTMLElement[]; columnIdx?: number; rowIdx?: number; }>; protected postProcessgroupId: number; protected counter_rows_rendered: number; protected counter_rows_removed: number; protected _paneHeaderL: HTMLDivElement; protected _paneHeaderR: HTMLDivElement; protected _paneTopL: HTMLDivElement; protected _paneTopR: HTMLDivElement; protected _paneBottomL: HTMLDivElement; protected _paneBottomR: HTMLDivElement; protected _headerScrollerL: HTMLDivElement; protected _headerScrollerR: HTMLDivElement; protected _headerL: HTMLDivElement; protected _headerR: HTMLDivElement; protected _groupHeadersL: HTMLDivElement; protected _groupHeadersR: HTMLDivElement; protected _headerRowScrollerL: HTMLDivElement; protected _headerRowScrollerR: HTMLDivElement; protected _footerRowScrollerL: HTMLDivElement; protected _footerRowScrollerR: HTMLDivElement; protected _headerRowL: HTMLDivElement; protected _headerRowR: HTMLDivElement; protected _footerRowL: HTMLDivElement; protected _footerRowR: HTMLDivElement; protected _topPanelScrollerL: HTMLDivElement; protected _topPanelScrollerR: HTMLDivElement; protected _topPanelL: HTMLDivElement; protected _topPanelR: HTMLDivElement; protected _viewportTopL: HTMLDivElement; protected _viewportTopR: HTMLDivElement; protected _viewportBottomL: HTMLDivElement; protected _viewportBottomR: HTMLDivElement; protected _canvasTopL: HTMLDivElement; protected _canvasTopR: HTMLDivElement; protected _canvasBottomL: HTMLDivElement; protected _canvasBottomR: HTMLDivElement; protected _viewportScrollContainerX: HTMLDivElement; protected _viewportScrollContainerY: HTMLDivElement; protected _headerScrollContainer: HTMLDivElement; protected _headerRowScrollContainer: HTMLDivElement; protected _footerRowScrollContainer: HTMLDivElement; protected cssShow: { position: string; visibility: string; display: string; }; protected _hiddenParents: HTMLElement[]; protected oldProps: Array>; protected enforceFrozenRowHeightRecalc: boolean; protected columnResizeDragging: boolean; protected slickDraggableInstance: InteractionBase | null; protected slickMouseWheelInstances: Array; protected slickResizableInstances: Array; protected sortableSideLeftInstance?: ReturnType; protected sortableSideRightInstance?: ReturnType; protected _pubSubService?: BasePubSub; /** * Creates a new instance of the grid. * @class SlickGrid * @constructor * @param {Node} container - Container node to create the grid in. * @param {Array|Object} data - An array of objects for databinding or an external DataView. * @param {Array} columns - An array of column definitions. * @param {Object} [options] - Grid Options * @param {Object} [externalPubSub] - optional External PubSub Service to use by SlickEvent **/ constructor(container: HTMLElement | string, data: CustomDataView | TData[], columns: C[], options: Partial, externalPubSub?: BasePubSub | undefined); /** Initializes the grid. */ init(): void; protected initialize(options: Partial): void; protected finishInitialization(): void; /** handles "display:none" on container or container parents, related to issue: https://github.com/6pac/SlickGrid/issues/568 */ cacheCssForHiddenInit(): void; restoreCssFromHiddenInit

>(): void; protected hasFrozenColumns(): boolean; /** Register an external Plugin */ registerPlugin(plugin: T): void; /** Unregister (destroy) an external Plugin */ unregisterPlugin(plugin: SlickPlugin): void; /** Get a Plugin (addon) by its name */ getPluginByName

(name: string): P | undefined; getPubSubService(): BasePubSub | undefined; /** * Unregisters a current selection model and registers a new one. See the definition of SelectionModel for more information. * @param {Object} selectionModel A SelectionModel. */ setSelectionModel(model: SelectionModel): void; /** Returns the current SelectionModel. See here for more information about SelectionModels. */ getSelectionModel(): T | undefined; /** Get Grid Canvas Node DOM Element */ getCanvasNode(columnIdOrIdx?: number | string, rowIndex?: number): HTMLDivElement; /** Get the canvas DOM element */ getActiveCanvasNode(e?: Event | SlickEventData): HTMLDivElement; /** Get the canvas DOM element */ getCanvases(): HTMLDivElement[]; /** Get the Viewport DOM node element */ getViewportNode(columnIdOrIdx?: number | string, rowIndex?: number): HTMLElement | undefined; /** Get all the Viewport node elements */ getViewports(): HTMLDivElement[]; getActiveViewportNode(e: Event | SlickEventData): HTMLDivElement; /** Sets an active viewport node */ setActiveViewportNode(e: Event | SlickEventData): HTMLDivElement; protected _getContainerElement(targetContainers: HTMLElement[], columnIdOrIdx?: number | string, rowIndex?: number): HTMLElement | undefined; protected measureScrollbar(): { width: number; height: number; }; /** Get the headers width in pixel */ getHeadersWidth(): number; /** Get the grid canvas width */ getCanvasWidth(): number; /** * Validate that the column freeze is allowed in the browser by making sure that the frozen column is not exceeding the available and visible left canvas width. * Note that it will only validate when `invalidColumnFreezeWidthCallback` grid option is enabled. * @param {Number} frozenColumn the column index to freeze at * - if `undefined` it will do the condition check and never alert more than once * - if `true` it will do the condition check and always alert even if it was called before * - if `false` it will do the condition check but always skip the alert */ validateColumnFreezeWidth(frozenColumn?: number): boolean; /** * Validate that the frozen column is allowed by verifying there is at least 1, or more, column to the right of the frozen column otherwise show an error * Note that it will only validate when `invalidColumnFreezePickerCallback` grid option is enabled. * @param {Number|String} [columnId] column id * @param {Boolean} [forceAlert] tri-state flag to alert when frozen column is invalid * @param {Array} [colums] optionally provide new columns to validate * - if `undefined` it will do the condition check and never alert more than once * - if `true` it will do the condition check and always alert even if it was called before * - if `false` it will do the condition check but always skip the alert */ validateColumnFreeze(columnId?: number | string, forceAlert?: boolean, columns?: Column[]): boolean; protected updateCanvasWidth(forceColumnWidthsUpdate?: boolean): void; protected disableSelection(target: HTMLElement[]): void; protected getMaxSupportedCssHeight(): number; /** Get grid unique identifier */ getUID(): string; /** Get Header Column Width Difference in pixel */ getHeaderColumnWidthDiff(): number; /** Get scrollbar dimensions */ getScrollbarDimensions(): { height: number; width: number; } | undefined; /** Get the displayed scrollbar dimensions */ getDisplayedScrollbarDimensions(): { width: number; height: number; }; /** Get the absolute column minimum width */ getAbsoluteColumnMinWidth(): number; protected bindAncestorScrollEvents(): void; /** * Updates an existing column definition and a corresponding header DOM element with the new title and tooltip. * @param {Number|String} columnId Column id. * @param {string | HTMLElement | DocumentFragment} [title] New column name. * @param {String} [toolTip] New column tooltip. */ updateColumnHeader(columnId: number | string, title?: string | HTMLElement | DocumentFragment, toolTip?: string): HTMLElement | void; /** * Get the Header DOM element * @param {C} columnDef - column definition */ getHeader(columnDef?: C): HTMLDivElement | HTMLDivElement[]; /** * Get a specific Header Column DOM element by its column Id or index * @param {Number|String} columnIdOrIdx - column Id or index */ getHeaderColumn(columnIdOrIdx: number | string): HTMLDivElement; /** Get the Header Row DOM element */ getHeaderRow(): HTMLDivElement | HTMLDivElement[]; /** Get the Footer DOM element */ getFooterRow(): HTMLDivElement | HTMLDivElement[]; /** @alias `getPreHeaderPanelLeft` */ getPreHeaderPanel(): HTMLDivElement; /** Get the Pre-Header Panel Left DOM node element */ getPreHeaderPanelLeft(): HTMLDivElement; /** Get the Pre-Header Panel Right DOM node element */ getPreHeaderPanelRight(): HTMLDivElement; /** Get the Top-Header Panel DOM node element */ getTopHeaderPanel(): HTMLDivElement; /** * Get Header Row Column DOM element by its column Id or index * @param {Number|String} columnIdOrIdx - column Id or index */ getHeaderRowColumn(columnIdOrIdx: number | string): HTMLDivElement; /** * Get the Footer Row Column DOM element by its column Id or index * @param {Number|String} columnIdOrIdx - column Id or index */ getFooterRowColumn(columnIdOrIdx: number | string): HTMLDivElement; protected createColumnFooter(): void; protected handleHeaderMouseHoverOn(e: Event | SlickEventData): void; protected handleHeaderMouseHoverOff(e: Event | SlickEventData): void; protected createColumnHeaders(): void; protected setupColumnSort(): void; protected setupColumnReorder(): void; protected getHeaderChildren(): HTMLElement[]; protected handleResizeableDoubleClick(evt: MouseEvent & { target: HTMLDivElement; }): void; protected setupColumnResize(): void; /** * Calculates the vertical box sizes (the sum of top/bottom borders and paddings) * for a given element by reading its computed style. * @param el * @returns number */ protected getVBoxDelta(el: HTMLElement): number; protected setFrozenOptions(): void; /** add/remove frozen class to left headers/footer when defined */ protected setPaneFrozenClasses(): void; protected setPaneVisibility(): void; protected setOverflow(): void; protected setScroller(): void; protected measureCellPaddingAndBorder(): void; protected createCssRules(): void; /** Create CSS rules via template in case the first approach with createElement('style') doesn't work */ protected createCssRulesAlternative(rules: string[]): void; protected getColumnCssRules(idx: number): { left: { selectorText: string; }; right: { selectorText: string; }; }; protected removeCssRules(): void; /** Clear all highlight timers that might have been left opened */ protected clearAllTimers(): void; /** * Destroy (dispose) of SlickGrid * @param {boolean} shouldDestroyAllElements - do we want to destroy (nullify) all DOM elements as well? This help in avoiding mem leaks */ destroy(shouldDestroyAllElements?: boolean): void; protected clearInternalDomCaches(): void; /** * call destroy method, when exists, on all the instance(s) it found * @params instances - can be a single instance or a an array of instances */ protected destroyAllInstances(inputInstances: null | InteractionBase | Array): InteractionBase[] | null; autosizeColumns(): void; /** * legacy autosizeColumns() method that was used before 6pac/SlickGrid reimplemented autosizeColumns(). * We could simply rename the method to autosizeColumns() but let's keep separate for now * to make it easier to compare against 6pac/SlickGrid fork */ protected legacyAutosizeColumns(): void; /** * Apply Columns Widths in the UI and optionally invalidate & re-render the columns when specified * @param {Boolean} shouldReRender - should we invalidate and re-render the grid? */ reRenderColumns(reRender?: boolean): void; getVisibleColumns(): C[]; triggerEvent(evt: SlickEvent, args?: ArgType, e?: Event | SlickEventData): SlickEventData; /** Get Editor lock */ getEditorLock(): SlickEditorLock; /** Get Editor Controller */ getEditController(): EditController | undefined; /** * Returns the index of a column with a given id. Since columns can be reordered by the user, this can be used to get the column definition independent of the order: * @param {String | Number} id A column id. */ getColumnIndex(id: number | string): number; /** * Returns the index of a visible column with a given id. Since columns can be reordered by the user, this can be used to get the column definition independent of the order: * @param {String | Number} id A column id. */ getVisibleColumnIndex(id: number | string): number; /** Returns the column object by its ID */ getColumnById(id: number | string): C | null; /** Update any column properties by their finding column by ID */ updateColumnById(columnId: number | string, props: Partial, forceColumnUpdate?: boolean): void; protected applyColumnHeaderWidths(): void; protected applyColumnWidths(): void; /** * Get column header by index * @param {Number} idx - column index * @returns - column header HTML element */ getColumnHeaderByIndex(idx: number): HTMLElement | undefined; /** @deprecated @alias `getColumnHeaderByIndex` Get column header by index */ getColumnByIndex(idx: number): HTMLElement | undefined; /** * Get column by index * @param {Number} idx - column index * @returns - column object */ getColumnByIdx(idx: number): C | null; /** * Accepts a columnId string and an ascending boolean. Applies a sort glyph in either ascending or descending form to the header of the column. Note that this does not actually sort the column. It only adds the sort glyph to the header. * @param {String | Number} columnId * @param {Boolean} ascending */ setSortColumn(columnId: number | string, ascending: boolean): void; /** * Accepts an array of objects in the form [ { columnId: [string], sortAsc: [boolean] }, ... ]. When called, this will apply a sort glyph in either ascending or descending form to the header of each column specified in the array. Note that this does not actually sort the column. It only adds the sort glyph to the header * @param {ColumnSort[]} cols - column sort */ setSortColumns(cols: ColumnSort[]): void; /** Get sorted columns **/ getSortColumns(): ColumnSort[]; protected handleSelectedRangesChanged(e: SlickEventData, ranges: SlickRange[]): void; arrayEquals(arr1: Array, arr2: Array): boolean; /** Returns an array of column definitions. */ getColumns(): C[]; protected updateColumnCaches(): void; protected updateColumnProps(): void; /** * Sets grid columns. Column headers will be recreated and all rendered rows will be removed. To rerender the grid (if necessary), call render(). * @param {Column[]} newColumns An array of column definitions. * @param {boolean} [waitNextCycle=false] - should we wait for a microtask cycle before updating column headers */ setColumns(newColumns: C[], waitNextCycle?: boolean): void; /** Update columns for when a hidden property has changed but the column list itself has not changed. */ updateColumns(): void; protected updateColumnsInternal(): void; /** Returns an object containing all of the Grid options set on the grid. See a list of Grid Options here. */ getOptions(): O; /** * Get the Column ID of the currently frozen column or `null` when not frozen * @returns {String|Number|null} Frozen Column ID */ getFrozenColumnId(): string | number | null; protected getFrozenColumnIdx(): number; /** * Extends grid options with a given hash. If an there is an active edit, the grid will attempt to commit the changes and only continue if the attempt succeeds. * @param {Object} options - an object with configuration options. * @param {Boolean} [suppressRender] - do we want to supress the grid re-rendering? (defaults to false) * @param {Boolean} [suppressColumnSet] - do we want to supress the columns set, via "setColumns()" method? (defaults to false) * @param {Boolean} [suppressSetOverflow] - do we want to suppress the call to `setOverflow` */ setOptions(newOptions: Partial, suppressRender?: boolean, suppressColumnSet?: boolean, suppressSetOverflow?: boolean): void; /** * If option.mixinDefaults is true then external code maintains a reference to the options object. In this case there is no need * to call setOptions() - changes can be made directly to the object. However setOptions() also performs some recalibration of the * grid in reaction to changed options. activateChangedOptions call the same recalibration routines as setOptions() would have. * @param {Boolean} [suppressRender] - do we want to supress the grid re-rendering? (defaults to false) * @param {Boolean} [suppressColumnSet] - do we want to supress the columns set, via "setColumns()" method? (defaults to false) * @param {Boolean} [suppressSetOverflow] - do we want to suppress the call to `setOverflow` */ activateChangedOptions(suppressRender?: boolean, suppressColumnSet?: boolean, suppressSetOverflow?: boolean): void; protected prepareForOptionsChange(): void; protected internal_setOptions(suppressRender?: boolean, suppressColumnSet?: boolean, suppressSetOverflow?: boolean): void; protected validateAndEnforceOptions(): void; /** * Sets a new source for databinding and removes all rendered rows. Note that this doesn't render the new rows - you can follow it with a call to render() to do that. * @param {CustomDataView|Array<*>} newData New databinding source using a regular JavaScript array.. or a custom object exposing getItem(index) and getLength() functions. * @param {Number} [scrollToTop] If true, the grid will reset the vertical scroll position to the top of the grid. */ setData(newData: CustomDataView | TData[], scrollToTop?: boolean): void; /** Returns an array of every data object, unless you're using DataView in which case it returns a DataView object. */ getData | U[] = SlickDataView>(): U; /** Returns the size of the databinding source. */ getDataLength(): number; protected getDataLengthIncludingAddNew(): number; /** * Returns the databinding item at a given position. * @param {Number} index Item row index. */ getDataItem(i: number): TData; /** * Returns item metadata by a row index when it exists * @param {Number} row * @returns {ItemMetadata | null} */ getItemMetadaWhenExists(row: number): ItemMetadata | null; /** Get Top Panel DOM element */ getTopPanel(): HTMLDivElement; /** Get Top Panels (left/right) DOM element */ getTopPanels(): HTMLDivElement[]; /** Are we using a DataView? */ hasDataView(): boolean; protected togglePanelVisibility(option: 'showTopPanel' | 'showHeaderRow' | 'showColumnHeader' | 'showFooterRow' | 'showPreHeaderPanel' | 'showTopHeaderPanel', container: HTMLElement | HTMLElement[], visible?: boolean): void; /** * Set the Top Panel Visibility * @param {Boolean} [visible] - optionally set if top panel is visible or not */ setTopPanelVisibility(visible?: boolean): void; /** * Set the Header Row Visibility * @param {Boolean} [visible] - optionally set if header row panel is visible or not */ setHeaderRowVisibility(visible?: boolean): void; /** * Set the Column Header Visibility * @param {Boolean} [visible] - optionally set if column header is visible or not */ setColumnHeaderVisibility(visible?: boolean): void; /** * Set the Footer Visibility * @param {Boolean} [visible] - optionally set if footer row panel is visible or not */ setFooterRowVisibility(visible?: boolean): void; /** * Set the Pre-Header Visibility * @param {Boolean} [visible] - optionally set if pre-header panel is visible or not */ setPreHeaderPanelVisibility(visible?: boolean): void; /** * Set the Top-Header Visibility * @param {Boolean} [visible] - optionally set if top-header panel is visible or not */ setTopHeaderPanelVisibility(visible?: boolean): void; /** Get Grid Canvas Node DOM Element */ getContainerNode(): HTMLElement; protected getRowHeight(): number; protected getRowTop(row: number): number; protected getRowBottom(row: number): number; protected getRowFromPosition(y: number): number; /** * Scroll to an Y coordinate position in the grid * @param {Number} y */ scrollTo(y: number): void; /** * Scroll to an X coordinate position in the grid * @param {Number} x */ scrollToX(x: number): void; protected defaultFormatter(_row: number, _cell: number, value: any): string; protected getFormatter(row: number, column: C): Formatter; protected getEditor(row: number, cell: number): Editor | EditorConstructor | null | undefined; protected getDataItemValueForColumn(item: TData, columnDef: C): TData | TData[keyof TData]; protected appendRowHtml(divArrayL: HTMLElement[], divArrayR: HTMLElement[], row: number, range: CellViewportRange, dataLength: number): void; protected appendCellHtml(divRow: HTMLElement, row: number, cell: number, colspan: number, rowspan: number, columnMetadata: ColumnMetadata | null, item: TData): void; protected cleanupRows(rangeToKeep: { bottom: number; top: number; }): void; /** * from a row number, return any column indexes that intersected with the grid row including the cell * @param {Number} row - grid row index */ getRowSpanColumnIntersects(row: number): number[]; /** * from a row number, check if the rowspan is intersecting with any rowspan and return it when found, * otherwise return `null` when nothing is found or when the rowspan feature is disabled. * @param {Number} row - grid row index */ getRowSpanIntersect(row: number): number | null; protected getRowSpanIntersection(row: number, outputType?: 'columns' | 'start'): R; /** * Returns the parent rowspan details when child cell are spanned from a rowspan or `null` when it's not spanned. * By default it will exclude the parent cell that holds the rowspan, and return `null`, that initiated the rowspan unless the 3rd argument is disabled. * The exclusion is helpful to find out when we're dealing with a child cell of a rowspan * @param {Number} row - grid row index * @param {Number} cell - grid cell/column index * @param {Boolean} [excludeParentRow] - should we exclude the parent who initiated the rowspan in the search (defaults to true)? */ getParentRowSpanByCell(row: number, cell: number, excludeParentRow?: boolean): { start: number; end: number; range: string; } | null; /** * Remap all the rowspan metadata by looping through all dataset rows and keep a cache of rowspan by column indexes * For example: * 1- if 2nd row of the 1st column has a metadata.rowspan of 3 then the cache will be: `{ 0: '1:4' }` * 2- if 2nd row if the 1st column has a metadata.rowspan of 3 AND a colspan of 2 then the cache will be: `{ 0: '1:4', 1: '1:4' }` */ remapAllColumnsRowSpan(): void; protected remapRowSpanMetadataByRow(row: number): void; protected remapRowSpanMetadata(row: number, cell: number, colspan: number, rowspan: number): void; /** Invalidate all grid rows and re-render the visible grid rows */ invalidate(): void; /** Invalidate all grid rows */ invalidateAllRows(): void; /** * Invalidate a specific set of row numbers * @param {Number[]} rows */ invalidateRows(rows: number[]): void; /** * Invalidate a specific row number * @param {Number} row */ invalidateRow(row: number): void; protected queuePostProcessedRowForCleanup(cacheEntry: RowCaching, postProcessedRow: any, rowIdx: number): void; protected queuePostProcessedCellForCleanup(cellnode: HTMLElement, columnIdx: number, rowIdx: number): void; protected removeRowFromCache(row: number): void; /** Apply a Formatter Result to a Cell DOM Node */ applyFormatResultToCellNode(formatterResult: FormatterResultWithHtml | FormatterResultWithText | string | HTMLElement | DocumentFragment, cellNode: HTMLElement, suppressRemove?: boolean): void; /** * Update a specific cell by its row and column index * @param {Number} row - grid row number * @param {Number} cell - grid cell column number */ updateCell(row: number, cell: number): void; /** * Update a specific row by its row index * @param {Number} row - grid row number */ updateRow(row: number): void; getCellHeight(row: number, rowspan: number): number; /** * Get the number of rows displayed in the viewport * Note that the row count is an approximation because it is a calculated value using this formula (viewport / rowHeight = rowCount), * the viewport must also be displayed for this calculation to work. * @return {Number} rowCount */ getViewportRowCount(): number; getViewportHeight(): number; /** returns the available viewport inner width, that is the viewport width minus the scrollbar when shown */ protected getViewportInnerWidth(): number; getViewportWidth(): number; /** Execute a Resize of the Grid Canvas */ resizeCanvas(): void; /** * Update paging information status from the View * @param {PagingInfo} pagingInfo */ updatePagingStatusFromView(pagingInfo: Pick): void; /** Update the dataset row count */ updateRowCount(): void; /** @alias `getVisibleRange` */ getViewport(viewportTop?: number, viewportLeft?: number): CellViewportRange; /** * Returns an object with the top and bottom row indices that are visible in the viewport, as well * as the left and right pixel boundaries. * It uses the current (or provided) scroll positions and viewport dimensions. * * @param {number} [viewportTop] - The top scroll position. * @param {number} [viewportLeft] - The left scroll position. * @returns {{ top: number; bottom: number; leftPx: number; rightPx: number }} The visible range. */ getVisibleRange(viewportTop?: number, viewportLeft?: number): CellViewportRange; /** * Computes the range of rows (and horizontal pixel boundaries) that should be rendered, * including an additional buffer (based on row height and a minimum buffer) determined by * the current vertical scroll direction. * This range is used to decide which rows and cells to render. * * @param {number} [viewportTop] - The top scroll position. * @param {number} [viewportLeft] - The left scroll position. * @returns {{ top: number; bottom: number; leftPx: number; rightPx: number }} The rendered range. */ getRenderedRange(viewportTop?: number, viewportLeft?: number): CellViewportRange; /** * Returns the rows cache that are currently rendered in the DOM, * the cache includes certain properties like the row div element, cell rendered queue and the row colspan when defined. */ getRowCache(): Record; protected ensureCellNodesInRowsCache(row: number): void; protected cleanUpCells(range: CellViewportRange, row: number): void; protected cleanUpAndRenderCells(range: CellViewportRange): void; protected createEmptyCachingRow(): RowCaching; protected renderRows(range: { top: number; bottom: number; leftPx: number; rightPx: number; }): void; /** polyfill if the new Set.difference() added in ES2024 */ protected setDifference(a: Set, b: Set): Set; protected startPostProcessing(): void; protected startPostProcessingCleanup(): void; protected invalidatePostProcessingResults(row: number): void; protected updateRowPositions(): void; /** (re)Render the grid */ render(): void; protected handleHeaderRowScroll(): void; protected handleFooterRowScroll(): void; protected handlePreHeaderPanelScroll(): void; protected handleTopHeaderPanelScroll(): void; protected handleElementScroll(element: HTMLElement): void; protected handleScroll(e?: Event): boolean; protected _handleScroll(eventType?: 'mousewheel' | 'scroll' | 'system'): boolean; protected handleActiveCellPositionChange(): void; /** * limits the frequency at which the provided action is executed. * call enqueue to execute the action - it will execute either immediately or, if it was executed less than minPeriod_ms in the past, as soon as minPeriod_ms has expired. * call dequeue to cancel any pending action. */ protected actionThrottle(action: () => void, minPeriod_ms: number): { enqueue: () => void; dequeue: () => void; }; protected asyncPostProcessRows(): void; protected asyncPostProcessCleanupRows(): void; protected updateCellCssStylesOnRenderedRows(addedHash?: CssStyleHash | null, removedHash?: CssStyleHash | null): void; /** * Adds an "overlay" of CSS classes to cell DOM elements. SlickGrid can have many such overlays associated with different keys and they are frequently used by plugins. For example, SlickGrid uses this method internally to decorate selected cells with selectedCellCssClass (see options). * @param {String} key A unique key you can use in calls to setCellCssStyles and removeCellCssStyles. If a hash with that key has already been set, an exception will be thrown. * @param {CssStyleHash} hash A hash of additional cell CSS classes keyed by row number and then by column id. Multiple CSS classes can be specified and separated by space. * @example * `{ * 0: { number_column: SlickEvent; title_column: SlickEvent; }, * 4: { percent_column: SlickEvent; } * }` */ addCellCssStyles(key: string, hash: CssStyleHash): void; /** * Removes an "overlay" of CSS classes from cell DOM elements. See setCellCssStyles for more. * @param {String} key A string key. */ removeCellCssStyles(key: string): void; /** * Removes an "overlay" of CSS classes from cell DOM elements matching predicated entries. * Useful when you have multiple keys and want to remove them based on a certain criteria. * @param {Function} predicate A callback function that receives the key and hash as arguments and should return true if the entry should be removed. * @example * grid.removeCellCssStylesBatch((key, hash) => key.startsWith('unsaved-changes') && hash[0].includes('highlight')); */ removeCellCssStylesBatch(predicate: (key: string, hash: CssStyleHash) => boolean): void; /** * Sets CSS classes to specific grid cells by calling removeCellCssStyles(key) followed by addCellCssStyles(key, hash). key is name for this set of styles so you can reference it later - to modify it or remove it, for example. hash is a per-row-index, per-column-name nested hash of CSS classes to apply. * Suppose you have a grid with columns: * ["login", "name", "birthday", "age", "likes_icecream", "favorite_cake"] * ...and you'd like to highlight the "birthday" and "age" columns for people whose birthday is today, in this case, rows at index 0 and 9. (The first and tenth row in the grid). * @param {String} key A string key. Will overwrite any data already associated with this key. * @param {Object} hash A hash of additional cell CSS classes keyed by row number and then by column id. Multiple CSS classes can be specified and separated by space. */ setCellCssStyles(key: string, hash: CssStyleHash): void; /** * Accepts a key name, returns the group of CSS styles defined under that name. See setCellCssStyles for more info. * @param {String} key A string. */ getCellCssStyles(key: string): CssStyleHash; /** * Flashes the cell twice by toggling the CSS class 4 times. * @param {Number} row A row index. * @param {Number} cell A column index. * @param {Number} [speed] (optional) - The milliseconds delay between the toggling calls. Defaults to 250 ms. */ flashCell(row: number, cell: number, speed?: number): void; /** * Highlight a row for a certain duration (ms) of time. * @param {Number} row - grid row number * @param {Number} [duration] - duration (ms), defaults to 400ms */ highlightRow(row: number, duration?: number): void; /** * Programmatically focus a header column by index (default: first visible column). * @param index - Column index to focus (defaults to 0) */ focusHeaderColumn(index?: number): void; /** * Programmatically focus a header menu (when found) or fallback to header column if menu is not found or not visible. * @param index - Column index to focus (defaults to 0) */ focusHeaderMenuOrColumn(index?: number): void; /** * Focus on first header row filter element it finds, unless focusOnLast is set to true in which case it will start backward and focus on the last one. * If header row filter isn't shown, it will focus on the first grid cell (or grid menu/header menu if focusOnLast is true) instead. * @param focusOnLast * @returns true when a header row filter element was found and focused otherwise false */ focusHeaderRowFilter(focusOnLast?: boolean): boolean; /** focus on the active cell when it exists, otherwise focus on first cell */ focusGridCell(): void; /** focus on grid menu button when enabled or fallback to last header menu or column */ focusGridMenu(): void; /** focus element and stop event bubbling (for keyboard events) */ protected focusElementWithoutBubbling(e: KeyboardEvent, target: Element | null): void; /** get only visible elemnts from a container and a query selector, e.g. elements with `display: none` will be excluded. */ protected getVisibleElements(container: HTMLElement, selector: string): HTMLElement[]; protected handleMouseWheel(e: MouseEvent, _delta: number, deltaX: number, deltaY: number): void; protected handleDragInit(e: DragEvent, dd: DragPosition): boolean; protected handleDragStart(e: DragEvent, dd: DragPosition): boolean; protected handleDrag(e: DragEvent, dd: DragPosition): void; protected handleDragEnd(e: DragEvent, dd: DragPosition): void; protected handleContainerKeyDown(e: KeyboardEvent & { originalEvent: Event; }): void; protected handleGridKeyDown(e: KeyboardEvent & { originalEvent: Event; target: HTMLElement; }): void; protected handleClick(evt: DOMEvent | SlickEventData): void; protected handleContextMenu(e: Event & { target: HTMLElement; }): void; protected handleDblClick(e: MouseEvent): void; protected handleHeaderMouseEnter(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderMouseOver(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderMouseLeave(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderMouseOut(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderRowMouseEnter(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderRowMouseOver(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderRowMouseLeave(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderRowMouseOut(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderContextMenu(e: MouseEvent & { target: HTMLElement; }): void; protected handleHeaderClick(e: MouseEvent & { target: HTMLElement; }): void; protected handlePreHeaderContextMenu(e: MouseEvent & { target: HTMLElement; }): void; protected handlePreHeaderClick(e: MouseEvent & { target: HTMLElement; }): void; protected handleFooterContextMenu(e: MouseEvent & { target: HTMLElement; }): void; protected handleFooterClick(e: MouseEvent & { target: HTMLElement; }): void; protected handleCellMouseOver(e: MouseEvent & { target: HTMLElement; }): void; protected handleCellMouseOut(e: MouseEvent & { target: HTMLElement; }): void; protected cellExists(row: number, cell: number): boolean; protected stopFullBubbling(e: KeyboardEvent | MouseEvent | TouchEvent): void; /** * Returns row and cell indexes by providing x,y coordinates. * Coordinates are relative to the top left corner of the grid beginning with the first row (not including the column headers). * @param x An x coordinate. * @param y A y coordinate. */ getCellFromPoint(x: number, y: number): { row: number; cell: number; }; protected getCellFromNode(cellNode: HTMLElement): number; protected getRowFromNode(rowNode: HTMLElement): number | null; /** * Get frozen (pinned) row offset * @param {Number} row - grid row number */ getFrozenRowOffset(row: number): number; /** * Returns row and cell indexes by providing a standard W3C event. * @param {*} event A standard W3C event. */ getCellFromEvent(evt: Event | SlickEventData): { row: number; cell: number; } | null; /** * Returns an object representing information about a cell's position. All coordinates are absolute and take into consideration the visibility and scrolling position of all ancestors. * @param {Number} row - A row number. * @param {Number} cell - A column number. */ getCellNodeBox(row: number, cell: number): { top: number; left: number; bottom: number; right: number; } | null; /** Resets active cell by making cell normal and other internal resets. */ resetActiveCell(): void; /** Clear active cell by making cell normal & removing "active" CSS class. */ unsetActiveCell(): void; /** * Focus the grid. * Defaults to `cell`, which focuses the active cell (or first cell when no active cell exists). * @param mode - `cell` focuses active/first grid cell, `header` focuses first header menu/column entry point, * `internal` keeps legacy focus-sink behavior (primarily for internal/editor flows). */ focus(mode?: 'cell' | 'header' | 'internal'): void; protected setFocus(): void; /** Scroll to a specific cell and make it into the view */ scrollCellIntoView(row: number, cell: number, doPaging?: boolean): void; protected internalScrollColumnIntoView(left: number, right: number): void; /** * Scroll to a specific column and show it into the viewport * @param {Number} cell - cell column number */ scrollColumnIntoView(cell: number): void; protected setActiveCellInternal(newCell: HTMLDivElement | null, opt_editMode?: boolean | null, preClickModeOn?: boolean | null, suppressActiveCellChangedEvent?: boolean, e?: Event | SlickEvent): void; /** Check if cell is editable and check if grid is also editable */ protected isCellEditable(row: number, cell: number): boolean; /** Check if cell is potentially editable but without validating that the grid is editable */ protected isCellPotentiallyEditable(row: number, cell: number): boolean; /** * Make the cell normal again (for example after destroying cell editor), * we can also optionally refocus on the current active cell (again possibly after closing cell editor) * @param {Boolean} [refocusActiveCell] */ protected makeActiveCellNormal(refocusActiveCell?: boolean): void; editActiveCell(editor?: Editor | EditorConstructor, preClickModeOn?: boolean | null, e?: Event): void; protected makeActiveCellEditable(editor?: Editor | EditorConstructor, preClickModeOn?: boolean | null, e?: Event | SlickEvent): void; protected commitEditAndSetFocus(navigateCellDown?: boolean): void; protected cancelEditAndSetFocus(): void; /** * Computes the absolute position of an element relative to the document, * taking into account offsets, scrolling, and visibility within scrollable containers. */ protected absBox(elem: HTMLElement): ElementPosition; /** Returns an object representing information about the active cell's position. All coordinates are absolute and take into consideration the visibility and scrolling position of all ancestors. */ getActiveCellPosition(): ElementPosition; /** Get the Grid Position */ getGridPosition(): ElementPosition; /** Returns the active cell editor. If there is no actively edited cell, null is returned. */ getCellEditor(): Editor | null; /** * Returns an object representing the coordinates of the currently active cell: * @example `{ row: activeRow, cell: activeCell }` */ getActiveCell(): { row: number; cell: number; } | null; /** Returns the DOM element containing the currently active cell. If no cell is active, null is returned. */ getActiveCellNode(): HTMLDivElement | null; protected getTextSelection(): Range | null; protected setTextSelection(selection: Range): void; /** * Scroll to a specific row and make it into the view * @param {Number} row - grid row number * @param {Boolean} doPaging - scroll when pagination is enabled */ scrollRowIntoView(row: number, doPaging?: boolean): void; /** * Scroll to the top row and make it into the view * @param {Number} row - grid row number */ scrollRowToTop(row: number): void; protected scrollPage(dir: number): void; /** Navigate (scroll) by a page down */ navigatePageDown(): void; /** Navigate (scroll) by a page up */ navigatePageUp(): void; /** Navigate to the top of the grid */ navigateTop(): void; /** Navigate to the bottom of the grid */ navigateBottom(): void; navigateToRow(row: number): boolean; protected getColspan(row: number, cell: number): number; protected getRowspan(row: number, cell: number): number; protected findFocusableRow(row: number, cell: number, dir: 'up' | 'down'): number; protected findFirstFocusableCell(row: number): { cell: number; row: number; }; protected findLastFocusableCell(row: number): { cell: number; row: number; }; /** * From any row/cell indexes that might have colspan/rowspan, find its starting indexes * For example, if we start at 0,0 and we have colspan/rowspan of 4 for both and our indexes is row:2,cell:3 * then our starting row/cell is 0,0. If a cell has no spanning at all then row/cell output is same as input */ findSpanStartingCell(row: number, cell: number): { cell: number; row: number; }; protected gotoRight(_row: number, cell: number, posY: number, _posX?: number): { row: number; cell: number; posX: number; posY: number; } | null; protected gotoLeft(row: number, cell: number, posY: number, _posX?: number): { row: number; cell: number; posX: number; posY: number; } | null; protected gotoDown(row: number, cell: number, _posY: number, posX: number): { row: number; cell: number; posX: number; posY: number; } | null; protected gotoUp(row: number, cell: number, _posY: number, posX: number): { row: number; cell: number; posX: number; posY: number; } | null; protected gotoNext(row: number, cell: number, posY: number, posX: number): { row: number; cell: number; posX: number; posY: number; } | null; protected gotoPrev(row: number, cell: number, posY: number, posX: number): { row: number; cell: number; posX: number; posY: number; } | null; protected gotoRowStart(row: number, _cell: number, _posY: number, _posX: number): { row: number; cell: number; posX: number; posY: number; } | null; protected gotoRowEnd(row: number, _cell: number, _posY: number, _posX: number): { row: number; cell: number; posX: number; posY: number; } | null; /** find the next available column to the right */ protected findNextAvailableColumnCell(cell: number): number; protected increaseHiddenColspan(colspan: number, cell: number): number; /** Switches the active cell one cell right skipping unselectable cells. Unline navigateNext, navigateRight stops at the last cell of the row. Returns a boolean saying whether it was able to complete or not. */ navigateRight(): boolean | undefined; /** Switches the active cell one cell left skipping unselectable cells. Unline navigatePrev, navigateLeft stops at the first cell of the row. Returns a boolean saying whether it was able to complete or not. */ navigateLeft(): boolean | undefined; /** Switches the active cell one row down skipping unselectable cells. Returns a boolean saying whether it was able to complete or not. */ navigateDown(): boolean | undefined; /** Switches the active cell one row up skipping unselectable cells. Returns a boolean saying whether it was able to complete or not. */ navigateUp(): boolean | undefined; /** Tabs over active cell to the next selectable cell. Returns a boolean saying whether it was able to complete or not. */ navigateNext(): boolean | undefined; /** Tabs over active cell to the previous selectable cell. Returns a boolean saying whether it was able to complete or not. */ navigatePrev(): boolean | undefined; /** Navigate to the start row in the grid */ navigateRowStart(): boolean | undefined; /** Navigate to the end row in the grid */ navigateRowEnd(): boolean | undefined; /** Navigate to coordinate 0,0 (top left home) */ navigateTopStart(): boolean | undefined; /** Navigate to bottom row end (bottom right end) */ navigateBottomEnd(): boolean | undefined; /** * @param {string} dir Navigation direction. * @return {boolean} Whether navigation resulted in a change of active cell. */ protected navigate(dir: 'up' | 'down' | 'left' | 'right' | 'prev' | 'next' | 'home' | 'end'): boolean | undefined; protected navigateToPos(pos: CellPosition | null): boolean | undefined; /** * Returns a DOM element containing a cell at a given row and cell. * @param row A row index. * @param cell A column index. */ getCellNode(row: number, cell: number): HTMLDivElement | null; /** * Sets an active cell. * @param {number} row - A row index. * @param {number} cell - A column index. * @param {boolean} [optionEditMode] Option Edit Mode is Auto-Edit? * @param {boolean} [preClickModeOn] Pre-Click Mode is Enabled? * @param {boolean} [suppressActiveCellChangedEvent] Are we suppressing Active Cell Changed Event (defaults to false) */ setActiveCell(row: number, cell: number, opt_editMode?: boolean, preClickModeOn?: boolean, suppressActiveCellChangedEvent?: boolean): void; /** * Sets an active cell. * @param {number} row - A row index. * @param {number} cell - A column index. * @param {boolean} [suppressScrollIntoView] - optionally suppress the ScrollIntoView that happens by default (defaults to false) */ setActiveRow(row: number, cell?: number, suppressScrollIntoView?: boolean): void; /** * Returns true if you can click on a given cell and make it the active focus. * @param {number} row A row index. * @param {number} col A column index. */ canCellBeActive(row: number, cell: number): boolean; /** * Returns true if selecting the row causes this particular cell to have the selectedCellCssClass applied to it. A cell can be selected if it exists and if it isn't on an empty / "Add New" row and if it is not marked as "unselectable" in the column definition. * @param {number} row A row index. * @param {number} col A column index. */ canCellBeSelected(row: number, cell: number): boolean; /** * Accepts a row integer and a cell integer, scrolling the view to the row where row is its row index, and cell is its cell index. Optionally accepts a forceEdit boolean which, if true, will attempt to initiate the edit dialogue for the field in the specified cell. * Unlike setActiveCell, this scrolls the row into the viewport and sets the keyboard focus. * @param {Number} row A row index. * @param {Number} cell A column index. * @param {Boolean} [forceEdit] If true, will attempt to initiate the edit dialogue for the field in the specified cell. */ gotoCell(row: number, cell: number, forceEdit?: boolean, e?: Event | SlickEvent): void; protected commitCurrentEdit(): boolean; protected cancelCurrentEdit(): boolean; protected rowsToRanges(rows: number[]): SlickRange[]; /** Returns an array of row indices corresponding to the currently selected rows. */ getSelectedRows(): number[]; /** * Accepts an array of row indices and applies the current selectedCellCssClass to the cells in the row, respecting whether cells have been flagged as selectable. * @param {Array} rowsArray - an array of row numbers. * @param {String} [caller] - an optional string to identify who called the method */ setSelectedRows(rows: number[], caller?: string): void; /** * Sanitize possible dirty html string (remove any potential XSS code like scripts and others) when a `sanitizer` is provided via grid options. * The logic will only call the sanitizer if it exists and the value is a defined string, anything else will be skipped (number, boolean, TrustedHTML will all be skipped) * @param {*} dirtyHtml: dirty html string */ sanitizeHtmlString(dirtyHtml: unknown): T; } export {}; //# sourceMappingURL=slickGrid.d.ts.map