import { CorrectnessState } from '@pbkware/js-utils'; import { Guid } from '@pbkware/js-utils'; import { IndexedRecord } from '@pbkware/js-utils'; import { IndexSignatureHack } from '@pbkware/js-utils'; import { Integer } from '@pbkware/js-utils'; import { InternalError } from '@pbkware/js-utils'; import { JsonElement } from '@pbkware/js-utils'; import { LockItemByKeyList } from '@pbkware/js-utils'; import { LockOpenListItem } from '@pbkware/js-utils'; import { MapKey } from '@pbkware/js-utils'; import { MultiEvent } from '@pbkware/js-utils'; import { NamedLocker } from '@pbkware/js-utils'; import { NamedOpener } from '@pbkware/js-utils'; import { Result } from '@pbkware/js-utils'; import { UnreachableCaseInternalError } from '@pbkware/js-utils'; import { UsableListChangeTypeId } from '@pbkware/js-utils'; export declare const effectFactory: RevStandardCellEffectFactory; /** @public */ export declare class RevAllowedMultiHeadingDataRowArraySourcedFieldsColumnLayoutDefinition extends RevColumnLayoutDefinition implements RevAllowedSourcedFieldsColumnLayoutDefinition { readonly allowedFields: readonly RevMultiHeadingDataRowArraySourcedField[]; readonly fixedColumnCount: Integer; constructor(columns: readonly RevColumnLayoutDefinition.Column[], allowedFields: readonly RevMultiHeadingDataRowArraySourcedField[], fixedColumnCount: Integer); } /** @public */ export declare class RevAllowedRecordSourcedField extends RevRecordSourcedField { getViewValue(_record: IndexedRecord): RevTextFormattableValue; } /** @public */ export declare class RevAllowedRecordSourcedFieldsColumnLayoutDefinition extends RevColumnLayoutDefinition implements RevAllowedSourcedFieldsColumnLayoutDefinition { readonly allowedFields: readonly RevAllowedRecordSourcedField[]; readonly fixedColumnCount: Integer; constructor(columns: readonly RevColumnLayoutDefinition.Column[], allowedFields: readonly RevAllowedRecordSourcedField[], fixedColumnCount: Integer); } /** @public */ export declare class RevAllowedSingleHeadingDataRowArraySourcedFieldsColumnLayoutDefinition extends RevColumnLayoutDefinition implements RevAllowedSourcedFieldsColumnLayoutDefinition { readonly allowedFields: readonly RevSingleHeadingDataRowArraySourcedField[]; readonly fixedColumnCount: Integer; constructor(columns: readonly RevColumnLayoutDefinition.Column[], allowedFields: readonly RevSingleHeadingDataRowArraySourcedField[], fixedColumnCount: Integer); } /** @public */ export declare interface RevAllowedSourcedFieldsColumnLayoutDefinition { readonly allowedFields: readonly RevSourcedField[]; readonly columns: readonly RevColumnLayoutDefinition.Column[]; readonly columnCount: Integer; readonly fixedColumnCount: Integer; } export declare class RevAnimation { private _animationFrameHandle; private _nextAnimateTimeoutHandle; private _nextAnimateTime; private _animators; private _backgroundIntervaliserMap; createAnimator(minimumAnimateTimeInterval: number, backgroundAnimateTimeInterval: number | undefined, animateEventer: RevAnimator.AnimateEventer): RevAnimator; destroyAnimator(animator: RevAnimator): void; private requestAnimationFrame; private scheduleAnimationFrame; private frameCallback; private processAnimatorBackgroundAnimateTimeIntervalChanged; private incrementBackgroundIntervaliserCount; private decrementBackgroundIntervaliserCount; } /** Controls initiation of painting of all grids with one animation frame */ export declare namespace RevAnimation { export interface BackgroundIntervaliser { readonly interval: number; readonly handle: ReturnType; count: number; } const animation: RevAnimation; } export declare class RevAnimator { private _minimumAnimateTimeInterval; private _backgroundAnimateTimeInterval; private readonly _animateEventer; private readonly _animateRequiredNowEventer; private readonly _animateRequiredAtEventer; private readonly _backgroundAnimateTimeIntervalChangedEventer; private _animateRequired; private _nextAnimateAllowedTime; private _animating; constructor(_minimumAnimateTimeInterval: number, _backgroundAnimateTimeInterval: number | undefined, _animateEventer: RevAnimator.AnimateEventer, _animateRequiredNowEventer: RevAnimator.AnimateRequiredNowEventer, _animateRequiredAtEventer: RevAnimator.AnimateRequiredAtEventer, _backgroundAnimateTimeIntervalChangedEventer: RevAnimator.BackgroundAnimateTimeIntervalChangedEventer); get minimumAnimateTimeInterval(): number; get backgroundAnimateTimeInterval(): number | undefined; get animateRequired(): boolean; get animating(): boolean; flagAnimateRequired(): void; makeRequiredAnimateImmediate(): void; getNextAnimateTime(now: DOMHighResTimeStamp): DOMHighResTimeStamp | undefined; animate(): void; setAnimateTimeIntervals(minimumAnimateTimeInterval: number, backgroundAnimateTimeInterval: number | undefined): void; } export declare namespace RevAnimator { export type AnimateEventer = (this: void) => void; export type AnimateRequiredNowEventer = (this: void, now: DOMHighResTimeStamp) => void; export type AnimateRequiredAtEventer = (this: void, atTime: DOMHighResTimeStamp, nowTime: DOMHighResTimeStamp) => void; export type BackgroundAnimateTimeIntervalChangedEventer = (this: void, animator: RevAnimator, oldBackgroundAnimateTimeInterval: number | undefined) => void; } /** @public */ export declare class RevApiError extends InternalError { constructor(code: string, message: string); } /** Render the grid only as needed ("partial render"). * @remarks Paints all the cells of a grid, one column at a time, but only as needed. * * Partial render is supported only by those cells whose cell renderer supports it by returning before rendering (based on `config.snapshot`). * * #### On the next call (after reset) * * Each cell is drawn redrawn only when its appearance changes. This determination is made by the cell renderer by comparing with (and maintaining) `config.snapshot`. See XXX for a sample implementation. * * `try...catch` surrounds each cell paint in case a cell renderer throws an error. * The error message is error-logged to console AND displayed in cell. * * #### On subsequent calls * * Iterates through each cell, calling `_paintCell` with `undefined` prefill color. This signifies partial render to the XXX cell renderer, which only renders the cell when it's text, font, or colors have changed. */ export declare class RevAsNeededGridPainter extends RevGridPainter { constructor(gridSettings: RevGridSettings, canvas: RevCanvas, subgridsManager: RevSubgridsManager, viewLayout: RevViewLayout, focus: RevFocus, selection: RevSelection, mouse: RevMouse, repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer); paintCells(): void; } export declare namespace RevAsNeededGridPainter { const key = "as-needed"; const partial = true; } /** @public */ export declare class RevAssertError extends InternalError { constructor(code: string, message?: string); } /** @public */ export declare interface RevBehavioredColumnSettings extends RevColumnSettings, RevBehavioredSettings { readonly gridSettings: RevGridSettings; merge(settings: Partial, overrideGrid: boolean): boolean; clone(overrideGrid: boolean): RevBehavioredColumnSettings; } /** @public */ export declare interface RevBehavioredGridSettings extends RevGridSettings, RevBehavioredSettings { merge(settings: Partial): boolean; clone(): RevBehavioredGridSettings; } /** @public */ export declare interface RevBehavioredSettings { /* Excluded from this release type: resizeEventer */ /* Excluded from this release type: viewRenderInvalidatedEventer */ /* Excluded from this release type: viewLayoutInvalidatedEventer */ /* Excluded from this release type: horizontalViewLayoutInvalidatedEventer */ /* Excluded from this release type: verticalViewLayoutInvalidatedEventer */ beginChange(): void; endChange(): boolean; subscribeChangedEvent(handler: RevBehavioredSettings.ChangedEventHandler): void; unsubscribeChangedEvent(handler: RevBehavioredSettings.ChangedEventHandler): void; } /** @public */ export declare namespace RevBehavioredSettings { export type ChangedEventHandler = (this: void) => void; /* Excluded from this release type: ResizeEventer */ /* Excluded from this release type: ViewRenderInvalidatedEventer */ /* Excluded from this release type: ViewLayoutInvalidatedEventer */ } /* Excluded from this release type: RevBehaviorManager */ /** Render the grid with consolidated row OR column rects. * @remarks Paints all the cells of a grid, one column at a time. * * First, a background rect is drawn using the grid background color. * * Then, if there are any rows with their own background color _that differs from the grid background color,_ these are consolidated and the consolidated groups of row backgrounds are all drawn before iterating through cells. These row backgrounds get priority over column backgrounds. * * If there are no such row background rects to draw, the column rects are consolidated and drawn instead (again, before the cells). Note that these column rects are _not_ suitable for clipping overflow text from previous columns. If you have overflow text, either turn on clipping (big performance hit) or turn on one of the `truncateTextWithEllipsis` options. * * `try...catch` surrounds each cell paint in case a cell renderer throws an error. * The error message is error-logged to console AND displayed in cell. * */ export declare class RevByColumnsAndRowsGridPainter extends RevGridPainter { constructor(gridSettings: RevGridSettings, canvas: RevCanvas, subgridsManager: RevSubgridsManager, viewLayout: RevViewLayout, focus: RevFocus, selection: RevSelection, mouse: RevMouse, repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer); paintCells(): void; } export declare namespace RevByColumnsAndRowsGridPainter { const key = "by-columns-and-rows"; } /** Render the grid with discrete column rects. * @remarks Paints all the cells of a grid, one column at a time. * * In this grid renderer, a background rect is _not_ drawn using the grid background color. * * Rather, all columns paint their own background rects, with color defaulting to grid background color. * * The idea of painting each column rect is to "clip" text that might have overflowed from the previous column by painting over it with the background from this column. Only the last column will show overflowing text, and only if the canvas width exceeds the grid width. If this is the case, you can turn on clipping for the last column only by setting `columnClip` to `true` for the last column. * * NOTE: As a convenience feature, setting `columnClip` to `null` will clip only the last column, so simply setting it on the grid (rather than the last column) will have the same effect. This is much more convenient because you don't have to worry about the last column being redefined (moved, hidden, etc). * * `try...catch` surrounds each cell paint in case a cell renderer throws an error. * The error message is error-logged to console AND displayed in cell. */ export declare class RevByColumnsDiscreteGridPainter extends RevGridPainter { constructor(gridSettings: RevGridSettings, canvas: RevCanvas, subgridsManager: RevSubgridsManager, viewLayout: RevViewLayout, focus: RevFocus, selection: RevSelection, mouse: RevMouse, repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer); paintCells(): void; } export declare namespace RevByColumnsDiscreteGridPainter { const key = "by-columns-discrete"; } /** Render the grid with consolidated column rects. * @remarks Paints all the cells of a grid, one column at a time. * * First, a background rect is drawn using the grid background color. * * Then, if there are any columns with their own background color _that differs from the grid background color,_ these are consolidated and the consolidated groups of column backgrounds are all drawn before iterating through cells. Note that these column rects are _not_ suitable for clipping overflow text from previous columns. If you have overflow text, either turn on clipping (`grid.properties.columnClip = true` but big performance hit) or turn on one of the `truncateTextWithEllipsis` options. * * `try...catch` surrounds each cell paint in case a cell renderer throws an error. * The error message is error-logged to console AND displayed in cell. * * **Regading clipping.** The reason for clipping is to prevent text from overflowing into the next column. However there is a serious performance cost. * * For performance reasons do not set up a clipping region for each cell. However, iff grid property `columnClip` is truthy, this grid renderer will set up a clipping region to prevent text overflow to right. If `columnClip` is `null`, a clipping region will only be set up on the last column. Otherwise, there will be no clipping region. * * The idea of clipping just the last column is because in addition to the optional graphics clipping, we also clip ("truncate") text. Text can be truncated conservatively so it will never overflow. The problem with this is that characters vanish as they hit the right cell boundary, which may or may be obvious depending on font size. Alternatively, text can be truncated so that the overflow will be a maximum of 1 character. This allows partial characters to be rendered. But this is where graphics clipping is required. * * When renderering column by column as this particular renderer does, _and_ when the background color _of the next cell to the right_ is opaque (alpha = 1), clipping can be turned off because each column will _overpaint_ any text that overflowed from the one before. However, any text that overflows the last column will paint into unused canvas region to the right of the grid. This is the _raison d'Γͺtre_ for "clip last column only" option mentioned above (when `columnClip` is set to `null`). To avoid even this performance cost (of clipping just the last column), column widths can be set to fill the available canvas. * * Note that text never overflows to left because text starting point is never less than 0. The reason we don't clip to the left is for cell renderers that need to re-render to the left to produce a merged cell effect, such as grouped column header. */ export declare class RevByColumnsGridPainter extends RevGridPainter { constructor(gridSettings: RevGridSettings, canvas: RevCanvas, subgridsManager: RevSubgridsManager, viewLayout: RevViewLayout, focus: RevFocus, selection: RevSelection, mouse: RevMouse, repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer); paintCells(): void; } export declare namespace RevByColumnsGridPainter { const key = "by-columns"; } /** Render the grid. * @remarks _**NOTE:** This grid renderer is not as performant as the others and it's use is not recommended if you care about performance. The reasons for the wanting performance are unclear, possibly having to do with the way Chrome optimizes access to the column objects?_ * * Paints all the cells of a grid, one row at a time. * * First, a background rect is drawn using the grid background color. * * Then, if there are any rows with their own background color _that differs from the grid background color,_ these are consolidated and the consolidated groups of row backgrounds are all drawn before iterating through cells. * * `try...catch` surrounds each cell paint in case a cell renderer throws an error. * The error message is error-logged to console AND displayed in cell. */ export declare class RevByRowsGridPainter extends RevGridPainter { constructor(gridSettings: RevGridSettings, canvas: RevCanvas, subgridsManager: RevSubgridsManager, viewLayout: RevViewLayout, focus: RevFocus, selection: RevSelection, mouse: RevMouse, repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer); paintCells(): void; } export declare namespace RevByRowsGridPainter { const key = "by-rows"; } /** * A wrapper around CanvasRenderingContext2D which accesses values from CanvasRenderingContext2D from a cache. * @remarks * Supports saving and restoring by pushing and popping cached values onto/from a stack. * Cache also stores the width and height of strings so that these widths and heights can be re-used without needing to be constantly recalculated */ export declare class RevCachedCanvasRenderingContext2D { private readonly canvasRenderingContext2D; /** Cache of CanvasRenderingContext2D values*/ readonly cache: RevCachedCanvasRenderingContext2D.Cache; /* Excluded from this release type: _conditionalsStack */ /* Excluded from this release type: _fontTextWidthMap */ /* Excluded from this release type: _fontTextHeightDefaultAndMap */ /* Excluded from this release type: __constructor */ clearRect(x: number, y: number, width: number, height: number): void; clearBounds(bounds: RevRectangle): void; fillRect(x: number, y: number, width: number, height: number): void; fillBounds(bounds: RevRectangle): void; measureText(value: string): TextMetrics; beginPath(): void; rect(x: number, y: number, width: number, height: number): void; clip(): void; createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; stroke(): void; strokeRect(x: number, y: number, width: number, height: number): void; fill(): void; fillText(text: string, x: number, y: number, maxWidth?: number): void; closePath(): void; lineTo(x: number, y: number): void; moveTo(x: number, y: number): void; drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void; scale(x: number, y: number): void; getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; putImageData(imageData: ImageData, sx: number, sy: number): void; quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; clearFillRect(x: number, y: number, width: number, height: number, color: string): void; clearFillBounds(bounds: RevRectangle, color: string): void; alpha(cssColorSpec: string | undefined): number; /** * Gets a map of the width (value) of characters (key) for a particular font * @param font - the name of the font */ getTextWidthMap(font: string): RevCachedCanvasRenderingContext2D.TextWidthMap; /** * Gets the width of a string using the current font. * @remarks * Calculates the width of a string in pixels by adding the widths of each character in the string. The widths of each character is either obtained from a map or (if not in map) calculated using * `measureText()` and stored in map. * * NOTE: There is a minor measuring error when taking the sum of the pixel widths of individual characters that make up a string vs. the pixel width of the string taken as a whole. * This is possibly due to kerning or rounding. The error is typically about 0.1%. * @param text - Text to measure. * @returns Width of string in pixels. */ getTextWidth(text: string): number; /** * Gets the width in pixels of a character using the current font. * @remarks * @param char - Character whose width is wanted. * @returns Width of character in pixels. */ getCharWidth(char: string): number; /** * Gets the width in pixels of the character `m` using the current font. * @remarks * @returns Width of `m` in pixels. */ getEmWidth(): number; /** * Gets the height, ascent and descent in pixels of a text string using the current font. * @param text - string whose height is to be obtained. * @returns A TextHeight interface with height, ascent and descent of string. */ getTextHeight(text: string): RevCachedCanvasRenderingContext2D.TextHeight; /** * Gets the height, ascent and descent in pixels of the current font. * @returns A TextHeight interface with height, ascent and descent encompassing the main characters in the font. */ getFontHeight(): RevCachedCanvasRenderingContext2D.TextHeight; /** * Conditionally clip a region * @remarks * The conditional paramater indicates whether a region is to be clipped. If so, then the cache is saved to the stack. * Always call a matching {@link clipRestore} to unwind this `clipSave` even if conditional was false * @param conditional - if true, save cache to stack and clip region * @param x - left of region * @param y - top of region * @param width - width of region * @param height - height of region */ clipSave(conditional: boolean, x: number, y: number, width: number, height: number): void; /** * Unwind a previous {@link clipSave} and pop cache stack if necessary */ clipRestore(): void; /* Excluded from this release type: getCurrentFontTextHeightDefaultAndMap */ /* Excluded from this release type: calculateTextHeight */ } export declare namespace RevCachedCanvasRenderingContext2D { const ALPHA_REGEX: RegExp; const fontMainCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; export type TextWidthMap = Map; export type FontTextWidthMap = Map; export interface TextHeight { ascent: number; height: number; descent: number; } export type TextHeightMap = Map; export interface TextHeightDefaultAndMap { default: TextHeight; map: TextHeightMap; } export type FontTextHeightMap = Map; export interface TruncatedTextWidth { /** `undefined` if it fits; truncated version of provided `string` if it does not. */ text: string | undefined; /** Width of provided `text` if it fits; width of truncated string if it does not. */ textWidth: number; } export type ConditionalsStack = boolean[]; export class Cache implements Cache.Values { /* Excluded from this release type: _canvasRenderingContext2D */ values: Cache.Values; valuesStack: Cache.Values[]; /* Excluded from this release type: __constructor */ get lineDash(): number[]; set lineDash(value: number[]); get fillStyle(): string | CanvasGradient; set fillStyle(value: string | CanvasGradient); get font(): string; set font(value: string); get globalAlpha(): number; set globalAlpha(value: number); get globalCompositeOperation(): GlobalCompositeOperation; set globalCompositeOperation(value: GlobalCompositeOperation); get imageSmoothingEnabled(): boolean; set imageSmoothingEnabled(value: boolean); get lineCap(): CanvasLineCap; set lineCap(value: CanvasLineCap); get lineDashOffset(): number; set lineDashOffset(value: number); get lineJoin(): CanvasLineJoin; set lineJoin(value: CanvasLineJoin); get lineWidth(): number; set lineWidth(value: number); get miterLimit(): number; set miterLimit(value: number); get shadowBlur(): number; set shadowBlur(value: number); get shadowColor(): string; set shadowColor(value: string); get shadowOffsetX(): number; set shadowOffsetX(value: number); get shadowOffsetY(): number; set shadowOffsetY(value: number); get strokeStyle(): string; set strokeStyle(value: string); get textAlign(): CanvasTextAlign; set textAlign(value: CanvasTextAlign); get textBaseline(): CanvasTextBaseline; set textBaseline(value: CanvasTextBaseline); get emWidth(): number | undefined; set emWidth(value: number | undefined); save(): void; restore(): void; } export namespace Cache { export interface Values { lineDash: number[] | undefined; fillStyle: string | CanvasGradient | undefined; font: string | undefined; globalAlpha: number | undefined; globalCompositeOperation: GlobalCompositeOperation | undefined; imageSmoothingEnabled: boolean | undefined; lineCap: CanvasLineCap | undefined; lineDashOffset: number | undefined; lineJoin: CanvasLineJoin | undefined; lineWidth: number | undefined; miterLimit: number | undefined; shadowBlur: number | undefined; shadowColor: string | undefined; shadowOffsetX: number | undefined; shadowOffsetY: number | undefined; strokeStyle: string | undefined; textAlign: CanvasTextAlign | undefined; textBaseline: CanvasTextBaseline | undefined; emWidth: number | undefined; } } } /* Excluded from this release type: revCalculateAdjustmentForRangeMoved */ /* Excluded from this release type: revCalculateNumberArrayUniqueCount */ /** * Encapsulates a grid's HTML canvas element and manages its rendering and user interaction. * * @typeParam BGS - Behaviored grid settings type. * * @see [Canvas Component πŸ—Ž](../../../../../Architecture/Client/Components/Canvas/) * @public */ export declare class RevCanvas implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; readonly element: HTMLCanvasElement; /* Excluded from this release type: _gridSettings */ readonly overlayElement: HTMLElement; readonly gc: RevCachedCanvasRenderingContext2D; /* Excluded from this release type: resizedEventerForViewLayout */ /* Excluded from this release type: resizedEventerForEventBehavior */ /* Excluded from this release type: repaintEventer */ /* Excluded from this release type: focusEventer */ /* Excluded from this release type: blurEventer */ /* Excluded from this release type: keyDownEventer */ /* Excluded from this release type: keyUpEventer */ /* Excluded from this release type: pointerEnterEventer */ /* Excluded from this release type: pointerDownEventer */ /* Excluded from this release type: pointerMoveEventer */ /* Excluded from this release type: pointerUpCancelEventer */ /* Excluded from this release type: pointerLeaveOutEventer */ /* Excluded from this release type: pointerDragStartEventer */ /* Excluded from this release type: pointerDragEventer */ /* Excluded from this release type: pointerDragEndEventer */ /* Excluded from this release type: wheelMoveEventer */ /* Excluded from this release type: clickEventer */ /* Excluded from this release type: dblClickEventer */ /* Excluded from this release type: contextMenuEventer */ /* Excluded from this release type: touchStartEventer */ /* Excluded from this release type: touchMoveEventer */ /* Excluded from this release type: touchEndEventer */ /* Excluded from this release type: copyEventer */ /* Excluded from this release type: dragStartEventer */ /* Excluded from this release type: _pointerEntered */ /* Excluded from this release type: _pointerDownState */ /* Excluded from this release type: _pointerDragInternal */ /* Excluded from this release type: _started */ /* Excluded from this release type: _flooredWidth */ /* Excluded from this release type: _flooredHeight */ /* Excluded from this release type: _flooredBounds */ /* Excluded from this release type: _hasBounds */ /* Excluded from this release type: _devicePixelRatio */ /* Excluded from this release type: _width */ /* Excluded from this release type: _height */ /* Excluded from this release type: _emptyImage */ /* Excluded from this release type: _resizeTimeoutId */ /* Excluded from this release type: _resizeObserver */ /* Excluded from this release type: __constructor */ get hasBounds(): boolean; get flooredBounds(): RevRectangle; get flooredWidth(): number; get flooredHeight(): number; get devicePixelRatio(): number; get emptyImage(): HTMLImageElement; addExternalEventListener(eventName: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeExternalEventListener(eventName: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; /* Excluded from this release type: start */ /* Excluded from this release type: stop */ checksize(): void; resize(debounceEvent: boolean, rect?: DOMRect): void; /* Excluded from this release type: getOffsetPoint */ /* Excluded from this release type: isActiveDocumentElement */ /* Excluded from this release type: takeFocus */ /* Excluded from this release type: dispatchEvent */ /* Excluded from this release type: setCursor */ /* Excluded from this release type: setTitleText */ /* Excluded from this release type: pointerUpCancelEventListener */ /* Excluded from this release type: pointerLeaveOutListener */ /* Excluded from this release type: keyDownEventListener */ /* Excluded from this release type: keyUpEventListener */ /* Excluded from this release type: focusEventListener */ /* Excluded from this release type: blurEventListener */ /* Excluded from this release type: clickEventListener */ /* Excluded from this release type: dblClickEventListener */ /* Excluded from this release type: contextMenuEventListener */ /* Excluded from this release type: touchStartEventListener */ /* Excluded from this release type: touchMoveEventListener */ /* Excluded from this release type: touchEndEventListener */ /* Excluded from this release type: copyEventListener */ /* Excluded from this release type: createCachedContext */ /* Excluded from this release type: checkFireResizedEvents */ /* Excluded from this release type: fireResizedEvents */ /* Excluded from this release type: checkClearResizeTimeout */ /* Excluded from this release type: setPointerDownState */ /* Excluded from this release type: checkPreventDefault */ /* Excluded from this release type: getBoundingClientRect */ /* Excluded from this release type: getCanvasBoundingClientRect */ } /** @public */ export declare namespace RevCanvas { /* Excluded from this release type: ResizedEventer */ /* Excluded from this release type: RepaintEventer */ /* Excluded from this release type: FocusEventer */ /* Excluded from this release type: MouseEventer */ /* Excluded from this release type: PointerEventer */ /* Excluded from this release type: PointerDragStartEventer */ /* Excluded from this release type: PointerDragEventer */ /* Excluded from this release type: WheelEventer */ /* Excluded from this release type: KeyEventer */ /* Excluded from this release type: TouchEventer */ /* Excluded from this release type: ClipboardEventer */ /* Excluded from this release type: DragEventer */ /* Excluded from this release type: PointerDownStateId */ const canvasCssSuffix = "canvas"; export function createCanvasElement(): HTMLCanvasElement; } /* Excluded from this release type: RevCellClickUiController */ /** @public */ export declare interface RevCellEditor extends RevCellPossiblyPaintable { /** Indicates if editor can only display data */ readonly: boolean; /** Get latest data from data server */ pullCellValueEventer?: RevCellEditor.PullCellValueEventer; /** Save data to data server. Optional. If not supplied then editor is read only */ pushCellValueEventer?: RevCellEditor.PushCellValueEventer; /** Editor can optionally use this eventer to notify Grid that it has completed */ cellClosedEventer?: RevCellEditor.CellClosedEventer; /** Emits key down events generated by editor */ keyDownEventer?: RevCellEditor.KeyDownEventer; /** Provide the initial data to the editor. This is done after all events have been subscribed to - so editor can start running */ tryOpenCell(viewCell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, openingClickEvent: MouseEvent | undefined): boolean; /** Close the editor - returns data that was in editor or undefined if cancel specified */ closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; /** Server data value has changed since being provided to editor or pulled by editor */ invalidateValue?(): void; /** See if the editor wants the key down event. If fromEditor is true, then this editor generated the event in the first place */ processGridKeyDownEvent(event: KeyboardEvent, fromEditor: boolean, field: SF, dataServerRowIndex: number): boolean; /** See if the editor wants the mouse down event. If fromEditor is true, then this editor generated the event in the first place */ processGridClickEvent?(event: MouseEvent, viewCell: RevViewCell): boolean; /** See if the editor wants the mouse move event. If fromEditor is true, then this editor generated the event in the first place */ processGridPointerMoveEvent?(event: PointerEvent, viewCell: RevViewCell): RevCellEditor.MouseActionPossible | undefined; /** Implement if editor paints itself (eg a HTML Input element). If bounds is undefined, then editor is hidden */ setBounds?(bounds: RevRectangle | undefined): void; /** Implement if editor can be focused. */ focus?(): void; } /** @public */ export declare namespace RevCellEditor { export type PullCellValueEventer = (this: void) => RevDataServer.ViewValue; export type PushCellValueEventer = (this: void, value: RevDataServer.ViewValue) => void; export type CellClosedEventer = (this: void, value: RevDataServer.ViewValue | undefined) => void; export type KeyDownEventer = (this: void, event: KeyboardEvent) => void; export interface MouseActionPossible { cursorName: string | undefined; titleText: string | undefined; } } /** @public */ export declare interface RevCellMetaSettings { get(key: T): RevColumnSettings[T]; get(key: string | number): RevMetaServer.CellOwnProperty; } /** * Implementations of `RevCellPainter` are used to render the 2D graphics context within the bound of a cell. * * Implement this interface to implement your own cell painter. * * @public */ export declare interface RevCellPainter extends RevCellPossiblyPaintable { /** * An empty implementation of a cell renderer, see [the null object pattern](http://c2.com/cgi/wiki?NullObject). * @returns Preferred pixel width of content. The content may or may not be rendered at that width depending on whether or not `config.bounds` was respected and whether or not the grid renderer is using clipping. (Clipping is generally not used due to poor performance.) */ paint(cell: RevViewCell, prefillColor: string | undefined): number | undefined; } /** @public */ export declare namespace RevCellPainter { /** * A simple implementation of rounding a cell. * @param x - the x grid coordinate of my origin * @param y - the y grid coordinate of my origin * @param width - the width I'm allowed to draw within * @param height - the height I'm allowed to draw within */ export function roundRect(gc: RevCachedCanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number, fill: boolean, stroke?: number | boolean): void; } /** @public */ export declare interface RevCellPossiblyPaintable { paint?(cell: RevViewCell, prefillColor: string | undefined): number | undefined; } export declare class RevCellPropertiesBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; private readonly _columnsManager; private readonly _subgridsManger; private readonly _viewLayout; constructor(clientId: string, internalParent: RevClientObject, _columnsManager: RevColumnsManager, _subgridsManger: RevSubgridsManager, _viewLayout: RevViewLayout); /* Excluded from this release type: getCellPropertiesAccessor */ /* Excluded from this release type: setCellOwnProperties */ /* Excluded from this release type: addCellOwnProperties */ /* Excluded from this release type: getCellOwnProperties */ /* Excluded from this release type: deleteCellOwnProperties */ /* Excluded from this release type: getCellProperty */ getCellProperty(column: RevColumn, subgridRowIndex: number, key: T, subgrid: RevSubgrid): RevColumnSettings[T]; /* Excluded from this release type: setCellProperty */ /* Excluded from this release type: deleteCellProperty */ /* Excluded from this release type: clearAllCellProperties */ /** * Get the properties object for cell. * @remarks This is the cell's own properties object if found else the column object. * * If you are seeking a single specific property, consider calling getCellProperty instead. * @param viewCell - RevViewCell representing cell. * @returns The properties of the cell at x,y in the grid or falsy if not available. */ getCellOwnPropertiesFromViewCell(viewCell: RevViewCell): RevMetaServer.CellOwnProperties | false | null | undefined; getCellOwnPropertyFromViewCell(viewCell: RevViewCell, key: string): RevMetaServer.CellOwnProperty | undefined; } export declare namespace RevCellPropertiesBehavior { export type GetRowMetadataEventer = (this: void, rowIndex: number, subgrid: RevSubgrid) => RevMetaServer.RowMetadata | undefined; export type SetRowMetadataEventer = (this: void, rowIndex: number, subgrid: RevSubgrid) => void; export class CellMetaSettingsImplementation implements RevCellMetaSettings { private readonly _cellOwnProperties; private readonly _columnSettings; constructor(_cellOwnProperties: RevMetaServer.CellOwnProperties | undefined, _columnSettings: RevColumnSettings); get(key: T): RevColumnSettings[T]; get(key: string | number): RevMetaServer.CellOwnProperty; } } /** @public */ export declare interface RevClickBoxCellPainter extends RevCellPainter { calculateClickBox(cell: RevViewCell): RevRectangle | undefined; } /** @public */ export declare class RevClientGrid { readonly settings: BGS; readonly id: string; readonly clientId: string; readonly internalParent: RevClientObject | undefined; readonly externalParent: unknown | undefined; readonly mouse: RevMouse; readonly selection: RevSelection; readonly focus: RevFocus; readonly canvas: RevCanvas; readonly columnsManager: RevColumnsManager; readonly subgridsManager: RevSubgridsManager; readonly viewLayout: RevViewLayout; readonly renderer: RevRenderer; readonly horizontalScroller: RevScroller; readonly verticalScroller: RevScroller; readonly schemaServer: RevSchemaServer; readonly mainSubgrid: RevMainSubgrid; readonly mainDataServer: RevDataServer; /* Excluded from this release type: _componentsManager */ /* Excluded from this release type: _behaviorManager */ /* Excluded from this release type: _uiManager */ /* Excluded from this release type: _focusScrollBehavior */ /* Excluded from this release type: _focusSelectBehavior */ /* Excluded from this release type: _dataExtractBehavior */ /* Excluded from this release type: _rowPropertiesBehavior */ /* Excluded from this release type: _cellPropertiesBehavior */ private _destroyed; /** * Creates a new RevClientGrid instance. * * @param canvasElement - The HTML canvas element to render the grid on, or a string selector for the canvas element * @param definition - The grid definition containing schema server and subgrid configurations * @param settings - The grid settings object of type BGS * @param getSettingsForNewColumnEventer - Event handler for obtaining settings when new columns are created * @param options - Optional configuration options for the grid including ID, external parent, canvas overlay, and UI controller definitions * * @remarks * This constructor initializes all the core grid components including: * - Components manager for handling canvas, focus, selection, mouse, columns, subgrids, view layout, and renderer * - Behavior manager for focus scroll, focus select, row properties, cell properties, and data extract behaviors * - UI manager for handling user interactions and custom UI controllers * * The schema server can be provided as either an instance or a constructor function. * A unique ID is generated for the grid instance using the provided options. * * @see [Client Grid πŸ—Ž](../../../Architecture/Client/Grid/) */ constructor(canvasElement: HTMLCanvasElement | string, definition: RevGridDefinition, settings: BGS, getSettingsForNewColumnEventer: RevClientGrid.GetSettingsForNewColumnEventer, options?: RevGridOptions); get destroyed(): boolean; get active(): boolean; set active(value: boolean); get fieldColumns(): readonly RevColumn[]; get activeColumns(): readonly RevColumn[]; /** * The index of the active column which is first in view (either on left or right depending on Grid alignment) */ get columnScrollAnchorIndex(): number; /** * The number of pixels that the scroll anchored column is offset. * Changes to allow smooth scrolling */ get columnScrollAnchorOffset(): number; get fixedColumnsViewWidth(): number; get nonFixedColumnsViewWidth(): number; get activeColumnsViewWidth(): number; get selectionDynamicAllSubgrids(): readonly RevSubgrid[]; get activeColumnCount(): number; /** * Be a responsible citizen and call this function on instance disposal! * If multiple grids are used in an application (simultaneously or not), then `destroy()` must be called otherwise * canvase paint loop will continue to run */ destroy(): void; activate(): void; deactivate(): void; /** * Reset all components, resize and invalidate all */ reset(): void; registerGridPainter(key: string, constructor: RevGridPainter.Constructor): void; /** * @returns We have focus. */ isActiveDocumentElement(): boolean; /** * Gets the number of rows in the main subgrid. * @returns The number of rows. */ getSubgridRowCount(subgrid: RevSubgrid): number; calculateRowCount(): number; /** * Retrieve a data row from the main data model. * @returns The data row object at y index. * @param subgridRowIndex - the row index of interest */ getSingletonViewDataRow(subgridRowIndex: Integer, subgrid?: RevSubgrid): RevDataServer.ViewRow; /** * Retrieve all data rows from the data model. * Use with caution! */ getViewData(): readonly RevDataServer.ViewRow[]; getViewValue(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): unknown; setValue(activeColumnIndex: Integer, subgridRowIndex: Integer, value: RevDataServer.EditValue, subgrid?: RevSubgrid): void; /** * Check if the specified active column is in the viewport. * @param activeColumnIndex - The index of the active column to be checked. * @returns `true` if the active column is in the viewport, otherwise `false`. */ isActiveColumnInView(activeColumnIndex: Integer): boolean; /** * Get the visibility of the row matching the provided data row index. * @remarks Requested row may not be visible due to being scrolled out of view. * Determines visibility of a row. * @param subgridRowIndex - The data row index. * @returns The given row is visible. */ isSubgridRowInView(subgridRowIndex: Integer, subgrid?: RevSubgrid): boolean; /** * @param activeColumnIndex - The column index in question. * @param subgridRowIndex - The grid row index in question. * @returns The given cell is fully is visible. */ isCellInView(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevMainSubgrid): boolean; /** * Find cell under offset position in canvas * @param canvasXOffset - X position of pixel in canvas. * @param canvasYOffset - Y position of pixel in canvas. */ findLinedHoverCellAtCanvasOffset(canvasXOffset: Integer, canvasYOffset: Integer): RevLinedHoverCell | undefined; /** * @param gridCell - The pixel location of the mouse in physical grid coordinates. * @returns The pixel based bounds rectangle given a data cell point. */ getBoundsOfCell(gridCell: RevPoint): RevRectangle; getSchema(): readonly RevSchemaField[]; getAllColumn(allX: Integer): RevColumn; /** * @returns A copy of the all columns array by passing the params to `Array.prototype.slice`. */ getFieldColumnRange(begin?: Integer, end?: Integer): RevColumn[]; /** * @returns A copy of the active columns array by passing the params to `Array.prototype.slice`. */ getActiveColumns(begin?: Integer, end?: Integer): RevColumn[]; getHiddenColumns(): RevColumn[]; setActiveColumnsAndWidthsByFieldName(columnNameWidths: RevColumnsManager.FieldNameAndAutoSizableWidth[]): void; /** * Show inactive column(s) or move active column(s). * * @remarks Adds one or several columns to the "active" column list. * * @param fieldColumnIndexes - A column index or array of field indices which are to be shown or hidden. * @param insertIndex - Active index of column to insert before. Set to undefined to add new active columns at end of list. Set to -1 to hide specified columns. * @param allowDuplicateColumns - If true, then if an existing column is already visible, it will not be removed and duplicates of that column will be present. Default: false. * @param ui - Whether this was instigated by a UI action. Default: true. */ showHideColumns(fieldColumnIndexes: Integer | Integer[], insertIndex?: Integer, allowDuplicateColumns?: boolean, ui?: boolean): void; /** * Show inactive column(s) or move active column(s). * * @remarks Adds one or several columns to the "active" column list. * * @param indexesAreActive - If true, then column indices specify active column indices. Otherwise field column indices. * @param fieldColumnIndexes - A column index or array of indices. If undefined then all of the columns as per indexesAreActive. * @param insertIndex - Active index of column to insert before. Set to undefined to add new active columns at end of list. Set to -1 to hide specified columns. * @param allowDuplicateColumns - If true, then if an existing column is already visible, it will not be removed and duplicates of that column will be present. Default: false. * @param ui - Whether this was instigated by a UI action. Default: true. */ showHideColumns(indexesAreActive: boolean, fieldColumnIndexes?: Integer | Integer[], insertIndex?: Integer, allowDuplicateColumns?: boolean, ui?: boolean): void; hideActiveColumn(activeColumnIndex: Integer, ui?: boolean): void; clearColumns(): void; moveActiveColumn(fromIndex: Integer, toIndex: Integer, ui: boolean): void; setActiveColumns(columnFieldNameOrFieldIndexArray: readonly (RevColumn | string | number)[]): void; autoSizeActiveColumnWidths(widenOnly: boolean): void; setActiveColumnsAutoWidthSizing(widenOnly: boolean): void; autoSizeFieldColumnWidth(fieldNameOrIndex: string | number, widenOnly: boolean): void; setColumnScrollAnchor(index: Integer, offset: Integer): boolean; calculateActiveColumnsWidth(): number; calculateActiveNonFixedColumnsWidth(): number; getActiveColumn(activeIndex: Integer): RevColumn; getActiveColumnIndexByFieldIndex(fieldIndex: Integer): number; /** * @returns The width of the given column. * @param activeIndex - The untranslated column index. */ getActiveColumnWidth(activeIndex: Integer): number; /** * Set the width of the given column. * @param columnOrIndex - Column or index of active column whose width is to be set. * @param width - The width in pixels. * @param ui - Whether this was instigated by a UI action * @returns true if column width was changed */ setActiveColumnWidth(columnOrIndex: Integer | RevColumn, width: Integer, ui: boolean): boolean; setColumnWidths(columnWidths: RevColumnAutoSizeableWidth[]): boolean; setColumnWidthsByName(columnNameWidths: RevColumnsManager.FieldNameAndAutoSizableWidth[]): boolean; /** * @returns The height of the given row * @param rowIndex - The untranslated fixed column index. */ getRowHeight(rowIndex: Integer, subgrid?: RevSubgrid): number; /** * Set the height of the given row. * @param rowIndex - The row index. * @param rowHeight - The width in pixels. */ setRowHeight(rowIndex: Integer, rowHeight: Integer, subgrid?: RevSubgrid): void; /** * The top left area has been clicked on * @remarks Delegates to the behavior. * @param {event} mouse - The event details. */ /** * A fixed row has been clicked. * @remarks Delegates to the behavior. * @param {event} event - The event details. */ /** * A fixed column has been clicked. * @remarks Delegates to the behavior. * @param {event} event - The event details. */ /** * @returns The HiDPI ratio. */ getHiDPI(): number; /** * @returns The width of the given (recently rendered) column. * @param colIndex - The column index. */ getRenderedWidth(colIndex: Integer): Integer; /** * @returns The height of the given (recently rendered) row. * @param rowIndex - The row index. */ getRenderedHeight(rowIndex: Integer): Integer; /** * @returns Objects with the values that were just rendered. */ getValuesInView(): RevDataServer.ViewValue[][]; /** * Reset zoom factor used by mouse tracking and placement * of cell editors on top of canvas. * * Call this after resetting `document.body.style.zoom`. * (Do not set `zoom` style on canvas or any other ancestor thereof.) * * **NOTE THE FOLLOWING:** * 1. `zoom` is non-standard (unsupported by FireFox) * 2. The alternative suggested on MDN, `transform`, is ignored * here as it is not a practical replacement for `zoom`. * @see https://developer.mozilla.org/en-US/docs/Web/CSS/zoom * * @todo Scrollbars need to be repositioned when `canvas.style.zoom` !== 1. (May need update to finbars.) */ /** * Enable/disable if this component can receive the focus. */ swapActiveColumns(source: Integer, target: Integer): void; /** * @param activeColumnIndex - Data x coordinate. * @returns The properties for a specific column. */ getActiveColumnSettings(activeColumnIndex: Integer): BCS; mergeFieldColumnSettings(fieldIndex: Integer, settings: Partial, overrideGrid?: boolean): boolean; setFieldColumnSettings(fieldIndex: Integer, settings: BCS): boolean; /* Excluded from this release type: clearAllCellProperties */ addEventListener(eventName: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(eventName: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; clearFocus(): void; tryFocusColumnRowAndEnsureInView(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevMainSubgrid, cell?: RevViewCell): boolean; tryFocusColumnAndEnsureInView(activeColumnIndex: Integer): boolean; tryFocusRowAndEnsureInView(subgridRowIndex: Integer, subgrid?: RevMainSubgrid): boolean; tryMoveFocusLeft(): boolean; tryMoveFocusRight(): boolean; tryMoveFocusUp(): boolean; tryMoveFocusDown(): boolean; tryFocusFirstColumn(): boolean; tryFocusLastColumn(): boolean; tryFocusTop(): boolean; tryFocusBottom(): boolean; tryPageFocusLeft(): boolean; tryPageFocusRight(): boolean; tryPageFocusUp(): boolean; tryPageFocusDown(): boolean; tryScrollLeft(): boolean; tryScrollRight(): boolean; tryScrollUp(): boolean; tryScrollDown(): boolean; scrollFirstColumn(): boolean; scrollLastColumn(): boolean; scrollTop(): boolean; scrollBottom(): boolean; tryScrollPageLeft(): boolean; tryScrollPageRight(): boolean; tryScrollPageUp(): boolean; tryScrollPageDown(): boolean; /* Excluded from this release type: getCellOwnProperties */ /* Excluded from this release type: getCellOwnPropertiesFromRenderedCell */ /* Excluded from this release type: getCellProperties */ /* Excluded from this release type: getCellOwnPropertyFromRenderedCell */ /* Excluded from this release type: getCellProperty */ /* Excluded from this release type: getCellProperty */ /* Excluded from this release type: setCellOwnPropertiesUsingCellEvent */ /* Excluded from this release type: setCellOwnProperties */ /* Excluded from this release type: addCellOwnPropertiesUsingCellEvent */ /* Excluded from this release type: addCellOwnProperties */ /* Excluded from this release type: setCellProperty */ /* Excluded from this release type: setCellProperty */ /** Call before multiple selection changes to consolidate SelectionChange events. * Pair with endSelectionChange(). */ beginSelectionChange(): void; /** Call after multiple selection changes to consolidate SelectionChange events. * Pair with beginSelectionChange(). */ endSelectionChange(): void; clearSelection(): void; selectDynamicAll(subgrid: RevSubgrid | undefined): RevLastSelectionArea | undefined; deselectDynamicAll(subgrid: RevSubgrid | undefined): boolean; selectCell(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): RevLastSelectionArea; deleteCellSelectionArea(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): void; toggleSelectCell(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): boolean; onlySelectRectangle(leftOrExRightActiveColumnIndex: Integer, topOrExBottomSubgridRowIndex: Integer, width: Integer, height: Integer, subgrid?: RevSubgrid): RevLastSelectionArea; selectRectangle(leftOrExRightActiveColumnIndex: Integer, topOrExBottomSubgridRowIndex: Integer, width: Integer, height: Integer, subgrid?: RevSubgrid): RevLastSelectionArea; deleteRectangleSelectionArea(rectangle: RevRectangle, subgrid?: RevMainSubgrid): void; deselectRow(subgridRowIndex: Integer, subgrid?: RevSubgrid): void; deselectRows(subgridRowIndex: Integer, count: Integer, subgrid?: RevSubgrid): void; /** * Removes a columns from the selection. * * The list of column selection areas will be updated to reflect the necessary deletion, splitting or resizing required. * * @param activeColumnIndex - The index of the active column to remove. */ deselectColumn(activeColumnIndex: Integer): void; /** * Removes a range of columns from the selection. * * The list of column selection areas will be updated to reflect the necessary deletion, splitting or resizing required. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to deselect if `count` is positive, or the exclusive end index if `count` is negative. * @param count - The number of columns to deselect. If negative, `count` is in reverse direction from the exclusive end index. */ deselectColumns(leftOrExRightActiveColumnIndex: Integer, count: Integer): void; isCellSelected(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): boolean; /** Returns undefined if not selected, false if selected with others, true if the only cell selected */ isOnlyThisCellSelected(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): boolean | undefined; getOneCellSelectionAreaType(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): RevSelectionAreaType | undefined; getAllCellSelectionAreaTypeIds(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid): RevSelectionAreaType[]; isSelectedCellTheOnlySelectedCell(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid: RevSubgrid, selectedType?: RevSelectionAreaType): boolean; areColumnsOrRowsSelected(includeDynamicAll?: boolean): boolean; areRowsSelected(subgrid?: RevMainSubgrid, includeDynamicAll?: boolean): boolean; getSelectedRowCount(subgrid?: RevMainSubgrid, includeDynamicAll?: boolean): number; getSelectedAllAreaRowCount(): number; getSelectedRowIndices(includeDynamicAll?: boolean): RevSelectionRows.SubgridIndices[]; getSelectedDynamicAllRowIndices(): RevSelectionRows.SubgridIndices[]; getSelectedSubgridDynamicAllRowIndices(subgrid?: RevMainSubgrid): Integer[]; areColumnsSelected(includeDynamicAll?: boolean): boolean; getSelectedColumnIndices(includeDynamicAll?: boolean): number[]; selectColumn(activeColumnIndex: Integer): void; selectColumns(activeColumnIndex: Integer, count: Integer): void; onlySelectColumn(activeColumnIndex: Integer): void; onlySelectColumns(activeColumnIndex: Integer, count: Integer): void; toggleSelectColumn(activeColumnIndex: Integer): void; selectRow(subgridRowIndex: Integer, subgrid?: RevSubgrid): void; selectRows(subgridRowIndex: Integer, count: Integer, subgrid?: RevSubgrid): void; selectAllRows(subgrid?: RevSubgrid): void; onlySelectRow(subgridRowIndex: Integer, subgrid?: RevSubgrid): void; onlySelectRows(subgridRowIndex: Integer, count: Integer, subgrid?: RevSubgrid): void; toggleSelectRow(subgridRowIndex: Integer, subgrid?: RevSubgrid): void; focusOnlySelectRectangle(leftOrExRightActiveColumnIndex: Integer, topOrExBottomSubgridRowIndex: Integer, width: Integer, height: Integer, subgrid?: RevSubgrid, ensureFullyInView?: RevEnsureFullyInViewEnum): void; focusOnlySelectCell(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid, ensureFullyInView?: RevEnsureFullyInViewEnum): void; onlySelectViewCell(viewLayoutColumnIndex: Integer, viewLayoutRowIndex: Integer): void; focusSelectCell(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid, ensureFullyInView?: RevEnsureFullyInViewEnum): void; focusToggleSelectCell(activeColumnIndex: Integer, subgridRowIndex: Integer, subgrid?: RevSubgrid, ensureFullyInView?: RevEnsureFullyInViewEnum): boolean; tryOnlySelectFocusedCell(): boolean; focusReplaceLastArea(areaType: RevSelectionAreaType, leftOrExRightActiveColumnIndex: Integer, topOrExBottomSubgridRowIndex: Integer, width: Integer, height: Integer, subgrid?: RevSubgrid, ensureFullyInView?: RevEnsureFullyInViewEnum): void; focusReplaceLastAreaWithRectangle(leftOrExRightActiveColumnIndex: Integer, topOrExBottomSubgridRowIndex: Integer, width: Integer, height: Integer, subgrid?: RevSubgrid, ensureFullyInView?: RevEnsureFullyInViewEnum): void; tryExtendLastSelectionAreaAsCloseAsPossibleToFocus(): boolean; protected descendantProcessDataServersRowListChanged(_dataServers: RevDataServer[]): void; protected descendantProcessCellFocusChanged(_newPoint: RevPoint | undefined, _oldPoint: RevPoint | undefined): void; protected descendantProcessRowFocusChanged(_newSubgridRowIndex: Integer | undefined, _oldSubgridRowIndex: Integer | undefined): void; protected descendantProcessSelectionChanged(): void; protected descendantProcessFieldColumnListChanged(_typeId: RevListChangedTypeId, _index: Integer, _count: Integer, _targetIndex: Integer | undefined): void; protected descendantProcessActiveColumnListChanged(_typeId: RevListChangedTypeId, _index: Integer, _count: Integer, _targetIndex: Integer | undefined, _ui: boolean): void; protected descendantProcessColumnsWidthChanged(_columns: RevColumn[], _ui: boolean): void; protected descendantProcessColumnsViewWidthsChanged(_changeds: RevViewLayout.ColumnsViewWidthChangeds): void; protected descendantProcessColumnSort(_event: MouseEvent, _headerOrFixedRowCell: RevViewCell): void; protected descendantEventerFocus(): void; protected descendantEventerBlur(): void; protected descendantProcessKeyDown(_event: KeyboardEvent, _fromEditor: boolean): void; protected descendantProcessKeyUp(_event: KeyboardEvent): void; protected descendantProcessClick(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessDblClick(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessPointerEnter(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessPointerDown(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessPointerUpCancel(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessPointerMove(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessPointerLeaveOut(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessWheelMove(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessDragStart(_event: DragEvent): void; protected descendantProcessContextMenu(_event: MouseEvent, _hoverCell: RevLinedHoverCell | null | undefined): void; /** * Uses DragEvent as this has original Mouse location. Do not change DragEvent or call any of its methods * Return true if drag operation is to be started. */ protected descendantProcessPointerDragStart(_event: DragEvent, _hoverCell: RevLinedHoverCell | null | undefined): boolean; protected descendantProcessPointerDrag(_event: PointerEvent): void; protected descendantProcessPointerDragEnd(_event: PointerEvent): void; protected descendantProcessRendered(): void; protected descendantProcessMouseEnteredCell(_cell: RevViewCell): void; protected descendantProcessMouseExitedCell(_cell: RevViewCell): void; protected descendantProcessTouchStart(_event: TouchEvent): void; protected descendantProcessTouchMove(_event: TouchEvent): void; protected descendantProcessTouchEnd(_event: TouchEvent): void; protected descendantProcessCopy(_event: ClipboardEvent): void; protected descendantProcessResized(): void; protected descendantProcessHorizontalScrollViewportStartChanged(): void; protected descendantProcessVerticalScrollViewportStartChanged(): void; protected descendantProcessHorizontalScrollerAction(_event: RevScroller.Action): void; protected descendantProcessVerticalScrollerAction(_event: RevScroller.Action): void; /* Excluded from this release type: resolveCanvasElement */ /* Excluded from this release type: createDescendantEventer */ } /** @public */ export declare namespace RevClientGrid { export type GetSettingsForNewColumnEventer = RevColumnsManager.GetSettingsForNewColumnEventer; /* Excluded from this release type: idGenerator */ } /** * The major classes in RevClient implement this interface to assist with debugging. * @public */ export declare interface RevClientObject { /** A unique string allowing you to identify different instances */ clientId: string; /** The parent of an object allowing you to easily navigate during debugging */ internalParent: RevClientObject | undefined; } /* Excluded from this release type: RevClipboardUiController */ /** @public */ export declare interface RevColumn { readonly field: SF; readonly settings: BCS; autoSizing: boolean; width: number; preferredWidth: number | undefined; setAutoWidthSizing(value: boolean): boolean; setWidth(width: number, ui: boolean): boolean; checkAutoWidthSizing(widenOnly: boolean): boolean; autoSizeWidth(widenOnly: boolean): boolean; loadSettings(settings: BCS): void; } /** @public */ export declare interface RevColumnAutoSizeableWidth { column: RevColumn; width: number | undefined; } /* Excluded from this release type: RevColumnImplementation */ /** * Provides access to a saved layout for a Grid * * @public */ export declare class RevColumnLayout implements LockOpenListItem, IndexedRecord { readonly id: Guid; readonly mapKey: MapKey; index: number; private readonly _lockOpenManager; private readonly _columns; private _beginChangeCount; private _changeInitiator; private _changed; private _widthsChanged; private _changedMultiEvent; private _widthsChangedMultiEvent; constructor(definition?: RevColumnLayoutDefinition, id?: Guid, mapKey?: MapKey); get lockCount(): number; get lockers(): readonly LockOpenListItem.Locker[]; get openCount(): number; get openers(): readonly LockOpenListItem.Opener[]; get columns(): readonly RevColumnLayout.Column[]; get columnCount(): number; tryLock(locker: LockOpenListItem.Locker): Promise>; unlock(locker: LockOpenListItem.Locker): void; openLocked(opener: LockOpenListItem.Opener): void; closeLocked(opener: LockOpenListItem.Opener): void; isLocked(ignoreOnlyLocker: LockOpenListItem.Locker | undefined): boolean; beginChange(initiator: RevColumnLayout.ChangeInitiator): void; equals(other: RevColumnLayout): boolean; endChange(): void; createCopy(): RevColumnLayout; createDefinition(): RevColumnLayoutDefinition; applyDefinition(initiator: RevColumnLayout.ChangeInitiator, definition: RevColumnLayoutDefinition): void; setColumns(initiator: RevColumnLayout.ChangeInitiator, columns: readonly RevColumnLayout.Column[]): void; getColumn(columnIndex: number): RevColumnLayout.Column; indexOfColumn(column: RevColumnLayout.Column): number; indexOfColumnByFieldName(fieldName: string): number; findColumn(fieldName: string): RevColumnLayout.Column | undefined; addColumn(initiator: RevColumnLayout.ChangeInitiator, columnOrName: string | RevColumnLayoutDefinition.Column): void; addColumns(initiator: RevColumnLayout.ChangeInitiator, columnsNames: (string | RevColumnLayoutDefinition.Column)[]): void; insertColumns(initiator: RevColumnLayout.ChangeInitiator, index: Integer, columnOrFieldNames: (string | RevColumnLayoutDefinition.Column)[]): void; removeColumn(initiator: RevColumnLayout.ChangeInitiator, index: Integer): void; removeColumns(initiator: RevColumnLayout.ChangeInitiator, index: Integer, count: Integer): void; clearColumns(initiator: RevColumnLayout.ChangeInitiator): void; moveColumn(initiator: RevColumnLayout.ChangeInitiator, fromColumnIndex: Integer, toColumnIndex: Integer): boolean; moveColumns(initiator: RevColumnLayout.ChangeInitiator, fromColumnIndex: Integer, toColumnIndex: Integer, count: Integer): boolean; setColumnWidth(initiator: RevColumnLayout.ChangeInitiator, fieldName: string, width: Integer | undefined): void; subscribeChangedEvent(handler: RevColumnLayout.ChangedEventHandler): number; unsubscribeChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeWidthsChangedEvent(handler: RevColumnLayout.WidthsChangedEventHandler): number; unsubscribeWidthsChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; protected assign(other: RevColumnLayout): void; protected createDefinitionColumns(): RevColumnLayoutDefinition.Column[]; private tryProcessFirstLock; private processLastUnlock; private processFirstOpen; private processLastClose; private notifyChanged; private notifyWidthsChanged; private setFieldWidthByColumn; private setColumnVisibility; } /** @public */ export declare namespace RevColumnLayout { export type ChangedEventHandler = (this: void, initiator: ChangeInitiator) => void; export type WidthsChangedEventHandler = (this: void, initiator: ChangeInitiator) => void; export interface Column { fieldName: string; visible: boolean | undefined; autoSizableWidth: Integer | undefined; } export namespace Column { export function createCopy(column: Column): Column; } export interface ChangeInitiator { } const forceChangeInitiator: ChangeInitiator; export interface Locker { lockerName: string; } } /** @public */ export declare namespace RevColumnLayoutChange { export enum ActionId { MoveUp = 0, MoveTop = 1, MoveDown = 2, MoveBottom = 3, SetVisible = 4, SetWidth = 5 } export interface ActionBase { id: ActionId; } export interface MoveUp extends ActionBase { id: ActionId.MoveUp; columnIndex: Integer; } export interface MoveTop extends ActionBase { id: ActionId.MoveTop; columnIndex: Integer; } export interface MoveDown extends ActionBase { id: ActionId.MoveDown; columnIndex: Integer; } export interface MoveBottom extends ActionBase { id: ActionId.MoveBottom; columnIndex: Integer; } export interface SetVisible extends ActionBase { id: ActionId.SetVisible; visible: boolean; columnIndex: Integer; } export interface SetWidth extends ActionBase { id: ActionId.SetWidth; width: Integer; columnIndex: Integer; } export type Action = MoveUp | MoveTop | MoveDown | MoveBottom | SetVisible | SetWidth; } /** @public */ export declare class RevColumnLayoutDefinition { readonly columns: readonly RevColumnLayoutDefinition.Column[]; readonly columnCreateErrorCount: number; constructor(columns: readonly RevColumnLayoutDefinition.Column[], columnCreateErrorCount?: number); get columnCount(): number; saveToJson(element: JsonElement): void; createCopy(): RevColumnLayoutDefinition; } /** @public */ export declare namespace RevColumnLayoutDefinition { export namespace JsonName { const columns = "revColumns"; } export interface Column { readonly fieldName: string; readonly visible: boolean | undefined; readonly autoSizableWidth: Integer | undefined; } export namespace Column { } export namespace Column { export namespace JsonTag { const fieldName = "fieldName"; const name = "name"; const visible = "visible"; const show = "show"; const width = "width"; } export function createCopy(column: Column): Column; export function saveToJson(column: Column, element: JsonElement): void; export function tryCreateFromJson(element: JsonElement): Column | undefined; } export function createColumnsFromFieldNames(fieldNames: readonly string[]): Column[]; export function createFromFieldNames(fieldNames: readonly string[]): RevColumnLayoutDefinition; export const enum CreateFromJsonErrorId { ColumnsElementIsNotDefined = 0, ColumnsElementIsNotAnArray = 1, ColumnElementIsNotAnObject = 2, AllColumnElementsAreInvalid = 3 } export interface ColumnsCreatedFromJson { readonly columns: RevColumnLayoutDefinition.Column[]; readonly columnCreateErrorCount: Integer; } export function tryCreateFromJson(element: JsonElement): Result; export function tryCreateColumnsFromJson(element: JsonElement): Result; } /** @public */ export declare class RevColumnLayoutGrid extends RevClientGrid { private _columnLayout; private _columnLayoutChangedSubscriptionId; private _columnLayoutWidthsChangedSubscriptionId; private _activeColumnsAndWidthSetting; get columnLayout(): RevColumnLayout | undefined; get emWidth(): number; createColumnLayoutDefinition(): RevColumnLayoutDefinition; createColumnLayoutDefinitionColumns(): RevColumnLayoutDefinition.Column[]; updateColumnLayout(value: RevColumnLayout): void; applyColumnLayoutDefinition(value: RevColumnLayoutDefinition): void; protected areFieldsAllowed(): boolean; protected isFieldNameAllowed(fieldName: string): boolean; protected setActiveColumnsAndWidths(): void; protected descendantProcessActiveColumnListChanged(typeId: RevListChangedTypeId, index: number, count: number, targetIndex: number | undefined, ui: boolean): void; protected descendantProcessColumnsWidthChanged(columns: RevColumn[], ui: boolean): void; private processColumnLayoutChangedEvent; private processColumnLayoutWidthsChangedEvent; private createColumnNameWidths; } /** @public */ export declare class RevColumnLayoutOrReference { private readonly _referenceableColumnLayouts; private readonly _referenceId; private readonly _columnLayoutDefinition; private _lockedColumnLayout; private _lockedReferenceableColumnLayout; constructor(_referenceableColumnLayouts: RevReferenceableColumnLayouts | undefined, definition: RevColumnLayoutOrReferenceDefinition); get lockedColumnLayout(): RevColumnLayout | undefined; get lockedReferenceableColumnLayout(): RevReferenceableColumnLayout | undefined; createDefinition(): RevColumnLayoutOrReferenceDefinition; tryLock(locker: LockOpenListItem.Locker): Promise>; unlock(locker: LockOpenListItem.Locker): void; } /** @public */ export declare namespace RevColumnLayoutOrReference { export const enum LockErrorId { DefinitionTry = 0, ReferenceTry = 1, ReferenceNotFound = 2 } export interface LockErrorIdPlusTryError { errorId: LockErrorId; tryError: string | undefined; } } /** @public */ export declare class RevColumnLayoutOrReferenceDefinition { readonly referenceId: Guid | undefined; readonly columnLayoutDefinition: RevColumnLayoutDefinition | undefined; constructor(definitionOrReferenceId: RevColumnLayoutDefinition | Guid); saveToJson(element: JsonElement): void; } /** @public */ export declare namespace RevColumnLayoutOrReferenceDefinition { export namespace JsonName { const referenceId = "revReferenceId"; const columnLayoutDefinition = "revColumnLayoutDefinition"; } export const enum CreateFromJsonErrorId { NeitherReferenceOrDefinitionJsonValueIsDefined = 0, BothReferenceAndDefinitionJsonValuesAreOfWrongType = 1, DefinitionJsonValueIsNotOfTypeObject = 2, DefinitionColumnsElementIsNotDefined = 3, DefinitionColumnsElementIsNotAnArray = 4, DefinitionColumnElementIsNotAnObject = 5, DefinitionAllColumnElementsAreInvalid = 6 } export function tryCreateFromJson(element: JsonElement): Result; } /* Excluded from this release type: RevColumnMovingUiController */ /* Excluded from this release type: RevColumnResizingUiController */ /** @public */ export declare type RevColumnSettings = RevOnlyColumnSettings; /** * The central class for managing the structure, visibility, sizing, and settings of columns in the grid, ensuring that the grid view and data schema remain synchronized. * * @typeParam BCS - Type of the column settings. * @typeParam SF - Type of the schema field. * * @see [Columns Manager Component πŸ—Ž](../../../../../Architecture/Client/Components/Columns_Manager/) * @public */ export declare class RevColumnsManager implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; readonly schemaServer: RevSchemaServer; readonly gridSettings: RevGridSettings; getSettingsForNewColumnEventer: RevColumnsManager.GetSettingsForNewColumnEventer; /* Excluded from this release type: invalidateHorizontalViewLayoutEventer */ /* Excluded from this release type: fieldColumnListChangedEventer */ /* Excluded from this release type: activeColumnListChangedEventer */ /* Excluded from this release type: columnsWidthChangedEventer */ /* Excluded from this release type: _activeColumns */ /* Excluded from this release type: _fieldColumns */ /* Excluded from this release type: _beginSchemaChangeCount */ /* Excluded from this release type: _schemaChanged */ /* Excluded from this release type: _beforeCreateColumnsListeners */ /* Excluded from this release type: __constructor */ get fieldColumnCount(): number; get activeColumnCount(): number; get fieldColumns(): readonly RevColumn[]; get activeColumns(): readonly RevColumn[]; getSchema(): readonly SF[]; /* Excluded from this release type: addBeforeCreateColumnsListener */ /* Excluded from this release type: removeBeforeCreateColumnsListener */ /* Excluded from this release type: beginSchemaChange */ /* Excluded from this release type: endSchemaChange */ /* Excluded from this release type: schemaFieldsInserted */ /* Excluded from this release type: schemaFieldsDeleted */ /* Excluded from this release type: allSchemaColumnsDeleted */ /* Excluded from this release type: schemaColumnsChanged */ /* Excluded from this release type: clearColumns */ /* Excluded from this release type: getActiveColumn */ /* Excluded from this release type: getActiveColumnIndexByFieldName */ /* Excluded from this release type: getActiveColumnIndexByFieldIndex */ /* Excluded from this release type: getFieldColumn */ /* Excluded from this release type: createDummyColumn */ /* Excluded from this release type: getActiveColumnWidth */ /* Excluded from this release type: getActiveColumnRoundedWidth */ /** * @returns The total width of all the fixed columns. */ calculateFixedColumnsWidth(): number; /* Excluded from this release type: setColumnWidths */ /* Excluded from this release type: setColumnWidthsByFieldName */ setActiveColumnsAndWidthsByFieldName(fieldNameAndWidths: RevColumnsManager.FieldNameAndAutoSizableWidth[], ui: boolean): void; /* Excluded from this release type: loadAllColumnSettings */ /* Excluded from this release type: mergeAllColumnSettings */ showHideColumns( /** If true, then column indices specify active column indices. Otherwise field column indices */ indexesAreActive: boolean, /** A column index or array of indices. If undefined then all of the columns as per isActiveColumnIndexes */ columnIndexOrIndices: number | number[] | undefined, /** Set to undefined to add new active columns at end of list. Set to -1 to hide specified columns */ insertIndex: number | undefined, /** If true, then if an existing column is already visible, it will not be removed and duplicates of that column will be present */ allowDuplicateColumns: boolean, /** Whether this was instigated by a UI action */ ui: boolean): void; hideColumns(indexesAreActive: boolean, columnIndexOrIndices: number | number[] | undefined, ui: boolean): void; hideActiveColumn(activeColumnIndex: number, ui: boolean): void; setActiveColumns(columnArray: readonly RevColumn[]): void; /* Excluded from this release type: mergeFieldColumnSettings */ /** * @returns The number of fixed columns. */ getFixedColumnCount(): number; isColumnFixed(activeColumnIndex: number): boolean; /** * swap source and target columns * @param source - column index * @param target - column index */ swapActiveColumns(source: number, target: number): void; moveActiveColumn(fromIndex: number, toIndex: number, ui: boolean): void; autoSizeActiveColumnWidths(widenOnly: boolean): void; setActiveColumnsAutoWidthSizing(value: boolean): void; /* Excluded from this release type: checkAutoWidenAllColumnsWithoutInvalidation */ /* Excluded from this release type: getHiddenColumns */ private notifyActiveColumnListChanged; private notifyColumnsWidthChanged; /* Excluded from this release type: newColumn */ /* Excluded from this release type: createColumns */ } /** @public */ export declare namespace RevColumnsManager { export type GetSettingsForNewColumnEventer = (this: void, field: SF) => BCS; /* Excluded from this release type: InvalidateHorizontalViewLayoutEventer */ /* Excluded from this release type: ColumnsWidthChangedEventer */ /* Excluded from this release type: BeforeCreateColumnsListener */ export interface FieldNameAndAutoSizableWidth { name: string; autoSizableWidth: number | undefined; } } /* Excluded from this release type: RevColumnSortingUiController */ /* Excluded from this release type: RevComponentsManager */ export declare class RevContiguousIndexRange { private _start; private _length; private _after; constructor(_start: number, _length: number); get start(): number; get length(): number; get after(): number; setStart(value: number): void; setAfter(value: number): void; move(offset: number): void; grow(increment: number): void; createCopy(): RevContiguousIndexRange; includes(index: number): boolean; overlaps(other: RevContiguousIndexRange): boolean; abuts(other: RevContiguousIndexRange): boolean; contains(this: RevContiguousIndexRange, other: RevContiguousIndexRange): boolean; createFromAbuttingOverlapping(this: RevContiguousIndexRange, other: RevContiguousIndexRange): RevContiguousIndexRange; addIndicesToArray(array: number[], count: number): number; } /** * Manages a list of non-overlapping, non-abutting, and ordered contiguous index ranges. * * This class provides methods to add, delete, and query ranges of indices, as well as to adjust * the ranges in response to insertions, deletions, and moves of indices. Ranges are represented * by `RevContiguousIndexRange` objects and are always kept in order by their starting index. * * Key features: * - Ranges do not overlap or abut, and are always ordered by their start index. * - Supports adding and deleting ranges, with automatic merging and splitting as needed. * - Provides methods to check for inclusion, count indices, and enumerate all indices. * - Can adjust ranges for inserted, deleted, or moved indices, maintaining consistency. * * Used to manage row and column selections. */ export declare class RevContiguousIndexRangeList { readonly ranges: RevContiguousIndexRange[]; assign(other: RevContiguousIndexRangeList): void; /** * Removes all index ranges from the list, effectively clearing the selection. */ clear(): void; /** * Determines whether the list of contiguous index ranges is empty. * @returns `true` if there are no ranges in the list; otherwise, `false`. */ isEmpty(): boolean; /** * Determines whether there are any index ranges present in the list. * * @returns `true` if the list contains at least one range; otherwise, `false`. */ hasIndices(): boolean; /** * Determines whether the list of contiguous index ranges contains more than one index in total. * * @returns `true` if there is more than one index represented in the ranges; otherwise, `false`. */ hasMoreThanOneIndex(): boolean; /** * Determines whether the list of contiguous index ranges contains zero, one or more than one index in total. * * @returns `0` if there are no indices, `1` if there is one index, or `-1` if there is more than one index represented in the ranges. */ hasZeroOneOrMoreThanOneIndex(): 0 | 1 | -1; /** * Adds a contiguous range of indices to the list, merging with existing ranges if necessary. * * The range is specified by an start or excluded end index, and a length. If the length is negative, * the range is added in reverse order (excluding the start index). The method ensures that overlapping or adjacent ranges * are merged into a single range, and prevents adding a range that is already fully contained * within an existing range. * * @param startOrExEnd - The starting index of the range to add if `length` is positive, or the exclusive end index if `length` is negative. * @param length - The length of the range. If negative, the range is specified from its exclusive end. * @returns `true` if the range was added or merged; `false` if the range was already contained and no change was made. */ add(startOrExEnd: number, length: number): boolean; /** * Deletes a contiguous range of indices from the selection. * * The method updates the internal ranges to reflect the deletion, splitting or resizing ranges as necessary. * * @param startOrExEnd - The starting index of the range to delete if `length` is positive, or the exclusive end index if `length` is negative. * @param length - The length of the range. If negative, the range is specified from its exclusive end. * @returns `true` if any ranges were deleted or modified; `false` if the deletion did not affect any ranges. */ delete(startOrExEnd: number, length: number): boolean; /** * Determines whether the specified index is included within any of the contiguous index ranges. * * @param index - The index to check for inclusion. * @returns `true` if the index is included in any range; otherwise, `false`. */ includesIndex(index: number): boolean; /** * Searches for and returns the first contiguous index range that includes the specified index. * * @param index - The index to search for within the list of contiguous index ranges. * @returns The {@link RevContiguousIndexRange} that contains the given index, or `undefined` if no such range exists. */ findRangeWithIndex(index: number): RevContiguousIndexRange | undefined; /** * Calculates and returns the total number of indices across all contiguous index ranges. * * Iterates through each range in the `ranges` array and sums their lengths to determine * the total count of selected indices. * * @returns The total count of indices in all ranges. */ getIndexCount(): number; /** * Returns an array containing all indices represented by the current list of contiguous index ranges. * The indices are collected from each range in order and combined into a single array. * * @returns An array of indices covered by all ranges in this list. */ getIndices(): number[]; /** * Calculates and returns the first or last overlapping range between the given range and the existing ranges. * If the length is non-negative, it calculates the first overlapping range. * If the length is negative, it calculates the last overlapping range. * * @param startOrExEnd - The starting index or exclusive ending index of the range to check for overlap. * @param length - The length of the range. If negative, the range is specified from its exclusive end. * @returns The overlapping contiguous index range, or `undefined` if there is no overlap. */ calculateOverlapRange(startOrExEnd: number, length: number): RevContiguousIndexRange | undefined; /** * Calculates and returns the first overlapping range between the given range and the existing ranges. * * Given a starting index (or exclusive end index) and a length, this method searches the list of * contiguous index ranges in order and returns the first range that overlaps with the specified range. * * @param startOrExEnd - The starting index of the range, or the exclusive end index if `length` is negative. * @param length - The length of the range. If negative, the range is specified from its exclusive end. * @returns A new `RevContiguousIndexRange` representing the first overlapping range, or `undefined` if there is no overlap. */ calculateFirstOverlapRange(startOrExEnd: number, length: number): RevContiguousIndexRange | undefined; /** * Calculates the last overlapping range between the specified range and the existing ranges. * * Given a starting index (or exclusive end index) and a length, this method searches the list of * contiguous index ranges in reverse order and returns the last range that overlaps with the specified range. * * @param startOrExEnd - The starting index of the range if `length` is positive, or the exclusive end index if `length` is negative. * @param length - The length of the range. If negative, the range is specified from its exclusive end. * @returns A new `RevContiguousIndexRange` representing the last overlapping range, or `undefined` if there is no overlap. */ calculateLastOverlapRange(startOrExEnd: number, length: number): RevContiguousIndexRange | undefined; /** * Adjusts the index ranges in the list to account for the insertion of new items. * * This method updates all ranges that are at or above the insertion point by moving them up by the specified count. * If the insertion point falls within an existing range, that range is grown to include the new items. * * @param start - The index at which new items are inserted. * @param count - The number of items inserted. * @returns `true` if any ranges were changed; otherwise, `false`. */ adjustForInserted(start: number, count: number): boolean; /** * Adjusts the list of contiguous index ranges to account for a deletion of items. * * This method updates the internal ranges to reflect the removal of a contiguous block of items, * starting at the specified `start` index and spanning `count` items. It shifts, shrinks, or removes * ranges as necessary to maintain consistency after the deletion. If any ranges are fully enclosed * within the deleted region, they are removed. Ranges that overlap the deleted region are shrunk, * and ranges above the deleted region are shifted down. If possible, adjacent ranges are merged after * the adjustment. * * @param start - The starting index of the deleted region. * @param count - The number of contiguous items deleted. * @returns `true` if any ranges were changed as a result of the deletion; otherwise, `false`. */ adjustForDeleted(start: number, count: number): boolean; /** * Adjusts the current index ranges to account for a contiguous block of items being moved * from one position to another within a collection. * * This method first removes the specified range from its old position, then inserts it at the new position. * It returns whether any changes were made to the selection as a result of the move. * * @param oldIndex - The starting index of the block being moved. * @param newIndex - The index at which the block should be inserted. * @param count - The number of contiguous items being moved. * @returns `true` if the selection was changed as a result of the move; otherwise, `false`. */ adjustForMoved(oldIndex: number, newIndex: number, count: number): boolean; } /** @public */ export declare interface RevCornerArea extends RevRectangle { readonly topLeft: RevPoint; readonly exclusiveBottomRight: RevPoint; readonly width: number; readonly height: number; } /** @public */ export declare class RevCornerRectangle implements RevCornerArea { private _x; private _y; /** * Upper left corner of this rect. */ private _topLeft; /** * this rect's width and height. * @remarks Unlike the other `Point` properties, `extent` is not a global coordinate pair; rather it consists of a _width_ (`x`, always positive) and a _height_ (`y`, always positive). * * This object might be more legitimately typed as something like `Area` with properties `width` and `height`; however we wanted it to be able to use it efficiently with a point's `plus` and `minus` methods (that is, without those methods having to check and branch on the type of its parameter). * * Created upon instantiation by the constructor. * @see The {@link RevCornerRectangle#_exclusiveBottomRight|corner} method. */ private _extent; /** * One pixel out from bottom right of rectangle. */ private _exclusiveBottomRight; /** * This object represents a rectangular area within an 2-dimensional space. * * @param leftOrExRight - The left X coordinate of the rectangle if width is positive, or the exclusive right X coordinate if width is negative. * @param topOrExBottom - The top Y coordinate of the rectangle if height is positive, or the exclusive bottom Y coordinate if height is negative. * @param width - Width of the rectangle. If negative, width is in reverse direction from the exclusive right. * @param height - Height of the rectangle. If negative, height is in reverse direction from the exclusive bottom. */ constructor(leftOrExRight: number, topOrExBottom: number, width: number, height: number); get x(): number; get y(): number; get topLeft(): RevPoint; get exclusiveBottomRight(): RevPoint; get inclusiveBottomRight(): RevPoint; get extent(): RevPoint; /** * Top co-ordinate of rectangle (same as {@link y}). */ get top(): number; /** * Left co-ordinate of rectangle (same as {@link x}). */ get left(): number; /** Bottom co-ordinate of rectangle. */ get inclusiveBottom(): number; /** Exclusive bottom co-ordinate of rectangle. ({@link inclusiveBottom} + 1) */ get exclusiveBottom(): number; /** Right co-ordinate of rectangle. */ get inclusiveRight(): number; /** Exclusive right co-ordinate of rectangle. ({@link inclusiveRight} + 1) */ get exclusiveRight(): number; /** * Width of this rectangle (always positive). */ get width(): number; /** * Height of this rect (always positive). */ get height(): number; /** * Area of this rectangle. */ get area(): number; /** * Creates and returns a new `RevCornerRectangle` instance that is a copy of the current rectangle. */ createCopy(): RevCornerRectangle; /** * Determines whether the specified point is contained within the rectangle. * @param point - The point or rect to test for containment. * @returns `true` if the point is within the rectangle; otherwise, `false`. */ containsPoint(point: RevPoint): boolean; /** * Determines whether the specified point (x, y) is contained within the rectangle. * * @param x - The x-coordinate of the point to test. * @param y - The y-coordinate of the point to test. * @returns `true` if the point is within the rectangle; otherwise, `false`. */ containsXY(x: number, y: number): boolean; /** * Determines whether the specified x-coordinate is within the horizontal bounds of the rectangle. * * @param x - The x-coordinate to test. * @returns `true` if the x-coordinate is within the rectangle's horizontal bounds; otherwise, `false`. */ containsX(x: number): boolean; /** * Determines whether the specified y-coordinate is within the vertical bounds of the rectangle. * * @param y - The y-coordinate to test. * @returns `true` if the y-coordinate is within the rectangle's vertical bounds; otherwise, `false`. */ containsY(y: number): boolean; /** * @returns `true` iff `this` rect is entirely contained within given `rect`. * @param rect - Rectangle to test against this rect. */ within(rect: RevCornerRectangle): boolean; /** Moves this Rectangle in x direction */ moveX(offset: number): void; /** Moves this Rectangle in y direction */ moveY(offset: number): void; /** Grows this Rectangle in x direction with let staying fixed */ growFromLeft(widthIncrease: number): void; /** Grows this Rectangle in y direction with top staying fixed */ growFromTop(heightIncrease: number): void; /** * @returns A copy of this rect but with horizontal position reset to given `x` and no width. * @param x - Horizontal coordinate of the new rect. */ newXFlattened(x: number): RevCornerRectangle; /** * @returns A copy of this rect but with vertical position reset to given `y` and no height. * @param y - Vertical coordinate of the new rect. */ newYFlattened(y: number): RevCornerRectangle; newXMoved(xOffset: number): RevCornerRectangle; newYMoved(yOffset: number): RevCornerRectangle; /** * _(Formerly: `insetBy`.)_ * @returns That is enlarged/shrunk by given `padding`. * @param padding - Amount by which to increase (+) or decrease (-) this rect * @see The {@link RevCornerRectangle#newShrunkFromCenter|shrinkBy} method. */ newGrownFromCenter(padding: number): RevCornerRectangle; /** * @returns That is enlarged/shrunk by given `padding`. * @param padding - Amount by which to decrease (+) or increase (-) this rect. * @see The {@link RevCornerRectangle#newGrownFromCenter|growBy} method. */ newShrunkFromCenter(padding: number): RevCornerRectangle; /** * @returns Bounding rect that contains both this rect and the given `rect`. * @param rect - The rectangle to union with this rect. */ newUnioned(rect: RevCornerRectangle): RevCornerRectangle; /** * iterate over all points within this rect, invoking `iteratee` for each. * @param {function(number,number)} iteratee - Function to call for each point. * Bound to `context` when given; otherwise it is bound to this rect. * Each invocation of `iteratee` is called with two arguments: * the horizontal and vertical coordinates of the point. * @param {object} [context=this] - Context to bind to `iteratee` (when not `this`). */ /** * @returns {RevCornerRectangle} One of: * * _If this rect intersects with the given `rect`:_ * a new rect representing that intersection. * * _If it doesn't intersect and `ifNoneAction` defined:_ * result of calling `ifNoneAction`. * * _If it doesn't intersect and `ifNoneAction` undefined:_ * `null`. * @param {RevCornerRectangle} rect - The rectangle to intersect with this rect. * @param {function(RevCornerRectangle)} [ifNoneAction] - When no intersection, invoke and return result. * Bound to `context` when given; otherwise bound to this rect. * Invoked with `rect` as sole parameter. * @param {object} [context=this] - Context to bind to `ifNoneAction` (when not `this`). */ /** * @returns `true` iff this rect overlaps with given `rect`. * @param rect - The rectangle to intersect with this rect. */ intersects(rect: RevCornerRectangle): boolean; /** Adjusts the selection to where it would be after a columns insertion. * @returns true if selection changed */ adjustForXRangeInserted(index: number, count: number): boolean; /** Adjusts the selection to where it would be after a rows insertion. * @returns true if selection changed */ adjustForYRangeInserted(index: number, count: number): boolean; /** Adjusts the selection to where it would be after a columns deletion. * @returns true if selection changed, false if it was not changed or null if it should be fully deleted */ adjustForXRangeDeleted(deletionLeft: number, deletionCount: number): boolean | null; /** Adjusts the selection to where it would be after a rows deletion. * @returns true if selection changed, false if it was not changed or null if it should be fully deleted */ adjustForYRangeDeleted(deletionTop: number, deletionCount: number): boolean | null; adjustForXRangeMoved(oldIndex: number, newIndex: number, count: number): void; adjustForYRangeMoved(oldIndex: number, newIndex: number, count: number): void; } /** @public */ export declare namespace RevCornerRectangle { export function arrayContainsPoint(rectangles: RevCornerRectangle[], x: number, y: number): boolean; } /** @public */ export declare namespace RevCssTypes { const libraryName = "revgrid"; export const enum Overflow { auto = "auto", clip = "clip", hidden = "hidden", scroll = "scroll", visible = "visible" } export const enum Position { static = "static", relative = "relative", fixed = "fixed", absolute = "absolute", sticky = "sticky" } export const enum Display { inline = "inline", block = "block" } } /** @public */ export declare class RevDataExtractBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _selection */ /* Excluded from this release type: _subgridsManager */ /* Excluded from this release type: _columnsManager */ /* Excluded from this release type: __constructor */ /** * @returns Tab separated value string from the selection and our data. */ getSelectionAsTSV(): string; convertDataValueArraysToTsv(dataValueArrays: RevDataServer.ViewValue[][]): string; /** * @returns An object that represents the currently selection row. */ getLastSelectionRectangleTopRowValues(): Record | undefined; getRowSelectionData(subgrid: RevSubgrid, hiddenColumns: boolean | number[] | string[]): RevDataServer.ViewRow; getDynamicAllSelectionMatrix(subgrid?: RevSubgrid): RevDataServer.ViewValue[][]; getRowSelectionMatrix(subgrid?: RevSubgrid, hiddenColumns?: boolean | number[] | string[]): RevDataServer.ViewValue[][]; getRowIndicesMatrix(subgrid: RevSubgrid, rowIndices: number[], hiddenColumns?: boolean | number[] | string[]): unknown[][]; getColumnSelectionMatrix(subgrid: RevSubgrid): RevDataServer.ViewValue[][]; getSelectedColumnsValues(subgrid: RevSubgrid): RevDataServer.ObjectViewRow; getSelectedValuesByRectangleAndColumn(subgrid: RevSubgrid): RevDataServer.ObjectViewRow[]; getSelectedValuesByRectangleColumnRowMatrix(subgrid: RevSubgrid): RevDataServer.ViewValue[][][]; /* Excluded from this release type: getActiveFieldOrSpecifiedColumns */ } /** @public */ export declare class RevDataRowArrayDataServer implements RevDataServer { private _data; private _callbackListeners; get data(): RevDataServer.ObjectViewRow[]; subscribeDataNotifications(listener: RevDataServer.NotificationsClient): void; unsubscribeDataNotifications(listener: RevDataServer.NotificationsClient): void; beginDataChange(): void; endDataChange(): void; reset(data?: RevDataServer.ObjectViewRow[]): void; invalidateAll(): void; getViewRow(index: number): RevDataServer.ObjectViewRow; /** * Update or blank row in place. * * _Note parameter order is the reverse of `addRow`._ * @param dataRow - if omitted or otherwise falsy, row renders as blank */ setViewRow(index: number, dataRow: RevDataServer.ObjectViewRow): void; addRow(dataRow: RevDataServer.ObjectViewRow): number; insertRow(index: number, dataRow: RevDataServer.ObjectViewRow): void; deleteRows(index: number, count?: number): RevDataServer.ObjectViewRow[]; getViewValue(field: SF, y: number): unknown; setEditValue(field: SF, y: number, value: unknown): void; getRowCount(): number; } /** @public */ export declare interface RevDataRowArrayField extends RevSchemaField { readonly name: string; } /** @public */ export declare class RevDataRowArrayGrid extends RevColumnLayoutGrid { schemaServer: RevDataRowArraySchemaServer; mainDataServer: RevDataRowArrayDataServer; readonly headerDataServer: RevDataServer | undefined; private _allowedFields; private _beenUsable; private _usableRendered; private _firstUsableRenderViewAnchor; constructor(canvasElement: HTMLCanvasElement, definition: RevGridDefinition, settings: BGS, getSettingsForNewColumnEventer: RevClientGrid.GetSettingsForNewColumnEventer, options?: RevGridOptions); get data(): RevDataServer.ObjectViewRow[]; get fieldCount(): number; get fieldNames(): readonly SF[]; get allowedFields(): readonly SF[] | undefined; get beenUsable(): boolean; get recordFocused(): boolean; get focusedRecordIndex(): Integer | undefined; get mainRowCount(): number; get headerRowCount(): number; get gridRightAligned(): boolean; get rowHeight(): number; resetUsable(): void; initialiseAllowedFields(fields: readonly SF[]): void; applyFirstUsable(viewAnchor: RevDataRowArrayGrid.ViewAnchor | undefined, columnLayout: RevColumnLayout | undefined): void; updateAllowedFields(fields: readonly SF[]): void; getViewAnchor(): RevDataRowArrayGrid.ViewAnchor | undefined; getFieldByName(fieldName: string): SF; getField(fieldIndex: Integer): SF; isHeaderRow(rowIndex: number): boolean; reset(): void; invalidateAll(): void; protected areFieldsAllowed(): boolean; protected isFieldNameAllowed(fieldName: string): boolean; protected descendantProcessRendered(): void; protected convertDataValueToString(value: RevDataServer.ViewValue | string): string; } /** @public */ export declare namespace RevDataRowArrayGrid { export interface ViewAnchor { readonly columnScrollAnchorIndex: Integer; readonly columnScrollAnchorOffset: Integer; readonly rowScrollAnchorIndex: Integer; } export interface DataRow extends RevDataServer.ObjectViewRow { [fieldName: string]: RevDataServer.ViewValue | string; } } /** @public */ export declare class RevDataRowArraySchemaServer implements RevSchemaServer { private _schemaCallbackListeners; private _fields; get fieldCount(): number; subscribeSchemaNotifications(listener: RevSchemaServer.NotificationsClient): void; unsubscribeSchemaNotifications(listener: RevSchemaServer.NotificationsClient): void; reset(schema?: SF[]): void; getFields(): readonly SF[]; setSchema(schema: SF[]): void; getField(fieldIndex: Integer): SF; getFieldByName(fieldName: string): SF; tryGetFieldByName(fieldName: string): SF | undefined; } /** Interface used by client to get data from a server or update values */ export declare interface RevDataServer< /** Type used to specify a field the rows of data */ SF extends RevSchemaField> { /** * Subscribe to data notifications from the server. * @param client - An interface with callbacks used to notify the grid of changes to data. */ subscribeDataNotifications(client: RevDataServer.NotificationsClient): void; /** * Unsubscribe from data notifications. * * Optional as it is not required when the client and server are closely bound together and destroyed at the same time. * @param client - A reference to the handler originally provided to {@link subscribeDataNotifications}. */ unsubscribeDataNotifications?(client: RevDataServer.NotificationsClient): void; /** * Get all data from the server as a readonly array of {@link RevDataServer.ViewRow}. * * If not implemented, all data can still obtain by retrieving one row at a time using {@link getViewRow} or * one cell at a time using {@link getViewValue}. */ getViewData?(): readonly RevDataServer.ViewRow[]; /** * Get a row of data from the server. * * If this method is implemented, it allows the client to retrieve an entire row of data from the server instead of having to * retrieve the value each cell in the row individually. Used by `RevSubgridImplementation.getSingletonViewDataRow`. * @param subgridRowIndex - Subgrid row index. */ getViewRow?(subgridRowIndex: number): RevDataServer.ViewRow; /** * Gets current count of rows in the associated subgrid at the server. */ getRowCount(): number; /** * Gets a unique identifier for a row which is not affected by sorting, filtering or reordering. * * This optional method needs to be implemented for selection and focus to be preserved across row sorting, filtering and reordering. * @param subgridRowIndex - Subgrid row index. */ getRowIdFromIndex?(subgridRowIndex: number): unknown; /** * Gets the current subgrid row index of a row from a row identifier. * * This optional method does not need to be implemented for selection and focus to be preserved row across sorting, filtering and reordering * however, if implemented, it will make restoring focus and selection more efficient. * @param rowId - Id previously obtained from {@link getRowIdFromIndex}. */ getRowIndexFromId?(rowId: unknown): number | undefined; /** * Get a field's value at the specified row in a format suitable for display. * * The core of the client does not need to know the type of the return value. `getViewValue()` is called by the `Cell Painter` associated with the cell/subgrid. * The cell painter expects a certain type of view value and casts the result accordingly. * @returns The value of the field at the specified row. */ getViewValue( /** The field from which to get the value */ field: SF, /** The index of the row from which to get the value */ rowIndex: number): RevDataServer.ViewValue; /** * Get a field's value at the specified row in a format suitable for editing. * * This function only needs to be implemented if cells can be edited. See RevCellEditor for more information about editing data. * The core of the client does not need to know the type of the return value. `getEditValue()` is called by the `Cell Editor` associated with the cell. * A cell editor expects a certain type of view value and casts the result accordingly. */ getEditValue?( /** The field from which to get the value */ field: SF, /** The index of the row from which to get the value */ rowIndex: number): RevDataServer.EditValue; /** * Set a cell's value given its column schema & row indexes and a new value. * * If not implemented, the cell cannot be edited. */ setEditValue?(field: SF, rowIndex: number, value: RevDataServer.EditValue): void; /** Cursor to be displayed when mouse hovers over cell containing data point */ getCursorName?(field: SF, rowIndex: number): string; /** Title text to be displayed when mouse hovers over cell containing data point */ getTitleText?(field: SF, rowIndex: number): string; } export declare namespace RevDataServer { export type ViewValue = unknown; export type EditValue = unknown; /** * A data row representation using an object. * The properties of this object are the data fields. * The property keys are the column names * All row objects should be congruent, meaning that each data row should have the same property keys. */ export type ObjectViewRow = Record; export type ArrayViewRow = ViewValue[]; export type ViewRow = ArrayViewRow | ObjectViewRow; export type Constructor = new () => RevDataServer; /** * Interface specifying callbacks from server which are used to advise client that server data has changed */ export interface NotificationsClient { beginChange: (this: void) => void; endChange: (this: void) => void; rowsInserted: (this: void, rowIndex: number, rowCount: number) => void; rowsDeleted: (this: void, rowIndex: number, rowCount: number) => void; allRowsDeleted: (this: void) => void; rowsMoved: (this: void, oldRowIndex: number, newRowIndex: number, rowCount: number) => void; rowsLoaded: (this: void) => void; invalidateAll: (this: void) => void; invalidateRows: (this: void, rowIndex: number, count: number) => void; invalidateRow: (this: void, rowIndex: number) => void; invalidateRowColumns: (this: void, rowIndex: number, fieldIndex: number, columnCount: number) => void; invalidateRowCells: (this: void, rowIndex: number, fieldIndexes: number[]) => void; invalidateCell: (this: void, fieldIndex: number, rowIndex: number) => void; /** * Notifies that ordering of data rows in server is about to change. * @remarks * When client receives this notification, it saves focus and selection to a temporary location. * Typically this notification is called before rows are sorted or filtered on the server. * This callback will always be followed by the {@link postReindex} callback. */ preReindex: (this: void) => void; /** * Notifies that ordering of data rows in server is has changed. * @remarks * This callback always be follows by the {@link preReindex} callback. * When client receives this notification, it restores the focus and selection from the stash of these saved to a temporary location. * Typically this notification is called after rows are sorted or filtered on the server. */ postReindex: (this: void, /** True if all rows are kept (eg. rows were not discarded due to server filtering) */ allRowsKept: boolean) => void; } } /** @public */ export declare class RevDataSource implements LockOpenListItem, RevDataSource.LockErrorIdPlusTryError>, IndexedRecord { private readonly _referenceableColumnLayouts; private readonly _tableFieldSourceDefinitionFactory; private readonly _tableRecordSourceFactory; readonly id: Guid; readonly mapKey: MapKey; index: number; private readonly _lockOpenManager; private readonly _tableRecordSourceDefinition; private _columnLayoutOrReferenceDefinition; private _initialRowOrderDefinition; private _lockedTableRecordSource; private _lockedColumnLayout; private _lockedReferenceableColumnLayout; private _table; private _columnLayoutSetMultiEvent; constructor(_referenceableColumnLayouts: RevReferenceableColumnLayouts | undefined, _tableFieldSourceDefinitionFactory: RevTableFieldSourceDefinitionFactory, _tableRecordSourceFactory: RevTableRecordSourceFactory, definition: RevDataSourceDefinition, id?: Guid, mapKey?: MapKey); get lockCount(): number; get lockers(): readonly LockOpenListItem.Locker[]; get openCount(): number; get openers(): readonly LockOpenListItem.Opener[]; get lockedTableRecordSource(): RevTableRecordSource | undefined; get lockedColumnLayout(): RevColumnLayout | undefined; get lockedReferenceableColumnLayout(): RevReferenceableColumnLayout | undefined; get initialRowOrderDefinition(): RevRecordRowOrderDefinition | undefined; get table(): RevTable | undefined; tryLock(locker: LockOpenListItem.Locker): Promise>; unlock(locker: LockOpenListItem.Locker): void; openLocked(opener: LockOpenListItem.Opener): void; closeLocked(opener: LockOpenListItem.Opener): void; isLocked(ignoreOnlyLocker: LockOpenListItem.Locker | undefined): boolean; equals(other: RevDataSource): boolean; createDefinition(rowOrderDefinition: RevRecordRowOrderDefinition | undefined): RevDataSourceDefinition; createTableRecordSourceDefinition(): RevTableRecordSourceDefinition; createColumnLayoutOrReferenceDefinition(): RevColumnLayoutOrReferenceDefinition; /** Can only call if a DataSource is already opened */ tryOpenColumnLayoutOrReferenceDefinition(definition: RevColumnLayoutOrReferenceDefinition, opener: LockOpenListItem.Opener): Promise>; subscribeColumnLayoutSetEvent(handler: RevDataSource.GridColumnSetEventHandler): number; unsubscribeColumnLayoutSetEvent(subscriptionId: MultiEvent.SubscriptionId): void; private notifyColumnLayoutSet; private tryLockColumnLayout; private tryCreateAndLockColumnLayoutFromDefinition; private tryProcessFirstLock; private processLastUnlock; private processFirstOpen; private processLastClose; private unlockColumnLayout; private openLockedColumnLayout; private closeLockedColumnLayout; private getTableFieldSourceDefinitionTypeIdsFromLayout; } /** @public */ export declare namespace RevDataSource { export type GridColumnSetEventHandler = (this: void) => void; export interface LockedColumnLayouts { readonly columnLayout: RevColumnLayout; readonly referenceableColumnLayout: RevReferenceableColumnLayout | undefined; } export const enum LockErrorId { TableRecordSourceTry = 0, LayoutDefinitionTry = 1, LayoutReferenceTry = 2, LayoutReferenceNotFound = 3 } export namespace LockError { export function fromRevColumnLayoutOrReference(lockErrorId: RevColumnLayoutOrReference.LockErrorId): LockErrorId; } export interface LockErrorIdPlusTryError { errorId: LockErrorId; tryError: string | undefined; } } /** @public */ export declare class RevDataSourceDefinition { readonly tableRecordSourceDefinition: RevTableRecordSourceDefinition; columnLayoutOrReferenceDefinition: RevColumnLayoutOrReferenceDefinition | undefined; rowOrderDefinition: RevRecordRowOrderDefinition | undefined; constructor(tableRecordSourceDefinition: RevTableRecordSourceDefinition, columnLayoutOrReferenceDefinition: RevColumnLayoutOrReferenceDefinition | undefined, rowOrderDefinition: RevRecordRowOrderDefinition | undefined); saveToJson(element: JsonElement): void; } /** @public */ export declare namespace RevDataSourceDefinition { export namespace JsonName { const tableRecordSource = "revTableRecordSource"; const columnLayoutOrReference = "revColumnLayoutOrReference"; const rowOrder = "revRowOrder"; } export const enum CreateFromJsonErrorId { TableRecordSourceElementIsNotDefined = 0, TableRecordSourceJsonValueIsNotOfTypeObject = 1, TableRecordSourceTryCreate = 2 } export const enum LayoutCreateFromJsonErrorId { ColumnLayoutOrReferenceElementIsNotDefined = 0, ColumnLayoutOrReferenceJsonValueIsNotOfTypeObject = 1, ColumnLayoutNeitherReferenceOrDefinitionJsonValueIsDefined = 2, ColumnLayoutBothReferenceAndDefinitionJsonValuesAreOfWrongType = 3, ColumnLayoutOrReferenceDefinitionJsonValueIsNotOfTypeObject = 4, ColumnLayoutOrReferenceDefinitionColumnsElementIsNotDefined = 5, ColumnLayoutOrReferenceDefinitionColumnsElementIsNotAnArray = 6, ColumnLayoutOrReferenceDefinitionColumnElementIsNotAnObject = 7, ColumnLayoutOrReferenceDefinitionAllColumnElementsAreInvalid = 8 } export interface CreateFromJsonErrorIdPlusExtra { readonly errorId: CreateFromJsonErrorId; readonly extra: string | undefined; } export function tryCreateTableRecordSourceDefinitionFromJson(tableRecordSourceDefinitionFromJsonFactory: RevTableRecordSourceDefinitionFromJsonFactory, element: JsonElement): Result, CreateFromJsonErrorIdPlusExtra>; export function tryCreateColumnLayoutOrReferenceDefinitionFromJson(element: JsonElement): Result; export function tryGetRowOrderFromJson(element: JsonElement): RevRecordRowOrderDefinition | undefined; export interface WithLayoutError { definition: RevDataSourceDefinition; layoutCreateFromJsonErrorId: LayoutCreateFromJsonErrorId | undefined; } export function tryCreateFromJson(tableRecordSourceDefinitionFromJsonFactory: RevTableRecordSourceDefinitionFromJsonFactory, element: JsonElement): Result, CreateFromJsonErrorIdPlusExtra>; } /** @public */ export declare class RevDataSourceOrReference { private readonly _referenceableColumnLayouts; private readonly _referenceableDataSources; private readonly _tableFieldSourceDefinitionFactory; private readonly _tableRecordSourceFactory; private readonly _referenceId; private readonly _dataSourceDefinition; private _lockedDataSource; private _lockedReferenceableDataSource; constructor(_referenceableColumnLayouts: RevReferenceableColumnLayouts | undefined, _referenceableDataSources: RevReferenceableDataSources | undefined, _tableFieldSourceDefinitionFactory: RevTableFieldSourceDefinitionFactory, _tableRecordSourceFactory: RevTableRecordSourceFactory, definition: RevDataSourceOrReferenceDefinition); get lockedDataSource(): RevDataSource | undefined; get lockedReferenceableDataSource(): RevReferenceableDataSource | undefined; createDefinition(rowOrderDefinition: RevRecordRowOrderDefinition | undefined): RevDataSourceOrReferenceDefinition; tryLock(locker: LockOpenListItem.Locker): Promise>; unlock(locker: LockOpenListItem.Locker): void; } /** @public */ export declare namespace RevDataSourceOrReference { export const enum LockErrorId { TableRecordSourceTry = 0, LayoutDefinitionTry = 1, LayoutReferenceTry = 2, LayoutReferenceNotFound = 3, ReferenceableTableRecordSourceTry = 4, ReferenceableLayoutDefinitionTry = 5, ReferenceableLayoutReferenceTry = 6, ReferenceableLayoutReferenceNotFound = 7, ReferenceableNotFound = 8 } export namespace LockError { export function fromRevDataSource(lockErrorId: RevDataSource.LockErrorId, referenceable: boolean): LockErrorId; } export interface LockErrorIdPlusTryError { errorId: LockErrorId; tryError: string | undefined; } } /** @public */ export declare class RevDataSourceOrReferenceDefinition { readonly referenceId: Guid | undefined; readonly dataSourceDefinition: RevDataSourceDefinition | undefined; constructor(dataSourceDefinitionOrReferenceId: RevDataSourceDefinition | Guid); saveToJson(element: JsonElement): void; canUpdateColumnLayoutDefinitionOrReference(): boolean; updateColumnLayoutDefinitionOrReference(value: RevColumnLayoutOrReferenceDefinition): void; } /** @public */ export declare namespace RevDataSourceOrReferenceDefinition { export namespace JsonName { const referenceId = "revReferenceId"; const dataSourceDefinition = "revDataSourceDefinition"; } export interface SaveAsDefinition { readonly id: string | undefined; readonly name: string | undefined; readonly tableRecordSourceOnly: boolean; } export const enum CreateFromJsonErrorId { NeitherReferenceOrDefinitionJsonValueIsDefined = 0, BothReferenceAndDefinitionJsonValuesAreOfWrongType = 1, DefinitionJsonValueIsNotOfTypeObject = 2, TableRecordSourceElementIsNotDefined = 3, TableRecordSourceJsonValueIsNotOfTypeObject = 4, TableRecordSourceTryCreate = 5 } export interface WithLayoutError { definition: RevDataSourceOrReferenceDefinition; layoutCreateFromJsonErrorId: RevDataSourceDefinition.LayoutCreateFromJsonErrorId | undefined; } export interface CreateFromJsonErrorIdPlusExtra { readonly errorId: ErrorId; readonly extra: string | undefined; } export function tryCreateFromJson(tableRecordSourceDefinitionFromJsonFactory: RevTableRecordSourceDefinitionFromJsonFactory, element: JsonElement): Result, CreateFromJsonErrorIdPlusExtra>; } /** @public */ export declare const revDefaultColumnSettings: RevColumnSettings; /** @public */ export declare const revDefaultGridSettings: RevGridSettings; /** @public */ export declare const revDefaultOnlyColumnSettings: RevOnlyColumnSettings; /** @public */ export declare const revDefaultOnlyGridSettings: RevOnlyGridSettings; /** @public */ export declare namespace RevDispatchableEvent { export type Name = keyof Name.DetailMap; export namespace Name { export interface DetailMap { 'rev-column-sort': Detail.ColumnSort; 'rev-cell-focus-changed': Detail.CellFocusChanged; 'rev-row-focus-changed': Detail.RowFocusChanged; 'rev-selection-changed': undefined; 'rev-context-menu': Detail.Pointer; 'rev-pointer-down': Detail.Pointer; 'rev-pointer-up-cancel': Detail.Pointer; 'rev-pointer-move': Detail.Pointer; 'rev-pointer-enter': Detail.Pointer; 'rev-pointer-leave-out': Detail.Pointer; 'rev-wheel-move': Detail.Wheel; 'rev-key-down': KeyboardEvent; 'rev-key-up': KeyboardEvent; 'rev-filter-applied': undefined; 'rev-cell-enter': RevViewCell; 'rev-cell-exit': RevViewCell; 'rev-click': Detail.Pointer; 'rev-dbl-click': Detail.Pointer; 'rev-columns-view-widths-changed': RevViewLayout.ColumnsViewWidthChangeds; 'rev-grid-rendered': undefined; 'rev-grid-resized': undefined; 'rev-touch-start': TouchEvent; 'rev-touch-move': TouchEvent; 'rev-touch-end': TouchEvent; 'rev-horizontal-scroll-viewport-changed': undefined; 'rev-vertical-scroll-viewport-changed': undefined; 'rev-horizontal-scroller-action': RevScroller.Action; 'rev-vertical-scroller-action': RevScroller.Action; 'rev-field-column-list-changed': undefined; } export type MouseHoverCell = 'rev-click' | 'rev-dbl-click' | 'rev-pointer-up-cancel' | 'rev-pointer-down' | 'rev-pointer-move' | 'rev-pointer-enter' | 'rev-pointer-leave-out' | 'rev-wheel-move' | 'rev-context-menu' | 'rev-column-sort'; } export namespace Detail { export interface CellFocusChanged { readonly oldPoint: RevPoint | undefined; readonly newPoint: RevPoint | undefined; } export interface RowFocusChanged { readonly oldSubgridRowIndex: number | undefined; readonly newSubgridRowIndex: number | undefined; } export interface Mouse extends MouseEvent { revgridHoverCell?: RevLinedHoverCell; } export interface Pointer extends PointerEvent, Mouse { revgridHoverCell?: RevLinedHoverCell; } export interface Wheel extends WheelEvent { revgridHoverCell?: RevLinedHoverCell; } export interface ColumnSort extends MouseEvent { revgridHoverCell?: RevLinedHoverCell; } } } /** * Represents the possible string keys of the {@link RevEnsureFullyInViewEnum} enumeration. * Use this type to restrict values to valid enum keys for ensuring a cell is fully in view. * @public */ export declare type RevEnsureFullyInView = keyof typeof RevEnsureFullyInViewEnum; /** * Specifies the behavior for ensuring that a cell is fully visible within a view. * * This enum is used to determine when a cell should be scrolled into view. * @public */ export declare const enum RevEnsureFullyInViewEnum { /** Never ensure the cell is fully in view */ Never = "Never", /** Ensure the cell is fully in view only if it is currently not visible */ IfNotVisible = "IfNotVisible", /** Always ensure the cell is fully in view, regardless of its current visibility */ Always = "Always" } /** @public */ export declare class RevEventBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _canvas */ /* Excluded from this release type: _columnsManager */ /* Excluded from this release type: _viewLayout */ /* Excluded from this release type: _focus */ /* Excluded from this release type: _selection */ /* Excluded from this release type: _mouse */ /* Excluded from this release type: _renderer */ /* Excluded from this release type: _horizontalScroller */ /* Excluded from this release type: _verticalScroller */ /* Excluded from this release type: _descendantEventer */ /* Excluded from this release type: _dispatchEventEventer */ /* Excluded from this release type: uiKeyDownEventer */ /* Excluded from this release type: uiKeyUpEventer */ /* Excluded from this release type: uiClickEventer */ /* Excluded from this release type: uiDblClickEventer */ /* Excluded from this release type: uiPointerDownEventer */ /* Excluded from this release type: uiPointerUpCancelEventer */ /* Excluded from this release type: uiPointerMoveEventer */ /* Excluded from this release type: uiPointerEnterEventer */ /* Excluded from this release type: uiPointerLeaveOutEventer */ /* Excluded from this release type: uiPointerDragStartEventer */ /* Excluded from this release type: uiPointerDragEventer */ /* Excluded from this release type: uiPointerDragEndEventer */ /* Excluded from this release type: uiWheelMoveEventer */ /* Excluded from this release type: uiContextMenuEventer */ /* Excluded from this release type: uiTouchStartEventer */ /* Excluded from this release type: uiTouchMoveEventer */ /* Excluded from this release type: uiTouchEndEventer */ /* Excluded from this release type: uiCopyEventer */ /* Excluded from this release type: uiHorizontalScrollerActionEventer */ /* Excluded from this release type: uiVerticalScrollerActionEventer */ /* Excluded from this release type: _dispatchEnabled */ /* Excluded from this release type: _destroyed */ /* Excluded from this release type: __constructor */ /* Excluded from this release type: destroy */ /* Excluded from this release type: processColumnSortEvent */ /* Excluded from this release type: processDataServersRowListChanged */ /* Excluded from this release type: processCanvasResizedEvent */ /* Excluded from this release type: processFieldColumnListChangedEvent */ /* Excluded from this release type: processActiveColumnListChangedEvent */ /* Excluded from this release type: processColumnsWidthChangedEvent */ /* Excluded from this release type: processColumnsViewWidthsChangedEvent */ /* Excluded from this release type: processHorizontalScrollViewportStartChangedEvent */ /* Excluded from this release type: processVerticalScrollViewportStartChangedEvent */ /* Excluded from this release type: processFocusEvent */ /* Excluded from this release type: processBlurEvent */ /* Excluded from this release type: processKeyDownEvent */ /* Excluded from this release type: processKeyUpEvent */ /* Excluded from this release type: processClickEvent */ /* Excluded from this release type: processDblClickEvent */ /* Excluded from this release type: processPointerEnterEvent */ /* Excluded from this release type: processPointerDownEvent */ /* Excluded from this release type: processPointerUpCancelEvent */ /* Excluded from this release type: processPointerMoveEvent */ /* Excluded from this release type: processPointerLeaveOutEvent */ /* Excluded from this release type: processWheelMoveEvent */ /* Excluded from this release type: processDragStartEvent */ /* Excluded from this release type: processContextMenuEvent */ /* Excluded from this release type: processPointerDragStartEvent */ /* Excluded from this release type: processPointerDragEvent */ /* Excluded from this release type: processPointerDragEndEvent */ /* Excluded from this release type: processTouchStartEvent */ /* Excluded from this release type: processTouchMoveEvent */ /* Excluded from this release type: processTouchEndEvent */ /* Excluded from this release type: processCopyEvent */ /* Excluded from this release type: processCellFocusChangedEvent */ /* Excluded from this release type: processRowFocusChangedEvent */ /* Excluded from this release type: processSelectionChangedEvent */ /* Excluded from this release type: processHorizontalScrollerEvent */ /* Excluded from this release type: processVerticalScrollerEvent */ /* Excluded from this release type: processMouseEnteredCellEvent */ /* Excluded from this release type: processMouseExitedCellEvent */ private processRenderedEvent; /* Excluded from this release type: dispatchCustomEvent */ /* Excluded from this release type: dispatchMouseHoverCellEvent */ } /** @public */ export declare namespace RevEventBehavior { /* Excluded from this release type: DispatchEventEventer */ /* Excluded from this release type: UiPointerDragStartResult */ /* Excluded from this release type: DescendantEventer */ /* Excluded from this release type: DescendantEventer *//* Excluded from this release type: UiKeyEventer */ /* Excluded from this release type: UiKeyDownEventer */ /* Excluded from this release type: UiMouseEventer */ /* Excluded from this release type: UiPointerEventer */ /* Excluded from this release type: UiPointerDragEventer */ /* Excluded from this release type: UiPointerDragStartEventer */ /* Excluded from this release type: UiWheelEventer */ /* Excluded from this release type: UiDragEventer */ /* Excluded from this release type: UiTouchEventer */ /* Excluded from this release type: UiClipboardEventer */ /* Excluded from this release type: UiScrollerActionEventer */ /* Excluded from this release type: isSecondaryMouseButton */ } /** @public */ export declare class RevFavouriteReferenceableColumnLayoutDefinition implements IndexedRecord { name: string; id: Guid; index: number; } /** @public */ export declare interface RevFavouriteReferenceableColumnLayoutDefinitionsStore { name: string; } /* Excluded from this release type: RevFiltersUiController */ /** * Represents a rectangular area with one corner designated as its first corner. * * @see RevCornerArea * @public */ export declare interface RevFirstCornerArea extends RevCornerArea { /** The corner of the area designated as its first corner. */ readonly firstCorner: RevFirstCornerArea.CornerId; /** * A point representing the first corner of the area. * * The x and y coordinates represent the relevant edges of the rectangle (ie are inclusive). */ readonly inclusiveFirst: RevPoint; } /** @public */ export declare namespace RevFirstCornerArea { /** * Identifies the four corners of a rectangle. */ export const enum CornerId { TopLeft = 0, TopRight = 1, BottomRight = 2, BottomLeft = 3 } export namespace Corner { /** * Calculates the corner of a rectangle/area based on the sign of width and height values (used in to create the rectangle/area). */ export function calculateFromWidthHeight(width: number, height: number): CornerId; } } /** * Represents a rectangle with one corner designated as its first corner. * * @see RevCornerRectangle * @see RevFirstCornerArea * @public */ export declare class RevFirstCornerRectangle extends RevCornerRectangle implements RevFirstCornerArea { /** * The corner of the rectangle designated as its first corner. */ readonly firstCorner: RevFirstCornerArea.CornerId; constructor(leftOrExRight: number, topOrExBottom: number, width: number, height: number); /** * The exclusive first corner point in a rectangle. * * If the x and y coordinates respectively represent the right or bottom edge, the point is the first point outside the rectangle. */ get exclusiveFirst(): RevPoint; /** * The inclusive first corner point in a rectangle. * * The x and y coordinates represent the edges of the rectangle. */ get inclusiveFirst(): RevPoint; /** * The exclusive corner point opposite the first point in the rectangle. * * If the x and y coordinates respectively represent the right or bottom edge, the point is the first point outside the rectangle. */ get exclusiveLast(): RevPoint; /** * The inclusive corner point opposite the first point in the rectangle. * * The x and y coordinates represent the edges of the rectangle. */ get inclusiveLast(): RevPoint; /** * Creates a copy of the current `RevFirstCornerRectangle` instance. */ createCopy(): RevFirstCornerRectangle; } /** @public */ export declare namespace RevFirstCornerRectangle { /** * Creates a rectangle based on the specified corner, ensuring exclusive bottom/right semantics. * * Depending on the `corner` parameter, the rectangle's origin (`x`, `y`) and dimensions (`width`, `height`) * are adjusted so that the rectangle is defined from the given corner and extends to the opposite side, * with coordinates and sizes normalized for exclusive bottom/right. * * @param left - The x-coordinate of the reference corner. * @param top - The y-coordinate of the reference corner. * @param width - The width of the rectangle (can be negative depending on the corner). * @param height - The height of the rectangle (can be negative depending on the corner). * @param corner - The corner from which the rectangle is being created. Should be one of the {@link RevFirstCornerArea.CornerId} enum values. */ export function createExclusiveRectangle(left: number, top: number, width: number, height: number, corner: RevFirstCornerArea.CornerId): RevRectangle; } /** * Manages the focus state within a grid, including the currently focused cell, row, and column, * as well as the cell editor lifecycle and related events. Handles navigation, editing, and * synchronization of focus with grid changes such as row/column insertion, deletion, and movement. * * @typeParam BGS - Behaviored grid settings type. * @typeParam BCS - Behaviored column settings type. * @typeParam SF - Schema field type. * * @see [Focus Component πŸ—Ž](../../../../../Architecture/Client/Components/Focus/) * @public */ export declare class RevFocus implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _canvas */ /* Excluded from this release type: _mainSubgrid */ /* Excluded from this release type: _columnsManager */ /* Excluded from this release type: _viewLayout */ getCellEditorEventer: RevFocus.GetCellEditorEventer | undefined; editorKeyDownEventer: RevFocus.EditorKeyDownEventer; /* Excluded from this release type: currentCellChangedForSelectionEventer */ /* Excluded from this release type: currentCellChangedForEventBehaviorEventer */ /* Excluded from this release type: currentRowChangedForEventBehaviorEventer */ /* Excluded from this release type: viewCellRenderInvalidatedEventer */ /* Excluded from this release type: _current */ /* Excluded from this release type: _previous */ /* Excluded from this release type: _canvasX */ /* Excluded from this release type: _canvasY */ /* Excluded from this release type: _editor */ /* Excluded from this release type: _editorPoint */ /* Excluded from this release type: _cell */ /* Excluded from this release type: __constructor */ get currentActiveColumnIndex(): number | undefined; get currentSubgridRowIndex(): number | undefined; get currentSubgrid(): RevSubgrid | undefined; get current(): RevFocus.Point | undefined; get previous(): RevFocus.Point | undefined; get canvasX(): number | undefined; get canvasY(): number | undefined; get editor(): RevCellEditor | undefined; /** Do not cache as can change whenever View Layout is recomputed (even if focus and/or editor does not change) */ get cell(): RevViewCell | undefined; /* Excluded from this release type: reset */ /** * Clears the current focus. * * The previous focus is set to the current focus before clearing it. * Listeners are notified if the current focus was changed. */ clear(): void; trySetColumnRow(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, cell: RevViewCell | undefined, canvasX: number | undefined, canvasY: number | undefined): boolean; setColumnRowOrClear(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, cell: RevViewCell | undefined, canvasX: number | undefined, canvasY: number | undefined): boolean; trySetPoint(subgridPoint: RevPoint, subgrid: RevSubgrid, cell: RevViewCell | undefined, canvasPoint: RevPartialPoint | undefined): boolean; setPointOrClear(subgridPoint: RevPoint, subgrid: RevSubgrid, cell: RevViewCell | undefined, canvasPoint: RevPartialPoint | undefined): boolean; trySetColumn(activeColumnIndex: number, cell: RevViewCell | undefined, canvasX: number | undefined): boolean; setColumnOrClear(activeColumnIndex: number, cell: RevViewCell | undefined, canvasX: number | undefined): boolean; trySetRow(subgridRowIndex: number, subgrid: RevSubgrid, cell: RevViewCell | undefined, canvasY: number | undefined): boolean; setRowOrClear(subgridRowIndex: number, subgrid: RevSubgrid, cell: RevViewCell | undefined, canvasY: number | undefined): boolean; isPointFocusable(point: RevPoint, subgrid: RevSubgrid): boolean; isColumnFocusable(activeColumnIndex: number): boolean; isRowFocusable(subgridRowIndex: number, subgrid: RevSubgrid): boolean; isColumnFocused(activeColumnIndex: number): boolean; isRowFocused(subgridRowIndex: number, subgrid: RevSubgrid): boolean; isMainRowFocused(mainSubgridRowIndex: number): boolean; isCellFocused(cell: RevViewCell): boolean; isGridPointFocused(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): boolean; /** * Attempts to open the editor at the currently focused cell. * * For a successful operation, the focused cell must be visible and editable. * * @returns Returns `true` if the editor was successfully opened (including if it was already open), or `false` if there is open operation failed. */ tryOpenEditor(): boolean; /** * Closes the currently active editor, if one exists. */ closeEditor(): void; canGetFocusedEditValue(): boolean; getFocusedEditValue(): unknown; canSetFocusedEditValue(): boolean; setFocusedEditValue(value: RevDataServer.ViewValue): void; /* Excluded from this release type: tryOpenEditorAtViewCell */ /* Excluded from this release type: checkEditorWantsKeyDownEvent */ /* Excluded from this release type: checkEditorWantsClickEvent */ /* Excluded from this release type: checkEditorProcessPointerMoveEvent */ /* Excluded from this release type: adjustForRowsInserted */ /* Excluded from this release type: adjustForRowsDeleted */ /* Excluded from this release type: adjustForRowsMoved */ /* Excluded from this release type: adjustForColumnsInserted */ /* Excluded from this release type: adjustForActiveColumnsDeleted */ /* Excluded from this release type: adjustForColumnsMoved */ /* Excluded from this release type: invalidateSubgrid */ /* Excluded from this release type: invalidateSubgridRows */ /* Excluded from this release type: invalidateSubgridRow */ /* Excluded from this release type: invalidateSubgridRowCells */ /* Excluded from this release type: invalidateSubgridCell */ /* Excluded from this release type: createStash */ /* Excluded from this release type: restoreStash */ /* Excluded from this release type: handleEditorClosed */ /* Excluded from this release type: handleCellPoolComputedEvent */ /* Excluded from this release type: notifyCurrentCellChanged */ /* Excluded from this release type: notifyCurrentRowChanged */ /* Excluded from this release type: setPoint */ /* Excluded from this release type: setColumnRow */ /* Excluded from this release type: setColumn */ /* Excluded from this release type: setRow */ /* Excluded from this release type: tryOpenEditorAtFocusedViewCell */ /* Excluded from this release type: finaliseEditor */ /* Excluded from this release type: closeFocus */ /* Excluded from this release type: closeSpecifiedEditor */ /* Excluded from this release type: createStashPoint */ /* Excluded from this release type: createPointFromStash */ } /** @public */ export declare namespace RevFocus { export interface Point extends RevWritablePoint { readonly subgrid: RevSubgrid; } export type EditorKeyDownEventer = (this: void, event: KeyboardEvent) => void; export type GetCellEditorEventer = (this: void, field: SF, subgridRowIndex: number, subgrid: RevSubgrid, readonly: boolean, cell: RevViewCell | undefined) => RevCellEditor | undefined; /* Excluded from this release type: CurrentCellChangedForSelectionEventer */ /* Excluded from this release type: CurrentCellChangedForEventBehaviorEventer */ /* Excluded from this release type: CurrentRowChangedForEventBehaviorEventer */ /* Excluded from this release type: ViewCellRenderInvalidatedEventer */ export type ActionKeyboardKey = typeof ActionKeyboardKey.tab | typeof ActionKeyboardKey.escape | typeof ActionKeyboardKey.enter | typeof ActionKeyboardKey.arrowLeft | typeof ActionKeyboardKey.arrowRight | typeof ActionKeyboardKey.arrowUp | typeof ActionKeyboardKey.arrowDown | typeof ActionKeyboardKey.pageUp | typeof ActionKeyboardKey.pageDown | typeof ActionKeyboardKey.home | typeof ActionKeyboardKey.end; export namespace ActionKeyboardKey { const tab = "Tab"; const escape = "Escape"; const enter = "Enter"; const arrowLeft = "ArrowLeft"; const arrowRight = "ArrowRight"; const arrowUp = "ArrowUp"; const arrowDown = "ArrowDown"; const pageUp = "PageUp"; const pageDown = "PageDown"; const home = "Home"; const end = "End"; } export function isNavActionKeyboardKey(key: ActionKeyboardKey): boolean; /* Excluded from this release type: Stash */ /* Excluded from this release type: Stash */} export declare class RevFocusScrollBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; private readonly _gridSettings; private readonly _columnsManager; private readonly _subgridsManager; private readonly _viewLayout; private readonly _focus; private readonly _mainSubgrid; constructor(clientId: string, internalParent: RevClientObject, _gridSettings: RevGridSettings, _columnsManager: RevColumnsManager, _subgridsManager: RevSubgridsManager, _viewLayout: RevViewLayout, _focus: RevFocus); tryFocusColumnRowAndEnsureInView(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, cell: RevViewCell | undefined): boolean; tryFocusColumnAndEnsureInView(activeColumnIndex: number): boolean; tryFocusRowAndEnsureInView(subgridRowIndex: number, subgrid: RevSubgrid): boolean; tryMoveFocusLeft(): boolean; tryMoveFocusRight(): boolean; tryMoveFocusUp(): boolean; tryMoveFocusDown(): boolean; tryFocusFirstColumn(): boolean; tryFocusLastColumn(): boolean; tryFocusTop(): boolean; tryFocusBottom(): boolean; tryPageFocusLeft(): boolean; tryPageFocusRight(): boolean; tryPageFocusUp(): boolean; tryPageFocusDown(): boolean; tryScrollLeft(): boolean; tryScrollRight(): boolean; tryScrollUp(): boolean; tryScrollDown(): boolean; scrollFirstColumn(): boolean; scrollLastColumn(): boolean; scrollTop(): boolean; scrollBottom(): boolean; tryScrollPageLeft(): boolean; tryScrollPageRight(): boolean; tryScrollPageUp(): boolean; tryScrollPageDown(): boolean; /** * Scroll up one full page. */ /** * Scroll down one full page. */ tryStepScroll(directionCanvasOffsetX: number, directionCanvasOffsetY: number): boolean; tryStepScrollColumn(directionCanvasOffsetX: number): boolean; tryStepScrollRow(directionCanvasOffsetY: number): boolean; private isColumnScrollable; private isRowScrollable; } export declare namespace RevFocusScrollBehavior { export type ScrollXToMakeVisibleEventer = (this: void, x: number) => void; export type ScrollYToMakeVisibleEventer = (this: void, y: number) => void; export type ScrollXYToMakeVisibleEventer = (this: void, x: number, y: number) => void; } /* Excluded from this release type: RevFocusScrollUiController */ export declare class RevFocusSelectBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; private readonly _gridSettings; private readonly _columnsManager; private readonly _selection; private readonly _focus; private readonly _viewLayout; constructor(clientId: string, internalParent: RevClientObject, _gridSettings: RevGridSettings, _columnsManager: RevColumnsManager, _selection: RevSelection, _focus: RevFocus, _viewLayout: RevViewLayout); selectColumn(activeColumnIndex: number): void; selectColumns(activeColumnIndex: number, count: number): void; onlySelectColumn(activeColumnIndex: number): void; onlySelectColumns(activeColumnIndex: number, count: number): void; focusOnlySelectColumn(activeColumnIndex: number, ensureFullyInView: RevEnsureFullyInView): void; toggleSelectColumn(activeColumnIndex: number): void; selectRow(subgridRowIndex: number, subgrid: RevSubgrid): void; selectRows(subgridRowIndex: number, count: number, subgrid: RevSubgrid): void; selectAllRows(subgrid: RevSubgrid): void; onlySelectRow(subgridRowIndex: number, subgrid: RevSubgrid): void; onlySelectRows(subgridRowIndex: number, count: number, subgrid: RevSubgrid): void; focusOnlySelectRow(subgridRowIndex: number, subgrid: RevSubgrid, ensureFullyInView: RevEnsureFullyInView): void; toggleSelectRow(subgridRowIndex: number, subgrid: RevSubgrid): void; focusOnlySelectRectangle(leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid, ensureFullyInView: RevEnsureFullyInView): void; /** Select only a single cell and try to focus it. If focused, ensure it is in view. */ focusOnlySelectCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, ensureFullyInView: RevEnsureFullyInView): void; onlySelectViewCell(viewLayoutColumnIndex: number, viewLayoutRowIndex: number): void; focusSelectCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, ensureFullyInView: RevEnsureFullyInView): void; /** * Toggles the selection state of a cell at the specified coordinates and attempts to set focus to it. * If the cell becomes selected and focus is successfully set, optionally ensures the cell is fully visible in the view. * Also flags the selection as focus-linked if focus is set. * * @param activeColumnIndex - The active column index of the cell. * @param subgridRowIndex - The row index within the subgrid of the cell. * @param subgrid - The subgrid containing the cell. * @param ensureFullyInView - Specifies whether to scroll to ensure the cell is visible in the view. * @returns `true` if the cell is selected after toggling; otherwise, `false`. */ focusToggleSelectCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, ensureFullyInView: RevEnsureFullyInView): boolean; tryOnlySelectFocusedCell(): boolean; focusReplaceLastArea(areaTypeId: RevSelectionAreaTypeId, leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid, ensureFullyInView: RevEnsureFullyInView): void; focusReplaceLastAreaWithRectangle(leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid, ensureFullyInView: RevEnsureFullyInView): void; tryExtendLastSelectionAreaAsCloseAsPossibleToFocus(): boolean; isMouseAddToggleExtendSelectionAreaAllowed(event: MouseEvent): boolean; } export declare namespace RevFocusSelectBehavior { export type FocusAndEnsureInViewEventer = (this: void, activeColumnIndex: number, subgridRowIndex: number, cell: RevViewCell | undefined) => void; } /** @public */ export declare class RevGenericTableField extends RevTableField { protected compareDefined(left: RevTableValue, right: RevTableValue): number; } /** @public */ export declare abstract class RevGenericTableValue extends RevTableValue { private _data; private _definedData; get definedData(): T; get data(): T | undefined; set data(value: T | undefined); isUndefined(): boolean; clear(): void; } /** @public */ export declare interface RevGridDefinition { schemaServer: (RevSchemaServer | RevSchemaServer.Constructor); subgrids: RevSubgrid.Definition[]; } /** @public */ export declare interface RevGridOptions { /** Used to distinguish between Revgrid instances in an application. If undefined, will generate an id from canvas element */ id?: string; /** Internally generated ids are numbered using the canvas element's id as a base or the above id as a base and suffixing it with a number. Normally the first id generated from a * base is not numbered. Subsequent ids generated from that base id are suffixed with numbers beginning with 2. This works well if Ids specified in canvas elements or RevGrid options are generally unique (so * suffices are generally not used). However, if Ids are not specified or not unique, then it may be better for all internally generated ids to be suffixed with a number (starting * from 1). Set `firstGeneratedIdFromBaseIsAlsoNumbered` to true to suffix all internally generated ids. */ firstGeneratedIdFromBaseIsAlsoNumbered?: boolean; /** Optional link to Revgrid instance's parent Javascript object. Is used to set externalParent which is not used within Revgrid however may be helpful with debugging */ externalParent?: unknown; /** The canvas element must have a positioned element to use as overlay element. By default it uses its parent element as the overlay element. (Requires that the canvas element takes up * the full size of its parent element and the parent element is positioned). If this is not possible/provided, then you can provide a specific overlay element using this option. */ canvasOverlayElement?: HTMLElement | undefined; /** Set alpha to false to speed up rendering if no colors use alpha channel */ canvasRenderingContext2DSettings?: CanvasRenderingContext2DSettings; /** Create functions to generate custom scrollbars */ scrollerCreateFns?: [ /** Will use all space along its axis */ spaceAccommodated: RevScroller.CreateFn, /** Will relinquish space along its axis to make room for the space accommodated scrollbar */ spaceRelinquishing: RevScroller.CreateFn ]; customUiControllerDefinitions?: RevUiController.Definition[]; } export declare abstract class RevGridPainter { protected readonly _gridSettings: RevGridSettings; protected readonly _canvas: RevCanvas; protected readonly _subgridsManager: RevSubgridsManager; protected readonly _viewLayout: RevViewLayout; protected readonly _focus: RevFocus; protected readonly _selection: RevSelection; protected readonly _mouse: RevMouse; protected readonly _repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer; readonly key: string; readonly partial: boolean; protected readonly _renderingContext: RevCachedCanvasRenderingContext2D; private _columnBundles; private _columnRebundlingRequired; private _columnBundlesComputationId; constructor(_gridSettings: RevGridSettings, _canvas: RevCanvas, _subgridsManager: RevSubgridsManager, _viewLayout: RevViewLayout, _focus: RevFocus, _selection: RevSelection, _mouse: RevMouse, _repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer, key: string, partial: boolean); flagColumnRebundlingRequired(): void; getColumnBundles(viewLayoutColumns: readonly RevViewLayoutColumn[]): (RevGridPainter.ColumnBundle | undefined)[]; paintErrorCell(err: Error, vc: RevViewLayoutColumn, vr: RevViewLayoutRow): void; /** * We opted to not paint borders for each cell as that was extremely expensive. Instead we draw grid lines here. */ paintGridlines(): void; checkPaintLastSelection(): void; calculateLastSelectionBounds(): RevRectangle | undefined; protected paintCell(viewCell: RevViewCell, prefillColor: string | undefined): number | undefined; protected stripeRows(stripeColor: RevOnlyGridSettings.Color, left: number, width: number): void; protected isRowStriped(subgridRowIndex: number): boolean; private calculateColumnBundles; private paintErrorMessage; abstract paintCells(): void; } export declare namespace RevGridPainter { export type ResetAllGridPaintersRequiredEventer = (this: void, blackList: string[]) => void; export type RepaintAllRequiredEventer = (this: void) => void; export type Constructor = new (gridSettings: RevGridSettings, canvas: RevCanvas, subgridsManager: RevSubgridsManager, viewLayout: RevViewLayout, focus: RevFocus, selection: RevSelection, mouse: RevMouse, repaintAllRequired: RepaintAllRequiredEventer) => RevGridPainter; export interface ColumnBundle { backgroundColor: string; left: number; right: number; } } export declare class RevGridPainterRepository { private readonly _gridSettings; private readonly _canvas; private readonly _subgridsManager; private readonly _viewLayout; private readonly _focus; private readonly _selection; private readonly _mouse; private readonly _repaintAllRequiredEventer; private constructorRegistry; private cache; constructor(_gridSettings: RevGridSettings, _canvas: RevCanvas, _subgridsManager: RevSubgridsManager, _viewLayout: RevViewLayout, _focus: RevFocus, _selection: RevSelection, _mouse: RevMouse, _repaintAllRequiredEventer: RevGridPainter.RepaintAllRequiredEventer); get(key: string): RevGridPainter; allCreatedEntries(): MapIterator<[string, RevGridPainter]>; allCreated(): MapIterator>; register(key: string, constructor: RevGridPainter.Constructor): void; } /** @public */ export declare namespace RevGridSettingChangeInvalidateType { /** May return a type id different from the 2 parameters */ export function getHigherPriority(left: RevGridSettingChangeInvalidateTypeId, right: RevGridSettingChangeInvalidateTypeId): RevGridSettingChangeInvalidateTypeId; } /** @public */ export declare const enum RevGridSettingChangeInvalidateTypeId { None = 0, ViewRender = 1, HorizontalViewLayout = 2, VerticalViewLayout = 3, ViewLayout = 4, HorizontalViewLayoutAndScrollDimension = 5, VerticalViewLayoutAndScrollDimension = 6, ViewLayoutAndScrollDimension = 7, Resize = 8 } /** @public */ export declare type RevGridSettingChangeInvalidateTypeIds = { [key in keyof RevGridSettings]: RevGridSettingChangeInvalidateTypeId; }; /** @public */ export declare const revGridSettingChangeInvalidateTypeIds: RevGridSettingChangeInvalidateTypeIds; /** @public */ export declare type RevGridSettings = RevOnlyGridSettings; /** @public */ export declare namespace RevGridSettings { export type Color = RevOnlyGridSettings.Color; export function assign(source: Partial, target: RevGridSettings): boolean; export function isAddToggleSelectionAreaModifierKeyDownInEvent(gridSettings: RevGridSettings, event: MouseEvent | KeyboardEvent): boolean; export function isExtendLastSelectionAreaModifierKeyDownInEvent(gridSettings: RevGridSettings, event: MouseEvent | KeyboardEvent): boolean; export function isSecondarySelectionAreaTypeSpecifierModifierKeyDownInEvent(gridSettings: RevGridSettings, event: MouseEvent | KeyboardEvent): boolean; export function isShowScrollerThumbOnMouseMoveModifierKeyDownInEvent(gridSettings: RevGridSettings, event: MouseEvent | KeyboardEvent): boolean; export function getSelectionAreaTypeFromEvent(gridSettings: RevGridSettings, event: MouseEvent | KeyboardEvent): "dynamicAll" | "rectangle" | "row" | "column"; export function getSelectionAreaTypeSpecifierFromEvent(gridSettings: RevGridSettings, event: MouseEvent | KeyboardEvent): RevSelectionAreaTypeSpecifierId.Primary | RevSelectionAreaTypeSpecifierId.Secondary; } /** @public */ export declare type RevHorizontalAlign = typeof RevHorizontalAlign.left | typeof RevHorizontalAlign.right | typeof RevHorizontalAlign.center | typeof RevHorizontalAlign.start | typeof RevHorizontalAlign.end; /** @public */ export declare namespace RevHorizontalAlign { export type Id = RevHorizontalAlignId; const left = "left"; const right = "right"; const center = "center"; const start = "start"; const end = "end"; export function tryToId(value: RevHorizontalAlign): Id | undefined; export function toId(value: RevHorizontalAlign, noMatchFallbackId?: Id): Id; export function idToCanvasTextAlign(id: Id): CanvasTextAlign; } /** @public */ export declare const enum RevHorizontalAlignId { Left = 0, Right = 1, Center = 2, Start = 3, End = 4 } /** * Tracks viewport size, position and scrollability in horizontal scroll dimension * @public * @see [View Layout Component πŸ—Ž](../../../../../Architecture/Client/Components/View_Layout/) */ export declare class RevHorizontalScrollDimension extends RevScrollDimension { /* Excluded from this release type: _columnsManager */ /* Excluded from this release type: __constructor */ /* Excluded from this release type: calculateLimitedScrollAnchorFromViewportStart */ /* Excluded from this release type: calculateColumnScrollAnchorToScrollIntoView */ /* Excluded from this release type: calculateHorizontalScrollableLeft */ /* Excluded from this release type: compute */ /* Excluded from this release type: calculateScrollStart */ /* Excluded from this release type: calculateNotRightAlignedGridRightAnchorLimit */ /* Excluded from this release type: calculateRightAlignedGridLeftAnchorLimit */ /* Excluded from this release type: calculateActiveNonFixedColumnsWidth */ /* Excluded from this release type: calculateScrollAnchorFromViewportStart */ /* Excluded from this release type: calculateScrollableViewLeftUsingDimensionStart */ /* Excluded from this release type: calculateScrollableViewRightUsingDimensionFinish */ } /** @public */ export declare const enum RevHorizontalWheelScrollingAllowedId { Never = 0, Always = 1, CtrlKeyDown = 2 } /* Excluded from this release type: RevHoverUiController */ /** @public */ export declare interface RevIColumnLayoutGrid extends RevColumnLayoutGrid { } /* Excluded from this release type: RevIdGenerator */ /** @public */ export declare class RevInMemoryBehavioredColumnSettings extends RevInMemoryBehavioredSettings implements RevBehavioredColumnSettings { readonly gridSettings: RevGridSettings; private _backgroundColor; private _color; private _columnAutoSizingMax; private _columnClip; private _defaultColumnAutoSizing; private _defaultColumnWidth; private _editable; private _editOnClick; private _editOnDoubleClick; private _editOnFocusCell; private _editOnKeyDown; private _cellEditPossibleCursorName; private _filterable; private _maximumColumnWidth; private _minimumColumnWidth; private _resizeColumnInPlace; private _sortOnDoubleClick; private _sortOnClick; constructor(gridSettings: RevGridSettings); get backgroundColor(): string; set backgroundColor(value: string); get color(): string; set color(value: string); get columnAutoSizingMax(): number | undefined; set columnAutoSizingMax(value: number | undefined); get columnClip(): boolean | undefined; set columnClip(value: boolean | undefined); get defaultColumnAutoSizing(): boolean; set defaultColumnAutoSizing(value: boolean); get defaultColumnWidth(): number; set defaultColumnWidth(value: number); get editable(): boolean; set editable(value: boolean); get editOnClick(): boolean; set editOnClick(value: boolean); get editOnDoubleClick(): boolean; set editOnDoubleClick(value: boolean); get editOnFocusCell(): boolean; set editOnFocusCell(value: boolean); get editOnKeyDown(): boolean; set editOnKeyDown(value: boolean); get cellEditPossibleCursorName(): string | undefined; set cellEditPossibleCursorName(value: string | undefined); get filterable(): boolean; set filterable(value: boolean); get maximumColumnWidth(): number | undefined; set maximumColumnWidth(value: number | undefined); get minimumColumnWidth(): number; set minimumColumnWidth(value: number); get resizeColumnInPlace(): boolean; set resizeColumnInPlace(value: boolean); get sortOnDoubleClick(): boolean; set sortOnDoubleClick(value: boolean); get sortOnClick(): boolean; set sortOnClick(value: boolean); merge(settings: Partial, overrideGrid?: boolean): boolean; clone(overrideGrid?: boolean): RevInMemoryBehavioredColumnSettings; } /** @public */ export declare class RevInMemoryBehavioredGridSettings extends RevInMemoryBehavioredSettings implements RevBehavioredGridSettings { private _addToggleSelectionAreaModifierKey; private _addToggleSelectionAreaModifierKeyDoesToggle; private _backgroundColor; private _color; private _defaultColumnAutoSizing; private _columnAutoSizingMax; private _columnClip; private _columnMoveDragPossibleCursorName; private _columnMoveDragPossibleTitleText; private _columnMoveDragActiveCursorName; private _columnMoveDragActiveTitleText; private _columnResizeDragPossibleCursorName; private _columnResizeDragPossibleTitleText; private _columnResizeDragActiveCursorName; private _columnResizeDragActiveTitleText; private _columnSortPossibleCursorName; private _columnSortPossibleTitleText; private _columnsReorderable; private _columnsReorderableHideable; private _switchNewRectangleSelectionToRowOrColumn; private _defaultRowHeight; private _defaultColumnWidth; private _defaultUiControllerTypeNames; private _editable; private _editKey; private _editOnClick; private _editOnDoubleClick; private _editOnFocusCell; private _editOnKeyDown; private _cellEditPossibleCursorName; private _extendLastSelectionAreaModifierKey; private _eventDispatchEnabled; private _filterable; private _filterBackgroundColor; private _filterBackgroundSelectionColor; private _filterColor; private _filterEditor; private _filterFont; private _filterForegroundSelectionColor; private _filterCellPainter; private _fixedColumnCount; private _horizontalFixedLineColor; private _horizontalFixedLineEdgeWidth; private _horizontalFixedLineWidth; private _verticalFixedLineColor; private _verticalFixedLineEdgeWidth; private _verticalFixedLineWidth; private _fixedRowCount; private _gridRightAligned; private _horizontalGridLinesColor; private _horizontalGridLinesWidth; private _horizontalGridLinesVisible; private _verticalGridLinesVisible; private _visibleVerticalGridLinesDrawnInFixedAndPreMainOnly; private _verticalGridLinesColor; private _verticalGridLinesWidth; private _horizontalWheelScrollingAllowed; private _minimumColumnWidth; private _maximumColumnWidth; private _viewColumnWidthAdjust; private _mouseLastSelectionAreaExtendingDragActiveCursorName; private _mouseLastSelectionAreaExtendingDragActiveTitleText; private _mouseAddToggleExtendSelectionAreaEnabled; private _mouseAddToggleExtendSelectionAreaDragModifierKey; private _mouseColumnSelectionEnabled; private _mouseColumnSelectionModifierKey; private _mouseRowSelectionEnabled; private _mouseRowSelectionModifierKey; private _multipleSelectionAreas; private _primarySelectionAreaType; private _minimumAnimateTimeInterval; private _backgroundAnimateTimeInterval; private _resizeColumnInPlace; private _resizedEventDebounceExtendedWhenPossible; private _resizedEventDebounceInterval; private _rowResize; private _rowStripeBackgroundColor; private _scrollHorizontallySmoothly; private _scrollerThickness; private _scrollerThumbColor; private _scrollerThumbReducedVisibilityOpacity; private _scrollingEnabled; private _secondarySelectionAreaTypeSpecifierModifierKey; private _secondarySelectionAreaType; private _selectionRegionOutlineColor; private _selectionRegionOverlayColor; private _showFilterRow; private _showScrollerThumbOnMouseMoveModifierKey; private _sortOnDoubleClick; private _sortOnClick; private _useHiDPI; private _wheelHFactor; private _wheelVFactor; get addToggleSelectionAreaModifierKey(): RevModifierKey; set addToggleSelectionAreaModifierKey(value: RevModifierKey); get addToggleSelectionAreaModifierKeyDoesToggle(): boolean; set addToggleSelectionAreaModifierKeyDoesToggle(value: boolean); get backgroundColor(): RevGridSettings.Color; set backgroundColor(value: RevGridSettings.Color); get color(): RevGridSettings.Color; set color(value: RevGridSettings.Color); get defaultColumnAutoSizing(): boolean; set defaultColumnAutoSizing(value: boolean); get columnAutoSizingMax(): number | undefined; set columnAutoSizingMax(value: number | undefined); get columnClip(): boolean | undefined; set columnClip(value: boolean | undefined); get columnMoveDragPossibleCursorName(): string | undefined; set columnMoveDragPossibleCursorName(value: string | undefined); get columnMoveDragPossibleTitleText(): string | undefined; set columnMoveDragPossibleTitleText(value: string | undefined); get columnMoveDragActiveCursorName(): string | undefined; set columnMoveDragActiveCursorName(value: string | undefined); get columnMoveDragActiveTitleText(): string | undefined; set columnMoveDragActiveTitleText(value: string | undefined); get columnResizeDragPossibleCursorName(): string | undefined; set columnResizeDragPossibleCursorName(value: string | undefined); get columnResizeDragPossibleTitleText(): string | undefined; set columnResizeDragPossibleTitleText(value: string | undefined); get columnResizeDragActiveCursorName(): string | undefined; set columnResizeDragActiveCursorName(value: string | undefined); get columnResizeDragActiveTitleText(): string | undefined; set columnResizeDragActiveTitleText(value: string | undefined); get columnSortPossibleCursorName(): string | undefined; set columnSortPossibleCursorName(value: string | undefined); get columnSortPossibleTitleText(): string | undefined; set columnSortPossibleTitleText(value: string | undefined); get columnsReorderable(): boolean; set columnsReorderable(value: boolean); get columnsReorderableHideable(): boolean; set columnsReorderableHideable(value: boolean); get switchNewRectangleSelectionToRowOrColumn(): RevRowOrColumnSelectionAreaType | undefined; set switchNewRectangleSelectionToRowOrColumn(value: RevRowOrColumnSelectionAreaType | undefined); get defaultRowHeight(): number; set defaultRowHeight(value: number); get defaultColumnWidth(): number; set defaultColumnWidth(value: number); get defaultUiControllerTypeNames(): string[]; set defaultUiControllerTypeNames(value: string[]); get editable(): boolean; set editable(value: boolean); get editKey(): string; set editKey(value: string); get editOnClick(): boolean; set editOnClick(value: boolean); get editOnDoubleClick(): boolean; set editOnDoubleClick(value: boolean); get editOnFocusCell(): boolean; set editOnFocusCell(value: boolean); get editOnKeyDown(): boolean; set editOnKeyDown(value: boolean); get cellEditPossibleCursorName(): string | undefined; set cellEditPossibleCursorName(value: string | undefined); get extendLastSelectionAreaModifierKey(): RevModifierKey; set extendLastSelectionAreaModifierKey(value: RevModifierKey); get eventDispatchEnabled(): boolean; set eventDispatchEnabled(value: boolean); get filterable(): boolean; set filterable(value: boolean); get filterBackgroundColor(): RevGridSettings.Color; set filterBackgroundColor(value: RevGridSettings.Color); get filterBackgroundSelectionColor(): RevGridSettings.Color; set filterBackgroundSelectionColor(value: RevGridSettings.Color); get filterColor(): RevGridSettings.Color; set filterColor(value: RevGridSettings.Color); get filterEditor(): string; set filterEditor(value: string); get filterFont(): string; set filterFont(value: string); get filterForegroundSelectionColor(): RevGridSettings.Color; set filterForegroundSelectionColor(value: RevGridSettings.Color); get filterCellPainter(): string; set filterCellPainter(value: string); get fixedColumnCount(): number; set fixedColumnCount(value: number); get horizontalFixedLineColor(): RevGridSettings.Color; set horizontalFixedLineColor(value: RevGridSettings.Color); get horizontalFixedLineEdgeWidth(): number | undefined; set horizontalFixedLineEdgeWidth(value: number | undefined); get horizontalFixedLineWidth(): number | undefined; set horizontalFixedLineWidth(value: number | undefined); get verticalFixedLineColor(): RevGridSettings.Color; set verticalFixedLineColor(value: RevGridSettings.Color); get verticalFixedLineEdgeWidth(): number | undefined; set verticalFixedLineEdgeWidth(value: number | undefined); get verticalFixedLineWidth(): number | undefined; set verticalFixedLineWidth(value: number | undefined); get fixedRowCount(): number; set fixedRowCount(value: number); get gridRightAligned(): boolean; set gridRightAligned(value: boolean); get horizontalGridLinesColor(): RevGridSettings.Color; set horizontalGridLinesColor(value: RevGridSettings.Color); get horizontalGridLinesWidth(): number; set horizontalGridLinesWidth(value: number); get horizontalGridLinesVisible(): boolean; set horizontalGridLinesVisible(value: boolean); get verticalGridLinesVisible(): boolean; set verticalGridLinesVisible(value: boolean); get visibleVerticalGridLinesDrawnInFixedAndPreMainOnly(): boolean; set visibleVerticalGridLinesDrawnInFixedAndPreMainOnly(value: boolean); get verticalGridLinesColor(): RevGridSettings.Color; set verticalGridLinesColor(value: RevGridSettings.Color); get verticalGridLinesWidth(): number; set verticalGridLinesWidth(value: number); get horizontalWheelScrollingAllowed(): RevHorizontalWheelScrollingAllowedId; set horizontalWheelScrollingAllowed(value: RevHorizontalWheelScrollingAllowedId); get minimumColumnWidth(): number; set minimumColumnWidth(value: number); get maximumColumnWidth(): number | undefined; set maximumColumnWidth(value: number | undefined); get viewColumnWidthAdjust(): boolean; set viewColumnWidthAdjust(value: boolean); get mouseColumnSelectionEnabled(): boolean; set mouseColumnSelectionEnabled(value: boolean); get mouseColumnSelectionModifierKey(): RevModifierKey | undefined; set mouseColumnSelectionModifierKey(value: RevModifierKey | undefined); get mouseLastSelectionAreaExtendingDragActiveCursorName(): string | undefined; set mouseLastSelectionAreaExtendingDragActiveCursorName(value: string | undefined); get mouseLastSelectionAreaExtendingDragActiveTitleText(): string | undefined; set mouseLastSelectionAreaExtendingDragActiveTitleText(value: string | undefined); get mouseAddToggleExtendSelectionAreaEnabled(): boolean; set mouseAddToggleExtendSelectionAreaEnabled(value: boolean); get mouseAddToggleExtendSelectionAreaDragModifierKey(): RevModifierKey | undefined; set mouseAddToggleExtendSelectionAreaDragModifierKey(value: RevModifierKey | undefined); get mouseRowSelectionEnabled(): boolean; set mouseRowSelectionEnabled(value: boolean); get mouseRowSelectionModifierKey(): RevModifierKey | undefined; set mouseRowSelectionModifierKey(value: RevModifierKey | undefined); get multipleSelectionAreas(): boolean; set multipleSelectionAreas(value: boolean); get primarySelectionAreaType(): RevSelectionAreaType; set primarySelectionAreaType(value: RevSelectionAreaType); get minimumAnimateTimeInterval(): number; set minimumAnimateTimeInterval(value: number); get backgroundAnimateTimeInterval(): number | undefined; set backgroundAnimateTimeInterval(value: number | undefined); get resizeColumnInPlace(): boolean; set resizeColumnInPlace(value: boolean); get resizedEventDebounceExtendedWhenPossible(): boolean; set resizedEventDebounceExtendedWhenPossible(value: boolean); get resizedEventDebounceInterval(): number; set resizedEventDebounceInterval(value: number); get rowResize(): boolean; set rowResize(value: boolean); get rowStripeBackgroundColor(): RevOnlyGridSettings.Color | undefined; set rowStripeBackgroundColor(value: RevOnlyGridSettings.Color | undefined); get scrollHorizontallySmoothly(): boolean; set scrollHorizontallySmoothly(value: boolean); get scrollerThickness(): string; set scrollerThickness(value: string); get scrollerThumbColor(): string; set scrollerThumbColor(value: string); get scrollerThumbReducedVisibilityOpacity(): number; set scrollerThumbReducedVisibilityOpacity(value: number); get scrollingEnabled(): boolean; set scrollingEnabled(value: boolean); get secondarySelectionAreaTypeSpecifierModifierKey(): RevModifierKey | undefined; set secondarySelectionAreaTypeSpecifierModifierKey(value: RevModifierKey | undefined); get secondarySelectionAreaType(): RevSelectionAreaType; set secondarySelectionAreaType(value: RevSelectionAreaType); get selectionRegionOutlineColor(): RevGridSettings.Color | undefined; set selectionRegionOutlineColor(value: RevGridSettings.Color | undefined); get selectionRegionOverlayColor(): RevGridSettings.Color | undefined; set selectionRegionOverlayColor(value: RevGridSettings.Color | undefined); get showFilterRow(): boolean; set showFilterRow(value: boolean); get showScrollerThumbOnMouseMoveModifierKey(): RevModifierKey | undefined; set showScrollerThumbOnMouseMoveModifierKey(value: RevModifierKey | undefined); get sortOnDoubleClick(): boolean; set sortOnDoubleClick(value: boolean); get sortOnClick(): boolean; set sortOnClick(value: boolean); get useHiDPI(): boolean; set useHiDPI(value: boolean); get wheelHFactor(): number; set wheelHFactor(value: number); get wheelVFactor(): number; set wheelVFactor(value: number); merge(settings: Partial): boolean; clone(): RevInMemoryBehavioredGridSettings; } /** @public */ export declare abstract class RevInMemoryBehavioredSettings implements RevBehavioredSettings { /* Excluded from this release type: viewRenderInvalidatedEventer */ /* Excluded from this release type: viewLayoutInvalidatedEventer */ /* Excluded from this release type: horizontalViewLayoutInvalidatedEventer */ /* Excluded from this release type: verticalViewLayoutInvalidatedEventer */ /* Excluded from this release type: resizeEventer */ /* Excluded from this release type: _beginChangeCount */ /* Excluded from this release type: _highestPriorityInvalidateType */ /* Excluded from this release type: _changedEventHandlers */ beginChange(): void; endChange(): boolean; subscribeChangedEvent(handler: RevBehavioredSettings.ChangedEventHandler): void; unsubscribeChangedEvent(handler: RevBehavioredSettings.ChangedEventHandler): void; protected flagChangedViewRender(): void; protected flagChanged(invalidateType: RevGridSettingChangeInvalidateTypeId): void; private notifyChanged; } /** @public */ export declare class RevInMemorySettingsClientGrid extends RevClientGrid { } /** @public */ export declare type RevInMemorySettingsGridDefinition = RevGridDefinition; /** @public */ export declare type RevInMemorySettingsGridOptions = RevGridOptions; /** @public */ export declare type RevInMemorySettingsViewCell = RevViewCell; /** @public */ export declare const revInvalidServerNotificationId = -1; /* Excluded from this release type: revIsDigit */ /** @public */ export declare class RevLastSelectionArea extends RevFirstCornerRectangle implements RevSelectionArea { readonly areaTypeId: RevSelectionAreaTypeId; readonly subgrid: RevSubgrid | undefined; constructor(areaTypeId: RevSelectionAreaTypeId, leftOrExRight: number, topOrExBottom: number, width: number, height: number, subgrid: RevSubgrid | undefined); get size(): number; /** * Determines whether the cell specified by the given point is contained in the last selection area. * @param point - The point of the cell to test for containment. * @returns `true` if the cell is within the last selection area; otherwise, `false`. */ containsSubgridCellPoint(point: RevPoint, subgrid: RevSubgrid): boolean; /** * Determines whether the specified cell specified by the co-ordinates is contained within the last selection area. * * @param activeColumnIndex - The index of the active column. * @param subgridRowIndex - The index of the row within the specified subgrid. * @param subgrid - The subgrid containing the `subgridRowIndex`. * @returns `true` if the point is within the rectangle; otherwise, `false`. */ containsSubgridCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): boolean; checkAdjustForXRangeInserted(subgrid: RevSubgrid, index: number, count: number): void; checkAdjustForYRangeInserted(subgrid: RevSubgrid, index: number, count: number): void; checkAdjustForXRangeDeleted(subgrid: RevSubgrid, deletionLeft: number, deletionCount: number): boolean | null; checkAdjustForYRangeDeleted(subgrid: RevSubgrid, deletionTop: number, deletionCount: number): boolean | null; checkAdjustForXRangeMoved(subgrid: RevSubgrid, oldIndex: number, newIndex: number, count: number): void; checkAdjustForYRangeMoved(subgrid: RevSubgrid, oldIndex: number, newIndex: number, count: number): void; } /** @public */ export declare interface RevLinedHoverCell { readonly viewCell: RevViewCell; readonly mouseOverLeftLine: boolean; readonly mouseOverTopLine: boolean; } /** @public */ export declare namespace RevLinedHoverCell { export function isMouseOverLine(hoverCell: RevLinedHoverCell): boolean; } /** @public */ export declare type RevListChangedEventer = (this: void, typeId: RevListChangedTypeId, index: number, count: number, targetIndex: number | undefined) => void; /** @public */ export declare const enum RevListChangedTypeId { Set = 0, Insert = 1, Remove = 2, Move = 3, Clear = 4 } /** @public */ export declare const revLowestValidServerNotificationId = 0; /** @public */ export declare interface RevMainSubgrid extends RevSubgrid { readonly role: typeof RevSubgrid.Role.main; readonly isMain: true; } /* Excluded from this release type: RevMainSubgridImplementation */ /** @public */ export declare interface RevMetaServer { /** * Get the metadata store. The precise type of this object is implementation-dependent so not defined here. * Hypergrid never calls `getMetadataStore` itself. If implemented, Hypergrid does make a single call to `setMetadataStore` when data model is reset with no arguments. * * @returns Metadata store object. */ getMetadataStore?(): RevMetaServer.RowMetadata[]; /** * _IMPLEMENTATION OF THIS METHOD IS OPTIONAL._ * * Get the row's metadata object, which is a hash of cell properties objects, for those cells that have property overrides, keyed by column name; plus a row properties object with key `__ROW` when there are row properties. * * The default implementations of `getRowMetadata` and `setRowMetadata` store the metadata in an in-memory table. If this is not appropriate, override these methods to store the meta somewhere else (_e.g.,_ with the data in a hidden column, in another database table, in local storage, _etc._). * * @param rowIndex - Row index. * @returns One of: * * object - existing metadata object; else * * `undefined` - row found but no existing metadata; else * * `null` - no such row */ getRowMetadata?(rowIndex: number): null | undefined | RevMetaServer.RowMetadata; /** * _IMPLEMENTATION OF THIS METHOD IS OPTIONAL._ * * Set the metadata store. The precise type of this object is implementation-dependent, so not defined here. * * If implemented, Hypergrid makes a single call to `setMetadataStore` when data model is reset with no arguments. Therefore this method needs to expect a no-arg overload and handle it appropriately. * * Hypergrid never calls `getMetadataStore`. * @param metadataStore - New metadata store object. Omitted on data model reset. */ setMetadataStore?(metadataStore?: RevMetaServer.RowMetadata[]): void; /** * _IMPLEMENTATION OF THIS METHOD IS OPTIONAL._ * * Set the row's metadata object, which is a hash of cell properties objects, for those cells that have property overrides, keyed by column name; plus a row properties object with key `__ROW` when there are row properties. * * The default implementations of `getRowMetadata` and `setRowMetadata` store the metadata in an in-memory table. If this is not appropriate, override these methods to store the meta somewhere else (_e.g.,_ with the data in a hidden column, in another database table, in local storage, _etc._). * * @param rowIndex - Row index. * @param newMetadata - When omitted, delete the row's metadata. */ setRowMetadata?(rowIndex: number, newMetadata?: RevMetaServer.RowMetadata): void; } /** @public */ export declare namespace RevMetaServer { export type Constructor = new () => RevMetaServer; export interface HeightRowProperties { height?: number; } export interface RowProperties extends HeightRowProperties { [key: string]: unknown; } export type RowPropertiesPrototype = RowProperties; export type CellOwnProperty = unknown; export type CellOwnProperties = Record; export interface CellOwnPropertiesRowMetadata { [fieldName: string]: CellOwnProperties; } export interface RowPropertiesRowMetadata { __ROW?: RowProperties; } export type RowMetadata = CellOwnPropertiesRowMetadata | RowPropertiesRowMetadata; export type RowMetadataPrototype = null; export class DefaultRowProperties implements RevMetaServer.RowPropertiesPrototype { private readonly _heightChangedEventer; [key: string]: unknown; private _height; constructor(_heightChangedEventer: DefaultRowProperties.HeightChangedEventer); get height(): number | undefined; set height(height: number | undefined); } export namespace DefaultRowProperties { export type HeightChangedEventer = (this: void) => void; } } /** @public */ export declare type RevModifierKey = typeof RevModifierKey.control | typeof RevModifierKey.shift | typeof RevModifierKey.meta | typeof RevModifierKey.alt; /** @public */ export declare namespace RevModifierKey { const control = "Control"; const shift = "Shift"; const meta = "Meta"; const alt = "Alt"; export function isDownInEvent(key: RevModifierKey | undefined, event: MouseEvent | KeyboardEvent): boolean; } /** * Manages mouse interactions for the grid component. * * @typeParam BGS - Behaviored grid settings type. * @typeParam BCS - Behaviored column settings type. * @typeParam SF - Schema field type. * * @see [Mouse Component πŸ—Ž](../../../../../Architecture/Client/Components/Mouse/) * @public */ export declare class RevMouse implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _canvas */ /* Excluded from this release type: _viewLayout */ /* Excluded from this release type: cellEnteredEventer */ /* Excluded from this release type: cellExitedEventer */ /* Excluded from this release type: viewCellRenderInvalidatedEventer */ /* Excluded from this release type: _activeDragType */ /* Excluded from this release type: _canvasOffsetPoint */ /* Excluded from this release type: _hoverCell */ /* Excluded from this release type: _dragTypeCursorName */ /* Excluded from this release type: _dragTypeTitleText */ /* Excluded from this release type: _actionPossibleCursorName */ /* Excluded from this release type: _actionPossibleTitleText */ /* Excluded from this release type: __constructor */ get activeDragType(): RevMouse.DragType | undefined; get hoverCell(): RevViewCell | undefined; /* Excluded from this release type: reset */ /* Excluded from this release type: setMouseCanvasOffset */ /* Excluded from this release type: setActionPossible */ /* Excluded from this release type: setActiveDragType */ /* Excluded from this release type: processViewLayoutComputed */ /* Excluded from this release type: updateHoverCell */ /* Excluded from this release type: updateHoverCursorAndTitleText */ /* Excluded from this release type: updateActionPossibleDragType */ /* Excluded from this release type: setDragTypeCursorNameAndTitleText */ /* Excluded from this release type: getCellCursorName */ /* Excluded from this release type: getCellTitleText */ } /** @public */ export declare namespace RevMouse { export type DragType = typeof DragType.lastRectangleSelectionAreaExtending | typeof DragType.lastColumnSelectionAreaExtending | typeof DragType.lastRowSelectionAreaExtending | typeof DragType.columnResizing | typeof DragType.columnMoving; export namespace DragType { const lastRectangleSelectionAreaExtending = "revgridlastrectangleselectionareaextending"; const lastColumnSelectionAreaExtending = "revgridlastcolumnselectionareaextending"; const lastRowSelectionAreaExtending = "revgridlastrowselectionareaextending"; const columnResizing = "revgridcolumnresizing"; const columnMoving = "revgridcolumnmoving"; } export type ActionPossible = typeof ActionPossible.linkNavigate | typeof ActionPossible.columnSort | typeof ActionPossible.columnResizeDrag | typeof ActionPossible.columnMoveDrag | typeof ActionPossible.cellEdit; export namespace ActionPossible { const linkNavigate = "linkNavigate"; const columnSort = "columnSortPossible"; const columnResizeDrag = "columnResizeDragPossible"; const columnMoveDrag = "columnMoveDragPossible"; const cellEdit = "cellEditPossible"; } /* Excluded from this release type: CellEnteredExitedEventer */ export type ViewCellRenderInvalidatedEventer = (this: void, cell: RevViewCell) => void; /* Excluded from this release type: CursorNameAndTitleText */ } /** @public */ export declare class RevMultiHeadingDataRowArraySourcedField implements RevSourcedField, RevDataRowArrayField, RevMultiHeadingField { readonly definition: RevMultiHeadingDataRowArraySourcedFieldDefinition; readonly name: string; index: Integer; heading: string; headings: string[]; constructor(definition: RevMultiHeadingDataRowArraySourcedFieldDefinition, heading?: string, headings?: string[]); } /** @public */ export declare interface RevMultiHeadingDataRowArraySourcedFieldDefinition extends RevSourcedFieldDefinition { readonly headings: string[]; readonly key?: string; } /** @public */ export declare namespace RevMultiHeadingDataRowArraySourcedFieldDefinition { export function create(sourceDefinition: RevSourcedFieldSourceDefinition, sourcelessName: string, headings: string[], defaultHeading: string | undefined, defaultTextAlignId: RevHorizontalAlignId, defaultWidth?: Integer, key?: string): RevMultiHeadingDataRowArraySourcedFieldDefinition; } /** @public */ export declare class RevMultiHeadingDataRowArraySourcedFieldGrid extends RevDataRowArrayGrid implements RevSourcedFieldGrid { /* Excluded from this release type: _createFieldEventer */ headerDataServer: RevMultiHeadingDataServer; constructor(canvasElement: HTMLCanvasElement, getHeaderCellPainterEventer: RevSubgrid.GetCellPainterEventer, getMainCellPainterEventer: RevSubgrid.GetCellPainterEventer, settings: BGS, getSettingsForNewColumnEventer: RevClientGrid.GetSettingsForNewColumnEventer, /** @internal */ _createFieldEventer: RevMultiHeadingDataRowArraySourcedFieldGrid.CreateFieldEventer, options?: RevGridOptions); createAllowedSourcedFieldsColumnLayoutDefinition(allowedFields: readonly SF[]): RevAllowedMultiHeadingDataRowArraySourcedFieldsColumnLayoutDefinition; /** * Establish new data and schema. * If no data provided, data will be set to 0 rows. * @param data - Array of congruent uniform objects containing the grid data and possibly also header rows. * @param headerRowCount - Number of Header rows. If greater than 0, then the initial rows in data actually contain headers. They * should be stripped from data and included in header. If less than 0, then there should be one header row and the header values * should be derived from column names in data. */ setData(data: RevDataRowArrayGrid.DataRow[] | (() => RevDataRowArrayGrid.DataRow[]), headerRowCount?: number): void; private extractSchemaAndMainDataRowsFromData; private calculateSchemaFromData; /** * Find initial defined elements in rows. * @param maxCount - the maximum number of initial rows to return * @returns The initial rows (up to maxCount) and the number of source rows these covered (may be more * than max count if some rows are undefined). */ private getInitialDefinedRows; } /** @public */ export declare namespace RevMultiHeadingDataRowArraySourcedFieldGrid { export type CreateFieldEventer = (this: void, index: number, key: string, headings: string[]) => SF; } /** @public */ export declare class RevMultiHeadingDataServer implements RevDataServer { private _rowCount; private _callbackListeners; subscribeDataNotifications(listener: RevDataServer.NotificationsClient): void; unsubscribeDataNotifications(client: RevDataServer.NotificationsClient): void; getRowCount(): number; getViewValue(field: SF, rowIndex: number): string; reset(rowCount: number): void; } /** @public */ export declare interface RevMultiHeadingField extends RevSchemaField { headings: string[]; } /** @public */ export declare type RevOnlyColumnSettings = Pick; /** @public */ export declare interface RevOnlyGridSettings { /** Modifier key that indicates a UI action should add a selection area to selection or toggle a selection area within a selection */ addToggleSelectionAreaModifierKey: RevModifierKey; /** Specifies whether the addToggleSelectionAreaModifierKey toggles. If if does not toggle, then it adds */ addToggleSelectionAreaModifierKeyDoesToggle: boolean; backgroundColor: RevOnlyGridSettings.Color; color: RevOnlyGridSettings.Color; /** * The widest the column will be auto-sized to. * @see [Columns Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Columns_Manager/) */ columnAutoSizingMax: number | undefined; /** Set up a clipping region around each column before painting cells. This will be interpretted differently by grid painters according to their algorithm*/ columnClip: boolean | undefined; /** * Cursor to display when current mouse position allows a column to be moved with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnMoveDragPossibleCursorName: string | undefined; /** * Title text of canvas element when current mouse position allows a column to be moved with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnMoveDragPossibleTitleText: string | undefined; /** * Cursor to display when moving a column with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnMoveDragActiveCursorName: string | undefined; /** * Title text of canvas element when moving a column with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnMoveDragActiveTitleText: string | undefined; /** * Cursor to display when current mouse position allows a column to be resized with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnResizeDragPossibleCursorName: string | undefined; /** * Title text of canvas element when current mouse position allows a column to be resized with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnResizeDragPossibleTitleText: string | undefined; /** * Cursor to display when resizing a column with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnResizeDragActiveCursorName: string | undefined; /** * Title text of canvas element when resizing a column with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnResizeDragActiveTitleText: string | undefined; /** * Cursor to display when current mouse position allows column sorting with a mouse action * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnSortPossibleCursorName: string | undefined; /** * Title text of canvas element when current mouse position allows column sorting with a mouse action * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ columnSortPossibleTitleText: string | undefined; /** * Allow user to move columns. */ columnsReorderable: boolean; /** Columns can be hidden when being reordered. */ columnsReorderableHideable: boolean; /** If defined, when new rectangle selection areas are added to a selection, they will be converted to a row or column area type as * specified by this setting. This allows you to restrict selections to rows or columns. * @see [Selection Client Component πŸ—Ž](../../../../Architecture/Client/Components/Selection/) */ switchNewRectangleSelectionToRowOrColumn: RevRowOrColumnSelectionAreaType | undefined; /** * Default row height in pixels. * @see [Subgrids Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Subgrids_Manager/) */ defaultRowHeight: number; /** * Whether to automatically expand column width to accommodate widest rendered value. * @see [Columns Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Columns_Manager/) */ defaultColumnAutoSizing: boolean; /** * This default column width is used when `width` property is undefined. * (`width` is defined on column creation unless {@link defaultColumnAutoSizing} has been set to `false`.) * @see [Columns Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Columns_Manager/) */ defaultColumnWidth: number; /** * Default UiController automatically used by program. Note that order of these in array is important as it * defines the order in which UI Events are processed. */ defaultUiControllerTypeNames: string[]; editable: boolean; /** * Keyboard event key for editing a cell * @see [Focus Client Component πŸ—Ž](../../../../Architecture/Client/Components/Focus/) */ editKey: string; /** * Open cell editor for cell when clicked by mouse * @see [Focus Client Component πŸ—Ž](../../../../Architecture/Client/Components/Focus/) */ editOnClick: boolean; /** Open cell editor for cell when double clicked by mouse */ editOnDoubleClick: boolean; /** * Open cell editor for cell when cell gains focus * @see [Focus Client Component πŸ—Ž](../../../../Architecture/Client/Components/Focus/) */ editOnFocusCell: boolean; /** * Open cell editor for cell when cell focus and certain keys are pushed down * @see [Focus Client Component πŸ—Ž](../../../../Architecture/Client/Components/Focus/) */ editOnKeyDown: boolean; /** Cursor to display when cell can be edited */ cellEditPossibleCursorName: string | undefined; /** Modifier key that indicates a UI action should extend the selection area */ extendLastSelectionAreaModifierKey: RevModifierKey; /** Whether grid events are dispatched as DOM events */ eventDispatchEnabled: boolean; /** Validation failure feedback. */ filterable: boolean; filterBackgroundColor: RevOnlyGridSettings.Color; filterBackgroundSelectionColor: RevOnlyGridSettings.Color; filterColor: RevOnlyGridSettings.Color; filterEditor: string; filterFont: string; filterForegroundSelectionColor: RevOnlyGridSettings.Color; filterCellPainter: string; /** * Number of columns at left of the grid which will not scroll. * @see [Columns Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Columns_Manager/) * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ fixedColumnCount: number; /** * Define this property to style rule lines between fixed & scolling rows differently from {@link horizontalGridLinesColor}. */ horizontalFixedLineColor: RevOnlyGridSettings.Color; /** * Define this property to render just the edges of the lines between non-scrollable rows & scrollable rows, creating a double-line effect. * The value is the thickness of the edges. * Undefined means no edge effect * Typical definition would be `1` in tandem with setting {@link horizontalFixedLineWidth} to `3`. */ horizontalFixedLineEdgeWidth: number | undefined; /** * Define this property to style rule lines between non-scrollable rows and scrollable rows differently from {@link horizontalGridLinesWidth}. * Undefine it to show normal grid line in that position. * @see [Subgrids Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Subgrids_Manager/) * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ horizontalFixedLineWidth: number | undefined; /** * Define this property to style rule lines between fixed & scolling columns differently from {@link verticalGridLinesColor}. */ verticalFixedLineColor: RevOnlyGridSettings.Color; /** * Define this property to render just the edges of the lines between fixed & scrolling columns, creating a double-line effect. * The value is the thickness of the edges. * Undefined means no edge effect * Typical definition would be `1` in tandem with setting {@link verticalFixedLineWidth} to `3`. * {@link verticalFixedLineWidth} */ verticalFixedLineEdgeWidth: number | undefined; /** * Define this property to style rule lines between non-scrollable columns and scrollable columns differently from {@link verticalGridLinesWidth}. * Undefine it to show normal grid line in that position. * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ verticalFixedLineWidth: number | undefined; /** * Number of rows at the top of a scrollable subgrid which will not scroll. * @see [Subgrids Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Subgrids_Manager/) * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ fixedRowCount: number; /** * Specifies whether the grid view is aligned to the right of the canvas. * If `true` the grid is aligned to the right and in view columns end at the right side of the canvas * (that is, instead starting from left side of canvas). * In this case, the last column is always in view (if canvas is wide enough) and the first will be partially in view * unless it exactly fits into the space available for it (in the width of the canvas). * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ gridRightAligned: boolean; /** Color of horizontal grid lines. */ horizontalGridLinesColor: RevOnlyGridSettings.Color; /** * Thickness of horizontal grid lines (pixels). Ignored if {@link horizontalGridLinesVisible} is false * @see [Subgrids Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Subgrids_Manager/) * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ horizontalGridLinesWidth: number; /** Specifies whether horizontal grid lines are drawn */ horizontalGridLinesVisible: boolean; horizontalWheelScrollingAllowed: RevHorizontalWheelScrollingAllowedId; /** * Minimum column width. * Adjust this value for different fonts/sizes or exotic cell renderers. * The default (`5`) is enough room for an ellipsis with default font size. * @see [Columns Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Columns_Manager/) */ minimumColumnWidth: number; /** * Maximum column width. * When defined, column width is clamped to this value. * Ignored when falsy. * Respects {@link resizeColumnInPlace} but may cause user confusion when * user can't make column narrower due to next column having reached its maximum. * @see [Columns Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Columns_Manager/) */ maximumColumnWidth: number | undefined; /** * Cursor to display when extending a selection with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ mouseLastSelectionAreaExtendingDragActiveCursorName: string | undefined; /** * Title text of canvas element when extending a selection with a mouse drag * @see [Mouse Client Component πŸ—Ž](../../../../Architecture/Client/Components/Mouse/) */ mouseLastSelectionAreaExtendingDragActiveTitleText: string | undefined; /** Allows rectangle selections with more than one cell and/or multiple rectangle selections. If false, then only focused cell is selected */ mouseAddToggleExtendSelectionAreaEnabled: boolean; mouseAddToggleExtendSelectionAreaDragModifierKey: RevModifierKey | undefined; /** * Enables column selections with mouse * @see [Selection Client Component πŸ—Ž](../../../../Architecture/Client/Components/Selection/) */ mouseColumnSelectionEnabled: boolean; mouseColumnSelectionModifierKey: RevModifierKey | undefined; /** Enables row selections with mouse * @defaultValue true * @see [Selection Client Component πŸ—Ž](../../../../Architecture/Client/Components/Selection/) */ mouseRowSelectionEnabled: boolean; mouseRowSelectionModifierKey: RevModifierKey | undefined; /** * Allows multiple areas in a selection. If false, a selection will be cleared when a new area is added. * @see [Selection Client Component πŸ—Ž](../../../../Architecture/Client/Components/Selection/) */ multipleSelectionAreas: boolean; /** * The area type that is added to a selection by default in a UI operation. Can also be specified in API calls which add an area to a RevSelection. * @see [Selection Client Component πŸ—Ž](../../../../Architecture/Client/Components/Selection/) */ primarySelectionAreaType: RevSelectionAreaType; /** The minimum time interval (in milliseconds) between call requestAnimationFrame to paint grid. Set low value for minimum latency. Set high value to reduce resource usage.*/ minimumAnimateTimeInterval: number; /** Specifies the interval (in milliseconds) between regular calls of requestAnimationFrame to paint grid. Set to undefined for no regular calls of requestAnimationFrame. * This is normally not required (undefined) as the grid will automatically detect when a repaint and automatically immediately initiate a repaint. However this can be used to force continuous * repaints (set to 0) for debugging purpose. It can also be used when data server invalidate callbacks to grid do not notify all data changes and repaints should be triggered by polling. */ backgroundAnimateTimeInterval: number | undefined; resizeColumnInPlace: boolean; /** * Reduce resize processing even more by increasing debounce when lots of resize observer call backs are occurring * @see [Canvas Client Component πŸ—Ž](../../../../Architecture/Client/Components/Canvas/) */ resizedEventDebounceExtendedWhenPossible: boolean; /** * Reduce resize processing with debounce. In milliseconds * @see [Canvas Client Component πŸ—Ž](../../../../Architecture/Client/Components/Canvas/) */ resizedEventDebounceInterval: number; /** On mouse hover, whether to repaint the row background and how. */ rowResize: boolean; /** Repeating pattern of property overrides for grid rows. */ rowStripeBackgroundColor: RevOnlyGridSettings.Color | undefined; /** Height or width (depending on orientation) in either pixels (px) or Em (em) */ scrollerThickness: string; scrollerThumbColor: string; scrollerThumbReducedVisibilityOpacity: number; /** Anchor column does not need to align with edge of grid */ scrollHorizontallySmoothly: boolean; scrollingEnabled: boolean; secondarySelectionAreaTypeSpecifierModifierKey: RevModifierKey | undefined; /** * The alternative area type that can be added to a selection in a UI operation. Can also be specified in API calls which add an area to a RevSelection. * @see [Selection Client Component πŸ—Ž](../../../../Architecture/Client/Components/Selection/) */ secondarySelectionAreaType: RevSelectionAreaType; /** Stroke color for last selection overlay. */ selectionRegionOutlineColor: RevOnlyGridSettings.Color | undefined; /** Fill color for last selection overlay. */ selectionRegionOverlayColor: RevOnlyGridSettings.Color | undefined; showFilterRow: boolean; showScrollerThumbOnMouseMoveModifierKey: RevModifierKey | undefined; /** Sort column on double-click rather than single-click. */ sortOnDoubleClick: boolean; /** Column can be sorted with mouse click on column header */ sortOnClick: boolean; /** * Use window.devicePixelRatio to adjust canvas scaling * @see [Canvas Client Component πŸ—Ž](../../../../Architecture/Client/Components/Canvas/) */ useHiDPI: boolean; /** Color of vertical grid lines. */ verticalGridLinesColor: RevOnlyGridSettings.Color; /** Specifies whether vertical grid lines are drawn */ verticalGridLinesVisible: boolean; /** * Thickness of vertical grid lines (pixels). Is ignored if {@link verticalGridLinesVisible} is false * @see [Columns Manager Client Component πŸ—Ž](../../../../Architecture/Client/Components/Columns_Manager/) * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ verticalGridLinesWidth: number; /** * Whether the width of view columns should be adjusted to reflect their width in the view. * Cell painters use the view column width to determine how to render cell content. If this is `true` (default), * then the rendering of cells in columns that are partially in view, will better reflect the visible width of those * columns. * If it is `false`, then the rendering of cells in these columns does not change with scrolling however * clipping will be needed. * @see [View Layout Component πŸ—Ž](../../../../Architecture/Client/Components/View_Layout/) */ viewColumnWidthAdjust: boolean; visibleVerticalGridLinesDrawnInFixedAndPreMainOnly: boolean; wheelHFactor: number; wheelVFactor: number; } /** @public */ export declare namespace RevOnlyGridSettings { export type Color = string; } /** @public */ export declare class RevOptionsError extends InternalError { constructor(code: string, message?: string); } /** @public */ export declare type RevPartialPoint = Partial; /** @public */ export declare namespace RevPartialPoint { export function create(x: number | undefined, y: number | undefined): RevPartialPoint; } /** @public */ export declare interface RevPoint { /** This point's horizontal coordinate */ readonly x: number; /** This point's vertical coordinate */ readonly y: number; } /** @public */ export declare namespace RevPoint { export function create(x: number, y: number): RevPoint; export function copy(other: RevPoint): { x: number; y: number; }; /** * @returns A new point which is the reference point's position increased by coordinates of given `offset`. * @param offset - Horizontal and vertical values to add to this point's coordinates. */ export function plus(referencePoint: RevPoint, offset: RevPoint): RevPoint; /** * @returns A new point which is this point's position increased by given offsets. * @param offsetX - Value to add to this point's horizontal coordinate. * @param offsetY - Value to add to this point's horizontal coordinate. */ export function plusXY(referencePoint: RevPoint, offsetX?: number, offsetY?: number): RevPoint; /** * @returns A new point which is this point's position decreased by coordinates of given `offset`. * @param offset - Horizontal and vertical values to subtract from this point's coordinates. */ export function minus(referencePoint: RevPoint, offset: RevPoint): RevPoint; /** * @returns A new `Point` positioned to least x and least y of this point and given `offset`. * @param point - A point to compare to this point. */ export function min(referencePoint: RevPoint, point: RevPoint): RevPoint; /** * @returns A new `Point` positioned to greatest x and greatest y of this point and given `point`. * @param point - A point to compare to this point. */ export function max(referencePoint: RevPoint, point: RevPoint): RevPoint; /** * @returns Distance between given `point` and this point using Pythagorean Theorem formula. * @param point - A point from which to compute the distance to this point. */ export function distance(referencePoint: RevPoint, point: RevPoint): number; /** * _(Formerly: `equal`.)_ * @returns `true` iff _both_ coordinates of this point are exactly equal to those of given `point`. * @param point - A point to compare to this point. */ export function isEqual(referencePoint: RevPoint, point: RevPoint | undefined): boolean; /** * @returns `true` iff _both_ coordinates of this point are greater than those of given `point`. * @param point - A point to compare to this point */ export function greaterThan(referencePoint: RevPoint, point: RevPoint): boolean; /** * @returns `true` iff _both_ coordinates of this point are less than those of given `point`. * @param point - A point to compare to this point */ export function lessThan(referencePoint: RevPoint, point: RevPoint): boolean; /** * _(Formerly `greaterThanEqualTo`.)_ * @returns `true` iff _both_ coordinates of this point are greater than or equal to those of given `point`. * @param point - A point to compare to this point */ export function greaterThanOrEqualTo(referencePoint: RevPoint, point: RevPoint): boolean; /** * _(Formerly `lessThanEqualTo`.)_ * @returns `true` iff _both_ coordinates of this point are less than or equal to those of given `point`. * @param point - A point to compare to this point. */ export function lessThanOrEqualTo(referencePoint: RevPoint, point: RevPoint): boolean; } /** @public */ export declare const revReadonlyBehavioredSettings: Readonly; /** @public */ export declare const revReadonlyDefaultBehavioredColumnSettings: Readonly; /** @public */ export declare const revReadonlyDefaultBehavioredGridSettings: Readonly; /** @public */ export declare interface RevRecord { index: number; __rows?: RevRecord.BoundRows; } /** @public */ export declare namespace RevRecord { /** * Rows are bound to Records so that they can easily reference each other. However records (which can be any object with an * interface that includes the property 'index'), may be used in more than one RevRecordMainAdapter at once. Therefore the * relationship between records to rows is one to many. To support this, an object map (BoundRows) is used to bind rows * to a record. A symbol is used to identify the RevRecordMainAdapter which a row belongs to. This symbol is used as the key * into the BoundRows object. */ export type BoundRows = Record; export function getBoundRow(record: RevRecord, rowKey: symbol): RevRecordRow | undefined; export function takeBoundRow(record: RevRecord, rowKey: symbol): RevRecordRow | undefined; export function bindRow(record: RevRecord, rowKey: symbol, row: RevRecordRow | undefined): void; export function unbindRow(record: RevRecord, rowKey: symbol): void; } export declare namespace RevRecordArrayUtil { export type Comparer = (left: T, right: T) => number; export function sort(values: T[], comparer: Comparer, index?: number, count?: number): void; export function binarySearch(values: T[], item: T, comparer: Comparer): number; /** Search list where multiple items return same comparer result */ export function binarySearchWithDuplicates(values: T[], item: T, comparer: Comparer): number; export function binarySearchWithSkip(values: T[], item: T, skipIndex: number, comparer: Comparer, index?: number, count?: number): number; export function partialSort(data: T[], offset: number, count: number, sortOffset: number, sortCount: number, comparer: Comparer): void; } /** @public */ export declare class RevRecordAssertError extends InternalError { constructor(code: string, message?: string); } /** @public */ export declare interface RevRecordData extends RevRecord { data: RevDataServer.ViewRow; } /** @public */ export declare class RevRecordDataError extends RevRecordExternalError { constructor(code: string, message: string); } /** @public */ export declare class RevRecordDataServer implements RevDataServer, RevRecordStore.RecordsEventers { private readonly _schemaServer; private readonly _recordStore; private readonly _recordRowBindingKey; private readonly _rows; private readonly _recordRowMap; private readonly _sortFieldSpecifiers; private _beginChangeCount; private _consistencyCheckRequired; private _comparer; private _maxSortingFieldCount; private _filterCallback; private _continuousFiltering; private _continuousSortingOrFilteringActive; private _rowOrderReversed; private readonly _recentChanges; private _callbackListener; private _recordStoreEventersSet; constructor(_schemaServer: RevRecordSchemaServer, _recordStore: RevRecordStore); get recordStore(): RevRecordStore; get recentChanges(): RevRecordRecentChanges; get rowCount(): number; get recordCount(): number; get filterCallback(): RevRecordDataServer.RecordFilterCallback | undefined; set filterCallback(value: RevRecordDataServer.RecordFilterCallback | undefined); get continuousFiltering(): boolean; set continuousFiltering(value: boolean); get isFiltered(): boolean; get sortColumnCount(): number; get sortFieldSpecifiers(): readonly RevRecordDataServer.SortFieldSpecifier[]; get sortFieldSpecifierCount(): number; get rowOrderReversed(): boolean; set rowOrderReversed(value: boolean); get allChangedRecentDuration(): number; set allChangedRecentDuration(value: number); get recordInsertedRecentDuration(): number; set recordInsertedRecentDuration(value: number); get recordUpdatedRecentDuration(): number; set recordUpdatedRecentDuration(value: number); get valueChangedRecentDuration(): number; set valueChangedRecentDuration(value: number); destroy(): void; subscribeDataNotifications(value: RevDataServer.NotificationsClient): void; beginChange(): void; getRowCount(): number; getRowIdFromIndex(rowIndex: number): unknown; getRowIndexFromId(rowId: unknown): number | undefined; getViewValue(field: SF, rowIndex: number): RevDataServer.ViewValue; getEditValue(field: SF, rowIndex: number): RevDataServer.EditValue; setEditValue(field: SF, rowIndex: number, value: RevDataServer.EditValue): void; allRecordsDeleted(): void; isAnyFieldSorted(fieldIndexes: readonly RevRecordFieldIndex[]): boolean; isAnyFieldInRangeSorted(rangeFieldIndex: number, rangeCount: number): boolean; clearSortFieldSpecifiers(): void; endChange(): void; getFieldSortAscending(field: RevRecordFieldIndex | SF): boolean | undefined; getFieldSortPriority(field: RevRecordFieldIndex | SF): number | undefined; getRecordIndexFromRowIndex(rowIndex: number): RevRecordIndex; getRecordRecentChangeTypeId(rowIndex: number): RevRecordRecentChangeTypeId | undefined; getRowIndexFromRecordIndex(recordIndex: RevRecordIndex): number | undefined; getSortSpecifier(index: number): RevRecordDataServer.SortFieldSpecifier; getValueRecentChangeTypeId(field: SF, rowIndex: number): RevRecordValueRecentChangeTypeId | undefined; invalidateAll(): void; invalidateRecord(recordIndex: RevRecordIndex, recent?: boolean): void; invalidateRecords(recordIndex: RevRecordIndex, count: number, recent?: boolean): void; invalidateValue(fieldIndex: RevRecordFieldIndex, recordIndex: RevRecordIndex, valueRecentChangeTypeId?: RevRecordValueRecentChangeTypeId): void; invalidateRecordValues(recordIndex: RevRecordIndex, invalidatedValues: readonly RevRecordInvalidatedValue[]): void; invalidateRecordFields(recordIndex: RevRecordIndex, fieldIndex: RevRecordFieldIndex, fieldCount: number): void; invalidateRecordAndValues(recordIndex: RevRecordIndex, invalidatedValues: readonly RevRecordInvalidatedValue[], recordUpdateRecent?: boolean): void; invalidateFiltering(): void; invalidateFields(fieldIndexes: readonly RevRecordFieldIndex[]): void; isFieldSorted(fieldIndex: RevRecordFieldIndex): boolean; recordDeleted(recordIndex: RevRecordIndex): void; recordsDeleted(recordIndex: number, count: number): void; recordInserted(recordIndex: RevRecordIndex, recent?: boolean): void; recordsInserted(firstInsertedRecordIndex: RevRecordIndex, count: number, recent?: boolean): void; recordMoved(fromIndex: RevRecordIndex, toIndex: RevRecordIndex): void; recordsMoved(fromIndex: RevRecordIndex, toIndex: RevRecordIndex, moveCount: number): void; recordReplaced(recordIndex: RevRecordIndex): void; recordsReplaced(recordIndex: RevRecordIndex, count: number): void; recordsSpliced(recordIndex: RevRecordIndex, deleteCount: number, insertCount: number): void; recordsLoaded(recent?: boolean): void; reset(): void; reverseRowIndex(rowIndex: number): number; reverseRowIndexIfRowOrderReversed(rowIndex: number): number; clearSort(): boolean; sort(): void; sortBy(fieldIndex?: number, isAscending?: boolean): boolean; sortByMany(specifiers: readonly RevRecordDataServer.SortFieldSpecifier[]): boolean; private handleExpiredRecentChanges; private processFieldListChangedEvent; private repopulateRows; private updateSortComparer; private getComparerFromSpecifier; /** * Handles Row related events and callbackListener function calls but not cell related events or callbacks * @param areAnyInvalidatedFieldsSorted - whether of any of the record's invalidated fields are in sort specifiers * @returns -1 if row is hidden */ private updateInvalidatedRecordRowIndex; private tryCreateRecordRow; private createRecordRow; private callbackInvalidateRow; private callbackInvalidateCell; private callbackInvalidateRowCells; private callbackInvalidateRowColumns; private callbackRowsDeleted; private callbackRowsInserted; private callbackRowMoved; private updateContinuousSortingOrFilteringActive; private checkConsistency; } /** @public */ export declare namespace RevRecordDataServer { export type SpecifierComparer = (this: void, left: RevRecordRow, right: RevRecordRow) => number; export type RecordFilterCallback = (this: void, record: RevRecord) => boolean; export interface SortFieldSpecifier { fieldIndex: RevRecordFieldIndex; ascending: boolean; } } /** @public */ export declare interface RevRecordDataStore extends RevRecordStore { revRecordData: true; /** * Gets the value of a record * @param index - The record index */ getRecord(index: RevRecordIndex): RevRecordData; /** * Retrieves the underlying records * @returns An array of the currently available records * The Grid Adapter will not modify the returned array */ getRecords(): readonly RevRecordData[]; } /** * Provides a date field accessor with basic sorting * @public */ export declare class RevRecordDateFunctionizeField extends RevRecordFunctionizeField { constructor(name: string, index: number, value: (record: Record) => Date); } /** @public */ export declare interface RevRecordDefinition { readonly mapKey: MapKey; } /** @public */ export declare namespace RevRecordDefinition { export function same(left: RevRecordDefinition, right: RevRecordDefinition): boolean; } /** @public */ export declare abstract class RevRecordExternalError extends Error { readonly code: string; constructor(code: string, message: string | undefined, baseMessage: string); } /** Provides access to a field * @public */ export declare interface RevRecordField extends RevSchemaField { readonly name: string; /** Set to true if field value depends on Record Index */ valueDependsOnRecordIndex?: boolean; /** Set to true if field value depends on Row Index */ valueDependsOnRowIndex?: boolean; /** Retrieves the value of a field for display purposes */ getViewValue(record: RevRecord): RevDataServer.ViewValue; /** Retrieves the value of a field for edit purposes */ getEditValue(record: RevRecord): RevDataServer.EditValue; /** Set the value of a field */ setEditValue(record: RevRecord, value: RevDataServer.EditValue): void; /** * Compares two records based on this field for sorting in ascending order * @param left - The record on the left of the comparison * @param right - The record on the right of the comparison */ compare?(left: RevRecord, right: RevRecord): number; /** * Compares two records based on this field for sorting in descending order * @param left - The record on the left of the comparison * @param right - The record on the right of the comparison * Can be undefined to disable sorting based on this field */ compareDesc?(left: RevRecord, right: RevRecord): number; } /** @public */ export declare namespace RevRecordField { export type Comparer = (this: void, left: RevRecord, right: RevRecord) => number; } /** Represents an index to a defined Field * @public */ export declare type RevRecordFieldIndex = number; /** Provides access to a field * @public */ export declare abstract class RevRecordFunctionizeField implements RevRecordField { readonly name: string; readonly index: number; getViewValue: (this: void, record: never) => RevDataServer.ViewValue; compare: (this: void, left: never, right: never) => number; compareDesc: (this: void, left: never, right: never) => number; constructor(name: string, index: number); getEditValue(_record: RevRecord): RevDataServer.EditValue; setEditValue(_record: RevRecord, _value: RevDataServer.EditValue): void; } /** @public */ export declare class RevRecordGrid extends RevColumnLayoutGrid implements RevColumnLayout.ChangeInitiator { schemaServer: RevRecordSchemaServer; mainDataServer: RevRecordDataServer; readonly headerDataServer: RevDataServer | undefined; readonly recordStore: RevRecordStore; recordFocusedEventer: RevRecordGrid.RecordFocusEventer | undefined; mainClickEventer: RevRecordGrid.MainClickEventer | undefined; mainDblClickEventer: RevRecordGrid.MainDblClickEventer | undefined; selectionChangedEventer: RevRecordGrid.SelectionChangedEventer | undefined; dataServersRowListChangedEventer: RevRecordGrid.DataServersRowListChangedEventer | undefined; private _allowedFields; private _beenUsable; private _usableRendered; private _firstUsableRenderViewAnchor; constructor(canvasElement: HTMLCanvasElement, definition: RevGridDefinition, settings: BGS, getSettingsForNewColumnEventer: RevClientGrid.GetSettingsForNewColumnEventer, options?: RevGridOptions); get fieldCount(): number; get fieldNames(): readonly SF[]; get allowedFields(): readonly SF[] | undefined; get beenUsable(): boolean; get recordFocused(): boolean; get continuousFiltering(): boolean; set continuousFiltering(value: boolean); get rowOrderReversed(): boolean; set rowOrderReversed(value: boolean); get focusedRecordIndex(): RevRecordIndex | undefined; set focusedRecordIndex(recordIndex: number | undefined); get mainRowCount(): number; get headerRowCount(): number; get isFiltered(): boolean; get gridRightAligned(): boolean; get rowHeight(): number; get rowRecIndices(): number[]; destroy(): void; resetUsable(): void; initialiseAllowedFields(fields: readonly SF[]): void; applyFirstUsable(rowOrderDefinition: RevRecordRowOrderDefinition | undefined, viewAnchor: RevRecordGrid.ViewAnchor | undefined, columnLayout: RevColumnLayout | undefined): void; updateAllowedFields(fields: readonly SF[]): void; getSortFields(): RevRecordSortDefinition.Field[] | undefined; getViewAnchor(): RevRecordGrid.ViewAnchor | undefined; applyFilter(filter?: RevRecordDataServer.RecordFilterCallback): void; clearFilter(): void; clearSort(): void; getRowOrderDefinition(): RevRecordRowOrderDefinition; getFieldByName(fieldName: string): SF; getField(fieldIndex: RevRecordFieldIndex): SF; getFieldSortPriority(field: RevRecordFieldIndex | SF): number | undefined; getFieldSortAscending(field: RevRecordFieldIndex | SF): boolean | undefined; getSortSpecifier(index: number): RevRecordDataServer.SortFieldSpecifier; isHeaderRow(rowIndex: number): boolean; reset(): void; invalidateAll(): void; recordToRowIndex(recIdx: RevRecordIndex): number; reorderRecRows(_itemIndices: number[]): void; rowToRecordIndex(rowIdx: number): Integer; sortBy(fieldIndex?: number, isAscending?: boolean): boolean; sortByMany(specifiers: RevRecordDataServer.SortFieldSpecifier[]): boolean; protected areFieldsAllowed(): boolean; protected isFieldNameAllowed(fieldName: string): boolean; protected descendantProcessColumnSort(_event: MouseEvent, headerOrFixedRowCell: RevViewCell): void; protected descendantProcessClick(event: MouseEvent, hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessDblClick(event: MouseEvent, hoverCell: RevLinedHoverCell | null | undefined): void; protected descendantProcessRowFocusChanged(newSubgridRowIndex: number | undefined, oldSubgridRowIndex: number | undefined): void; protected descendantProcessRendered(): void; protected descendantProcessSelectionChanged(): void; protected descendantProcessDataServersRowListChanged(dataServers: RevDataServer[]): void; private applySortFields; } /** @public */ export declare namespace RevRecordGrid { export interface ViewAnchor { readonly columnScrollAnchorIndex: Integer; readonly columnScrollAnchorOffset: Integer; readonly rowScrollAnchorIndex: Integer; } export type RecordFocusEventer = (this: void, newRecordIndex: RevRecordIndex | undefined, oldRecordIndex: RevRecordIndex | undefined) => void; export type MainClickEventer = (this: void, fieldIndex: RevRecordFieldIndex, recordIndex: RevRecordIndex) => void; export type MainDblClickEventer = (this: void, fieldIndex: RevRecordFieldIndex, recordIndex: RevRecordIndex) => void; export type SelectionChangedEventer = (this: void) => void; export type DataServersRowListChangedEventer = (this: void, dataServers: RevDataServer[]) => void; export type FieldSortedEventer = (this: void) => void; export interface MainSubgridDefinitionOptions { selectable?: boolean; defaultRowHeight?: number; rowPropertiesCanSpecifyRowHeight?: boolean; rowPropertiesPrototype?: RevMetaServer.RowPropertiesPrototype; } } /** Represents an index to a Record * @public */ export declare type RevRecordIndex = number; /** @public */ export declare interface RevRecordInvalidatedValue { fieldIndex: RevRecordFieldIndex; typeId?: RevRecordValueRecentChangeTypeId; } /** * Provides a numeric field accessor with sorting * @public */ export declare class RevRecordNumericFunctionizeField extends RevRecordFunctionizeField { constructor(name: string, index: number, value: (record: Record) => number); } export declare interface RevRecordRecentChange extends RevRecordSearchableRecentChange { readonly typeId: RevRecordRecentChange.TypeId; rowIndex: number; } export declare namespace RevRecordRecentChange { export const enum TypeId { Value = 0, Row = 1 } } export declare class RevRecordRecentChanges { private readonly _recordRowMap; private readonly _expiredChangesHandler; allChangedRecentDuration: RevRecordSysTick.Span; recordInsertedRecentDuration: RevRecordSysTick.Span; recordUpdatedRecentDuration: RevRecordSysTick.Span; valueChangedRecentDuration: RevRecordSysTick.Span; private readonly _rows; private readonly _expiryQueue; private readonly _searchRecentChange; private _beginMultipleChangesCount; private _nextExpiryTimeoutHandle; private _nextExpiryTimeoutTargetTime; constructor(_recordRowMap: RevRecordRowMap, _expiredChangesHandler: RevRecordRecentChanges.ExpiredChangesHandler); destroy(): void; beginMultipleChanges(): void; endMultipleChanges(): void; getRecordRecentChangeTypeId(rowIndex: number): RevRecordRecentChangeTypeId | undefined; getValueRecentChangeTypeId(fieldIndex: RevRecordFieldIndex, rowIndex: number): RevRecordValueRecentChangeTypeId | undefined; addRecordUpdatedChange(rowIndex: number): void; addValueChange(fieldIndex: RevRecordFieldIndex, rowIndex: number, changeTypeId: RevRecordValueRecentChangeTypeId): void; addRecordValuesChanges(rowIndex: number, invalidatedValues: readonly RevRecordInvalidatedValue[]): void; processAllChanged(addChange: boolean): void; processRecordInserted(rowIndex: number, addChange: boolean): void; processRecordsInserted(rowIndex: number, count: number, addChanges: boolean): void; processRowInserted(rowIndex: number): void; processRowsInserted(rowIndex: number, count: number): void; processRowDeleted(rowIndex: number): void; processRowsDeleted(rowIndex: number, count: number): void; processAllRowsDeleted(): void; processRowMoved(oldRowIndex: number, newRowIndex: number): void; processPreReindex(): void; processPostReindex(allRowsKept: boolean): void; checkConsistency(): void; private queueRecentChange; private updateRecentChangeExpiryTime; private processNextExpiryTimeout; private expireRecentChanges; private cancelNextExpiryTimeout; private ensureNextExpiryTimeoutActive; private addValueChangeToRow; } export declare namespace RevRecordRecentChanges { export type ExpiredCellPosition = [fieldIndex: number, rowIndex: number]; export type ExpiredRowIndex = number; export type ExpiredChangesHandler = (this: void, expiredCellPositions: ExpiredCellPosition[], expiredCellCount: number, expiredRowIndexes: ExpiredRowIndex[], expiredRowCount: number) => void; export type ExpiredEventer = (this: void, cellChanges: ExpiredCellPosition[] | undefined, cellChangeCount: number, rowChanges: ExpiredRowIndex[] | undefined, rowChangeCount: number) => void; } /** @public */ export declare const enum RevRecordRecentChangeTypeId { Update = 0, Insert = 1, Remove = 2 } export declare interface RevRecordRow { record: RevRecord; index: number; recentChange?: RevRecordRowRecentChange; valueRecentChanges?: RevRecordValueRecentChange[]; } export declare namespace RevRecordRow { export function addValueRecentChange(row: RevRecordRow, change: RevRecordValueRecentChange): void; export function deleteValueRecentChange(row: RevRecordRow, fieldIndex: RevRecordFieldIndex): void; export function clearRecentChanges(row: RevRecordRow): void; export function findRecentValueChange(row: RevRecordRow, fieldIndex: RevRecordFieldIndex): RevRecordValueRecentChange | undefined; export function getRowRecentChangeTypeId(row: RevRecordRow): RevRecordRecentChangeTypeId | undefined; export function getValueRecentChangeTypeId(row: RevRecordRow, fieldIndex: RevRecordFieldIndex): RevRecordValueRecentChangeTypeId | undefined; export function adjustForInsertion(rows: readonly RevRecordRow[], count: number, insertIndex: number): void; export type Comparer = (this: void, left: RevRecordRow, right: RevRecordRow) => number; } /** @public */ export declare class RevRecordRowError extends RevRecordExternalError { constructor(code: string, message: string); } /** Provides fast mappings between array locations, including imbalanced mappings where records are absent from one side */ export declare class RevRecordRowIndexMap { private ltoref; private reftor; private rtoref; private reftol; /** Gets the number of indexes on the left */ get leftCount(): number; /** Gets the number of indexes on the right */ get rightCount(): number; /** * Performs a binary search for a specific reference number * @param nodes - The array to search * @param ref - The reference number to search for * @returns The index of the reference number * @throws Error when the reference number is not found */ static search(nodes: number[], ref: number): number; /** * Attempts to insert a reference at a specific index in an array * @param nodes - The array to insert into * @param nodeIndex - The index to insert at * @returns The new reference number, or -1 if there was no space */ static insert(nodes: number[], nodeIndex: number): number; /** * Redistributes reference numbers to make space at a specific index * @param nodes - The array to redistribute * @param index - The index we need to make space at * @returns A map of old to new reference numbers */ static redistribute(nodes: number[], index: number): Map; static apply(nodes: number[], changes: Map): void; private static refBelow; private static refAbove; /** * Inserts a new record at both the left and right indexes * @param leftIndex - The left index of the new record * @param rightIndex - The right index of the new record * @remarks O(Log(N)+Log(M)) where N and M are left and right lengths, plus array update */ add(leftIndex: number | undefined, rightIndex: number | undefined): void; /** Clears the index */ clear(): void; /** * Retrieves the left index of a record * @param rightIndex - The right index of the record * @remarks O(Log(N)) where N is the right length, worst O(N + Log(M)) where N and M are the left and right lengths */ getLeftIndex(rightIndex: number): number | undefined; /** * Find the nearest valid left index to the left index * @param rightIndex - The right index of the record * @remarks Approximately O(Log(N)) where N is the left length, worst O(Log(N) + M) where N and M are the left and right lengths */ getNearestLeftIndex(rightIndex: number): number; /** * Find the nearest valid right index to the left index * @param leftIndex - * @remarks Approximately O(Log(N)) where N is the left length */ getNearestRightIndex(leftIndex: number): number; /** * Retrieves the right index of a record * @param leftIndex - The left index of the record * @remarks O(Log(N)) where N is the right length */ getRightIndex(leftIndex: number): number | undefined; /** * Efficiently repopulates the mappings as if left and right indexes are one-to-one (no relocations) * @param length - The number of records to map * @remarks O(N) where N is the length */ oneToOne(length: number): void; /** * Replace the index with mappings for the given records * @param left - The records in their left positions * @param right - The records in the right positions * @remarks O(N Log(M)) where N is the left length, and M is the right */ populate(left: readonly T[], right: readonly T[]): void; /** * Validates and removes a record given both left and right indexes * @param leftIndex - The left index of the record to remove * @param rightIndex - The right index of the record to remove * @remarks O(1), plus array update. Both left and right indexes must correspond * @throws Error when the left and right indexes do not match the same record */ remove(leftIndex: number | undefined, rightIndex: number | undefined): void; /** * Removes a record based on the left index * @param leftIndex - The left index of the record to remove * @remarks O(Log(N)) where N is the right length, plus array update */ removeLeft(leftIndex: number): number | undefined; /** * Removes a record based on the right index * @param rightIndex - The right index of the record to remove * @remarks O(Log(N)) where N is the left length, plus array update */ removeRight(rightIndex: number): number | undefined; /** * Removes all records based on the left and right indexes given * @param left - * @param right - */ removeAll(left: (number | undefined)[], right: (number | undefined)[]): void; /** * The right index of the record may have changed, update it * @param leftIndex - The left index of the record to update * @param rightIndex - The new right index to apply * @returns The old right index of the record * @remarks O(Log(N)+Log(M)) where N and M are left and right lengths. The right index should be the location before the * insert is performed */ updateLeft(leftIndex: number, rightIndex: number | null): number | null; /** * The left index of the record may have changed, update it * @param leftIndex - The new left index to apply * @param rightIndex - The right index of the record to update * @returns The old left index of the record * @remarks O(Log(N)+Log(M)) where N and M are left and right lengths. The left index should be the location before * the insert is performed */ updateRight(leftIndex: number | null, rightIndex: number): number | null; verify(): void; } export declare class RevRecordRowMap { private readonly _recordRowBindingKey; readonly records: RevRecord[]; readonly rows: RevRecordRow[]; constructor(_recordRowBindingKey: symbol); clear(): void; getRecordFromRowIndex(rowIndex: number): RevRecord; getRecordIndexFromRowIndex(rowIndex: number): number; getRowIndexFromRecordIndex(recordIndex: RevRecordIndex): number | undefined; hasRecord(record: RevRecord): boolean; insertRecord(record: RevRecord): void; insertRecordsButNotRows(recordIndex: RevRecordIndex, records: readonly RevRecord[]): void; removeRecord(recordIndex: RevRecordIndex): number | undefined; removeRecordsButNotRows(recordIndex: RevRecordIndex, count: number): void; insertRow(row: RevRecordRow): void; insertRowRangeButIgnoreRecords(rowIndex: number, rows: readonly RevRecordRow[], rangeStartIndex: number, rangeExclusiveEndIndex: number): void; deleteRow(rowIndex: number): void; deleteRowsButIgnoreRecords(rowIndex: number, count: number): void; replaceRecord(newRecord: RevRecord): number | undefined; moveRecordWithRow(fromIndex: number, toIndex: number): void; moveRecordsWithRow(fromIndex: number, toIndex: number, moveCount: number): void; moveRow(fromIndex: number, toIndex: number): void; moveRows(fromIndex: number, toIndex: number, moveCount: number): void; findInsertRowIndex(recordIndex: RevRecordIndex): number; binarySearchRows(row: RevRecordRow, comparer: RevRecordRow.Comparer): number; sortRows(comparer: RevRecordRow.Comparer): void; reindexAllRows(): void; checkConsistency(): void; private reindexFromRow; private reindexRowRange; } /** @public */ export declare class RevRecordRowOrderDefinition { readonly sortFields: RevRecordSortDefinition.Field[] | undefined; readonly recordDefinitions: RevRecordDefinition[] | undefined; constructor(sortFields: RevRecordSortDefinition.Field[] | undefined, recordDefinitions: RevRecordDefinition[] | undefined); saveToJson(element: JsonElement): void; } /** @public */ export declare namespace RevRecordRowOrderDefinition { export namespace JsonName { const sortFields = "revSortFields"; } export function tryCreateSortFieldsFromJson(element: JsonElement): RevRecordSortDefinition.Field[] | undefined; export function saveSortFieldsToJson(sortFields: RevRecordSortDefinition.Field[], element: JsonElement): void; export function createFromJson(element: JsonElement): RevRecordRowOrderDefinition; } export declare interface RevRecordRowRecentChange extends RevRecordRecentChange { readonly typeId: RevRecordRecentChange.TypeId.Row; recordRecentChangeTypeId: RevRecordRecentChangeTypeId; } /** @public */ export declare class RevRecordSchemaError extends RevRecordExternalError { constructor(code: string, message: string); } /** @public */ export declare class RevRecordSchemaServer implements RevSchemaServer { /* Excluded from this release type: fieldListChangedEventer */ private readonly _fields; private readonly _fieldNameLookup; private readonly _fieldIndexLookup; private readonly _fieldValueDependsOnRecordIndexFieldIndexes; private readonly _fieldValueDependsOnRowIndexFieldIndexes; private _notificationClient; get schema(): readonly SF[]; get fields(): readonly SF[]; get fieldCount(): number; subscribeSchemaNotifications(value: RevSchemaServer.NotificationsClient): void; addField(field: SF): SF; addFields(addFields: readonly SF[]): RevRecordFieldIndex; setFields(fields: readonly SF[]): void; beginChange(): void; endChange(): void; getActiveSchemaColumns(): readonly SF[]; getColumnCount(): number; getField(fieldIndex: RevRecordFieldIndex): SF; getFieldByName(fieldName: string): SF; getFieldIndex(field: SF): RevRecordFieldIndex; getFieldIndexByName(fieldName: string): RevRecordFieldIndex; getFieldNames(): string[]; getFilteredFields(filterCallback: (field: SF) => boolean): SF[]; getFieldValueDependsOnRecordIndexFieldIndexes(): readonly RevRecordFieldIndex[]; getFields(): readonly SF[]; hasField(name: string): boolean; reset(): void; private internalClearFields; private internalAddField; } export declare interface RevRecordSearchableRecentChange { expiryTime: RevRecordSysTick.Time; } export declare namespace RevRecordSearchableRecentChange { export function compareExpiryTime(left: RevRecordSearchableRecentChange, right: RevRecordSearchableRecentChange): number; } /** * Provides a simple field accessor * @public */ export declare class RevRecordSimpleFunctionizeField extends RevRecordFunctionizeField { constructor(name: string, index: number, value: (record: Record) => RevDataServer.ViewValue, compare?: (left: Record, right: Record) => number, compareDesc?: (left: Record, right: Record) => number); } /** @public */ export declare namespace RevRecordSortDefinition { export interface Field { name: string; ascending: boolean; } export namespace Field { export function saveToJson(definition: Field, element: JsonElement): void; export function tryCreateFromJson(element: JsonElement): Field | undefined; } } /** @public */ export declare abstract class RevRecordSourcedField implements RevSourcedField, RevRecordField { readonly definition: RevRecordSourcedFieldDefinition; getEditValueEventer: RevSourcedRecordField.GetEditValueEventer | undefined; setEditValueEventer: RevSourcedRecordField.SetEditValueEventer | undefined; readonly name: string; index: Integer; heading: string; constructor(definition: RevRecordSourcedFieldDefinition, heading?: string); getEditValue(record: IndexedRecord): RevDataServer.EditValue; setEditValue(record: IndexedRecord, value: RevDataServer.EditValue): void; abstract getViewValue(record: IndexedRecord): RevTextFormattableValue; } /** @public */ export declare class RevRecordSourcedFieldDefinition implements RevSourcedFieldDefinition { readonly sourceDefinition: RevRecordSourcedFieldSourceDefinition; readonly sourcelessName: string; readonly defaultHeading: string; readonly defaultTextAlignId: RevHorizontalAlignId; readonly defaultWidth?: Integer | undefined; readonly name: string; constructor(sourceDefinition: RevRecordSourcedFieldSourceDefinition, sourcelessName: string, defaultHeading: string, defaultTextAlignId: RevHorizontalAlignId, defaultWidth?: Integer | undefined); } /** @public */ export declare class RevRecordSourcedFieldGrid> extends RevRecordGrid implements RevSourcedFieldGrid { createAllowedSourcedFieldsColumnLayoutDefinition(allowedFields: readonly RevAllowedRecordSourcedField[]): RevAllowedRecordSourcedFieldsColumnLayoutDefinition; } /** @public */ export declare class RevRecordSourcedFieldSourceDefinition implements RevSourcedFieldSourceDefinition { readonly name: string; constructor(name: string); } /** * An interface for providing access to records in a data store. Called by the Grid Adapter to retrieve data to display. * @public */ export declare interface RevRecordStore { /** Get the number of current records available */ readonly recordCount: number; setRecordEventers(recordsEventers: RevRecordStore.RecordsEventers): void; /** * Gets the value of a record * @param index - The record index */ getRecord(index: RevRecordIndex): RevRecord; /** * Retrieves the underlying records * @returns An array of the currently available records * The Grid Adapter will not modify the returned array */ getRecords(): readonly RevRecord[]; } /** @public */ export declare namespace RevRecordStore { export interface RecordsEventers { beginChange(): void; endChange(): void; allRecordsDeleted(): void; recordDeleted(recordIndex: RevRecordIndex): void; recordsDeleted(recordIndex: number, count: number): void; recordInserted(recordIndex: RevRecordIndex, recent?: boolean): void; recordsInserted(firstInsertedRecordIndex: RevRecordIndex, count: number, recent?: boolean): void; recordMoved(fromRecordIndex: RevRecordIndex, toRecordIndex: RevRecordIndex): void; recordsMoved(fromRecordIndex: RevRecordIndex, toRecordIndex: RevRecordIndex, moveCount: number): void; recordReplaced(recordIndex: RevRecordIndex): void; recordsReplaced(recordIndex: RevRecordIndex, count: number): void; recordsSpliced(recordIndex: RevRecordIndex, deleteCount: number, insertCount: number): void; recordsLoaded(recent?: boolean): void; invalidateAll(): void; invalidateRecord(recordIndex: RevRecordIndex, recent?: boolean): void; invalidateRecords(recordIndex: RevRecordIndex, count: number, recent?: boolean): void; invalidateValue(fieldIndex: RevRecordFieldIndex, recordIndex: RevRecordIndex, valueRecentChangeTypeId?: RevRecordValueRecentChangeTypeId): void; invalidateRecordValues(recordIndex: RevRecordIndex, invalidatedValues: readonly RevRecordInvalidatedValue[]): void; invalidateRecordFields(recordIndex: RevRecordIndex, fieldIndex: RevRecordFieldIndex, fieldCount: number): void; invalidateRecordAndValues(recordIndex: RevRecordIndex, invalidatedValues: readonly RevRecordInvalidatedValue[], recordUpdateRecent?: boolean): void; invalidateFiltering(): void; invalidateFields(fieldIndexes: readonly RevRecordFieldIndex[]): void; } } /** * Provides a string field accessor with basic sorting * @public */ export declare class RevRecordStringFunctionizeField extends RevRecordFunctionizeField { constructor(name: string, index: number, value: (record: Record) => string, options?: Intl.CollatorOptions); } /** @public */ export declare namespace RevRecordSysTick { export type Time = number; export type Span = number; export function now(): Time; export function compare(left: Time, right: Time): number; } /** @public */ export declare class RevRecordUnexpectedUndefinedError extends InternalError { constructor(code: string, message?: string); } /** @public */ export declare class RevRecordUnreachableCaseError extends UnreachableCaseInternalError { constructor(code: string, value: never); } export declare interface RevRecordValueRecentChange extends RevRecordRecentChange { readonly typeId: RevRecordRecentChange.TypeId.Value; valueRecentChangeTypeId: RevRecordValueRecentChangeTypeId; fieldIndex: number; } /** @public */ export declare const enum RevRecordValueRecentChangeTypeId { Update = 0, Increase = 1, Decrease = 2 } /** * Represents a rectangle defined by its top-left corner (x, y) and its dimensions (width, height). * @public */ export declare interface RevRectangle { /** The x-coordinate of the top-left corner of the rectangle. */ x: number; /** The y-coordinate of the top-left corner of the rectangle. */ y: number; /** The width of the rectangle. */ width: number; /** The height of the rectangle. */ height: number; } /** @public */ export declare namespace RevRectangle { /** * Determines whether two `RevRectangle` interfaces are equal by comparing their * `x`, `y`, `width`, and `height` properties. * * @param left - The first rectangle to compare. * @param right - The second rectangle to compare. * @returns `true` if all properties are equal; otherwise, `false`. */ export function isEqual(left: RevRectangle, right: RevRectangle): boolean; /** * Determines whether the specified (x, y) coordinate lies within the bounds of the given rectangle. * * @param rectangle - The rectangle to test against. * @param x - The x-coordinate to check. * @param y - The y-coordinate to check. * @returns `true` if the (x, y) coordinate is inside the rectangle (inclusive of the top-left edge and exclusive of the bottom-right edge); otherwise, `false`. */ export function containsXY(rectangle: RevRectangle, x: number, y: number): boolean; } /** @public */ export declare class RevReferenceableColumnLayout extends RevColumnLayout { readonly name: string; readonly upperCaseName: string; constructor(definition: RevReferenceableColumnLayoutDefinition, index: Integer); createDefinition(): RevReferenceableColumnLayoutDefinition; } /** @public */ export declare class RevReferenceableColumnLayoutDefinition extends RevColumnLayoutDefinition { id: Guid; name: string; constructor(id: Guid, name: string, initialColumns: RevColumnLayoutDefinition.Column[], columnCreateErrorCount: Integer); saveToJson(element: JsonElement): void; } /** @public */ export declare namespace RevReferenceableColumnLayoutDefinition { export namespace ReferenceableJsonName { const id = "revId"; const name = "revName"; } export const enum CreateReferenceableFromJsonErrorId { IdJsonValueIsNotDefined = 0, IdJsonValueIsNotOfTypeString = 1, NameJsonValueIsNotDefined = 2, NameJsonValueIsNotOfTypeString = 3, ColumnsElementIsNotDefined = 4, ColumnsElementIsNotAnArray = 5, ColumnElementIsNotAnObject = 6, AllColumnElementsAreInvalid = 7 } export function tryCreateReferenceableFromJson(element: JsonElement): Result; export function is(definition: RevColumnLayoutDefinition): definition is RevReferenceableColumnLayoutDefinition; } /** @public */ export declare interface RevReferenceableColumnLayouts extends LockItemByKeyList { getOrNew(definition: RevReferenceableColumnLayoutDefinition): RevReferenceableColumnLayout; } /** @public */ export declare class RevReferenceableDataSource extends RevDataSource implements LockOpenListItem, RevDataSource.LockErrorIdPlusTryError>, IndexedRecord { readonly name: string; readonly upperCaseName: string; constructor(referenceableColumnLayouts: RevReferenceableColumnLayouts | undefined, tableFieldSourceDefinitionFactory: RevTableFieldSourceDefinitionFactory, tableRecordSourceFactory: RevTableRecordSourceFactory, lockedDefinition: RevReferenceableDataSourceDefinition, index: number); createDefinition(rowOrderDefinition: RevRecordRowOrderDefinition): RevReferenceableDataSourceDefinition; } /** @public */ export declare class RevReferenceableDataSourceDefinition extends RevDataSourceDefinition { readonly id: Guid; readonly name: string; constructor(id: Guid, name: string, tableRecordSourceDefinition: RevTableRecordSourceDefinition, columnLayoutDefinitionOrReference: RevColumnLayoutOrReferenceDefinition | undefined, rowOrderDefinition: RevRecordRowOrderDefinition | undefined); saveToJson(element: JsonElement): void; } /** @public */ export declare namespace RevReferenceableDataSourceDefinition { export namespace ReferenceableJsonName { const id = "revId"; const name = "revName"; } export const enum CreateReferenceableFromJsonErrorId { IdJsonValueIsNotDefined = 0, IdJsonValueIsNotOfTypeString = 1, NameJsonValueIsNotDefined = 2, NameJsonValueIsNotOfTypeString = 3, TableRecordSourceElementIsNotDefined = 4, TableRecordSourceJsonValueIsNotOfTypeObject = 5, TableRecordSourceTryCreate = 6 } export interface CreateReferenceableFromJsonErrorIdPlusExtra { readonly errorId: ErrorId; readonly extra: string | undefined; } export interface WithLayoutError { definition: RevReferenceableDataSourceDefinition; layoutCreateFromJsonErrorId: RevDataSourceDefinition.LayoutCreateFromJsonErrorId | undefined; } export function tryCreateReferenceableFromJson(tableRecordSourceDefinitionFromJsonFactory: RevTableRecordSourceDefinitionFromJsonFactory, element: JsonElement): Result, CreateReferenceableFromJsonErrorIdPlusExtra>; export function is(definition: RevDataSourceDefinition): definition is RevReferenceableDataSourceDefinition; } /** @public */ export declare interface RevReferenceableDataSourceDefinitionsStore { } /** @public */ export declare interface RevReferenceableDataSources extends LockItemByKeyList, RevDataSource.LockErrorIdPlusTryError> { getOrNew(definition: RevReferenceableDataSourceDefinition): RevReferenceableDataSource; } /** @public */ export declare namespace RevReferenceableDataSources { } /** @public */ export declare class RevRegistry { private readonly items; get all(): T[]; /** * Register an item and return it. * @remarks Adds an item to the registry using the provided name (or the class name), converted to all lower case. * @param name - Case-insensitive item key. If not given, fallsback to `item.prototype.$$CLASS_NAME` or `item.prototype.name` or `item.name`. * @param item - If unregistered or omitted, nothing is added and method returns `undefined`. * * @returns Newly registered item or `undefined` if unregistered. */ register(name: string, item: T): T; get(name: string): T | undefined; } export declare class RevReindexBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _focus */ /* Excluded from this release type: _selection */ private _requestNestCount; private _focusStash; private _selectionStash; constructor(clientId: string, internalParent: RevClientObject, /** @internal */ _focus: RevFocus, /** @internal */ _selection: RevSelection); stash(): void; unstash(allRowsKept: boolean): void; } export declare interface RevRenderAction { type: RevRenderAction.TypeId; } export declare namespace RevRenderAction { export const enum TypeId { PaintAll = 0 } } /* Excluded from this release type: RevRenderActioner */ /* Excluded from this release type: RevRenderActionQueue */ /** @public */ export declare class RevRenderer implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _canvas */ /* Excluded from this release type: _columnsManager */ /* Excluded from this release type: _subgridsManager */ /* Excluded from this release type: _viewLayout */ /* Excluded from this release type: _focus */ /* Excluded from this release type: _selection */ /* Excluded from this release type: _mouse */ /* Excluded from this release type: renderedEventer */ /* Excluded from this release type: _gridPainterRepository */ /* Excluded from this release type: _renderActionQueue */ /* Excluded from this release type: _documentHidden */ /* Excluded from this release type: _lastServerNotificationId */ /* Excluded from this release type: _lastRenderedServerNotificationId */ /* Excluded from this release type: _waitLastServerNotificationRenderedResolves */ /* Excluded from this release type: _animator */ /* Excluded from this release type: _gridPainter */ /* Excluded from this release type: _allGridPainter */ /* Excluded from this release type: __constructor */ get painting(): boolean; get lastServerNotificationId(): number; /** Promise resolves after paint renders the last server notification (change) for the first time. Columns and rows will then reflect server data and schema */ waitLastServerNotificationRendered(next: boolean): Promise; animateImmediatelyIfRequired(): void; /* Excluded from this release type: destroy */ /* Excluded from this release type: registerGridPainter */ /* Excluded from this release type: getGridPainter */ /* Excluded from this release type: setGridPainter */ /* Excluded from this release type: repaintAll */ /* Excluded from this release type: flagColumnRebundlingRequired */ /* Excluded from this release type: start */ /* Excluded from this release type: stop */ /* Excluded from this release type: serverNotified */ /* Excluded from this release type: beginChange */ /* Excluded from this release type: endChange */ /* Excluded from this release type: invalidateView */ /* Excluded from this release type: invalidateViewCell */ /* Excluded from this release type: invalidateSubgrid */ /* Excluded from this release type: invalidateSubgridRows */ /* Excluded from this release type: invalidateSubgridRow */ /* Excluded from this release type: invalidateSubgridRowCells */ /* Excluded from this release type: invalidateSubgridCell */ /* Excluded from this release type: _gridSettingsChangedListener */ /* Excluded from this release type: _pageVisibilityChangeListener */ /* Excluded from this release type: handlePageVisibilityChange */ private handleGridSettingsChanged; /* Excluded from this release type: resolveWaitLastServerNotificationRendered */ /* Excluded from this release type: flagAnimateRequired */ /* Excluded from this release type: processRenderActionQueue */ /* Excluded from this release type: paintAll */ } /** @public */ export declare namespace RevRenderer { /* Excluded from this release type: WaitLastServerNotificationRenderedResolve */ /* Excluded from this release type: RenderedEventer */ } export declare interface RevRepaintViewAction extends RevRenderAction { type: RevRenderAction.TypeId.PaintAll; } /** @public */ /** * String representation of ${@link RevSelectionAreaTypeId.row} or ${@link RevSelectionAreaTypeId.column} type identifiers. */ export declare type RevRowOrColumnSelectionAreaType = keyof RevRowOrColumnSelectionAreaTypeObject; /** @public */ export declare type RevRowOrColumnSelectionAreaTypeObject = Pick; export declare class RevRowPropertiesBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; private readonly _viewLayout; constructor(clientId: string, internalParent: RevClientObject, _viewLayout: RevViewLayout); /** * set the pixel height of a specific row * @param rowIndex - Data row index local to dataModel. * @param height - pixel height */ setRowHeight(rowIndex: number, height: number, subgrid: RevSubgrid): void; /** * Reset the row properties in its entirety to the given row properties object. * @param rowIndex - Data row index local to `dataModel`. * @param properties - The new row properties object. If `undefined`, this call is a no-op. * @param subgrid - This is the subgrid. You only need to provide the subgrid when it is not the data subgrid _and_ you did not give a `CellEvent` object in the first param (which already knows what subgrid it's in). */ setRowProperties(rowIndex: number, properties: RevMetaServer.RowProperties | undefined, subgrid: RevSubgrid): void; setRowPropertiesUsingCell(cell: RevViewCell, properties: RevMetaServer.RowProperties | undefined): void; /** * Sets a single row property on a specific individual row. * @param y - Data row index local to `dataModel`. * @param key - The property name. * @param value - The new property value. * @param subgrid - This is the subgrid. You only need to provide the subgrid when it is not the data subgrid _and_ you did not give a `CellEvent` object in the first param (which already knows what subgrid it's in). */ setRowProperty(y: number, key: string, value: unknown, subgrid: RevSubgrid): void; setRowPropertyUsingCell(cell: RevViewCell, key: string, value: unknown): void; } export declare namespace RevRowPropertiesBehavior { export type InvalidateViewEventer = (this: void, scrollablePlaneDimensionAsWell: boolean) => void; } /* Excluded from this release type: RevRowResizingUiController */ /** * Will return null if conversion not possible * @public */ export declare function revSafeConvertUnknownToBoolean(value: unknown): boolean | null | undefined; /** * A field in the schema obtained from the server to which one or more grid columns can be bound. * * All columns are bound to a {@link RevSchemaField} when they are created. The field is used to access data on the `RevDataServer` server. The index of fields are also used * to notify the client when data on the server has changed. * * Note that while it is possible to bind more than one column to a {@link RevSchemaField}, this usage scenario would not be typical. * * @see {@link common/server-interfaces/schema/schema-server!RevSchemaServer RevSchemaServer} * @see {@link common/server-interfaces/data/data-server!RevDataServer RevDataServer} * @see {@link common/server-interfaces/data/data-server!RevDataServer.NotificationsClient NotificationsClient} * @public */ export declare interface RevSchemaField { /** Identifies a field in the schema. Will be unique within a schema (ie grid). */ readonly name: string; /** * Used by servers to index data. Will be used by client to access data in circumstances when a complete row of data is retrieved with RevDataServer.getViewRow from * the server. */ index: number; } /** * Interface representing a schema server. * * @typeParam SF - The type of schema field used to specify the field columns. * * Client grid uses this interface to retrieve the schema fields which are the field columns in the grid. It also uses * it to get notified about changes to the schema. * * @see [Schema Server Interface πŸ—Ž](../../../../../Architecture/Common/Server_Interfaces/Schema/) * @public */ export declare interface RevSchemaServer { subscribeSchemaNotifications(client: RevSchemaServer.NotificationsClient): void; unsubscribeSchemaNotifications?(client: RevSchemaServer.NotificationsClient): void; /** * Get list of fields. * * The order of these fields defines the orders of field columns in Columns Manager. */ getFields(): readonly SF[]; } /** @public */ export declare namespace RevSchemaServer { export interface NotificationsClient { beginChange: (this: void) => void; endChange: (this: void) => void; /** Notifies that one or more fields have been inserted into the schema */ fieldsInserted: (this: void, fieldIndex: number, fieldCount: number) => void; /** Notifies that one or more fields have been deleted from the schema */ fieldsDeleted: (this: void, fieldIndex: number, fieldCount: number) => void; allFieldsDeleted: (this: void) => void; /** * Notifies schema has changed. * @remarks * Try to use {@link fieldsInserted}, {@link fieldsDeleted}, {@link allFieldsDeleted} callbacks instead of `schemaChanged` callback. These provide better optimisations and control of selection. */ schemaChanged: (this: void) => void; getActiveSchemaFields: (this: void) => readonly SF[]; } export type Constructor = new () => RevSchemaServer; } /** * Base class to track viewport size, position and scrollability in scroll dimension (horizontal or vertical) * @public * @see [View Layout Component πŸ—Ž](../../../../../Architecture/Client/Components/View_Layout/) */ export declare abstract class RevScrollDimension { /** Specifies whether is is the Horizontal or Vertical dimension */ readonly horizontalVertical: RevScrollDimension.AxisId; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _canvas */ /* Excluded from this release type: changedEventer */ /* Excluded from this release type: computedEventer */ /* Excluded from this release type: scrollerTargettedViewportStartChangedEventer */ /* Excluded from this release type: eventBehaviorTargettedViewportStartChangedEventer */ private _start; private _size; private _viewportSize; private _viewportSizeExactMultiple; private _viewportCoverageExtent; private _startScrollAnchorLimitIndex; private _startScrollAnchorLimitOffset; private _finishScrollAnchorLimitIndex; private _finishScrollAnchorLimitOffset; private _viewportStart; private _computed; private _scrollable; /* Excluded from this release type: __constructor */ /** Start of scrollable range in dimension */ get start(): number; /** Size of scrollable range in dimension */ get size(): number; /** Finish of scrollable range in dimension */ get finish(): number; /** Position in dimension after scrollable range finish */ get after(): number; /** Start of scroll viewport in dimension */ get viewportStart(): number | undefined; /** Size of scroll viewport in dimension */ get viewportSize(): number; /** * Indicates whether viewport size is an exact multiple of the respective row or column size. * If `true`, no partial respective row or columns will be rendered. */ get viewportSizeExactMultiple(): boolean; /** Finish of scroll viewport in dimension */ get viewportFinish(): number; get startScrollAnchorLimitIndex(): number; get startScrollAnchorLimitOffset(): number; get finishScrollAnchorLimitIndex(): number; get finishScrollAnchorLimitOffset(): number; /** * Indicates the extent to which the viewport covers the scrollable range. * @returns One of: * * Viewport does not exist (None) * * Viewport is smaller than the scrollable range (Partial) * * Viewport is covers the scrollable range (Full) */ get viewportCoverageExtent(): RevScrollDimension.ViewportCoverageExtent; /** * Indicates whether scrolling is possible. * `true` if the viewport exists and is smaller than the scrollable range */ get scrollable(): boolean; /* Excluded from this release type: reset */ /* Excluded from this release type: invalidate */ /* Excluded from this release type: ensureComputedOutsideAnimationFrame */ /* Excluded from this release type: ensureComputedInsideAnimationFrame */ /* Excluded from this release type: setViewportStart */ /* Excluded from this release type: calculateLimitedScrollAnchorIfRequired */ isScrollAnchorWithinStartLimit(index: number, offset: number): boolean; isScrollAnchorWithinFinishLimit(index: number, offset: number): boolean; /* Excluded from this release type: calculateLimitedScrollAnchor */ /* Excluded from this release type: setComputedValues */ /* Excluded from this release type: ensureComputed */ /* Excluded from this release type: updateScrollable */ /* Excluded from this release type: notifyChanged */ /* Excluded from this release type: notifyViewportStartChanged */ /* Excluded from this release type: compute */ } /** * @public */ export declare namespace RevScrollDimension { export type ChangedEventer = (this: void) => void; export type ComputedEventer = (this: void, withinAnimationFrame: boolean) => number | undefined; export type ViewportStartChangedEventer = (this: void) => void; export enum ViewportCoverageExtent { /** Viewport does not have any size (does not exist) (Scrolling not active) */ None = 0, /** Viewport does not cover all of Scrollable range (Scrolling active) */ Partial = 1, /** Viewport covers all of Scrollable range (Scrolling not active) */ Full = 2 } /** @public */ export const enum AxisId { horizontal = 0, vertical = 1 } export type Axis = keyof typeof AxisId; export interface Anchor { /**Index of column/row */ readonly index: number; /**number of pixels anchor is offset in current column/row */ readonly offset: number; } export interface AnchorLimits { readonly start: Anchor; readonly finish: Anchor; } export interface ScrollSizeAndAnchor { readonly scrollSize: number; readonly anchor: Anchor; } export interface ScrollSizeAndAnchorLimits { readonly scrollSize: number; readonly anchorLimits: AnchorLimits; } const invalidScrollAnchorIndex = -1; const invalidScrollAnchorOffset = 0; const resetStart = 0; const resetSize = 0; const resetViewportSize = 0; const resetViewportSizeExactMultiple = true; const resetViewportCoverageExtent = ViewportCoverageExtent.None; const resetComputed = false; const resetViewportStart: undefined; const invalidAnchor: Anchor; } export declare interface RevScroller extends RevClientObject { actionEventer: RevScroller.ActionEventer; wheelEventer: RevScroller.WheelEventer | undefined; visibilityChangedEventer: RevScroller.VisibilityChangedEventer | undefined; readonly axis: RevScrollDimension.Axis; readonly trailing: boolean; readonly hidden: boolean; readonly insideOverlap: number; destroy(): void; setBeforeInsideOffset(offset: number): void; setAfterInsideOffset(offset: number): void; temporarilyGiveThumbFullVisibility(timePeriod: number): void; } export declare namespace RevScroller { /** * A function that handles a wheel event. */ export type WheelEventer = (this: void, event: WheelEvent) => void; /** @public */ export interface Action { readonly type: Action.TypeId; readonly viewportStart: number | undefined; } /** @public */ export namespace Action { export const enum TypeId { StepForward = 0, StepBack = 1, PageForward = 2, PageBack = 3, newViewportStart = 4 } } export type ActionEventer = (this: void, action: Action) => void; export type VisibilityChangedEventer = (this: void) => void; export type CreateFn = (clientId: string, internalParent: RevClientObject, gridSettings: BGS, canvas: RevCanvas, scrollDimension: RevScrollDimension, viewLayout: RevViewLayout, spaceAccommodatedScroller: RevScroller | undefined) => RevScroller; export type CreateFnPair = [ spaceAccommodated: CreateFn, spaceRelinquishing: CreateFn ]; } /** * Manages the selection state for a grid, supporting selection of rows, columns, rectangles, and the entire grid. * * @typeParam BGS - Type of the grid settings. * @typeParam BCS - Type of the column settings. * @typeParam SF - Type of the schema field. * * @see [Selection Component πŸ—Ž](../../../../../Architecture/Client/Components/Selection/) * @public */ export declare class RevSelection implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _columnsManager */ /* Excluded from this release type: _subgridsManager */ /* Excluded from this release type: _focus */ /* Excluded from this release type: changedEventerForRenderer */ /* Excluded from this release type: changedEventerForEventBehavior */ /* Excluded from this release type: _rows */ /* Excluded from this release type: _columns */ /* Excluded from this release type: _rectangleList */ /* Excluded from this release type: _dynamicAllSubgrids */ /* Excluded from this release type: _lastArea */ /* Excluded from this release type: _clearOnNextFocusChange */ /* Excluded from this release type: _beginChangeCount */ /* Excluded from this release type: _changed */ /* Excluded from this release type: _silentlyChanged */ /* Excluded from this release type: __constructor */ /** * Gets the most recently selection area added to the selection. */ get lastArea(): RevLastSelectionArea | undefined; /** * Gets the all the subgrids for which dynamic all selection is active. */ get dynamicAllSubgrids(): readonly RevSubgrid[]; /** Determines whether the selection will be cleared on the next focus change. */ get clearOnNextFocusChange(): boolean; set clearOnNextFocusChange(value: boolean); /* Excluded from this release type: destroy */ /** Call before multiple selection changes to consolidate RevSelection Change events. * Pair with endChange(). */ beginChange(): void; /** Call after multiple selection changes to consolidate SelectionChange events. * Pair with beginSelectionChange(). */ endChange(): void; /** * Creates a stash object representing the current selection in a format which is not affected by sorting, filtering or reordering. */ createStash(): RevSelection.Stash; /** * Restores the selection state from a given stash object. * * This method begins a change transaction, clears the current selection, * and restores the subgrid, auto-selection state, last rectangle's first cell, * selected rows, and selected columns from the provided stash. * * @param stash - The stash object containing the selection state to restore. * @param allRowsKept - Indicates whether all rows are kept during restoration. If true, an exception is thrown if the stash contains rows that are not present in the current subgrid. */ restoreStash(stash: RevSelection.Stash, allRowsKept: boolean): void; hasRectangles(subgrid: RevSubgrid | undefined): boolean; /** * Retrieves the list of selection rectangles for the specified subgrid. * * @param subgrid - The subgrid for which to get the selection rectangles. If undefined, returns rectangles for all subgrids. * @returns A readonly array of `RevSelectionRectangle` objects representing the current selection rectangles from either the given subgrid or all subgrids. */ getRectangles(subgrid: RevSubgrid | undefined): readonly RevSelectionRectangle[]; /** * Get the last rectangle added to the selection. */ getLastRectangle(): RevSelectionRectangle | undefined; /** * Clears the selection */ clear(): void; /* Excluded from this release type: focusLinkableOnlySelectCell */ /** * Selects all rows, columns or cells in either all subgrids or a specific subgrid. * * If `subgrid` is `undefined`, selects all rows in all subgrids (unless already selected). * If a specific `subgrid` is provided, selects all rows in that subgrid (unless already selected). * * This selection area(s) will be dynamically adjusted if rows or columns are added or removed in a subgrid. * * @param subgrid - The specific subgrid to select all rows in, or `undefined` to select all rows in all subgrids. * @returns The last selection area created by this operation, or `undefined` if the selection was already present. Since a selection area can cover only one subgrid, * if `subgrid` is `undefined`, the last area will be created using the main subgrid. */ selectDynamicAll(subgrid: RevSubgrid | undefined): RevLastSelectionArea | undefined; /** * Deselects the "dynamic all" selection for either all subgrids or a specific subgrid. * * If no subgrid is specified, this method removes the dynamic all selection areas for all subgrids. * If a specific subgrid is provided, only that subgrid's "dynamic all" selection is removed. * * The method returns `true` if any selection was actually changed, or `false` if there was nothing to deselect. * * @param subgrid - The specific subgrid to deselect, or `undefined` to deselect all subgrids. * @returns `true` if a deselection occurred, `false` otherwise. */ deselectDynamicAll(subgrid: RevSubgrid | undefined): boolean; /** * Selects only the specified cell in the given subgrid, clearing any previous selection. * * Use `RevFocusSelectBehavior.focusOnlySelectCell()` instead to both focus and select only the cell. * * @param activeColumnIndex - The column index of the cell to select. * @param subgridRowIndex - The row index of the cell to select. * @param subgrid - The subgrid containing the cell to select. * @returns The last selection area after selecting the cell. */ onlySelectCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): RevLastSelectionArea; /** * Create a selection area for a single cell and add the new area to the selection. * * If multiple selection areas * are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), clear the selection before adding the new selection area. * * if {@link RevGridSettings.switchNewRectangleSelectionToRowOrColumn} is defined ('row' or 'column'), the new selection area will be made * as a row or column selection area instead of a rectangle. * * Use `RevFocusSelectBehavior.focusSelectCell()` instead to both focus and select the cell. * * @param activeColumnIndex - The index of the active column of the cell. * @param subgridRowIndex - The index of the row of the cell within the subgrid. * @param subgrid - The subgrid containing the cell. * @returns The selection area representing the selected cell. */ selectCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): RevLastSelectionArea; /** * Deletes a cell (rectangle selection area) from the selection. * * @param activeColumnIndex - The column index of the cell to deselect. * @param subgridRowIndex - The row index within the subgrid of the cell to deselect. * @param subgrid - The subgrid containing the cell. */ deleteCellArea(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): void; /** * Adds a selection area within the grid based on the specified area type and dimensions. * * If multiple selection areas * are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), clear the selection before adding the new selection area. * * if `areaTypeId` is `rectangle` and {@link RevGridSettings.switchNewRectangleSelectionToRowOrColumn} is defined ('row' or 'column'), the new selection area will be made * as a row or column selection area instead of a rectangle. * * @param areaTypeId - The type of selection area to create (e.g., all, rectangle, column, row). * @param leftOrExRightActiveColumnIndex - The left active column index of the selection area if `width` is positive, or the exclusive right index if `width` is negative. * @param topOrBottomSubgridRowIndex - The top subgrid row index of the selection area if `height` is positive, or the exclusive bottom index if `height` is negative. * @param width - The number of columns in the selection area. If negative, `width` is in reverse direction from the exclusive right index. * @param height - The number of rows in the selection area. If negative, `height` is in reverse direction from the exclusive bottom index. * @param subgrid - The subgrid context in which the selection is being made. * @returns The created {@link RevLastSelectionArea} if a valid area is selected; otherwise, `undefined`. */ selectArea(areaTypeId: RevSelectionAreaTypeId, leftOrExRightActiveColumnIndex: number, topOrBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid | undefined): RevLastSelectionArea | undefined; /** * Deletes the last selected area from the selection. */ deleteLastArea(): void; /** * Clears the current selection and adds a new rectangular selection area. * * if {@link RevGridSettings.switchNewRectangleSelectionToRowOrColumn} is defined ('row' or 'column'), the new selection area will be made as a row or column selection area instead of a rectangle. * * @param leftOrExRightActiveColumnIndex - The left active column index of the rectangle if `width` is positive, or the exclusive right index if `width` is negative. * @param topOrExBottomSubgridRowIndex - The top subgrid row index of the rectangle if `height` is positive, or the exclusive bottom index if `height` is negative. * @param width - The number of columns in the rectangle. If negative, `width` is in reverse direction from the exclusive right index. * @param height - The number of rows in the rectangle. If negative, `height` is in reverse direction from the exclusive bottom index. * @param subgrid - The subgrid in which the rectangle is to be made. * @returns The (rectangle) selection area added to the selection. */ onlySelectRectangle(leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid): RevLastSelectionArea; /** * Add a new rectangular selection area to the selection. * * If multiple selection areas * are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), clear the selection before adding the new selection area. * * if {@link RevGridSettings.switchNewRectangleSelectionToRowOrColumn} is defined ('row' or 'column'), the new selection area will be made as a row or column selection area instead of a rectangle. * * @param leftOrExRightActiveColumnIndex - The left active column index of the rectangle if `width` is positive, or the exclusive right index if `width` is negative. * @param topOrExBottomSubgridRowIndex - The top subgrid row index of the rectangle if `height` is positive, or the exclusive bottom index if `height` is negative. * @param width - The number of columns in the rectangle. If negative, `width` is in reverse direction from the exclusive right index. * @param height - The number of rows in the rectangle. If negative, `height` is in reverse direction from the exclusive bottom index. * @param subgrid - The subgrid in which the rectangle is to be made. * @param silent - If true, suppresses any change notifications. * @returns The (rectangle) selection area added to the selection. */ selectRectangle(leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid, silent?: boolean): RevLastSelectionArea; /** * Deletes a rectangular selection area from the selection. * * @param rectangle - The rectangle area to deselect. * @param subgrid - The subgrid in which the rectangle selection exists. */ deleteRectangleArea(rectangle: RevRectangle, subgrid: RevSubgrid): void; /** * Create a row selection area and add the new area to the selection. * * If multiple selection areas * are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), clear the selection before adding the new selection area. * * While the leftOrExRightActiveColumnIndex and width values are not needed to specify the rows, they are needed to create a * selection area. Normally they are set to specify all active columns. * * Recommend use `RevFocusSelectBehavior.selectRows()` instead. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to include in last area if `width` is positive, or the exclusive end index if `width` is negative. * @param topOrExBottomSubgridRowIndex - The start index of the range of subgrid rows to select if `count` is positive, or the exclusive end index if `count` is negative. * @param width - The number of active columns to include in the last area. If negative, `width` is in reverse direction from the exclusive end index. * @param count - The number of subgrid rows to include in the new selection area. If negative, `count` is in reverse direction from the exclusive bottom subgrid row index. * @param subgrid - The subgrid in which the new selection area is made. * @returns The last selection area which contains the selected rows. */ selectRows(leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, count: number, subgrid: RevSubgrid): RevLastSelectionArea; /** * Selects all rows within the specified subgrid. * * If multiple selection areas * are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), the selection is cleared before adding all the rows to the selection. * * The leftOrExRightActiveColumnIndex and width values are needed to create a selection area. Normally they are set to specify all columns in the subgrid. * * Note that while this selects all cells in the subgrid, it differs from {@link selectDynamicAll} in that this selection area will not include new rows subsequently added to the subgrid. * * Recommend use `RevFocusSelectBehavior.selectAllRows()` instead. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to include if `width` is positive, or the exclusive end index if `width` is negative. * @param width - The number of active columns to include in the new selection area. If negative, width is in reverse direction from the exclusive end index. * @param subgrid - The subgrid instance containing the rows to be selected. */ selectAllRows(leftOrExRightActiveColumnIndex: number, width: number, subgrid: RevSubgrid): void; /** * Removes a range of rows from the selection. * * The list of row selection areas will be updated to reflect the necessary deletion, splitting or resizing required. * * @param topOrExBottomSubgridRowIndex - The start index of the range of subgrid rows to deselect if `count` is positive, or the exclusive end index if `count` is negative. * @param count - The number of rows to deselect. If negative, count is in reverse direction from the exclusive bottom active row index. * @param subgrid - The subgrid from which rows should be deselected. */ deselectRows(topOrExBottomSubgridRowIndex: number, count: number, subgrid: RevSubgrid): void; /** * Adds the specified row to the selection if it is not already included, otherwise removes it from the selection. * * While the leftOrExRightActiveColumnIndex and width values are not needed to toggle the row, they are needed to create a * selection area. Normally they are set to specify all active columns. * * Recommend use `RevFocusSelectBehavior.toggleSelectRow()` instead. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to include in last area if `width` is positive, or the exclusive end index if `width` is negative. * @param subgridRowIndex - The index of the row within the subgrid to toggle selection. * @param width - The number of active columns to include in the last area. If negative, `width` is in reverse direction from the exclusive end index. * @param subgrid - The subgrid instance containing the row. */ toggleSelectRow(leftOrExRightActiveColumnIndex: number, subgridRowIndex: number, width: number, subgrid: RevSubgrid): void; /** * Create a column selection area and add the new area to the selection. * * If multiple selection areas are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), the selection is cleared before proceeding. * * Recommend use `RevFocusSelectBehavior.selectColumns()` instead. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to select if `count` is positive, or the exclusive end index if `count` is negative. * @param count - The number of active columns to include in the new selection area. If negative, `count` is in reverse direction from the exclusive end index. * @returns The last selection area which contains the selected columns. */ selectColumns(leftOrExRightActiveColumnIndex: number, count: number): RevLastSelectionArea; /** * Removes a range of columns from the selection. * * The list of column selection areas will be updated to reflect the necessary deletion, splitting or resizing required. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to deselect if `count` is positive, or the exclusive end index if `count` is negative. * @param count - The number of columns to deselect. If negative, `count` is in reverse direction from the exclusive end index. */ deselectColumns(leftOrExRightActiveColumnIndex: number, count: number): void; /** * Adds the specified column to the selection if it is not already included, otherwise removes it from the selection. * * Recommend use `RevFocusSelectBehavior.toggleSelectColumn()` instead. * * @param activeColumnIndex - The index of the column to toggle selection for. */ toggleSelectColumn(activeColumnIndex: number): void; /** * Deletes the current last selection area (if it exists) and add a new selection area which becomes the new last selection area. * * @param areaTypeId - The type identifier for the selection area. * @param leftOrExRightActiveColumnIndex - The left active column index of the selection area if `width` is positive, or the exclusive right index if `width` is negative. * @param topOrExBottomSubgridRowIndex - The top subgrid row index of the selection area if `height` is positive, or the exclusive bottom index if `height` is negative. * @param width - The number of columns in the selection area. If negative, `width` is in reverse direction from the exclusive right index. * @param height - The number of rows in the selection area. If negative, `height` is in reverse direction from the exclusive bottom index. * @param subgrid - The subgrid in which the selection area is defined. * @returns The newly created {@link RevLastSelectionArea}, or `undefined` if the specified area could not be created. */ replaceLastArea(areaTypeId: RevSelectionAreaTypeId, leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid): RevLastSelectionArea | undefined; /** * Deletes the current last selection area (if it exists) and add a new rectangular selection area which becomes the new last selection area. * * If multiple selection areas are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), clear the selection before adding the new selection area. * * @param leftOrExRightActiveColumnIndex - The left active column index of the selection area if `width` is positive, or the exclusive right index if `width` is negative. * @param topOrExBottomSubgridRowIndex - The top subgrid row index of the selection area if `height` is positive, or the exclusive bottom index if `height` is negative. * @param width - The number of columns in the selection area. If negative, `width` is in reverse direction from the exclusive right index. * @param height - The number of rows in the selection area. If negative, `height` is in reverse direction from the exclusive bottom index. * @param subgrid - The subgrid in which the rectangle selection area is defined. * @returns The newly created {@link RevLastSelectionArea | selection area}, or `undefined` if the specified area could not be created. */ replaceLastAreaWithRectangle(leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, height: number, subgrid: RevSubgrid): RevLastSelectionArea; /** * Deletes the current last selection area (if it exists) and select a range of columns which becomes the new last selection area. * * If multiple selection areas are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), the selection is cleared before proceeding. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to select if `count` is positive, or the exclusive end index if `count` is negative. * @param count - The number of active columns to include in the new selection area. If negative, `count` is in reverse direction from the exclusive end index. * @returns The newly created {@link RevLastSelectionArea | selection area}. */ replaceLastAreaWithColumns(leftOrExRightActiveColumnIndex: number, count: number): RevLastSelectionArea; /** * Deletes the current last selection area (if it exists) and select a range of rows which becomes the new last selection area. * * If multiple selection areas are not allowed ({@link RevGridSettings.multipleSelectionAreas} is false), clear the selection before adding the new selection area. * * While the leftOrExRightActiveColumnIndex and width values are not needed to specify the rows, they are needed to create a * selection area. Normally they are set to specify all active columns. * * @param leftOrExRightActiveColumnIndex - The start index of the range of active columns to include in last area if `width` is positive, or the exclusive end index if `width` is negative. * @param topOrExBottomSubgridRowIndex - The start index of the range of subgrid rows to select if `count` is positive, or the exclusive end index if `count` is negative. * @param width - The number of active columns to include in the last area. If negative, `width` is in reverse direction from the exclusive end index. * @param count - The number of subgrid rows to include in the new selection area. If negative, `count` is in reverse direction from the exclusive bottom subgrid row index. * @param subgrid - The subgrid in which the selection is made. * @returns The newly created {@link RevLastSelectionArea | selection area}. */ replaceLastAreaWithRows(leftOrExRightActiveColumnIndex: number, topOrExBottomSubgridRowIndex: number, width: number, count: number, subgrid: RevSubgrid): RevLastSelectionArea; /** * Selects the cell if it not covered by any existing selection area, or removes/deselects the highest priority selection area covering the cell. * * @param activeColumnIndex - The index of the column containing the cell to toggle. * @param subgridRowIndex - The row index within the subgrid containing the cell to toggle. * @param subgrid - The subgrid instance in which the cell resides. * @returns `true` if the cell was selected; `false` if the a selection area covering the cell was removed/deselected. */ toggleSelectCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): boolean; isDynamicAllSelected(subgrid: RevSubgrid | undefined): boolean; /** * Determines whether the specified column index is currently selected. * * @param activeColumnIndex - The index of the column to check for selection. * @returns `true` if the column at the given index is selected; otherwise, `false`. */ isColumnSelected(activeColumnIndex: number): boolean; /** * Determines whether a specific cell is selected within the grid. * * @param activeColumnIndex - The index of the column for the cell to check. * @param subgridRowIndex - The row index within the subgrid for the cell to check. * @param subgrid - The subgrid instance containing the cell. * @returns `true` if the cell is selected; otherwise, `false`. */ isCellSelected(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): boolean; /** * Determines if the specified cell is the only selected cell in the given subgrid. * * @param activeColumnIndex - The column index of the cell to check. * @param subgridRowIndex - The row index of the cell to check within the subgrid. * @param subgrid - The subgrid instance containing the cell. * @returns `undefined` if not selected, `false` if selected with others, `true` if the only cell selected. */ isOnlyThisCellSelected(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): boolean | undefined; /** * Gets a selection area type for a single cell. * * @param activeColumnIndex - The column index of the cell. * @param subgridRowIndex - The row index of the cell within the subgrid. * @param subgrid - The subgrid instance containing the cell. * @returns The selection area type ID (`RevSelectionAreaTypeId`) if the cell is part of a selection area, * or `undefined` if the cell is not selected or the subgrid does not match. * * The method checks, in order: * - If the provided subgrid matches the current selection's subgrid. * - If the entire area is active (`all`). * - If the row is included in the selection (`row`). * - If the column is included in the selection (`column`). * - If the cell is within any selected rectangle (`rectangle`). * - Returns `undefined` if none of the above conditions are met. */ getOneCellSelectionAreaTypeId(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): RevSelectionAreaTypeId | undefined; /** * Returns an array of all {@link RevSelectionAreaTypeId | selection area type IDs} that apply to the specified cell. * * @param activeColumnIndex - The column index of the cell. * @param subgridRowIndex - The row index of the cell within the subgrid. * @param subgrid - The subgrid instance containing the cell. * @returns An array of `RevSelectionAreaTypeId` values indicating which selection areas * the specified cell belongs to. Returns an empty array if the subgrid does not match. */ getAllCellSelectionAreaTypeIds(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): RevSelectionAreaTypeId[]; /** * Determines whether a selected cell is the only cell selected in the grid. * * @param activeColumnIndex - The column index of the cell. * @param subgridRowIndex - The row index of the cell within the subgrid. * @param subgrid - The subgrid instance containing the cell. * @param selectedTypeId - The type of selection area used to select the cell. * @returns `true` if the active cell is the only selected cell, otherwise `false`. */ isSelectedCellTheOnlySelectedCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, // assume this was previously checked by getCellSelectedType selectedTypeId: RevSelectionAreaTypeId): boolean; /** * Determines whether any rows or columns are selected. * * @param includeDynamicAll - If `true`, then test includes rows and columns selected with {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll}; otherwise * rows and columns only selected with this selection area type are excluded. * @returns `true` if any rows or columns are selected; otherwise, `false`. */ hasColumnsOrRows(includeDynamicAll: boolean): boolean; /** * Determines whether any rows are selected. * * @param includeDynamicAll - If `true`, then test includes rows selected with {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll}; otherwise * rows only selected with this selection area type are excluded. * @returns `true` if any rows are selected; otherwise, `false`. */ hasRows(subgrid: RevSubgrid | undefined, includeDynamicAll: boolean): boolean; /** * Gets the count of selected rows. * * @param subgrid - The subgrid in which to count selected rows. If `undefined`, counts across all subgrids. * @param includeDynamicAll - If `true`, then count includes all rows selected with {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll}; otherwise * rows only selected with this selection area type are excluded from the count. * @returns The count of selected rows. */ getRowCount(subgrid: RevSubgrid | undefined, includeDynamicAll: boolean): number; /** * Gets the count of rows included in {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll} selection areas across all subgrids. * * @returns The count of selected rows. */ getDynamicAllRowCount(): number; /** * Gets all the selected row indices. * * Since indices are not unique across subgrids, the result returns separate arrays of row indices for each subgrid containing selected rows. * * @param includeDynamicAll - If `true`, then includes indices of all rows selected with {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll}; otherwise * indices of rows only selected with this selection area type are excluded. * @returns An array of objects, where each object contains a subgrid and an array of row indices for that subgrid. */ getRowIndices(includeDynamicAll: boolean): RevSelectionRows.SubgridIndices[]; /** * Gets all the selected row indices in a subgrid. * * @returns An array of row indices. */ getSubgridRowIndices(subgrid: RevSubgrid): number[]; /** * Gets all selected row indices included in {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll} selection areas across all subgrids. * * Since indices are not unique across subgrids, the result returns separate arrays of row indices for each subgrid * included in {@link dynamicAllSubgrids} containing one or more rows. * * @returns An array of objects, where each object contains a subgrid and an array of row indices for that subgrid. */ getDynamicAllRowIndices(): RevSelectionRows.SubgridIndices[]; /** * Gets all row indices in a subgrid if it is selected with {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll} selection area. * * That is, the subgrid must be included in {@link dynamicAllSubgrids}. * * @returns An array of row indices. */ getSubgridDynamicAllRowIndices(subgrid: RevSubgrid): number[]; /** * Determines whether any columns are selected. * * @param includeDynamicAll - If `true`, then test includes any columns if there are one or more {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll} type selection areas; otherwise * this selection area type is ignored. * @returns `true` if selection contains one or more column selection areas, otherwise `false`. */ hasColumns(includeDynamicAll: boolean): boolean; /** * Gets all the selected column indices. * * @param includeDynamicAll - If `true`, then result includes all column indices if there are one or more {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll} type selection areas; otherwise * this selection area type is ignored. * @returns An array of column indices. */ getColumnIndices(includeDynamicAll: boolean): number[]; /** * Gets all column indices if there are one or more {@link RevSelectionAreaTypeId.dynamicAll | dynamicAll} type selection areas. * * @returns An array of column indices. */ getDynamicAllColumnIndices(): number[]; /** * Returns an array of selection areas that cover the specified cell. * * @param activeColumnIndex - The index of the active column containing the cell. * @param subgridRowIndex - The row index within the subgrid. * @param subgrid - The subgrid instance containing the cell. * @returns An array of `RevSelectionArea` objects that cover the specified cell. */ getAreasCoveringCell(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): RevSelectionArea[]; /** * Determines whether the specified cell, identified by its column and row indices, * is within the bounds of the last selection area. * * @param activeColumnIndex - The index of the column to check. * @param subgridRowIndex - The index of the row within the subgrid to check. * @returns `true` if the cell is within the last selection area; otherwise, `false`. */ isPointInLastArea(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): boolean; /** * Calculates the total number of selection areas, including dynamicAll, rectangles, rows, and columns. */ calculateAreaCount(): number; /* Excluded from this release type: calculateAreaTypeFromSpecifier */ /* Excluded from this release type: calculateMouseSelectAllowedAreaTypeId */ /* Excluded from this release type: adjustForRowsInserted */ /* Excluded from this release type: adjustForRowsDeleted */ /* Excluded from this release type: adjustForRowsMoved */ /* Excluded from this release type: adjustForColumnsInserted */ /* Excluded from this release type: adjustForActiveColumnsDeleted */ /* Excluded from this release type: adjustForColumnsMoved */ /* Excluded from this release type: flagChanged */ /* Excluded from this release type: createLastSelectionAreaFromAll */ /* Excluded from this release type: createAreaFromRowRange */ /* Excluded from this release type: createAreaFromColumnRange */ /* Excluded from this release type: calculateMouseSelectAreaTypeId */ /* Excluded from this release type: createLastRectangleFirstCellStash */ /* Excluded from this release type: restoreLastRectangleFirstCellStash */ /* Excluded from this release type: createRowsStash */ /* Excluded from this release type: restoreRowsStash */ /* Excluded from this release type: restoreSubgridRowsStash */ /* Excluded from this release type: createColumnsStash */ /* Excluded from this release type: restoreColumnsStash */ } /** @public */ export declare namespace RevSelection { /* Excluded from this release type: ChangedEventer */ export interface Stash { readonly dynamicAll: readonly RevSubgrid[]; readonly lastRectangleFirstCell: Stash.LastRectangleFirstCell | undefined; readonly rows: readonly Stash.SubgridRowIds[]; readonly columns: readonly string[] | undefined; } export namespace Stash { export interface LastRectangleFirstCell { subgrid: RevSubgrid; fieldName: string; rowId: unknown; } export interface SubgridRowIds { subgrid: RevSubgrid; rowIds: unknown[]; } } } /** @public */ export declare interface RevSelectionArea extends RevFirstCornerArea { readonly areaTypeId: RevSelectionAreaTypeId; readonly subgrid: RevSubgrid | undefined; readonly size: number; } /** @public */ export declare namespace RevSelectionArea { export function isEqual(left: RevSelectionArea, right: RevSelectionArea): boolean; export function getTogglePriorityCellCoveringSelectionArea(areas: RevSelectionArea[]): RevSelectionArea | undefined; export function isCellCoveringSelectionAreaHigherTogglePriority(area: RevSelectionArea, referenceArea: RevSelectionArea): boolean; } /** * String representation of {@link RevSelectionAreaTypeId} type identifiers. * @public */ export declare type RevSelectionAreaType = keyof RevSelectionAreaTypeObject; /** @public */ export declare namespace RevSelectionAreaType { /** * Converts a {@link RevSelectionAreaType} string value to its corresponding {@link RevSelectionAreaTypeId} enum. * * @param type - The selection area type to convert. * @returns The corresponding `RevSelectionAreaTypeId` for the given type. * @throws `RevUnreachableCaseError` If the provided type is not a recognized selection area type. */ export function toId(type: RevSelectionAreaType): RevSelectionAreaTypeId; /** * Converts a {@link RevSelectionAreaTypeId} to its corresponding {@link RevSelectionAreaType} string value. * * @param id - The selection area type identifier to convert. * @returns The string representation of the selection area type. * @throws `RevUnreachableCaseError` If the provided `id` does not match any known selection area type. */ export function fromId(id: RevSelectionAreaTypeId): RevSelectionAreaType; /** * Converts an array of {@link RevSelectionAreaTypeId} values into an array of corresponding {@link RevSelectionAreaType}. * * @param ids - The array of selection area {@link RevSelectionAreaTypeId} to convert. * @returns An array of {@link RevSelectionAreaType} mapped from the provided {@link RevSelectionAreaTypeId} array. */ export function arrayFromIds(ids: RevSelectionAreaTypeId[]): RevSelectionAreaType[]; } /** * Identifies the types of selection areas in a grid. * * A selection can have one or more selection area. Each area will be of one of the types defined in this enum. * @public */ export declare const enum RevSelectionAreaTypeId { /** All the cells within a subgrid. Dynamically changes to reflect additions and deletions of rows and columns. */ dynamicAll = 0, /** A rectangle of cells within a subgrid. */ rectangle = 1, /** One or more contiguous rows within a subgrid. */ row = 2, /** One or more contiguous columns. */ column = 3 } /** @public */ export declare type RevSelectionAreaTypeObject = typeof RevSelectionAreaTypeId; /** @public */ export declare const enum RevSelectionAreaTypeSpecifierId { Primary = 0, Secondary = 1, Rectangle = 2, Row = 3, Column = 4, LastOrPrimary = 5 } /** * A "range" is defined as an Array(2) where: * element [0] is the beginning of the range * element [1] is the end of the range (inclusive) and is always \>= element [0] */ export declare type RevSelectionInclusiveRange = [start: number, stop: number]; export declare interface RevSelectionRange extends RevSelectionInclusiveRange { offsetY?: number; } export declare namespace RevSelectionRange { /** * Preps `start` and `stop` params into order array * @remarks Utility function called by both `select()` and `deselect()`. */ export function make(start: number, count: number): RevSelectionRange; export function copy(other: RevSelectionRange): RevSelectionRange; /** * @returns `true` iff `range1` overlaps `range2` * Comparison operator that determines if given ranges overlap with one another. * @remarks Both parameters are assumed to be _ordered_ arrays. * * Overlap is defined to include the case where one range completely contains the other. * * Note: This operator is commutative. * @param range1 - first range * @param range2 - second range */ export function overlaps(range1: RevSelectionRange, range2: RevSelectionRange): boolean; /** * Comparison operator that determines if given ranges are consecutive with one another. * @returns `true` iff `range1` is consecutive with `range2` * @remarks Both parameters are assumed to be _ordered_ arrays. * * Note: This operator is commutative. * @param range1 - first range * @param range2 - second range */ export function abuts(range1: RevSelectionRange, range2: RevSelectionRange): boolean; /** * Operator that subtracts one range from another. * @returns The remaining pieces of `minuend` after removing `subtrahend`. * @remarks Both parameters are assumed to be _ordered_ arrays. * * This function _does not assumes_ that `overlap()` has already been called with the same ranges and has returned `true`. * * Returned array contains 0, 1, or 2 ranges which are the portion(s) of `minuend` that do _not_ include `subtrahend`. * * Caveat: This operator is *not* commutative. * @param minuend - a range from which to "subtract" `subtrahend` * @param subtrahend - a range to "subtracted" from `minuend` */ export function subtract(minuend: RevSelectionRange, subtrahend: RevSelectionRange): RevSelectionRange[]; /** * Operator that merges given ranges. * @returns A single merged range. * @remarks Both parameters are assumed to be _ordered_ arrays. * * The ranges are assumed to be overlapping or adjacent to one another. * * Note: This operator is commutative. * @param range1 - a range to merge with `range2` * @param range2 - a range to merge with `range1` */ export function merge(range1: RevSelectionRange, range2: RevSelectionRange): RevSelectionRange; /** * Comparison operator that determines if outerRange completely contains a range. * @returns `true` iff `outerRange` completely contains `range` * @remarks Both parameters are assumed to be _ordered_ arrays. */ export function contains(outerRange: RevSelectionRange, range: RevSelectionRange): boolean; } export declare class RevSelectionRangeList extends RevContiguousIndexRangeList { get areaCount(): number; } /** @public */ export declare class RevSelectionRectangle extends RevFirstCornerRectangle implements RevSelectionArea { readonly subgrid: RevSubgrid; readonly areaTypeId = RevSelectionAreaTypeId.rectangle; constructor(leftOrExRight: number, topOrExBottom: number, width: number, height: number, subgrid: RevSubgrid); get size(): number; createCopy(): RevSelectionRectangle; } export declare class RevSelectionRectangleList { private readonly _subgridLists; private _lastRectangle; get areaCount(): number; has(inSubgrid: RevSubgrid | undefined): boolean; assign(other: RevSelectionRectangleList): void; isEmpty(): boolean; hasPoints(): boolean; hasMoreThanOnePoint(): boolean; hasPointOtherThan(subgrid: RevSubgrid | undefined, activeColumnIndex: number, subgridRowIndex: number): boolean; clear(): void; getRectangles(subgrid: RevSubgrid | undefined): readonly RevSelectionRectangle[]; getLastRectangle(): RevSelectionRectangle | undefined; getRectanglesContainingPoint(subgrid: RevSubgrid, activeColumnIndex: number, subgridRowIndex: number): RevSelectionRectangle[]; push(rectangle: RevSelectionRectangle): void; only(rectangle: RevSelectionRectangle): void; findIndex(subgrid: RevSubgrid, ox: number, oy: number, ex: number, ey: number): number; removeAt(subgrid: RevSubgrid, index: number): void; removeLast(): boolean; containsPoint(subgrid: RevSubgrid, x: number, y: number): boolean; adjustForYRangeInserted(subgrid: RevSubgrid, index: number, count: number): boolean; adjustForYRangeDeleted(subgrid: RevSubgrid, index: number, count: number): boolean; adjustForYRangeMoved(subgrid: RevSubgrid, oldIndex: number, newIndex: number, count: number): boolean; adjustForXRangeInserted(index: number, count: number): boolean; adjustForXRangeDeleted(index: number, count: number): boolean; private getSubgridList; } /** public */ declare class RevSelectionRows { private readonly _subgridLists; /** Can use this to include subgrids in _subgridList in a particular order. The most used subgrids can be included first to improve performance.*/ registerSubgrids(subgrids: RevSubgrid[]): void; hasMoreThanOneIndex(): boolean; getIndices(): RevSelectionRows.SubgridIndices[]; clear(): void; isEmpty(): boolean; calculateAreaCount(): number; hasIndices(subgrid: RevSubgrid | undefined): boolean; getIndexCount(subgrid: RevSubgrid | undefined): number; getSubgridIndexCount(subgrid: RevSubgrid): number; getSubgridIndices(subgrid: RevSubgrid): number[]; add(subgrid: RevSubgrid, subgridStartOrExEndRowIndex: number, count: number): boolean; delete(subgrid: RevSubgrid, subgridStartOrExEndRowIndex: number, count: number): boolean; calculateOverlapRange(subgrid: RevSubgrid, subgridStartOrExEndRowIndex: number, count: number): RevContiguousIndexRange | undefined; includesIndex(subgrid: RevSubgrid, subgridRowIndex: number): boolean; findRangeWithIndex(subgrid: RevSubgrid, subgridRowIndex: number): RevContiguousIndexRange | undefined; adjustForInserted(subgrid: RevSubgrid, start: number, count: number): boolean; adjustForDeleted(subgrid: RevSubgrid, start: number, count: number): boolean; adjustForMoved(subgrid: RevSubgrid, oldIndex: number, newIndex: number, count: number): boolean; private getSubgridList; } /** public */ declare namespace RevSelectionRows { interface SubgridIndices { readonly subgrid: RevSubgrid; readonly indices: number[]; } } export declare class RevSelectionSubgridRectangleList { readonly subgrid: RevSubgrid; readonly rectangles: RevSelectionRectangle[]; private readonly _flattenedX; private readonly _flattenedY; get has(): boolean; get areaCount(): number; constructor(subgrid: RevSubgrid); assign(other: RevSelectionSubgridRectangleList): void; isEmpty(): boolean; hasPoints(): boolean; hasMoreThanOnePoint(): boolean; hasZeroOneOrMoreThanOnePoint(): 0 | 1 | -1; hasPointOtherThan(x: number, y: number): boolean; clear(): void; getLastRectangle(): RevSelectionRectangle | undefined; getRectanglesContainingPoint(x: number, y: number): RevSelectionRectangle[]; push(rectangle: RevSelectionRectangle): void; only(rectangle: RevSelectionRectangle): void; findIndex(ox: number, oy: number, ex: number, ey: number): number; removeAt(index: number): RevSelectionRectangle | undefined; remove(rectangle: RevSelectionRectangle): boolean; containsY(y: number): boolean; containsX(x: number): boolean; containsPoint(x: number, y: number): boolean; getUniqueXIndexCount(): number; getNonUniqueXIndices(): number[]; getFlattenedYs(): number[]; adjustForYRangeInserted(index: number, count: number): boolean; adjustForYRangeDeleted(index: number, count: number): boolean; adjustForYRangeMoved(oldIndex: number, newIndex: number, count: number): boolean; adjustForXRangeInserted(index: number, count: number): boolean; adjustForXRangeDeleted(index: number, count: number): boolean; } /* Excluded from this release type: RevSelectionUiController */ export declare class RevServerNotificationBehavior implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; private readonly _columnsManager; private readonly _subgridsManager; private readonly _viewLayout; private readonly _focus; private readonly _selection; private readonly _renderer; private readonly _eventBehavior; private readonly _reindexStashManager; private readonly _schemaServer; private readonly _subgrids; private readonly _mainDataServer; private readonly _rowListChangedDataServers; private _destroyed; private _notificationsEnabled; private _schemaNotificationsSubscribed; private _beginDataChangeCount; private _rowListChangedDataServerCount; /* Excluded from this release type: schemaServerNotificationsClient */ constructor(clientId: string, internalParent: RevClientObject, _columnsManager: RevColumnsManager, _subgridsManager: RevSubgridsManager, _viewLayout: RevViewLayout, _focus: RevFocus, _selection: RevSelection, _renderer: RevRenderer, _eventBehavior: RevEventBehavior, _reindexStashManager: RevReindexBehavior); get notificationsEnabled(): boolean; destroy(): void; reset(): void; enableNotifications(): void; disableNotifications(): void; private enableSchemaNotifications; private disableSchemaNotifications; private enableDataNotifications; private disableDataNotifications; /* Excluded from this release type: handleBeginSchemaChange */ /* Excluded from this release type: handleEndSchemaChange */ /* Excluded from this release type: handleFieldsInserted */ /* Excluded from this release type: handleFieldsDeleted */ /* Excluded from this release type: handleAllFieldsDeleted */ /* Excluded from this release type: handleSchemaChanged */ /* Excluded from this release type: handleGetActiveSchemaFields */ /* Excluded from this release type: handleBeginDataChange */ /* Excluded from this release type: handleEndDataChange */ /* Excluded from this release type: handleInvalidateAll */ /* Excluded from this release type: handleInvalidateRows */ /* Excluded from this release type: handleInvalidateRow */ /* Excluded from this release type: handleInvalidateRowColumns */ /* Excluded from this release type: handleInvalidateRowCells */ /* Excluded from this release type: handleInvalidateCell */ /* Excluded from this release type: handleRowsInserted */ /* Excluded from this release type: handleRowsDeleted */ /* Excluded from this release type: handleAllRowsDeleted */ /* Excluded from this release type: handleRowsMoved */ /* Excluded from this release type: handleRowsLoaded */ /* Excluded from this release type: handleDataPreReindex */ /* Excluded from this release type: handleDataPostReindex */ private beginSchemaChange; private endSchemaChange; private beginDataChange; private endDataChange; private includeDataServerInRowListChanged; } /** @public */ export declare type RevServerNotificationId = number; /** * A cell renderer for a text cell. * @remarks Great care has been taken in crafting this function as it needs to perform extremely fast. * * Use `gc.cache` instead which we have implemented to cache the graphics context properties. Reads on the graphics context (`gc`) properties are expensive but not quite as expensive as writes. On read of a `gc.cache` prop, the actual `gc` prop is read into the cache once and from then on only the cache is referenced for that property. On write, the actual prop is only written to when the new value differs from the cached value. * * Clipping bounds are not set here as this is also an expensive operation. Instead, we employ a number of strategies to truncate overflowing text and content. * @public */ export declare class RevSimpleAlphaTextCellPainter extends RevStandardCellPainter { private readonly _textPainter; constructor(grid: RevClientGrid, dataServer: RevDataServer); paint(cell: RevViewCell, prefillColor: string | undefined): number | undefined; private paintLayerColors; } /** @public */ export declare namespace RevSimpleAlphaTextCellPainter { export interface RevPaintFingerprintInterface { readonly value: string; readonly textColor: string; readonly textFont: string; readonly borderColor: string | undefined; readonly firstColorIsFill: boolean; readonly layerColors: string[]; } export type RevPaintFingerprint = IndexSignatureHack; } /** @public */ export declare interface RevSimpleBehavioredColumnSettings extends RevSimpleColumnSettings, RevBehavioredColumnSettings { merge(settings: Partial, overrideGrid: boolean): boolean; clone(overrideGrid: boolean): RevSimpleBehavioredColumnSettings; } /** @public */ export declare interface RevSimpleBehavioredGridSettings extends RevSimpleGridSettings, RevBehavioredGridSettings { merge(settings: Partial): boolean; clone(): RevSimpleBehavioredGridSettings; } /** @public */ export declare class RevSimpleClientGrid extends RevClientGrid { } /** @public */ export declare interface RevSimpleColumnSettings extends RevSimpleOnlyColumnSettings, RevColumnSettings { } /** @public */ export declare class RevSimpleDataRowArrayGrid extends RevDataRowArrayGrid { private readonly _headerCellPainter; private readonly _textCellPainter; constructor(canvasElement: HTMLCanvasElement, settings?: RevSimpleInMemoryBehavioredGridSettings, options?: RevGridOptions); private getHeaderCellPainter; private getMainCellPainter; } /** @public */ export declare const revSimpleDefaultColumnSettings: RevSimpleColumnSettings; /** @public */ export declare const revSimpleDefaultGridSettings: RevSimpleGridSettings; /** @public */ export declare const revSimpleDefaultOnlyColumnSettings: RevSimpleOnlyColumnSettings; /** @public */ export declare const revSimpleDefaultOnlyGridSettings: RevSimpleOnlyGridSettings; /** @public */ export declare interface RevSimpleGridSettings extends RevSimpleOnlyGridSettings, RevGridSettings { } /** @public */ export declare class RevSimpleInMemoryBehavioredColumnSettings extends RevInMemoryBehavioredColumnSettings implements RevSimpleBehavioredColumnSettings, RevStandardCheckboxCellPainter.ColumnSettings, RevStandardHeaderTextCellPainter.ColumnSettings { gridSettings: RevSimpleGridSettings; private _cellPadding; private _cellFocusedBorderColor; private _cellHoverBackgroundColor; private _columnHoverBackgroundColor; private _columnHeaderFont; private _columnHeaderHorizontalAlignId; private _columnHeaderHorizontalAlign; private _columnHeaderBackgroundColor; private _columnHeaderForegroundColor; private _columnHeaderSelectionFont; private _columnHeaderSelectionBackgroundColor; private _columnHeaderSelectionForegroundColor; private _font; private _horizontalAlign; private _horizontalAlignId; private _verticalOffset; private _textTruncateTypeId; private _textTruncateType; private _textStrikeThrough; get cellPadding(): number; set cellPadding(value: number); get cellFocusedBorderColor(): RevGridSettings.Color | undefined; set cellFocusedBorderColor(value: RevGridSettings.Color | undefined); get cellHoverBackgroundColor(): RevGridSettings.Color | undefined; set cellHoverBackgroundColor(value: RevGridSettings.Color | undefined); get columnHoverBackgroundColor(): RevGridSettings.Color | undefined; set columnHoverBackgroundColor(value: RevGridSettings.Color | undefined); get columnHeaderFont(): string | undefined; set columnHeaderFont(value: string | undefined); get columnHeaderHorizontalAlignId(): RevHorizontalAlignId; get columnHeaderHorizontalAlign(): RevHorizontalAlign; set columnHeaderHorizontalAlign(value: RevHorizontalAlign); get columnHeaderBackgroundColor(): RevGridSettings.Color | undefined; set columnHeaderBackgroundColor(value: RevGridSettings.Color | undefined); get columnHeaderForegroundColor(): RevGridSettings.Color | undefined; set columnHeaderForegroundColor(value: RevGridSettings.Color | undefined); get columnHeaderSelectionFont(): string | undefined; set columnHeaderSelectionFont(value: string | undefined); get columnHeaderSelectionBackgroundColor(): RevGridSettings.Color | undefined; set columnHeaderSelectionBackgroundColor(value: RevGridSettings.Color | undefined); get columnHeaderSelectionForegroundColor(): RevGridSettings.Color | undefined; set columnHeaderSelectionForegroundColor(value: RevGridSettings.Color | undefined); get font(): string; set font(value: string); get horizontalAlignId(): RevHorizontalAlignId; get horizontalAlign(): RevHorizontalAlign; set horizontalAlign(value: RevHorizontalAlign); get verticalOffset(): number; set verticalOffset(value: number); get textTruncateTypeId(): RevTextTruncateTypeId | undefined; get textTruncateType(): RevTextTruncateType | undefined; set textTruncateType(value: RevTextTruncateType | undefined); get textStrikeThrough(): boolean; set textStrikeThrough(value: boolean); merge(settings: Partial, overrideGrid?: boolean): boolean; clone(overrideGrid?: boolean): RevSimpleInMemoryBehavioredColumnSettings; } /** @public */ export declare class RevSimpleInMemoryBehavioredGridSettings extends RevInMemoryBehavioredGridSettings implements RevSimpleBehavioredGridSettings { private _cellPadding; private _cellFocusedBorderColor; private _cellHoverBackgroundColor; private _columnHoverBackgroundColor; private _columnHeaderFont; private _columnHeaderHorizontalAlignId; private _columnHeaderHorizontalAlign; private _columnHeaderBackgroundColor; private _columnHeaderForegroundColor; private _columnHeaderSelectionFont; private _columnHeaderSelectionBackgroundColor; private _columnHeaderSelectionForegroundColor; private _rowHoverBackgroundColor; private _selectionFont; private _selectionBackgroundColor; private _selectionForegroundColor; private _font; private _horizontalAlignId; private _horizontalAlign; private _verticalOffset; private _textTruncateTypeId; private _textTruncateType; private _textStrikeThrough; get cellPadding(): number; set cellPadding(value: number); get cellFocusedBorderColor(): RevGridSettings.Color | undefined; set cellFocusedBorderColor(value: RevGridSettings.Color | undefined); get cellHoverBackgroundColor(): RevGridSettings.Color | undefined; set cellHoverBackgroundColor(value: RevGridSettings.Color | undefined); get columnHoverBackgroundColor(): RevGridSettings.Color | undefined; set columnHoverBackgroundColor(value: RevGridSettings.Color | undefined); get columnHeaderFont(): string | undefined; set columnHeaderFont(value: string | undefined); get columnHeaderHorizontalAlignId(): RevHorizontalAlignId; get columnHeaderHorizontalAlign(): RevHorizontalAlign; set columnHeaderHorizontalAlign(value: RevHorizontalAlign); get columnHeaderBackgroundColor(): RevGridSettings.Color | undefined; set columnHeaderBackgroundColor(value: RevGridSettings.Color | undefined); get columnHeaderForegroundColor(): RevGridSettings.Color | undefined; set columnHeaderForegroundColor(value: RevGridSettings.Color | undefined); get columnHeaderSelectionFont(): string | undefined; set columnHeaderSelectionFont(value: string | undefined); get columnHeaderSelectionBackgroundColor(): RevGridSettings.Color | undefined; set columnHeaderSelectionBackgroundColor(value: RevGridSettings.Color | undefined); get columnHeaderSelectionForegroundColor(): RevGridSettings.Color | undefined; set columnHeaderSelectionForegroundColor(value: RevGridSettings.Color | undefined); get rowHoverBackgroundColor(): RevGridSettings.Color | undefined; set rowHoverBackgroundColor(value: RevGridSettings.Color | undefined); get selectionFont(): RevGridSettings.Color | undefined; set selectionFont(value: RevGridSettings.Color | undefined); get selectionBackgroundColor(): RevGridSettings.Color | undefined; set selectionBackgroundColor(value: RevGridSettings.Color | undefined); get selectionForegroundColor(): RevGridSettings.Color | undefined; set selectionForegroundColor(value: RevGridSettings.Color | undefined); get font(): string; set font(value: string); get horizontalAlignId(): RevHorizontalAlignId; get horizontalAlign(): RevHorizontalAlign; set horizontalAlign(value: RevHorizontalAlign); get verticalOffset(): number; set verticalOffset(value: number); get textTruncateTypeId(): RevTextTruncateTypeId | undefined; get textTruncateType(): RevTextTruncateType | undefined; set textTruncateType(value: RevTextTruncateType | undefined); get textStrikeThrough(): boolean; set textStrikeThrough(value: boolean); merge(settings: Partial): boolean; clone(): RevSimpleInMemoryBehavioredGridSettings; } /** @public */ export declare type RevSimpleOnlyColumnSettings = Pick; /** @public */ export declare interface RevSimpleOnlyGridSettings extends RevStandardTextPainter.OnlyColumnSettings { /** Padding to left and right of cell content */ cellPadding: number; cellFocusedBorderColor: RevGridSettings.Color | undefined; cellHoverBackgroundColor: RevGridSettings.Color | undefined; columnHoverBackgroundColor: RevGridSettings.Color | undefined; columnHeaderFont: string | undefined; readonly columnHeaderHorizontalAlignId: RevHorizontalAlignId; columnHeaderHorizontalAlign: RevHorizontalAlign; columnHeaderBackgroundColor: RevGridSettings.Color | undefined; columnHeaderForegroundColor: RevGridSettings.Color | undefined; /** Font style for selected columns' headers. */ columnHeaderSelectionFont: string | undefined; columnHeaderSelectionBackgroundColor: RevGridSettings.Color | undefined; columnHeaderSelectionForegroundColor: RevGridSettings.Color | undefined; rowHoverBackgroundColor: RevGridSettings.Color | undefined; /** Font style for selected cell(s). */ selectionFont: RevGridSettings.Color | undefined; /** Background color for selected cell(s). */ selectionBackgroundColor: RevGridSettings.Color | undefined; /** Font color for selected cell(s). */ selectionForegroundColor: RevGridSettings.Color | undefined; font: string; /** Horizontal alignment of content of each cell. */ readonly horizontalAlignId: RevHorizontalAlignId; horizontalAlign: RevHorizontalAlign; /** Vertical offset from top of cell of content of each cell. */ verticalOffset: number; readonly textTruncateTypeId: RevTextTruncateTypeId | undefined; textTruncateType: RevTextTruncateType | undefined; /** Display cell font with strike-through line drawn over it. */ textStrikeThrough: boolean; } /** @public */ export declare const revSimpleReadonlyDefaultBehavioredColumnSettings: Readonly; /** @public */ export declare const revSimpleReadonlyDefaultBehavioredGridSettings: Readonly; /** @public */ export declare interface RevSingleHeadingDataRowArraySourcedField extends RevSourcedField, RevDataRowArrayField, RevSingleHeadingField { } /** @public */ export declare namespace RevSingleHeadingDataRowArraySourcedField { export function createFromDefinition(definition: RevSingleHeadingDataRowArraySourcedFieldDefinition, heading?: string): RevSingleHeadingDataRowArraySourcedField; } /** @public */ export declare interface RevSingleHeadingDataRowArraySourcedFieldDefinition extends RevSourcedFieldDefinition { readonly key?: string; } /** @public */ export declare namespace RevSingleHeadingDataRowArraySourcedFieldDefinition { export function create(sourceDefinition: RevSourcedFieldSourceDefinition, sourcelessName: string, defaultHeading: string, defaultTextAlignId: RevHorizontalAlignId, defaultWidth?: Integer, key?: string): RevSingleHeadingDataRowArraySourcedFieldDefinition; } /** @public */ export declare class RevSingleHeadingDataRowArraySourcedFieldGrid extends RevDataRowArrayGrid implements RevSourcedFieldGrid { /* Excluded from this release type: _createFieldEventer */ headerDataServer: RevSingleHeadingDataServer; constructor(canvasElement: HTMLCanvasElement, getHeaderCellPainterEventer: RevSubgrid.GetCellPainterEventer, getMainCellPainterEventer: RevSubgrid.GetCellPainterEventer, settings: BGS, getSettingsForNewColumnEventer: RevClientGrid.GetSettingsForNewColumnEventer, /** @internal */ _createFieldEventer: RevSingleHeadingDataRowArraySourcedFieldGrid.CreateFieldEventer, options?: RevGridOptions); createAllowedSourcedFieldsColumnLayoutDefinition(allowedFields: readonly SF[]): RevAllowedSingleHeadingDataRowArraySourcedFieldsColumnLayoutDefinition; /** * Establish new data and schema. * If no data provided, data will be set to 0 rows. * @param data - Array of congruent uniform objects containing the grid data and possibly also header rows. */ setData(data: RevDataRowArrayGrid.DataRow[] | (() => RevDataRowArrayGrid.DataRow[]), keyIsHeading: boolean): void; private extractSchemaAndMainDataRowsFromData; private calculateSchemaFromKeys; } /** @public */ export declare namespace RevSingleHeadingDataRowArraySourcedFieldGrid { export type CreateFieldEventer = (this: void, index: number, key: string, heading: string) => SF; } /** @public */ export declare class RevSingleHeadingDataServer implements RevDataServer { private _callbackListeners; subscribeDataNotifications(listener: RevDataServer.NotificationsClient): void; unsubscribeDataNotifications(client: RevDataServer.NotificationsClient): void; getRowCount(): number; getViewValue(field: SF): string; reset(): void; invalidateCell(schemaColumnIndex: number, rowIndex?: number): void; } /** @public */ export declare interface RevSingleHeadingField extends RevSchemaField { heading: string; } /** @public */ export declare type RevSizeUnit = typeof RevSizeUnit.pixel | typeof RevSizeUnit.percent | typeof RevSizeUnit.fractional | typeof RevSizeUnit.em; /** @public */ export declare namespace RevSizeUnit { const pixel = "px"; const percent = "%"; const fractional = "fr"; const em = "em"; export function tryParse(value: string): RevSizeUnitId | undefined; export function format(value: RevSizeUnitId): RevSizeUnit; } /** @public */ export declare const enum RevSizeUnitId { Pixel = 0, Percent = 1, Fractional = 2, Em = 3 } /** @public */ export declare interface RevSizeWithUnit { size: number; sizeUnit: RevSizeUnitId; } /** @public */ export declare namespace RevSizeWithUnit { export function tryParse(value: string): RevSizeWithUnit | undefined; /* Excluded from this release type: formatSize */ } /** @public */ export declare interface RevSourcedField extends RevSchemaField { readonly definition: RevSourcedFieldDefinition; readonly name: string; heading: string; } /** @public */ export declare namespace RevSourcedField { export const enum FieldId { Name = 0, Heading = 1, SourceName = 2, DefaultHeading = 3, DefaultTextAlign = 4, DefaultWidth = 5 } export namespace Field { export type Id = FieldId; const idCount: number; export function checkOrder(): void; export function idToName(id: Id): string; export function idToHorizontalAlignId(id: Id): RevHorizontalAlignId; } export function generateHeading(customHeadings: RevSourcedFieldCustomHeadings | undefined, fieldDefinition: RevSourcedFieldDefinition): string; } /** @public */ export declare interface RevSourcedFieldCustomHeadings { tryGetFieldHeading(sourceName: string, fieldName: string): string | undefined; } /** @public */ export declare interface RevSourcedFieldDefinition { readonly name: string; readonly sourceDefinition: RevSourcedFieldSourceDefinition; readonly sourcelessName: string; readonly defaultTextAlignId: RevHorizontalAlignId; readonly defaultHeading: string; readonly defaultWidth?: Integer; } /** @public */ export declare namespace RevSourcedFieldDefinition { export namespace Name { export function compose(sourceName: string, sourcelessName: string): string; export type DecomposedArray = [sourceName: string, sourcelessName: string]; export const enum DecomposeErrorId { UnexpectedCharAfterQuotedElement = 0, QuotesNotClosedInLastElement = 1, NotHas2Elements = 2 } export interface DecomposeErrorIdPlusExtra { readonly errorId: DecomposeErrorId; readonly extraInfo: string; } export function tryDecompose(name: string): Result; } } /** @public */ export declare interface RevSourcedFieldGrid extends RevIColumnLayoutGrid { readonly allowedFields: readonly SF[] | undefined; createAllowedSourcedFieldsColumnLayoutDefinition(allowedFields: readonly SF[]): RevAllowedSourcedFieldsColumnLayoutDefinition; } /** @public */ export declare interface RevSourcedFieldSourceDefinition { readonly name: string; } /** @public */ export declare namespace RevSourcedRecordField { export type GetEditValueEventer = (this: void, record: IndexedRecord) => RevDataServer.EditValue; export type SetEditValueEventer = (this: void, record: IndexedRecord, value: RevDataServer.EditValue) => void; } /* Excluded from this release type: revSplitStringAtFirstNonNumericChar */ /* Excluded from this release type: RevSplitStringAtFirstNonNumericCharResult */ /** * The default cell rendering function for a button cell. * @public */ export declare class RevStandardButtonCellPainter extends RevStandardCellPainter { config: RevStandardButtonCellPainter.Config; paint(cell: RevViewCell, _prefillColor: string | undefined): number | undefined; } /** @public */ export declare namespace RevStandardButtonCellPainter { const typeName = "Button"; export interface Config { value: string; bounds: RevRectangle; backgroundColor: string; } } /** @public */ export declare abstract class RevStandardCellEditor implements RevCellEditor { protected readonly _grid: RevClientGrid; protected readonly _dataServer: RevDataServer; cellClosedEventer: RevCellEditor.CellClosedEventer; /* Excluded from this release type: _readonly */ constructor(_grid: RevClientGrid, _dataServer: RevDataServer); get readonly(): boolean; set readonly(value: boolean); protected setReadonly(value: boolean): void; protected isToggleKey(key: string): boolean; protected tryToggleBoolenValue(field: SF, dataServerRowIndex: number): boolean; abstract tryOpenCell(viewCell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, openingClickEvent: MouseEvent | undefined): boolean; abstract closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; abstract processGridKeyDownEvent(event: KeyboardEvent, fromEditor: boolean, field: SF, dataServerRowIndex: number): boolean; } export declare abstract class RevStandardCellEffect { readonly el: HTMLElement; readonly options?: RevStandardCellEffect.Options | undefined; protected readonly _finishedEventer: RevStandardCellEffect.Options.FinishedEventer | undefined; constructor(el: HTMLElement, options?: RevStandardCellEffect.Options | undefined); abstract start(): void; } export declare namespace RevStandardCellEffect { export interface Options { finishedEventer?: Options.FinishedEventer; } export namespace Options { export type FinishedEventer = (this: void) => void; } export type Constructor = new (el: HTMLElement, options?: Options) => RevStandardCellEffect; } export declare class RevStandardCellEffectFactory { create(name: string, el: HTMLElement, options?: RevStandardCellEffect.Options): RevStandardShakerCellEffect | RevStandardGlowerCellEffect; } /** @public */ export declare abstract class RevStandardCellPainter implements RevCellPainter { protected readonly _grid: RevClientGrid; protected readonly _dataServer: RevDataServer; protected readonly _gridSettings: BGS; protected readonly _renderingContext: RevCachedCanvasRenderingContext2D; constructor(_grid: RevClientGrid, _dataServer: RevDataServer); protected paintBackground(bounds: RevRectangle, backgroundColor: string): void; protected paintBorder(bounds: RevRectangle, borderColor: string, focus: boolean): void; abstract paint(cell: RevViewCell, prefillColor: string | undefined): number | undefined; } /** @public */ export declare class RevStandardCheckboxCellPainter extends RevStandardCellPainter { private readonly _editable; private readonly _checkboxPainter; constructor(grid: RevClientGrid, dataServer: RevDataServer, _editable: boolean); paint(cell: RevViewCell, prefillColor: string | undefined): number | undefined; calculateClickBox(cell: RevViewCell): RevRectangle | undefined; } /** @public */ export declare namespace RevStandardCheckboxCellPainter { const typeName = "Checkbox"; export interface PaintFingerprintInterface extends RevStandardCheckboxPainter.PaintFingerprintInterface { readonly backgroundColor: RevGridSettings.Color; readonly borderColor: string | undefined; } export type PaintFingerprint = IndexSignatureHack; export namespace PaintFingerprint { export function same(left: PaintFingerprint, right: PaintFingerprint): boolean; } export interface OnlyColumnSettings { cellPadding: number; font: string; cellFocusedBorderColor: RevGridSettings.Color | undefined; } export interface ColumnSettings extends OnlyColumnSettings, RevColumnSettings { } export interface BehavioredColumnSettings extends ColumnSettings, RevBehavioredColumnSettings { merge(settings: Partial, overrideGrid: boolean): boolean; clone(overrideGrid: boolean): BehavioredColumnSettings; } } /** @public */ export declare class RevStandardCheckboxPainter { private readonly _editable; private readonly _renderingContext; constructor(_editable: boolean, _renderingContext: RevCachedCanvasRenderingContext2D); writeFingerprintOrCheckPaint(fingerprint: Partial, bounds: RevRectangle, booleanValue: boolean | undefined | null, boxDetails: RevStandardCheckboxPainter.BoxDetails, color: string, font: string): number | undefined; calculateClickBox(bounds: RevRectangle, booleanValue: boolean | undefined | null, cellPadding: number, font: string): RevRectangle | undefined; calculateBoxDetails(bounds: RevRectangle, cellPadding: number): RevStandardCheckboxPainter.BoxDetails; writeUndefinedFingerprint(fingerprint: Partial): void; private writeFingerprint; } /** @public */ export declare namespace RevStandardCheckboxPainter { const minimumBoxSideLength = 5; const valueNotBooleanChar = "!"; export interface BoxDetails { sumOfResolvedLeftRightPadding: number; maxBoxBoundsWidth: number; maxBoxBoundsHeight: number; maxBoxSideLength: number; maxBoxWidth: number; boxSideLength: number; boxLineWidth: number; idealBoxSideLength: number; } export interface PaintFingerprintInterface { value: boolean | undefined | null; boxLineWidth: number; boxSideLength: number | undefined; color: RevGridSettings.Color; errorFont: string | undefined; } export type PaintFingerprint = IndexSignatureHack; export namespace PaintFingerprint { export function same(left: PaintFingerprint, right: PaintFingerprint): boolean; } } /** @public */ export declare class RevStandardColorInputCellEditor extends RevStandardInputElementCellEditor { constructor(grid: RevClientGrid, dataServer: RevDataServer); tryOpenCell(cell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, _openingClickEvent: MouseEvent | undefined): boolean; closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; } /** @public */ export declare class RevStandardDateInputCellEditor extends RevStandardInputElementCellEditor { constructor(grid: RevClientGrid, dataServer: RevDataServer); tryOpenCell(cell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, _openingClickEvent: MouseEvent | undefined): boolean; closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; } /** @public */ export declare abstract class RevStandardElementCellEditor extends RevStandardCellEditor { protected readonly _element: HTMLElement; constructor(grid: RevClientGrid, dataServer: RevDataServer, element: HTMLElement); tryOpenCell(_viewCell: RevViewCell, _openingKeyDownEvent: KeyboardEvent | undefined, _openingClickEvent: MouseEvent | undefined): boolean; closeCell(_schemaColumn: SF, _dataServerRowIndex: number, _cancel: boolean): void; focus(): void; setBounds(bounds: RevRectangle | undefined): void; } /** * Transition styles on element for a moment and revert as if to say, "Whoa!." */ export declare class RevStandardGlowerCellEffect extends RevStandardCellEffect { private _duration; private _glowerStyles; private _originalTransitionStyle; private _styleWasMap; private _activeCount; constructor(el: HTMLElement, options?: RevStandardGlowerCellEffect.Options); start(): void; destroy(): void; glower(event: TransitionEvent): void; private _transitionendListener; } export declare namespace RevStandardGlowerCellEffect { const typeName = "glower"; const duration = "0.25s"; export interface Options extends RevStandardCellEffect.Options { duration: string; styles: Styles; } export type Styles = Record; const defaultStyles: Styles; export interface StyleWas { style: string; undo: boolean; } } /** * A cell painter with features typically needed by header cells * @remarks Great care has been taken in crafting this function as it needs to perform extremely fast. * * Use `gc.cache` instead which we have implemented to cache the graphics context properties. Reads on the graphics context (`gc`) properties are expensive but not quite as expensive as writes. On read of a `gc.cache` prop, the actual `gc` prop is read into the cache once and from then on only the cache is referenced for that property. On write, the actual prop is only written to when the new value differs from the cached value. * * Clipping bounds are not set here as this is also an expensive operation. Instead, we employ a number of strategies to truncate overflowing text and content. * @public */ export declare class RevStandardHeaderTextCellPainter extends RevStandardCellPainter { private readonly _textPainter; constructor(grid: RevClientGrid, dataServer: RevDataServer); paint(cell: RevViewCell, _prefillColor: string | undefined): number | undefined; } /** @public */ export declare namespace RevStandardHeaderTextCellPainter { export interface OnlyColumnSettings { cellPadding: number; font: string; readonly horizontalAlignId: RevHorizontalAlignId; readonly columnHeaderHorizontalAlignId: RevHorizontalAlignId; columnHeaderFont: string | undefined; columnHeaderBackgroundColor: RevGridSettings.Color | undefined; columnHeaderForegroundColor: RevGridSettings.Color | undefined; columnHeaderSelectionFont: string | undefined; columnHeaderSelectionForegroundColor: RevGridSettings.Color | undefined; } export interface ColumnSettings extends OnlyColumnSettings, RevStandardTextPainter.OnlyColumnSettings, RevColumnSettings { } export interface BehavioredColumnSettings extends ColumnSettings, RevBehavioredColumnSettings { merge(settings: Partial, overrideGrid: boolean): boolean; clone(overrideGrid: boolean): BehavioredColumnSettings; } export interface RevPaintFingerprintInterface { readonly value: string; readonly backgroundColor: string; readonly textColor: string; readonly textFont: string; } export type RevPaintFingerprint = IndexSignatureHack; export namespace PaintFingerprint { export function same(left: RevPaintFingerprint, right: RevPaintFingerprint): boolean; } } /** @public */ export declare abstract class RevStandardInputElementCellEditor extends RevStandardElementCellEditor { keyDownEventer: RevCellEditor.KeyDownEventer; protected readonly _element: HTMLInputElement; constructor(grid: RevClientGrid, dataServer: RevDataServer, inputType: string); setReadonly(value: boolean): void; tryOpenCell(viewCell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, openingClickEvent: MouseEvent | undefined): boolean; closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; processGridKeyDownEvent(event: KeyboardEvent, fromEditor: boolean, _schemaColumn: SF, _dataServerRowIndex: number): boolean; selectAll(): void; private canConsumeKey; } /** @public */ export declare class RevStandardNumberInputCellEditor extends RevStandardInputElementCellEditor { constructor(grid: RevClientGrid, dataServer: RevDataServer); tryOpenCell(cell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, _openingClickEvent: MouseEvent | undefined): boolean; closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; } /** @public */ export declare abstract class RevStandardPaintCellEditor extends RevStandardCellEditor implements RevCellPainter { protected readonly _painter: RevCellPainter; constructor(grid: RevClientGrid, dataServer: RevDataServer, _painter: RevCellPainter); paint(cell: RevViewCell, prefillColor: string | undefined): number | undefined; } /** @public */ export declare class RevStandardRangeInputCellEditor extends RevStandardInputElementCellEditor { constructor(grid: RevClientGrid, dataServer: RevDataServer); tryOpenCell(cell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, _openingClickEvent: MouseEvent | undefined): boolean; closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; } /** @public */ export declare class RevStandardScroller implements RevScroller { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _hostElement */ /* Excluded from this release type: _canvas */ /* Excluded from this release type: _scrollDimension */ readonly axis: RevScrollDimension.Axis; /* Excluded from this release type: _trailing */ /* Excluded from this release type: _spaceAccommodatedScroller */ private readonly bar; private readonly barCssClass; private readonly axisBarCssClass; private readonly thumbCssClass; actionEventer: RevScroller.ActionEventer; wheelEventer: RevScroller.WheelEventer | undefined; visibilityChangedEventer: RevScroller.VisibilityChangedEventer | undefined; /* Excluded from this release type: _thumb */ /* Excluded from this release type: _axisProperties */ /* Excluded from this release type: _thumbMax */ /* Excluded from this release type: _thumbMarginLeading */ /* Excluded from this release type: _pinOffset */ /* Excluded from this release type: _pointerOverBar */ /* Excluded from this release type: _pointerOverThumb */ /* Excluded from this release type: _temporaryThumbFullVisibilityTimePeriod */ /* Excluded from this release type: _temporaryThumbFullVisibilityTimeoutId */ /* Excluded from this release type: _pointerScrollingState */ /* Excluded from this release type: _thumbVisibilityState */ /* Excluded from this release type: _barPointerMoveListener */ /* Excluded from this release type: _barPointerUpListener */ /* Excluded from this release type: _barPointerCancelListener */ /* Excluded from this release type: _barPointerCaptured */ /* Excluded from this release type: __constructor */ get trailing(): boolean; /* Excluded from this release type: index */ /* Excluded from this release type: index */ get hidden(): boolean; get thickness(): number; get insideOverlap(): number; /** * Remove the scrollbar. * @remarks Unhooks all the event handlers and then removes the element from the DOM. Always call this method prior to disposing of the scrollbar object. */ destroy(): void; setBeforeInsideOffset(offset: number): void; setAfterInsideOffset(offset: number): void; temporarilyGiveThumbFullVisibility(timePeriod: number): void; /* Excluded from this release type: activatePointerScrolling */ /* Excluded from this release type: deactivatePointerScrolling */ /* Excluded from this release type: _settingsChangedListener */ /* Excluded from this release type: _barWheelListener */ /* Excluded from this release type: _barClickListener */ /* Excluded from this release type: _thumbClickListener */ /* Excluded from this release type: _thumbPointerEnterListener */ /* Excluded from this release type: _thumbPointerLeaveListener */ /* Excluded from this release type: _thumbTransitionEndListener */ /* Excluded from this release type: _barPointerEnterListener */ /* Excluded from this release type: _barPointerLeaveListener */ /* Excluded from this release type: _barPointerDownListener */ /* Excluded from this release type: applySettings */ /* Excluded from this release type: applyThumbThickness */ /* Excluded from this release type: setThumbPosition */ /* Excluded from this release type: setThumbSize */ /* Excluded from this release type: handleThumbClickEvent */ /* Excluded from this release type: handleBarWheelEvent */ /* Excluded from this release type: handleBarClickEvent */ /* Excluded from this release type: handleThumbPointerEnterEvent */ /* Excluded from this release type: handleThumbPointerLeaveEvent */ /* Excluded from this release type: handleThumbTransitionEndEvent */ /* Excluded from this release type: handleBarPointerEnterEvent */ /* Excluded from this release type: handleBarPointerLeaveEvent */ /* Excluded from this release type: handleBarPointerDownEvent */ /* Excluded from this release type: handleBarPointerMoveEvent */ /* Excluded from this release type: handleBarPointerUpCancelEvent */ /* Excluded from this release type: resize */ /* Excluded from this release type: calculateLeadingTrailingForSpaceAccommodatedScroller */ /* Excluded from this release type: updatePointerScrolling */ /* Excluded from this release type: armPointerScrolling */ /* Excluded from this release type: updateThumbVisibility */ /* Excluded from this release type: wantThumbFullVisibility */ /* Excluded from this release type: isThumbVisibilityTransitionSpecified */ /* Excluded from this release type: handleTemporaryThumbFullVisibilityTimeout */ /* Excluded from this release type: cancelTemporaryThumbFullVisibilityTimeout */ } /** @public */ export declare namespace RevStandardScroller { const barCssSuffix = "scroller"; const thumbCssSuffix = "scroller-thumb"; const defaultInsideOffset = 3; /* Excluded from this release type: PointerEventListener */ /* Excluded from this release type: PointerScrollingStateId */ } /** * Shake element back and fourth a few times as if to say, "Nope!" */ export declare class RevStandardShakerCellEffect extends RevStandardCellEffect { private duration; private transitions; private position; private x; private dx; private shakes; constructor(el: HTMLElement, options?: RevStandardShakerCellEffect.Options); start(): void; destroy(): void; shake(event?: TransitionEvent): void; private _transitionendListener; } export declare namespace RevStandardShakerCellEffect { const typeName = "shaker"; const duration = "0.065s"; export interface Options extends RevStandardCellEffect.Options { duration: string; } } /** * Renders a slider button. * Currently however the user cannot interact with it. * @public */ export declare class RevStandardSliderCellPainter extends RevStandardCellPainter { config: RevStandardSliderCellPainter.Config; paint(_cell: RevViewCell, _prefillColor: string | undefined): number | undefined; } /** @public */ export declare namespace RevStandardSliderCellPainter { const typeName = "Slider"; export interface Config { value: number; bounds: RevRectangle; backgroundColor: string; isSelected: boolean; } } /** @public */ export declare class RevStandardSourcedFieldCustomHeadingsService implements RevSourcedFieldCustomHeadings { private saveRequired; private sourceMap; tryGetFieldHeading(sourceName: string, fieldName: string): string | undefined; setFieldHeading(sourceName: string, fieldName: string, text: string): void; load(): void; checkSave(): void; save(): void; private loadSource; private saveSource; } /** * Renders a bar chart sparkline, hence the name. * @public */ export declare class RevStandardSparkBarCellPainter extends RevStandardCellPainter { config: RevStandardSparkBarCellPainter.Config; paint(_cell: RevViewCell, _prefillColor: string | undefined): number | undefined; } /** @public */ export declare namespace RevStandardSparkBarCellPainter { const typeName = "SparkBar"; export interface Config { value: number[]; bounds: RevRectangle; backgroundColor: string; isSelected: boolean; foregroundSelectionColor: string; color: string; } } /** * Renders a sparkline. * {@link http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR|Edward Tufte sparkline} * @public */ export declare class RevStandardSparkLineCellPainter extends RevStandardCellPainter { config: RevStandardSparkLineCellPainter.Config; paint(_cell: RevViewCell, _prefillColor: string | undefined): number | undefined; } /** @public */ export declare namespace RevStandardSparkLineCellPainter { const typeName = "SparkLine"; export interface Config { value: number[]; bounds: RevRectangle; backgroundColor: string; isSelected: boolean; backgroundSelectionColor: string; foregroundSelectionColor: string; color: string; } } /** @public */ export declare class RevStandardTableFieldSourceDefinitionCachingFactoryService { readonly definitionFactory: RevTableFieldSourceDefinitionFactory; private readonly _definitionsByTypeId; private readonly _definitionsByName; constructor(definitionFactory: RevTableFieldSourceDefinitionFactory); get(typeId: TypeId): RevTableFieldSourceDefinition; createLayoutDefinition(fieldIds: RevTableFieldSourceDefinition.FieldId[]): RevColumnLayoutDefinition; } /* Excluded from this release type: RevStandardTagCellPainter */ /** @public */ export declare class RevStandardTextInputCellEditor extends RevStandardInputElementCellEditor { constructor(grid: RevClientGrid, dataServer: RevDataServer); tryOpenCell(cell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, _openingClickEvent: MouseEvent | undefined): boolean; closeCell(field: SF, dataServerRowIndex: number, cancel: boolean): void; } /** @public */ export declare class RevStandardTextPainter { private readonly _renderingContext; protected _columnSettings: RevStandardTextPainter.ColumnSettings; constructor(_renderingContext: RevCachedCanvasRenderingContext2D); setColumnSettings(value: RevStandardTextPainter.ColumnSettings): void; renderMultiLineText(bounds: RevRectangle, text: string, leftPadding: number, rightPadding: number, horizontalAlignId: RevHorizontalAlignId, font: string): number; /** * Renders single line text. * @param text - The text to render in the cell. */ renderSingleLineText(bounds: RevRectangle, text: string, leftPadding: number, rightPadding: number, horizontalAlignId: RevHorizontalAlignId): number; protected findLines(words: string[], width: number): string[]; protected strikeThrough(text: string, x: number, y: number, thickness: number): void; protected underline(text: string, font: string, x: number, y: number, thickness: number): void; protected decorateText(): void; /** * Similar to `getTextWidth` except: * 1. Aborts accumulating when sum exceeds given `width`. * 2. Returns an object containing both the truncated string and the sum (rather than a number primitive containing the sum alone). * @param text - Text to measure. * @param width - Width of target cell; overflow point. * @param truncateType - Type of truncation to apply if text does not fit within `width`. * @param abort - Abort measuring upon overflow. Returned `width` sum will reflect truncated string rather than untruncated string. Note that returned `string` is truncated in either case. * @param truncateFromStart - by default it will truncate the string from the position 0 */ private measureAndTruncateText; } /** @public */ export declare namespace RevStandardTextPainter { const Whitespace: RegExp; const Ellipsis = "\u2026"; export interface TruncatedTextWidth { /** `undefined` if it fits; truncated version of provided `string` if it does not. */ text: string | undefined; /** Width of provided `text` if it fits; width of truncated string if it does not. */ width: number; } export interface ClientColumnSettings { defaultColumnAutoSizing: boolean; } export interface OnlyColumnSettings { verticalOffset: number; textTruncateTypeId: RevTextTruncateTypeId | undefined; textStrikeThrough: boolean; } export interface ColumnSettings extends ClientColumnSettings, OnlyColumnSettings { } } /** @public */ export declare class RevStandardToggleClickBoxCellEditor extends RevStandardPaintCellEditor { protected _painter: RevClickBoxCellPainter; tryOpenCell(cell: RevViewCell, openingKeyDownEvent: KeyboardEvent | undefined, openingClickEvent: MouseEvent | undefined): boolean; closeCell(_schemaColumn: SF, _dataServerRowIndex: number, _cancel: boolean): void; processGridKeyDownEvent(event: KeyboardEvent, _fromEditor: boolean, field: SF, dataServerRowIndex: number): boolean; processGridClickEvent(event: MouseEvent, viewCell: RevViewCell): boolean; processGridPointerMoveEvent(event: PointerEvent, viewCell: RevViewCell): RevCellEditor.MouseActionPossible | undefined; } /** @public */ export declare interface RevStartLength { readonly start: number; readonly length: number; } /** @public */ export declare namespace RevStartLength { export function createFromInclusiveFirstLast(first: number, last: number): RevStartLength; export function ensureLengthIsNotNegative(startLength: RevStartLength): RevStartLength; } /** @public */ export declare interface RevSubgrid { readonly schemaServer: RevSchemaServer; readonly dataServer: RevDataServer; readonly metaServer: RevMetaServer | undefined; /** Only valid if {@link viewRowCount} \> 0 */ readonly firstViewRowIndex: number; /** Only valid if {@link viewRowCount} \> 0 */ readonly firstViewableSubgridRowIndex: number; /** Number of Subgrid rows visible in viewport */ readonly viewRowCount: number; readonly role: RevSubgrid.Role; readonly isMain: boolean; readonly isHeader: boolean; readonly isFilter: boolean; readonly isSummary: boolean; readonly isFooter: boolean; readonly focusable: boolean; readonly selectable: boolean; readonly scrollable: boolean; readonly rowHeightsCanDiffer: boolean; readonly fixedRowCount: number; getCellPainterEventer: RevSubgrid.GetCellPainterEventer; isRowFixed(subgridRowIndex: number): boolean; getRowCount(): number; getSingletonViewDataRow(subgridRowIndex: number): RevDataServer.ViewRow; getDefaultRowHeight(): number; getRowMetadata(subgridRowIndex: number): RevMetaServer.RowMetadata | undefined; setRowMetadata(subgridRowIndex: number, newMetadata: RevMetaServer.RowMetadata | undefined): void; getRowProperties(subgridRowIndex: number): RevMetaServer.RowProperties | undefined; setRowProperties(subgridRowIndex: number, properties: RevMetaServer.RowProperties | undefined): boolean; getRowProperty(subgridRowIndex: number, key: string): unknown | undefined; getRowHeight(subgridRowIndex: number): number; setRowProperty(subgridRowIndex: number, key: string, isHeight: boolean, value: unknown): boolean; getViewValue(column: RevColumn, subgridRowIndex: number): RevDataServer.ViewValue; getViewValueFromDataRowAtColumn(dataRow: RevDataServer.ViewRow, column: RevColumn): RevDataServer.ViewValue; generateAllRowIndicesArray(): number[]; } /** @public */ export declare namespace RevSubgrid { export type GetCellPainterEventer = (this: void, viewCell: RevViewCell) => RevCellPainter; export interface Definition { /** defaults to main */ role?: RevSubgrid.Role; dataServer: RevDataServer | RevDataServer.Constructor; metaServer?: RevMetaServer | RevMetaServer.Constructor; focusable?: boolean; selectable?: boolean; defaultRowHeight?: number; rowPropertiesCanSpecifyRowHeight?: boolean; rowPropertiesPrototype?: RevMetaServer.RowPropertiesPrototype; getCellPainterEventer: GetCellPainterEventer; } export type Role = typeof Role.header | typeof Role.filter | typeof Role.main | typeof Role.summary | typeof Role.footer; export namespace Role { const header = "header"; const filter = "filter"; const main = "main"; const summary = "summary"; const footer = "footer"; const defaultRole = "main"; export function gridOrderCompare(left: Role | undefined, right: Role | undefined): number; } } /* Excluded from this release type: RevSubgridImplementation */ export declare class RevSubgridSelectionRangeList extends RevSelectionRangeList { readonly subgrid: RevSubgrid; constructor(subgrid: RevSubgrid); } /** * Manages all subgrids within the grid component. * * @typeParam BCS - Type of the column settings. * @typeParam SF - Type of the schema field. * * @see [Subgrids Manager Component πŸ—Ž](../../../../../Architecture/Client/Components/Subgrids_Manager/) * @public */ export declare class RevSubgridsManager implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _columnsManager */ readonly subgrids: RevSubgrid[]; readonly mainSubgrid: RevMainSubgrid; readonly headerSubgrid: RevSubgrid | undefined; readonly filterSubgrid: RevSubgrid | undefined; readonly summarySubgrid: RevSubgrid | undefined; readonly footerSubgrid: RevSubgrid | undefined; readonly mainDataServer: RevDataServer; /* Excluded from this release type: subgridImplementations */ /* Excluded from this release type: _handledSubgrids */ /* Excluded from this release type: __constructor */ /* Excluded from this release type: destroy */ getSubgridWithDataServer(dataServer: RevDataServer): RevSubgrid; /* Excluded from this release type: getSubgridImplementationWithDataServer */ /* Excluded from this release type: getSubgridByHandle */ calculateRowCount(): number; calculatePreMainRowCount(): number; calculatePreMainHeight(): number; calculatePreMainPlusFixedRowCount(): number; calculatePreMainPlusFixedRowsHeight(): number; calculatePreMainPlusFixedRowCountAndHeight(): RevSubgridsManager.CountAndHeight; calculatePostMainRowCount(): number; calculatePostMainHeight(): number; calculatePostMainAndFooterHeights(): RevSubgridsManager.PostMainAndFooterHeights; calculateSummariesFootersHeights(): RevSubgridsManager.SummariesFootersHeights; calculatePrePostMainRowcount(): number; calculateFootersHeight(): number; /** * Gets the total number of rows across all subgrids. */ getAllRowCount(): number; /* Excluded from this release type: createSubgridFromDefinition */ /* Excluded from this release type: createSubgrid */ /* Excluded from this release type: destroySubgrids */ } /** @public */ export declare namespace RevSubgridsManager { export interface CountAndHeight { count: number; height: number; } export interface SummariesFootersHeights { summariesHeight: number; footersHeight: number; summariesPlusFootersHeight: number; } export interface PostMainAndFooterHeights { allPostMainSubgridsHeight: number; footersHeight: number; } } /** @public */ export declare class RevSymbolTableGrid extends RevTableGrid { } /** @public */ export declare class RevTable { readonly recordSource: RevTableRecordSource; private readonly _correctnessState; private _records; private _beenUsable; private _correctnessStateUsableChangedSubscriptionId; private _recordSourceBadnessChangedSubscriptionId; private _recordSourceListChangeSubscriptionId; private _recordSourceAfterRecDefinitionChangeSubscriptionId; private _recordSourceBeforeRecDefinitionChangeSubscriptionId; private _fieldsChangedMultiEvent; private _openMultiEvent; private _openChangeMultiEvent; private _recordsLoadedMultiEvent; private _recordsInsertedMultiEvent; private _recordsReplacedMultiEvent; private _recordsMovedMultiEvent; private _recordsSplicedMultiEvent; private _recordsDeletedMultiEvent; private _allRecordsDeletedMultiEvent; private _recordValuesChangedMultiEvent; private _recordSequentialFieldValuesChangedMultiEvent; private _recordChangedMultiEvent; private _layoutChangedMultiEvent; private _recordDisplayOrderChangedMultiEvent; private _firstUsableMultiEvent; private _recordDisplayOrderSetMultiEvent; constructor(recordSource: RevTableRecordSource, _correctnessState: CorrectnessState, initialActiveFieldSources: readonly TableFieldSourceDefinitionTypeId[]); get usable(): boolean; get badness(): Badness; get fields(): readonly RevTableField[]; get recordCount(): number; get records(): readonly RevTableRecord[]; get beenUsable(): boolean; setActiveFieldSources(fieldSourceTypeIds: readonly TableFieldSourceDefinitionTypeId[], suppressGridSchemaUpdate: boolean): void; createAllowedFields(): readonly RevAllowedRecordSourcedField[]; open(opener: NamedOpener): void; close(opener: NamedOpener): void; getRecord(idx: Integer): RevTableRecord; createRecordDefinition(index: Integer): RevTableRecordDefinition; findRecord(recordDefinition: RevTableRecordDefinition): Integer | undefined; clearRendering(): void; subscribeUsableChangedEvent(handler: CorrectnessState.UsableChangedEventHandler): MultiEvent.SubscriptionId; unsubscribeUsableChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeBadnessChangedEvent(handler: CorrectnessState.BadnessChangedEventHandler): MultiEvent.SubscriptionId; unsubscribeBadnessChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeFieldsChangedEvent(handler: RevTable.FieldsChangedEventHandler): number; unsubscribeFieldsChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeOpenEvent(handler: RevTable.OpenEventHandler): number; unsubscribeOpenEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeOpenChangeEvent(handler: RevTable.OpenChangeEventHandler): number; unsubscribeOpenChangeEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordsLoadedEvent(handler: RevTable.RecordsLoadedEventHandler): number; unsubscribeRecordsLoadedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordsInsertedEvent(handler: RevTable.RecordsInsertedEventHandler): number; unsubscribeRecordsInsertedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordsReplacedEvent(handler: RevTable.RecordsReplacedEventHandler): number; unsubscribeRecordsReplacedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordsMovedEvent(handler: RevTable.RecordsMovedEventHandler): number; unsubscribeRecordsMovedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordsSplicedEvent(handler: RevTable.RecordsSplicedEventHandler): number; unsubscribeRecordsSplicedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordsDeletedEvent(handler: RevTable.RecordsDeletedEventHandler): number; unsubscribeRecordsDeletedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeAllRecordsDeletedEvent(handler: RevTable.AllRecordsDeletedEventHandler): number; unsubscribeAllRecordsDeletedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordValuesChangedEvent(handler: RevTable.RecordValuesChangedEventHandler): number; unsubscribeRecordValuesChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordSequentialFieldValuesChangedEvent(handler: RevTable.RecordSequentialFieldValuesChangedEventHandler): number; unsubscribeRecordSequentialFieldValuesChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordChangedEvent(handler: RevTable.RecordChangedEventHandler): number; unsubscribeRecordChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeLayoutChangedEvent(handler: RevTable.LayoutChangedEventHandler): number; unsubscribeLayoutChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordDisplayOrderChangedEvent(handler: RevTable.RecordDisplayOrderChangedEventHandler): number; unsubscribeRecordDisplayOrderChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeFirstUsableEvent(handler: RevTable.FirstUsableEventHandler): number; unsubscribeFirstUsableEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeRecordDisplayOrderSetEvent(handler: RevTable.RecordDisplayOrderSetEventHandler): number; unsubscribeRecordDisplayOrderSetEvent(subscriptionId: MultiEvent.SubscriptionId): void; private processUsableChanged; private handleRecordSourceBadnessChangedEvent; private handleRecordSourceListChangeEvent; private handleRecordDefinitionListBeforeRecDefinitionChangeEvent; private handleRecordDefinitionListAfterRecDefinitionChangeEvent; private handleRecordBecomeIncubatedEvent; private notifyFieldsChanged; private notifyOpen; private notifyOpenChange; private notifyRecordsLoaded; private notifyRecordsInserted; private notifyRecordsReplaced; private notifyRecordsMoved; private notifyRecordsSpliced; private notifyRecordsDeleted; private notifyAllRecordsDeleted; private notifyRecordValuesChanged; private notifyRecordSequentialFieldValuesChanged; private notifyRecordChanged; private notifyLayoutChange; private notifyRecordDisplayOrderChanged; private notifyFirstUsable; private notifyRecordDisplayOrderSet; private processRecordSourceListChange; private haveAllRecordsBeenIncubated; private isFieldSourcesArrayEqual; private createRecord; private insertRecords; private replaceAllRecords; private deactivateRecords; private replaceRecords; private moveRecords; private deleteRecords; private clearRecords; private reindexRecordRange; private updateAllRecordValues; } /** @public */ export declare namespace RevTable { export type FieldsChangedEventHandler = (this: void, suppressGridSchemaUpdate: boolean) => void; export namespace JsonTag { const id = "id"; const name = "name"; const source = "source"; const layout = "layout"; const columns = "columns"; const column = "column"; const orderedRecordDefinitions = "orderedRecordDefinitions"; const orderedRecordDefinition = "orderedRecordDefinition"; export namespace SerialisedColumn { const name = "name"; const show = "show"; const width = "width"; const priority = "priority"; const ascending = "ascending"; } } export interface RecordUsageRec { record: RevTableRecord; used: boolean; } export type ExclusiveUnlockedEventer = (this: void) => void; export type OpenEventHandler = (this: void, recordDefinitionList: RevTableRecordSource) => void; export type OpenChangeEventHandler = (this: void, opened: boolean) => void; export type BadnessChangedEventHandler = (this: void) => void; export type RecordsLoadedEventHandler = (this: void) => void; export type RecordsInsertedEventHandler = (this: void, index: Integer, count: Integer) => void; export type RecordsReplacedEventHandler = (this: void, index: Integer, count: Integer) => void; export type RecordsMovedEventHandler = (this: void, fromIndex: Integer, toIndex: Integer, count: Integer) => void; export type RecordsSplicedEventHandler = (this: void, index: Integer, count: Integer) => void; export type RecordsDeletedEventHandler = (this: void, index: Integer, count: Integer) => void; export type AllRecordsDeletedEventHandler = (this: void) => void; export type RecordValuesChangedEventHandler = (this: void, recordIdx: Integer, invalidatedValues: RevRecordInvalidatedValue[]) => void; export type RecordSequentialFieldValuesChangedEventHandler = (this: void, recordIdx: Integer, fieldIdx: Integer, fieldCount: Integer) => void; export type RecordChangedEventHandler = (this: void, recordIdx: Integer) => void; export type LayoutChangedEventHandler = (this: void, initiator: NamedOpener) => void; export type RecordDisplayOrderChangedEventHandler = (this: void, initiator: NamedOpener) => void; export type FirstUsableEventHandler = (this: void) => void; export type RecordDisplayOrderSetEventHandler = (this: void, recordIndices: Integer[]) => void; } /** @public */ export declare abstract class RevTableField extends RevRecordSourcedField { protected readonly _textFormatter: RevTextFormatter; private _valueTypeId; constructor(_textFormatter: RevTextFormatter, definition: RevTableField.Definition, heading: string); get valueTypeId(): TextFormattableValueTypeId; compare(left: RevTableValuesRecord, right: RevTableValuesRecord): number; compareDesc(left: RevTableValuesRecord, right: RevTableValuesRecord): number; getViewValue(record: RevTableValuesRecord): RevTextFormattableValue; protected setValueTypeId(value: TextFormattableValueTypeId): void; protected compareUndefinedToDefinedField(definedValue: RevTableValue): number; protected abstract compareDefined(left: RevTableValue, right: RevTableValue): number; } /** @public */ export declare namespace RevTableField { export class Definition extends RevRecordSourcedFieldDefinition { readonly gridFieldConstructor: RevTableField.Constructor; readonly gridValueConstructor: RevTableValue.Constructor; constructor(sourceDefinition: RevSourcedFieldSourceDefinition, sourcelessName: string, defaultHeading: string, defaultTextAlignId: RevHorizontalAlignId, gridFieldConstructor: RevTableField.Constructor, gridValueConstructor: RevTableValue.Constructor); } export type Constructor = new (textFormatter: RevTextFormatter, definition: RevTableField.Definition, heading: string, index: Integer) => RevTableField; } /** @public */ export declare class RevTableFieldSource { private readonly _textFormatter; private readonly _customHeadings; readonly definition: RevTableFieldSourceDefinition; private _headingPrefix; fieldIndexOffset: Integer; nextFieldIndexOffset: Integer; constructor(_textFormatter: RevTextFormatter, _customHeadings: RevSourcedFieldCustomHeadings | undefined, definition: RevTableFieldSourceDefinition, _headingPrefix: string); get name(): string; get fieldCount(): Integer; createTableFields(): RevTableField[]; } /** @public */ export declare abstract class RevTableFieldSourceDefinition extends RevRecordSourcedFieldSourceDefinition { readonly typeId: TypeId; readonly fieldDefinitions: RevTableField.Definition[]; constructor(typeId: TypeId, name: string); get fieldCount(): Integer; getFieldName(idx: Integer): string; findFieldByName(name: string): Integer | undefined; encodeFieldName(sourcelessFieldName: string): string; abstract getFieldNameById(id: number): string; } /** @public */ export declare namespace RevTableFieldSourceDefinition { export type TableFieldValueConstructors = [ field: RevTableField.Constructor, value: RevTableValue.Constructor ]; export type TableGridConstructors = [ RevTableField.Constructor, RevTableValue.Constructor ]; export interface FieldName { readonly sourceTypeId: TypeId; readonly sourcelessName: string; } export interface FieldId { sourceTypeId: TypeId; id: number; } } /** @public */ export declare interface RevTableFieldSourceDefinitionCachingFactory { readonly definitionFactory: RevTableFieldSourceDefinitionFactory; get(typeId: TypeId): RevTableFieldSourceDefinition; createLayoutDefinition(fieldIds: RevTableFieldSourceDefinition.FieldId[]): RevColumnLayoutDefinition; } /** @public */ export declare interface RevTableFieldSourceDefinitionFactory { create(typeId: TypeId): RevTableFieldSourceDefinition; tryNameToId(name: string): TypeId | undefined; } /** @public */ export declare class RevTableGrid extends RevRecordSourcedFieldGrid> { private readonly _referenceableColumnLayouts; readonly tableFieldSourceDefinitionCachingFactory: RevTableFieldSourceDefinitionCachingFactory; readonly tableRecordSourceDefinitionFromJsonFactory: RevTableRecordSourceDefinitionFromJsonFactory; private readonly _referenceableDataSources; private readonly _tableRecordSourceFactory; readonly recordStore: RevTableRecordStore; opener: LockOpenListItem.Opener; keepPreviousLayoutIfPossible: boolean; keptColumnLayoutOrReferenceDefinition: RevColumnLayoutOrReferenceDefinition | undefined; openedEventer: RevTableGrid.OpenedEventer | undefined; columnLayoutSetEventer: RevTableGrid.ColumnLayoutSetEventer | undefined; private _lockedDataSourceOrReference; private _openedDataSource; private _openedTable; private _keptRowOrderDefinition; private _keptGridRowAnchor; private _autoSizeAllColumnWidthsOnFirstUsable; private _tableFieldsChangedSubscriptionId; private _tableFirstUsableSubscriptionId; private _dataSourceColumnLayoutSetSubscriptionId; constructor(_referenceableColumnLayouts: RevReferenceableColumnLayouts | undefined, tableFieldSourceDefinitionCachingFactory: RevTableFieldSourceDefinitionCachingFactory, tableRecordSourceDefinitionFromJsonFactory: RevTableRecordSourceDefinitionFromJsonFactory, _referenceableDataSources: RevReferenceableDataSources | undefined, _tableRecordSourceFactory: RevTableRecordSourceFactory, canvasElement: HTMLCanvasElement, definition: RevGridDefinition>, settings: BGS, getSettingsForNewColumnEventer: RevClientGrid.GetSettingsForNewColumnEventer>, options?: RevGridOptions>); get recordCount(): Integer; get opened(): boolean; get openedTable(): RevTable; get openedRecordSource(): RevTableRecordSource; get badness(): Badness; tryOpenDataSource(definition: RevDataSourceOrReferenceDefinition, keepView: boolean): Promise, RevDataSourceOrReference.LockErrorIdPlusTryError>>; closeDataSource(keepView: boolean): void; createDataSourceOrReferenceDefinition(): RevDataSourceOrReferenceDefinition; createColumnLayoutOrReferenceDefinition(): RevColumnLayoutOrReferenceDefinition; createTableRecordSourceDefinition(): RevTableRecordSourceDefinition; tryOpenColumnLayoutOrReferenceDefinition(columnLayoutOrReferenceDefinition: RevColumnLayoutOrReferenceDefinition): Promise>; applyColumnLayoutOrReferenceDefinition(definition: RevColumnLayoutOrReferenceDefinition): void; createRecordDefinition(index: Integer): RevTableRecordDefinition; canCreateAllowedSourcedFieldsColumnLayoutDefinition(): boolean; clearRendering(): void; subscribeBadnessChangedEvent(handler: CorrectnessState.BadnessChangedEventHandler): MultiEvent.SubscriptionId; unsubscribeBadnessChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; createAllowedSourcedFieldsColumnLayoutDefinition(): RevAllowedRecordSourcedFieldsColumnLayoutDefinition; private applyFirstUsableFromLayout; private handleDataSourceColumnLayoutSetEvent; private notifyOpened; private notifyColumnLayoutSet; } /** @public */ export declare namespace RevTableGrid { export type OpenedEventer = (this: void) => void; export type ColumnLayoutSetEventer = (this: void, layout: RevColumnLayout) => void; } /** @public */ export declare class RevTableRecord extends RevTableValuesRecord { private _sources; private _fieldCount; private _beenIncubated; private _beginValuesChangeCount; private readonly _valuesChangedEvent; private readonly _sequentialFieldValuesChangedEvent; private readonly _recordChangedEvent; constructor(index: Integer, eventHandlers: RevTableRecord.EventHandlers); get fieldCount(): number; activate(): void; deactivate(): void; addSource(source: RevTableValueSource): void; updateAllValues(): void; getAllValues(): RevTableValue[]; clearRendering(): void; private handleBecomeIncubatedEvent; private handleSourceValueChangesEvent; private handleSourceAllValuesChangeEvent; private calculateBeenIncubated; } /** @public */ export declare namespace RevTableRecord { export type ValueChange = RevTableValueSource.ValueChange; export type ValuesChangedEventHandler = (this: void, recordIdx: Integer, invalidatedValues: RevRecordInvalidatedValue[]) => void; export type SequentialFieldValuesChangedEventHandler = (this: void, recordIdx: Integer, fieldIdx: Integer, fieldCount: Integer) => void; export type RecordChangedEventHandler = (this: void, recordIdx: Integer) => void; export interface EventHandlers { readonly valuesChanged: ValuesChangedEventHandler; readonly sequentialfieldValuesChanged: SequentialFieldValuesChangedEventHandler; readonly recordChanged: RecordChangedEventHandler; } } /** @public */ export declare interface RevTableRecordDefinition extends RevRecordDefinition { readonly typeId: TableFieldSourceDefinitionTypeId; } /** @public */ export declare namespace RevTableRecordDefinition { export function same(left: RevTableRecordDefinition, right: RevTableRecordDefinition): boolean; } /** @public */ export declare abstract class RevTableRecordSource implements CorrectnessState { readonly textFormatter: RevTextFormatter; readonly customHeadings: RevSourcedFieldCustomHeadings | undefined; readonly tableFieldSourceDefinitionCachingFactory: RevTableFieldSourceDefinitionCachingFactory; protected readonly _correctnessState: CorrectnessState; protected readonly _definition: RevTableRecordSourceDefinition; readonly allowedFieldSourceDefinitionTypeIds: readonly TableFieldSourceDefinitionTypeId[]; private _activeFieldSources; private _fields; private _opened; private _listChangeMultiEvent; private _beforeRecDefinitionChangeMultiEvent; private _afterRecDefinitionChangeMultiEvent; constructor(textFormatter: RevTextFormatter, customHeadings: RevSourcedFieldCustomHeadings | undefined, tableFieldSourceDefinitionCachingFactory: RevTableFieldSourceDefinitionCachingFactory, _correctnessState: CorrectnessState, _definition: RevTableRecordSourceDefinition, allowedFieldSourceDefinitionTypeIds: readonly TableFieldSourceDefinitionTypeId[]); get usable(): boolean; get badness(): Badness; get opened(): boolean; get activeFieldSources(): readonly RevTableFieldSource[]; get fields(): readonly RevTableField[]; get count(): Integer; get AsArray(): RevTableRecordDefinition[]; finalise(): void; tryLock(_locker: NamedLocker): Promise>; unlock(_locker: NamedLocker): void; openLocked(_opener: NamedOpener): void; closeLocked(_opener: NamedOpener): void; setUsable(badness: Badness): void; setUnusable(badness: Badness): void; checkSetUnusable(badness: Badness): void; createAllowedFields(): readonly RevAllowedRecordSourcedField[]; setActiveFieldSources(fieldSourceTypeIds: readonly TableFieldSourceDefinitionTypeId[]): void; indexOf(value: RevTableRecordDefinition): Integer; subscribeUsableChangedEvent(handler: CorrectnessState.UsableChangedEventHandler): MultiEvent.SubscriptionId; unsubscribeUsableChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeBadnessChangedEvent(handler: CorrectnessState.BadnessChangedEventHandler): MultiEvent.SubscriptionId; unsubscribeBadnessChangedEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeListChangeEvent(handler: RevTableRecordSource.ListChangeEventHandler): number; unsubscribeListChangeEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeBeforeRecDefinitionChangeEvent(handler: RevTableRecordSource.RecDefinitionChangeEventHandler): number; unsubscribeBeforeRecDefinitionChangeEvent(subscriptionId: MultiEvent.SubscriptionId): void; subscribeAfterRecDefinitionChangeEvent(handler: RevTableRecordSource.RecDefinitionChangeEventHandler): number; unsubscribeAfterRecDefinitionChangeEvent(subscriptionId: MultiEvent.SubscriptionId): void; protected notifyListChange(listChangeTypeId: UsableListChangeTypeId, recIdx: Integer, recCount: Integer): void; protected checkUsableNotifyListChange(listChangeTypeId: UsableListChangeTypeId, recIdx: Integer, recCount: Integer): void; protected notifyBeforeRecDefinitionChange(recIdx: Integer): void; protected notifyAfterRecDefinitionChange(recIdx: Integer): void; protected createFields(): RevTableField[]; protected getAsArray(): RevTableRecordDefinition[]; private createActiveSources; private createFieldSource; abstract createDefinition(): RevTableRecordSourceDefinition; abstract createTableRecord(recordIndex: Integer, eventHandlers: RevTableRecord.EventHandlers): RevTableRecord; abstract createRecordDefinition(recordIdx: Integer): RevTableRecordDefinition; protected abstract getCount(): Integer; protected abstract getDefaultFieldSourceDefinitionTypeIds(): TableFieldSourceDefinitionTypeId[]; } /** @public */ export declare namespace RevTableRecordSource { export type FactoryClosure = (this: void, definition: RevTableRecordSourceDefinition) => RevTableRecordSource; export type ListChangeEventHandler = (this: void, listChangeTypeId: UsableListChangeTypeId, itemIdx: Integer, itemCount: Integer) => void; export type RecDefinitionChangeEventHandler = (this: void, itemIdx: Integer) => void; export type badnessChangedEventHandler = (this: void) => void; export type ModifiedEventHandler = (this: void, list: RevTableRecordSource) => void; export type RequestIsGroupSaveEnabledEventHandler = (this: void) => boolean; } /** @public */ export declare abstract class RevTableRecordSourceDefinition { readonly customHeadings: RevSourcedFieldCustomHeadings | undefined; readonly tableFieldSourceDefinitionCachingFactory: RevTableFieldSourceDefinitionCachingFactory; readonly typeId: TypeId; readonly name: string; readonly allowedFieldSourceDefinitionTypeIds: readonly TableFieldSourceDefinitionTypeId[]; constructor(customHeadings: RevSourcedFieldCustomHeadings | undefined, tableFieldSourceDefinitionCachingFactory: RevTableFieldSourceDefinitionCachingFactory, typeId: TypeId, name: string, allowedFieldSourceDefinitionTypeIds: readonly TableFieldSourceDefinitionTypeId[]); createAllowedFields(): readonly RevAllowedRecordSourcedField[]; saveToJson(element: JsonElement): void; abstract createDefaultLayoutDefinition(): RevColumnLayoutDefinition; } /** @public */ export declare namespace RevTableRecordSourceDefinition { const jsonTag_TypeId = "recordSourceDefinitionTypeId"; export function tryGetTypeIdNameFromJson(element: JsonElement): Result; } /** @public */ export declare interface RevTableRecordSourceDefinitionFromJsonFactory { tryCreateFromJson(element: JsonElement): Result>; } /** @public */ export declare interface RevTableRecordSourceFactory { create(definition: RevTableRecordSourceDefinition): RevTableRecordSource; createCorrectnessState(): CorrectnessState; } /** @public */ export declare class RevTableRecordStore implements RevRecordStore { private _table; private _recordsEventers; private _allRecordsDeletedSubscriptionId; private _recordsLoadedSubscriptionId; private _recordsInsertedSubscriptionId; private _recordsReplacedSubscriptionId; private _recordsMovedSubscriptionId; private _recordsDeletedSubscriptionId; private _recordValuesChangedSubscriptionId; private _recordSequentialFieldValuesChangedSubscriptionId; private _recordChangedSubscriptionId; get table(): RevTable | undefined; get recordCount(): Integer; setTable(value: RevTable): void; setRecordEventers(recordsEventers: RevRecordStore.RecordsEventers): void; getRecord(index: number): IndexedRecord; getRecords(): readonly IndexedRecord[]; beginChange(): void; endChange(): void; recordsLoaded(): void; recordsInserted(index: Integer, count: Integer): void; recordsDeleted(index: Integer, count: Integer): void; allRecordsDeleted(): void; invalidateRecordValues(recordIndex: RevRecordIndex, invalidatedValues: readonly RevRecordInvalidatedValue[]): void; invalidateRecordFields(recordIndex: RevRecordIndex, fieldIndex: RevRecordFieldIndex, fieldCount: Integer): void; invalidateRecord(recordIndex: RevRecordIndex): void; private bindTable; private unbindTable; } /** @public */ export declare abstract class RevTableValue { private _textFormattableValue; private _renderAttributes; get textFormattableValue(): RevTextFormattableValue; clearRendering(): void; hasRenderAttribute(value: RevTextFormattableValue.Attribute): boolean; addRenderAttribute(value: RevTextFormattableValue.Attribute): void; removeRenderAttribute(value: RevTextFormattableValue.Attribute): void; addOrRemoveRenderAttribute(value: RevTextFormattableValue.Attribute, add: boolean): void; setRenderAttributes(value: readonly RevTextFormattableValue.Attribute[]): void; abstract isUndefined(): boolean; protected abstract createTextFormattableValue(): RevTextFormattableValue; } /** @public */ export declare namespace RevTableValue { export type Constructor = new () => RevTableValue; } /** @public */ export declare abstract class RevTableValueSource { private readonly _firstFieldIndexOffset; valueChangesEvent: RevTableValueSource.ValueChangesEvent; allValuesChangeEvent: RevTableValueSource.AllValuesChangeEvent; becomeIncubatedEventer: RevTableValueSource.BecomeIncubatedEventer; protected _beenIncubated: boolean; constructor(_firstFieldIndexOffset: Integer); get beenIncubated(): boolean; get fieldCount(): number; get firstFieldIndexOffset(): number; protected notifyValueChangesEvent(valueChanges: RevTableValueSource.ValueChange[]): void; protected notifyAllValuesChangeEvent(newValues: RevTableValue[]): void; protected initialiseBeenIncubated(value: boolean): void; protected processDataCorrectnessChanged(allValues: RevTableValue[], incubated: boolean): void; private checkNotifyBecameIncubated; abstract activate(): RevTableValue[]; abstract deactivate(): void; abstract getAllValues(): RevTableValue[]; protected abstract getfieldCount(): Integer; } /** @public */ export declare namespace RevTableValueSource { export interface ChangedValue { fieldIdx: Integer; newValue: RevTableValue; } export interface ValueChange { fieldIndex: Integer; newValue: RevTableValue; recentChangeTypeId: RevRecordValueRecentChangeTypeId | undefined; } export namespace ValueChange { export function arrayIncludesFieldIndex(array: readonly ValueChange[], fieldIndex: Integer, end: Integer): boolean; } export type BeginValuesChangeEvent = (this: void) => void; export type EndValuesChangeEvent = (this: void) => void; export type ValueChangesEvent = (valueChanges: ValueChange[]) => void; export type AllValuesChangeEvent = (firstFieldIdxOffset: Integer, newValues: RevTableValue[]) => void; export type BecomeIncubatedEventer = (this: void) => void; export type Constructor = new (firstFieldIdxOffset: Integer, recordIdx: Integer) => RevTableValueSource; } /** @public */ export declare class RevTableValuesRecord implements IndexedRecord { index: Integer; protected _values: RevTableValue[]; constructor(index: Integer); get values(): readonly RevTableValue[]; } /** @public */ export declare interface RevTextFormattableValue { readonly typeId: TypeId; readonly attributes: readonly RevTextFormattableValue.Attribute[]; hasAttribute(value: RevTextFormattableValue.Attribute): boolean; addAttribute(value: RevTextFormattableValue.Attribute): void; removeAttribute(value: RevTextFormattableValue.Attribute): void; addOrRemoveAttribute(value: RevTextFormattableValue.Attribute, add: boolean): void; setAttributes(value: RevTextFormattableValue.Attribute[]): void; isUndefined(): boolean; } /** @public */ export declare namespace RevTextFormattableValue { export interface Attribute { readonly typeId: TypeId; } } /** @public */ export declare interface RevTextFormatter { format(value: RevTextFormattableValue): string; } /** @public */ export declare type RevTextTruncateType = typeof RevTextTruncateType.withEllipsis | typeof RevTextTruncateType.beforeLastPartiallyVisibleCharacter | typeof RevTextTruncateType.afterLastPartiallyVisibleCharacter; /** @public */ export declare namespace RevTextTruncateType { export type Id = RevTextTruncateTypeId; const withEllipsis = "withEllipsis"; const beforeLastPartiallyVisibleCharacter = "beforeLastPartiallyVisibleCharacter"; const afterLastPartiallyVisibleCharacter = "afterLastPartiallyVisibleCharacter"; export function tryToId(value: RevTextTruncateType): Id | undefined; export function toId(value: RevTextTruncateType, noMatchFallbackId?: Id): Id; } /** @public */ export declare const enum RevTextTruncateTypeId { WithEllipsis = 0, BeforeLastPartiallyVisibleCharacter = 1, AfterLastPartiallyVisibleCharacter = 2 } /* Excluded from this release type: RevTouchScrollingUiController */ /** @public */ export declare type RevUiableListChangedEventHandler = (this: void, typeId: RevListChangedTypeId, index: number, count: number, targetIndex: number | undefined, ui: boolean) => void; /** * Instances of features are connected to one another to make a chain of responsibility for handling all the input to the hypergrid. * @public */ export declare abstract class RevUiController implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; /** * the next feature to be given a chance to handle incoming events */ next: RevUiController | undefined; /** * a temporary holding field for my next feature when I'm in a disconnected state */ detached: RevUiController | undefined; protected readonly _sharedState: RevUiControllerSharedState; protected readonly _gridSettings: RevGridSettings; protected readonly _canvas: RevCanvas; protected readonly _selection: RevSelection; protected readonly _focus: RevFocus; protected readonly _columnsManager: RevColumnsManager; protected readonly _subgridsManager: RevSubgridsManager; protected readonly _viewLayout: RevViewLayout; protected readonly _renderer: RevRenderer; protected readonly _reindexBehavior: RevReindexBehavior; protected readonly _mouse: RevMouse; protected readonly _horizontalScroller: RevScroller; protected readonly _verticalScroller: RevScroller; protected readonly _focusScrollBehavior: RevFocusScrollBehavior; protected readonly _focusSelectBehavior: RevFocusSelectBehavior; protected readonly _rowPropertiesBehavior: RevRowPropertiesBehavior; protected readonly _cellPropertiesBehavior: RevCellPropertiesBehavior; protected readonly _dataExtractBehavior: RevDataExtractBehavior; protected readonly _eventBehavior: RevEventBehavior; protected readonly _mainSubgrid: RevMainSubgrid; abstract readonly typeName: string; constructor(services: RevUiControllerServices); /** * set my next field, or if it's populated delegate to the feature in my next field * @param nextFeature - this is how we build the chain of responsibility */ setNext(nextFeature: RevUiController): void; /** * disconnect my child */ detachChain(): void; /** * reattach my child from the detached reference */ attachChain(): void; /* Excluded from this release type: handleKeyDown */ /* Excluded from this release type: handleKeyUp */ /* Excluded from this release type: handlePointerMove */ /* Excluded from this release type: handlePointerLeaveOut */ /* Excluded from this release type: handlePointerEnter */ /* Excluded from this release type: handlePointerDown */ /* Excluded from this release type: handlePointerUpCancel */ /* Excluded from this release type: handleWheelMove */ /* Excluded from this release type: handleDblClick */ /* Excluded from this release type: handleClick */ /* Excluded from this release type: handlePointerDragStart */ /* Excluded from this release type: handlePointerDrag */ /* Excluded from this release type: handlePointerDragEnd */ /* Excluded from this release type: handleContextMenu */ /* Excluded from this release type: handleTouchStart */ /* Excluded from this release type: handleTouchMove */ /* Excluded from this release type: handleTouchEnd */ /* Excluded from this release type: handleCopy */ /* Excluded from this release type: handleHorizontalScrollerAction */ /* Excluded from this release type: handleVerticalScrollerAction */ /* Excluded from this release type: initialise */ /* Excluded from this release type: tryGetHoverCellFromMouseEvent */ } /** @public */ export declare namespace RevUiController { export type Constructor = new (services: RevUiControllerServices) => RevUiController; export interface Definition { typeName: string; constructor: Constructor; } } /* Excluded from this release type: RevUiControllerFactory */ /** @public */ export declare class RevUiControllerServices implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; readonly sharedState: RevUiControllerSharedState; readonly gridSettings: RevGridSettings; readonly canvas: RevCanvas; readonly selection: RevSelection; readonly focus: RevFocus; readonly columnsManager: RevColumnsManager; readonly subgridsManager: RevSubgridsManager; readonly viewLayout: RevViewLayout; readonly renderer: RevRenderer; readonly mouse: RevMouse; readonly horizontalScroller: RevScroller; readonly verticalScroller: RevScroller; readonly reindexBehavior: RevReindexBehavior; readonly focusScrollBehavior: RevFocusScrollBehavior; readonly focusSelectBehavior: RevFocusSelectBehavior; readonly rowPropertiesBehavior: RevRowPropertiesBehavior; readonly cellPropertiesBehavior: RevCellPropertiesBehavior; readonly dataExtractBehavior: RevDataExtractBehavior; readonly eventBehavior: RevEventBehavior; /* Excluded from this release type: __constructor */ } export declare interface RevUiControllerSharedState extends RevCellEditor.MouseActionPossible { mouseActionPossible: RevMouse.ActionPossible | undefined; } export declare namespace RevUiControllerSharedState { export function initialise(state: RevUiControllerSharedState): void; } /** @public */ export declare class RevUiManager implements RevClientObject { readonly clientId: string; readonly internalParent: RevClientObject; private readonly _gridSettings; private readonly _mouse; private readonly _eventBehavior; /* Excluded from this release type: _uiControllerFactory */ /* Excluded from this release type: _uiControllerMap */ /* Excluded from this release type: _sharedState */ /* Excluded from this release type: _services */ /* Excluded from this release type: _firstUiController */ /* Excluded from this release type: _enabled */ /* Excluded from this release type: _pointerDownCell */ private _pointerDownCellSysTick; /* Excluded from this release type: __constructor */ load(customUiControllerDefinitions: RevUiController.Definition[] | undefined): RevUiController; enable(): void; disable(): void; lookupFeature(key: string): RevUiController | undefined; /* Excluded from this release type: handleKeyDownEvent */ /* Excluded from this release type: handleKeyUpEvent */ /* Excluded from this release type: handlePointerMoveEvent */ /* Excluded from this release type: handleClickEvent */ /* Excluded from this release type: handleContextMenuEvent */ /* Excluded from this release type: handleWheelMovedEvent */ /* Excluded from this release type: handlePointerUpCancelEvent */ /* Excluded from this release type: handlePointerDragStartEvent */ /* Excluded from this release type: handlePointerDragEvent */ /* Excluded from this release type: handlePointerDragEndEvent */ /* Excluded from this release type: handleDblClickEvent */ /* Excluded from this release type: handlePointerDownEvent */ /* Excluded from this release type: handlePointerEnterEvent */ /* Excluded from this release type: handlePointerLeaveOutEvent */ /* Excluded from this release type: handleTouchStartEvent */ /* Excluded from this release type: handleTouchMoveEvent */ /* Excluded from this release type: handleTouchEndEvent */ /* Excluded from this release type: handleCopyEvent */ /* Excluded from this release type: handleHorizontalScrollerActionEvent */ /* Excluded from this release type: handleVerticalScrollerActionEvent */ /* Excluded from this release type: createAndLinkUiControllers */ private isPointerDownCellValid; private isPointerDownSubsequentEventInTime; private claimValidPointerDownCell; } /** @public */ export declare class RevUnreachableCaseError extends UnreachableCaseInternalError { constructor(code: string, value: never); } /** * Tracks viewport size, position and scrollability in vertical scroll dimension * @public * @see [View Layout Component πŸ—Ž](../../../../../Architecture/Client/Components/View_Layout/) */ export declare class RevVerticalScrollDimension extends RevScrollDimension { /* Excluded from this release type: _subgridsManager */ /* Excluded from this release type: __constructor */ /* Excluded from this release type: calculateLimitedScrollAnchor */ /* Excluded from this release type: compute */ } /** @public */ export declare interface RevViewCell { readonly viewValue: RevDataServer.ViewValue; readonly viewLayoutColumn: RevViewLayoutColumn; readonly subgrid: RevSubgrid; readonly viewLayoutRow: RevViewLayoutRow; readonly bounds: RevRectangle; readonly columnSettings: BCS; readonly isRowVisible: boolean; readonly isColumnVisible: boolean; readonly isCellVisible: boolean; readonly isMainRow: boolean; readonly isMain: boolean; readonly isHeader: boolean; readonly isRowFixed: boolean; readonly isColumnFixed: boolean; readonly isFixed: boolean; readonly isHeaderOrRowFixed: boolean; readonly isScrollable: boolean; readonly isFilter: boolean; readonly isSummary: boolean; paintFingerprint: RevViewCell.PaintFingerprint | undefined; clearCellOwnProperties(): void; } /** @public */ export declare namespace RevViewCell { export type PaintFingerprint = Record; export function sameByDataPoint(left: RevViewCell, right: RevViewCell): boolean; } /* Excluded from this release type: RevViewCellImplementation */ /** * Manages the visual layout of the grid, including the arrangement and sizing of rows and columns, scroll positions, and mapping between data and view coordinates. * * @typeParam BCS - Type of the column settings. * @typeParam SF - Type of the schema field. * * @see [View Layout Component πŸ—Ž](../../../../../Architecture/Client/Components/View_Layout/) * * @showGroups * @public */ export declare class RevViewLayout implements RevClientObject { /** @group Client Object */ readonly clientId: string; /** @group Client Object */ readonly internalParent: RevClientObject; /* Excluded from this release type: _gridSettings */ /* Excluded from this release type: _canvas */ /* Excluded from this release type: _columnsManager */ /* Excluded from this release type: _subgridsManager */ /** * Tracks viewport size, position and scrollability in horizontal scroll dimension * @group Scroll Dimension */ readonly horizontalScrollDimension: RevHorizontalScrollDimension; /** * Tracks viewport size, position and scrollability in vertical scroll dimension * @group Scroll Dimension */ readonly verticalScrollDimension: RevVerticalScrollDimension; /* Excluded from this release type: layoutInvalidatedEventer */ /* Excluded from this release type: columnsViewWidthsChangedEventer */ /* Excluded from this release type: cellPoolComputedEventerForFocus */ /* Excluded from this release type: cellPoolComputedEventerForMouse */ /* Excluded from this release type: _columns */ /* Excluded from this release type: _rows */ /* Excluded from this release type: _dummyUnusedColumn */ /* Excluded from this release type: _rowColumnOrderedCellPool */ /* Excluded from this release type: _columnRowOrderedCellPool */ /* Excluded from this release type: _horizontalComputed */ /* Excluded from this release type: _verticalComputed */ /* Excluded from this release type: _preMainRowCount */ /* Excluded from this release type: _rowsColumnsComputationId */ /* Excluded from this release type: _rowColumnOrderedCellPoolComputationId */ /* Excluded from this release type: _columnRowOrderedCellPoolComputationId */ /* Excluded from this release type: _columnScrollAnchorIndex */ /* Excluded from this release type: _columnScrollAnchorOffset */ /* Excluded from this release type: _unanchoredColumnOverflow */ /* Excluded from this release type: _firstScrollableColumnIndex */ /* Excluded from this release type: _lastScrollableColumnIndex */ /* Excluded from this release type: _fixedColumnsViewWidth */ /* Excluded from this release type: _scrollableColumnsViewWidth */ /* Excluded from this release type: _columnsViewWidth */ /* Excluded from this release type: _rowScrollAnchorIndex */ /* Excluded from this release type: _rowScrollAnchorOffset */ /* Excluded from this release type: _firstScrollableRowIndex */ /* Excluded from this release type: _lastScrollableRowIndex */ /* Excluded from this release type: __constructor */ /** * The array of columns in the view layout. * @group Column * @returns The array of columns in the view layout but restricted to readonly. */ get columns(): readonly RevViewLayoutColumn[] & { gap: RevViewLayout.ColumnArray.Gap | undefined; }; /** * The number of columns in the view layout. * @group Column */ get columnCount(): number; /** * The array of rows in the view layout. * @group Row * @returns The array of rows in the view layout but restricted to readonly. */ get rows(): readonly RevViewLayoutRow[] & { gap: RevViewLayout.RowArray.Gap | undefined; }; /** * The number of rows in the view layout. * @group Row */ get rowCount(): number; /** * The number of rows before/above the main subgrid in the view layout. * @group Row */ get preMainRowCount(): number; /* Excluded from this release type: possiblyNotVerticallyComputedPreMainRowCount */ /** * A counter which increments every time the rows or columns are recomputed. * Used to check whether a cell pool is valid. * @group Pool * @see {@link columnRowCellPoolComputationInvalid | columnRowCellPoolComputationInvalid} * @see {@link rowColumnCellPoolComputationInvalid | rowColumnCellPoolComputationInvalid} * @see {@link getColumnRowOrderedCellPool | getColumnRowOrderedCellPool()} * @see {@link getRowColumnOrderedCellPool | getRowColumnOrderedCellPool()} */ get rowsColumnsComputationId(): number; /** * The index of the active column which is first non-fixed column in the view (either on left or right depending on Grid alignment) * @returns Index of active column or -1 if there is no space for scrollable columns (ie only space for fixed columns) * @group Anchor */ get columnScrollAnchorIndex(): number; /** * Specifies the number of pixels of the anchored column which have been scrolled off the view * Changes to allow smooth scrolling * @group Anchor */ get columnScrollAnchorOffset(): number; /** * Specifies the number of pixels the column at the opposite end of the anchored column has off the view * This value will be: * * undefined if unanchored column does not reach the end of the view. * * 0 if the unanchored column is touches the edge of the view with no overflow * * Positive number which specifies the number of pixels the column overflows the grid on the unanchored side * @group Anchor */ get unanchoredColumnOverflow(): number | undefined; /** * Number of {@link RevViewLayoutColumn | columns} in {@link columns} * @group Column */ get scrollableColumnCount(): number; /** * Index of the first scrollable {@link RevViewLayoutColumn | column} in {@link columns} * @group Column */ get firstScrollableColumnIndex(): number | undefined; /** * First scrollable {@link RevViewLayoutColumn | column} in view * @group Column */ get firstScrollableColumn(): RevViewLayoutColumn | undefined; /** * @group Column */ get firstScrollableActiveColumnIndex(): number | undefined; /** * @group Anchor */ get firstScrollableColumnLeftOverflow(): number | undefined; /** * @group Column */ get lastScrollableColumnIndex(): number | undefined; /** * @group Column */ get lastScrollableColumn(): RevViewLayoutColumn | undefined; /** * @group Column */ get lastScrollableActiveColumnIndex(): number | undefined; /** * @group Anchor */ get lastScrollableColumnRightOverflow(): number | undefined; /** * @group Bounds */ get fixedColumnsViewWidth(): number; /** * @group Bounds */ get scrollableColumnsViewWidth(): number; /** * @group Bounds */ get columnsViewWidth(): number; /** * @group Row */ get scrollableRowCount(): number; /** * @group Anchor */ get rowScrollAnchorIndex(): number; /** * Index of the first scrollable {@link RevViewLayoutRow | row} in {@link rows} * @group Row */ get firstScrollableRowIndex(): number | undefined; /** * Subgrid row index of the first scrollable row * @group Row */ get firstScrollableSubgridRowIndex(): number | undefined; /** * @group Bounds */ get firstScrollableRowViewTop(): number | undefined; /** * Gets the index of the last row that can be scrolled to in the view. * Ensures that vertical computations are performed outside of the animation frame before returning the value. * * @returns The index of the last scrollable row, or `undefined` if not available. * @group Row */ get lastScrollableRowIndex(): number | undefined; /** * Gets the subgrid row index of the last scrollable row. * * Ensures that vertical computations are up-to-date before accessing the value. * Returns `undefined` if there is no last scrollable row, otherwise returns the * corresponding subgrid row index. * @group Row */ get lastScrollableRowSubgridRowIndex(): number | undefined; /** * Gets the bounds of the canvas which contains the scrollable area. * @returns A `RevCornerRectangle` representing the bounds of the scrollable canvas area, or `undefined` if scrolling is not possible. * @group Bounds */ get scrollableCanvasBounds(): RevCornerRectangle | undefined; /** * Indicates whether the first (left most) scrollable column is displayed in view as much as possible. * @returns `true` if the first scrollable column is maximally in the view, `false` otherwise. * @group Column */ get firstScrollableColumnIsMaximallyInView(): boolean; /** * Indicates whether the last (right most) scrollable column is displayed in view as much as possible. * @returns `true` if the last scrollable column is maximally in the view, `false` otherwise. * @group Column */ get lastScrollableColumnIsMaximallyInView(): boolean; /** * @group Pool */ get columnRowCellPoolComputationInvalid(): boolean; /** * @group Pool */ get rowColumnCellPoolComputationInvalid(): boolean; /** * @group Pool */ getRowColumnOrderedCellPool(): RevViewCell[]; /** * @group Pool */ getColumnRowOrderedCellPool(): RevViewCell[]; /* Excluded from this release type: reset */ /* Excluded from this release type: invalidate */ /** * @group Invalidate */ invalidateAll(scrollDimensionAsWell: boolean): void; /** * @group Invalidate */ invalidateHorizontalAll(scrollDimensionAsWell: boolean): void; /** * @group Invalidate */ invalidateVerticalAll(scrollDimensionAsWell: boolean): void; /* Excluded from this release type: invalidateHorizontalAllAndScrollDimensionWithoutAction */ /* Excluded from this release type: invalidateFieldsInserted */ /* Excluded from this release type: invalidateActiveColumnsDeleted */ /* Excluded from this release type: invalidateAllColumnsDeleted */ /* Excluded from this release type: invalidateColumnsChanged */ /* Excluded from this release type: invalidateDataRowsInserted */ /* Excluded from this release type: invalidateDataRowsDeleted */ /* Excluded from this release type: invalidateAllDataRowsDeleted */ /* Excluded from this release type: invalidateDataRowsLoaded */ /* Excluded from this release type: invalidateDataRowsMoved */ /* Excluded from this release type: ensureComputedInsideAnimationFrame */ /** * Ensures that the specified cell is within the viewport. * If its column or row is not currently in view, adjusts the viewport to bring them into view. * * @param activeColumnIndex - The index of the active column to ensure is in view. * @param mainSubgridRowIndex - The index of the row in main subgrid to ensure is in view. * @param maximally - If true, attempts to maximize the visibility of the column and row within the viewport. * @returns `true` if the viewport start position was changed to bring the column or row into view; otherwise, `false`. * @group Scroll */ ensureCellIsInView(activeColumnIndex: number, mainSubgridRowIndex: number, maximally: boolean): boolean; /** * Scrolls the viewport by the specified number of columns and rows. * @param columnCount - The number of columns to scroll (can be negative). * @param rowCount - The number of rows to scroll (can be negative). * @returns `true` if the viewport was scrolled; otherwise, `false`. * @group Scroll */ scrollColumnsRowsBy(columnCount: number, rowCount: number): boolean; /** * @param activeColumnIndex - Index of active column that should be anchor * @returns true if changed * @group Scroll */ setColumnScrollAnchor(activeColumnIndex: number, offset: number): boolean; /** * Sets the column scroll anchor to its current limit. * This will scroll the viewport as far as possible to the right. * @group Scroll */ setColumnScrollAnchorToLimit(): void; /** * Scrolls the viewport by the specified number of columns. * @param scrollColumnCount - The number of columns to scroll (can be negative). * @returns `true` if the viewport was scrolled; otherwise, `false`. * @group Scroll */ scrollColumnsBy(scrollColumnCount: number): boolean; /** * @group Scroll */ scrollHorizontalViewportBy(delta: number): void; /** * @group Scroll */ setHorizontalViewportStart(value: number): boolean; /** * @group Scroll */ ensureColumnIsInView(activeColumnIndex: number, maximally: boolean): boolean; /** * @group Scroll */ setRowScrollAnchor(index: number, offset: number): boolean; /** * @group Scroll */ setRowScrollAnchorToLimit(): void; /** * @group Scroll */ scrollRowsBy(rowScrollCount: number): boolean; /** * @group Scroll */ scrollVerticalViewportBy(delta: number): boolean; /** * @group Scroll */ setVerticalViewportStart(viewportStart: number): void; /** * Ensures that the specified row index is within the viewport of the grid. * If the row is within the fixed rows, no scrolling occurs. Otherwise, the method * scrolls the grid to bring the row into view, considering whether the scrolling * should be maximal (i.e., align the row at the top of the viewport) and handling * edge cases where the viewport size is not an exact multiple of the row height. * * @param mainSubgridRowIndex - The index of the row in the main subgrid to ensure in viewport. * @param maximally - If `true`, ensure the row is maximally in view; otherwise do not scroll if it is already partially in view. * @returns `true` if scrolling was performed to bring the row into view; `false` otherwise. * @throws If the scrollable row indices are inconsistent. * @group Scroll */ ensureRowIsInView(mainSubgridRowIndex: number, maximally: boolean): boolean; /** * @param x - Grid column coordinate. * @param y - Grid row coordinate. * @returns Bounding rect of cell with the given coordinates. * @group Bounds */ getBoundsOfCell(x: number, y: number): RevRectangle; /** * Get the index of the column whose edge is closest to the coordinate at pixelX * @param pixelX - The horizontal coordinate. * @returns The column index under the coordinate at pixelX. * @group Column */ getActiveColumnWidthEdgeClosestToPixelX(pixelX: number): number; /** * Get cell at offset position on canvas. * @param canvasXOffset - x position on canvas. * @param canvasYOffset - y position on canvas. * @returns Cell at co-ordinate or undefined if none. * @group Cell */ findLinedHoverCellAtCanvasOffset(canvasXOffset: number, canvasYOffset: number): RevLinedHoverCell | undefined; /** * @group Cell */ findScrollableCellClosestToCanvasOffset(canvasOffsetX: number, canvasOffsetY: number): RevViewCell | undefined; /** * @group Column */ findLeftGridLineInclusiveColumnOfCanvasOffset(canvasOffsetX: number): RevViewLayoutColumn | undefined; /** * @group Column */ findLeftGridLineInclusiveColumnIndexOfCanvasOffset(canvasOffsetX: number): number; /** * @group Column */ findColumnIndexOfCanvasOffset(canvasOffsetX: number): number; /** * @group Column */ findIndexOfScrollableColumnClosestToCanvasOffset(canvasOffsetX: number): number; /** * @group Row */ findTopGridLineInclusiveRowOfCanvasOffset(canvasOffsetY: number): RevViewLayoutRow | undefined; /** * @group Row */ findTopGridLineInclusiveRowIndexOfCanvasOffset(canvasOffsetY: number): number; /** * @group Row */ findRowIndexOfCanvasOffset(canvasOffsetY: number): number; /** * @group Row */ findIndexOfScrollableRowClosestToOffset(y: number): number; /* Excluded from this release type: createUnusedSpaceColumn */ /** * Matrix of view values within cells in the viewport. * @group Values */ getValuesInView(): RevDataServer.ViewValue[][]; /** * Indicates whether an active column is in view. * @param activeColumnIndex - the column index * @returns `true` if the column is in view, `false` otherwise. * @group Column */ isActiveColumnInView(activeColumnIndex: number): boolean; /** * @group Column */ isActiveColumnFullyInView(activeColumnIndex: number): boolean; /** * Get the column index matching the provided active column index. * @param activeColumnIndex - The grid column index. * @returns The given column if in view or `undefined` if not. * @group Column */ findColumnWithActiveIndex(activeColumnIndex: number): RevViewLayoutColumn | undefined; /** * Get the column in viewport with the provided field index. * @param fieldIndex - The grid column index. * @returns The column if found and in viewport, otherwise `undefined`. * @group Column */ findColumnWithFieldIndex(fieldIndex: number): RevViewLayoutColumn | undefined; /** * Get the row in viewport with the provided subgrid row index and subgrid. * @param subgridRowIndex - The index of the row within the specified subgrid. * @param subgrid - The subgrid to which the row belongs. * @returns The given row if in viewport or `undefined` if not. * @group Row */ findRowWithSubgridRowIndex(subgridRowIndex: number, subgrid: RevSubgrid): RevViewLayoutRow | undefined; /** * @group Column */ findFullyInViewColumnWithActiveIndex(activeColumnIndex: number): RevViewLayoutColumn | undefined; /** * Check if a field column is in viewport. * A column will not be in viewport if it is either not active or scrolled out of view. * @param fieldIndex - the column's field index * @group Column */ isFieldColumnInView(fieldIndex: number): boolean; /** * Limit an active column index value to within the range of active column indices of columns that are scrollable. * @param activeColumnIndex - The active column index to limit. * @returns The passed `activeColumnIndex` if it is within the range of scrollable columns, or the active column index of the closest scrollable column or `undefined` if no scrollable columns are present. * @group Column */ limitActiveColumnIndexToScrollableRange(activeColumnIndex: number): number | undefined; /** * Check if a subgrid row is in view. * @param rowIndex - The index of the row (within a subgrid) to check. * @param subgrid - The subgrid to check against. * @returns `true` if the row is in view, otherwise `false`. * @group Row */ isSubgridRowInView(rowIndex: number, subgrid: RevSubgrid): boolean; /** * Limit a row index value to within the range of indices of rows that are scrollable. * @param rowIndex - The row index to limit. * @returns The passed `rowIndex` if it is within the range of scrollable rows, or the index of the closest scrollable row or `undefined` if no scrollable rows are present. * @group Row */ limitRowIndexToScrollableRange(rowIndex: number): number | undefined; /** * @returns The last col was rendered (is in view) * @group Column */ isLastActiveColumnInView(): boolean; /** * @returns The rendered column width at index * @group Bounds */ getRenderedWidth(index: number): number; /** * @returns The rendered row height at index * @group Bounds */ getRenderedHeight(index: number): number; /** * Calculates the scroll anchor for a page left scroll action. * Warning: NOT IMPLEMENTED * @returns A new scroll anchor which can be used for page left scrolling or `undefined` if a left scroll operation is not possible. * @group Anchor */ calculatePageLeftColumnAnchor(): RevViewLayout.ScrollAnchor | undefined; /** * Calculates the scroll anchor for a page right scroll action. * Warning: NOT IMPLEMENTED * @returns A new scroll anchor which can be used for page right scrolling or `undefined` if a right scroll operation is not possible. * @group Anchor */ calculatePageRightColumnAnchor(): RevViewLayout.ScrollAnchor | undefined; /** * @returns The row to go to for a page up. * @group Anchor */ calculatePageUpRowAnchor(): RevViewLayout.ScrollAnchor | undefined; /** * @returns The row to goto for a page down. * @group Anchor */ calculatePageDownRowAnchor(): RevViewLayout.ScrollAnchor | undefined; /** * Finds a cell at the specified grid row and column. * @param activeColumnIndex - index of active column within grid * @param subgridRowIndex - index of row within its subgrid within the grid * @param subgrid - the subgrid to search within * @param canComputePool - whether the pool can be recomputed (set to false if called from within animation frame) * @returns the cell at the specified index, or undefined if not found * @group Cell */ findCellAtGridPoint(activeColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid, canComputePool: boolean): RevViewCell | undefined; /** * Finds a cell at the specified data point. * @param fieldColumnIndex - index of field column within grid * @param subgridRowIndex - index of row within its subgrid within the grid * @param subgrid - the subgrid to search within * @returns the cell at the specified index, or undefined if not found * @group Cell */ findCellAtDataPoint(fieldColumnIndex: number, subgridRowIndex: number, subgrid: RevSubgrid): RevViewCell | undefined; /** * Finds a cell at the specified viewport row and column. * @param viewportColumnIndex - index of column within viewport * @param viewportRowIndex - index of row within viewport * @param canComputePool - whether the pool can be recomputed (set to false if called from within animation frame) * @returns the cell at the specified index, or undefined if not found * @group Cell */ findCellAtViewpointIndex(viewportColumnIndex: number, viewportRowIndex: number, canComputePool: boolean): RevViewCell; /** * Finds a cell at the specified canvas offset. * @param x - The x-coordinate of the canvas offset. * @param y - The y-coordinate of the canvas offset. * @returns The cell at the specified canvas offset, or undefined if not found. * @group Cell */ findCellAtCanvasOffset(x: number, y: number): RevViewCell | undefined; /* Excluded from this release type: findCellAtCanvasOffsetSpecifyRecompute */ /** * @group Pool */ resetAllCellPaintFingerprints(): void; /** * @group Pool */ resetAllCellPropertiesCaches(): void; /* Excluded from this release type: handleHorizontalScrollDimensionComputedEvent */ /* Excluded from this release type: handleVerticalScrollDimensionComputedEvent */ /* Excluded from this release type: notifyCellPoolComputed */ /* Excluded from this release type: computeHorizontal */ /* Excluded from this release type: computeVertical */ /* Excluded from this release type: ensureComputedOutsideAnimationFrame */ /* Excluded from this release type: ensureHorizontalComputedOutsideAnimationFrame */ /* Excluded from this release type: ensureVerticalComputedOutsideAnimationFrame */ /* Excluded from this release type: updateColumnsViewWidths */ /* Excluded from this release type: resizeCellPool */ /* Excluded from this release type: getAPool */ /* Excluded from this release type: resetPoolAllCellPaintFingerprints */ /* Excluded from this release type: resetPoolAllCellPropertiesCaches */ } /** @public */ export declare namespace RevViewLayout { /* Excluded from this release type: LayoutInvalidatedEventer */ /* Excluded from this release type: ColumnsViewWidthsChangedEventer */ /* Excluded from this release type: CellPoolComputedEventer */ export interface ColumnsViewWidthChangeds { readonly fixedChanged: boolean; readonly scrollableChanged: boolean; readonly viewChanged: boolean; } export class ColumnArray extends Array> { gap: ColumnArray.Gap | undefined; } export namespace ColumnArray { export interface Gap { left: number; rightPlus1: number; } } export class RowArray extends Array> { gap: RowArray.Gap | undefined; } export namespace RowArray { export interface Gap { top: number; bottom: number; } } export interface ScrollAnchor { index: number; offset: number; } export interface ScrollAnchorLimits { startAnchorLimitIndex: number; startAnchorLimitOffset: number; finishAnchorLimitIndex: number; finishAnchorLimitOffset: number; } export interface ScrollContentSizeAndAnchorLimits { contentSize: number; contentOverflowed: boolean; anchorLimits: ScrollAnchorLimits; } /* Excluded from this release type: InvalidateAction */ /* Excluded from this release type: InvalidateAction *//* Excluded from this release type: AllInvalidateAction */ /* Excluded from this release type: LoadedInvalidateAction */ /* Excluded from this release type: DataRangeInsertedInvalidateAction */ /* Excluded from this release type: DataRangeDeletedInvalidateAction */ /* Excluded from this release type: ActiveRangeDeletedInvalidateAction */ /* Excluded from this release type: AllDeletedInvalidateAction */ /* Excluded from this release type: DataRangeMovedInvalidateAction */ /* Excluded from this release type: AllChangedInvalidateAction */ } /** * Defines a column in the view layout. * @public */ export declare interface RevViewLayoutColumn { /** A back reference to the element's array index in {@link client/components/view/view-layout!RevViewLayout:class#columns}. */ index: Integer; /** Active index of column */ activeColumnIndex: Integer; column: RevColumn; /** Pixel coordinate of the left edge of this column, rounded to nearest integer. */ left: Integer; /** Pixel coordinate of the right edge of this column + 1, rounded to nearest integer. */ rightPlus1: Integer; /** Width of this column in pixels, rounded to nearest integer. */ width: Integer; } /** * Defines a row in the view layout. * @public */ export declare interface RevViewLayoutRow { /** A back reference to the element's array index in {@link client/components/view/view-layout!RevViewLayout:class#rows}. */ index: number; /** Local vertical row coordinate within the subgrid to which the row belongs. */ subgridRowIndex: number; /** The subgrid to which the row belongs. */ subgrid: RevSubgrid; /** Pixel coordinate of the top edge of this row, rounded to nearest integer. */ top: number; /** Pixel coordinate of the bottom edge of this row, rounded to nearest integer. */ bottomPlus1: number; /** Height of this row in pixels, rounded to nearest integer. */ height: number; } /** @public */ export declare type RevWritable = { -readonly [P in keyof T]: T[P]; }; /** @public */ export declare type RevWritablePoint = RevWritable; /** @public */ export declare namespace RevWritablePoint { export function create(x: number, y: number): RevWritablePoint; export function moveX(point: RevWritablePoint, offset: number): void; export function moveY(point: RevWritablePoint, offset: number): void; export function adjustForXRangeInserted(point: RevWritablePoint, insertionIndex: number, insertionCount: number): void; export function adjustForYRangeInserted(point: RevWritablePoint, insertionIndex: number, insertionCount: number): void; export function adjustForXRangeDeleted(point: RevWritablePoint, deletionIndex: number, deletionCount: number): number | undefined; export function adjustForYRangeDeleted(point: RevWritablePoint, deletionIndex: number, deletionCount: number): number | undefined; export function adjustForXRangeMoved(point: RevWritablePoint, oldIndex: number, newIndex: number, count: number): void; export function adjustForYRangeMoved(point: RevWritablePoint, oldIndex: number, newIndex: number, count: number): void; } export { }