@glideapps/glide-data-grid
Advanced tools
Comparing version 5.2.2-beta2 to 5.2.2-beta3
export declare function proveType<T>(_val: T): void; | ||
export declare function assert(fact: boolean, message?: string): asserts fact; | ||
export declare function assertNever(_never: never): never; | ||
export declare function assertNever(_never: never, msg?: string): never; | ||
export declare function maybe<T>(fn: () => T, defaultValue: T): T; | ||
export declare function deepEqual(foo: any, bar: any): boolean; | ||
//# sourceMappingURL=support.d.ts.map |
@@ -5,2 +5,17 @@ import * as React from "react"; | ||
export declare function degreesToRadians(degrees: number): number; | ||
export declare const getSquareBB: (posX: number, posY: number, squareSideLength: number) => { | ||
x1: number; | ||
y1: number; | ||
x2: number; | ||
y2: number; | ||
}; | ||
export declare const getSquareXPosFromAlign: (alignment: "left" | "center" | "right", containerX: number, containerWidth: number, horizontalPadding: number, squareWidth: number) => number; | ||
export declare const getSquareWidth: (maxSize: number, containerHeight: number, verticalPadding: number) => number; | ||
declare type BoundingBox = { | ||
x1: number; | ||
y1: number; | ||
x2: number; | ||
y2: number; | ||
}; | ||
export declare const pointIsWithinBB: (x: number, y: number, bb: BoundingBox) => boolean; | ||
/** | ||
@@ -21,2 +36,3 @@ * The input provided to a sprite function. | ||
export declare function useStateWithReactiveInput<T>(inputState: T): [T, React.Dispatch<React.SetStateAction<T>>, () => void]; | ||
export {}; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -8,3 +8,3 @@ import * as React from "react"; | ||
import type { CustomRenderer } from "../data-grid/cells/cell-types"; | ||
declare type Props = Partial<Omit<DataGridSearchProps, "accessibilityHeight" | "canvasRef" | "cellXOffset" | "cellYOffset" | "className" | "clientSize" | "columns" | "disabledRows" | "drawCustomCell" | "enableGroups" | "firstColAccessible" | "firstColSticky" | "freezeColumns" | "getCellContent" | "getCellRenderer" | "getCellsForSelection" | "gridRef" | "groupHeaderHeight" | "headerHeight" | "isFilling" | "isFocused" | "lockColumns" | "maxColumnWidth" | "minColumnWidth" | "onCanvasBlur" | "onCanvasFocused" | "onCellFocused" | "onContextMenu" | "onDragEnd" | "onMouseDown" | "onMouseMove" | "onMouseUp" | "onSearchResultsChanged" | "onVisibleRegionChanged" | "rowHeight" | "rows" | "scrollRef" | "searchColOffset" | "searchInputRef" | "selectedColumns" | "selection" | "theme" | "trailingRowType" | "translateX" | "translateY" | "verticalBorder">>; | ||
declare type Props = Partial<Omit<DataGridSearchProps, "accessibilityHeight" | "canvasRef" | "cellXOffset" | "cellYOffset" | "className" | "clientSize" | "columns" | "disabledRows" | "drawCustomCell" | "enableGroups" | "firstColAccessible" | "firstColSticky" | "freezeColumns" | "getCellContent" | "getCellRenderer" | "getCellsForSelection" | "gridRef" | "groupHeaderHeight" | "headerHeight" | "isFilling" | "isFocused" | "lockColumns" | "maxColumnWidth" | "minColumnWidth" | "onCanvasBlur" | "onCanvasFocused" | "onCellFocused" | "onContextMenu" | "onDragEnd" | "onMouseDown" | "onMouseMove" | "onMouseUp" | "onVisibleRegionChanged" | "rowHeight" | "rows" | "scrollRef" | "searchInputRef" | "selectedColumns" | "selection" | "theme" | "trailingRowType" | "translateX" | "translateY" | "verticalBorder">>; | ||
declare type EditListItem = { | ||
@@ -11,0 +11,0 @@ location: Item; |
@@ -6,2 +6,11 @@ import * as React from "react"; | ||
readonly getCellsForSelection?: (selection: Rectangle, abortSignal: AbortSignal) => GetCellsThunk | CellArray; | ||
/** | ||
* The search results to display. If not provided glide will use its own internal search provider. | ||
*/ | ||
readonly searchResults?: readonly Item[]; | ||
/** | ||
* Emitted whenever the search results for the current search field changes. | ||
* @param results The new search results | ||
* @param navIndex The currents selected search result | ||
*/ | ||
readonly onSearchResultsChanged?: (results: readonly Item[], navIndex: number) => void; | ||
@@ -18,2 +27,13 @@ /** | ||
readonly onSearchClose?: () => void; | ||
/** | ||
* The current search value. | ||
* @group Search | ||
*/ | ||
readonly searchValue?: string; | ||
/** | ||
* Emitted when the search value changes. | ||
* @group Search | ||
* @param newVal The new search value | ||
*/ | ||
readonly onSearchValueChange?: (newVal: string) => void; | ||
readonly searchInputRef: React.MutableRefObject<HTMLInputElement | null>; | ||
@@ -20,0 +40,0 @@ } |
@@ -17,2 +17,3 @@ import type { Theme } from "../.."; | ||
hyperWrapping: boolean; | ||
cell: InnerGridCell; | ||
requestAnimationFrame: () => void; | ||
@@ -19,0 +20,0 @@ } |
@@ -34,3 +34,3 @@ import type { Theme } from "../common/styles"; | ||
export declare function drawNewRowCell(args: BaseDrawArgs, data: string, icon?: string): void; | ||
export declare function drawCheckbox(ctx: CanvasRenderingContext2D, theme: Theme, checked: boolean | BooleanEmpty | BooleanIndeterminate, x: number, y: number, width: number, height: number, highlighted: boolean, hoverX?: number, hoverY?: number, maxSize?: number): void; | ||
export declare function drawCheckbox(ctx: CanvasRenderingContext2D, theme: Theme, checked: boolean | BooleanEmpty | BooleanIndeterminate, x: number, y: number, width: number, height: number, highlighted: boolean, hoverX?: number, hoverY?: number, maxSize?: number, alignment?: BaseGridCell["contentAlign"]): void; | ||
export declare function prepMarkerRowCell(args: BaseDrawArgs, lastPrep: PrepResult | undefined): Partial<PrepResult>; | ||
@@ -37,0 +37,0 @@ export declare function deprepMarkerRowCell(args: Pick<BaseDrawArgs, "ctx">): void; |
@@ -41,3 +41,3 @@ /// <reference types="react" /> | ||
export declare function pointInRect(rect: Rectangle, x: number, y: number): boolean; | ||
export declare function getHeaderMenuBounds(x: number, y: number, width: number, height: number): Rectangle; | ||
export declare function getHeaderMenuBounds(x: number, y: number, width: number, height: number, isRtl: boolean): Rectangle; | ||
export declare function drawHeader(ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, c: MappedGridColumn, selected: boolean, theme: Theme, isHovered: boolean, hasSelectedCell: boolean, hoverAmount: number, spriteManager: SpriteManager, drawHeaderCallback: DrawHeaderCallback | undefined, touchMode: boolean): void; | ||
@@ -44,0 +44,0 @@ export interface DrawGridArg { |
@@ -7,4 +7,5 @@ export type { OverlayImageEditorProps } from "./data-grid-overlay-editor/private/image-overlay-editor"; | ||
export type { CustomCellRenderer } from "./data-editor/use-custom-cells"; | ||
export type { CustomRenderer } from "./data-grid/cells/cell-types"; | ||
export type { CustomRenderer, BaseDrawArgs, DrawArgs } from "./data-grid/cells/cell-types"; | ||
export type { SelectionBlending } from "./data-grid/use-selection-behavior"; | ||
export type { GetRowThemeCallback } from "./data-grid/data-grid-render"; | ||
export * from "./data-editor/data-editor"; | ||
@@ -11,0 +12,0 @@ export * from "./data-grid/data-grid-types"; |
{ | ||
"name": "@glideapps/glide-data-grid", | ||
"version": "5.2.2-beta2", | ||
"version": "5.2.2-beta3", | ||
"description": "React data grid for beautifully displaying and editing large amounts of data with amazing performance.", | ||
@@ -5,0 +5,0 @@ "sideEffects": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3043342
28773