Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@glideapps/glide-data-grid

Package Overview
Dependencies
Maintainers
8
Versions
294
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glideapps/glide-data-grid - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1-alpha1

2

CHANGELOG.md

@@ -109,3 +109,3 @@ # 5.0.0 Release notes

rightElement={el}
rightElementSticky={{
rightElementProps={{
sticky: true,

@@ -112,0 +112,0 @@ }}

@@ -1,3 +0,3 @@

import type { Item, Rectangle } from "../data-grid/data-grid-types";
declare class ImageWindowLoader {
import type { ImageWindowLoader, Item, Rectangle } from "../data-grid/data-grid-types";
declare class ImageWindowLoaderImpl implements ImageWindowLoader {
private imageLoaded;

@@ -16,2 +16,2 @@ private loadedLocations;

}
export default ImageWindowLoader;
export default ImageWindowLoaderImpl;

@@ -26,2 +26,3 @@ import React from "react";

horizontalBorderColor?: string;
headerBottomBorderColor?: string;
drilldownBorder: string;

@@ -28,0 +29,0 @@ linkColor: string;

@@ -1,4 +0,3 @@

import type ImageWindowLoader from "../common/image-window-loader";
import type { Theme } from "../common/styles";
import type { Rectangle } from "../data-grid/data-grid-types";
import type { Rectangle, ImageWindowLoader } from "../data-grid/data-grid-types";
export interface DrawArgs {

@@ -5,0 +4,0 @@ ctx: CanvasRenderingContext2D;

@@ -8,3 +8,4 @@ import * as React from "react";

import { SelectionBlending } from "../data-grid/use-selection-behavior";
declare type Props = Omit<DataGridSearchProps, "accessibilityHeight" | "canvasRef" | "cellXOffset" | "cellYOffset" | "className" | "clientSize" | "columns" | "disabledRows" | "drawCustomCell" | "enableGroups" | "firstColAccessible" | "firstColSticky" | "freezeColumns" | "getCellContent" | "getCellsForSelection" | "gridRef" | "groupHeaderHeight" | "headerHeight" | "isFilling" | "isFocused" | "lockColumns" | "maxColumnWidth" | "minColumnWidth" | "onCanvasBlur" | "onCanvasFocused" | "onCellFocused" | "onContextMenu" | "onDragEnd" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onMouseMove" | "onMouseUp" | "onSearchResultsChanged" | "onVisibleRegionChanged" | "rowHeight" | "scrollRef" | "searchColOffset" | "selectedColumns" | "selection" | "theme" | "trailingRowType" | "translateX" | "translateY" | "verticalBorder">;
import type { CustomRenderer } from "../data-grid/cells/cell-types";
declare type Props = 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" | "scrollRef" | "searchColOffset" | "selectedColumns" | "selection" | "theme" | "trailingRowType" | "translateX" | "translateY" | "verticalBorder">;
declare type ImageEditorType = React.ComponentType<OverlayImageEditorProps>;

@@ -94,2 +95,3 @@ declare type EditListItem = {

readonly theme?: Partial<Theme>;
readonly customRenderers?: readonly CustomRenderer[];
}

@@ -96,0 +98,0 @@ export interface DataEditorRef {

import type { Theme } from "../common/styles";
import type { DataGridSearchProps } from "../data-grid-search/data-grid-search";
import type { GetCellRendererCallback } from "../data-grid/cells/cell-types";
import { CellArray, GridColumn, InnerGridColumn, SizedGridColumn } from "../data-grid/data-grid-types";
export declare function measureColumn(ctx: CanvasRenderingContext2D, theme: Theme, c: GridColumn, colIndex: number, selectedData: CellArray, minColumnWidth: number, maxColumnWidth: number, removeOutliers: boolean): SizedGridColumn;
export declare function useColumnSizer(columns: readonly GridColumn[], rows: number, getCellsForSelection: DataGridSearchProps["getCellsForSelection"], clientWidth: number, minColumnWidth: number, maxColumnWidth: number, theme: Theme, abortController: AbortController): readonly InnerGridColumn[];
export declare function measureColumn(ctx: CanvasRenderingContext2D, theme: Theme, c: GridColumn, colIndex: number, selectedData: CellArray, minColumnWidth: number, maxColumnWidth: number, removeOutliers: boolean, getCellRenderer: GetCellRendererCallback): SizedGridColumn;
export declare function useColumnSizer(columns: readonly GridColumn[], rows: number, getCellsForSelection: DataGridSearchProps["getCellsForSelection"], clientWidth: number, minColumnWidth: number, maxColumnWidth: number, theme: Theme, getCellRenderer: GetCellRendererCallback, abortController: AbortController): readonly InnerGridColumn[];

@@ -1,16 +0,12 @@

import { CustomCell, GridCell, ProvideEditorCallback } from "../data-grid/data-grid-types";
import type { DrawArgs } from "./custom-cell-draw-args";
import type { CustomRenderer } from "../data-grid/cells/cell-types";
import { CustomCell } from "../data-grid/data-grid-types";
import type { DataEditorProps } from "./data-editor";
declare type DrawCallback = NonNullable<DataEditorProps["drawCell"]>;
export declare type CustomCellRenderer<T extends CustomCell> = {
isMatch: (cell: CustomCell) => cell is T;
draw: (args: DrawArgs, cell: T) => boolean;
provideEditor: ProvideEditorCallback<T>;
onPaste?: (val: string, cellData: T["data"]) => T["data"];
};
export declare type CustomCellRenderer<T extends CustomCell> = Omit<CustomRenderer<T>, "kind">;
/**
* @deprecated use customRenderers instead.
* @param cells
* @returns an object intended to be spread on the DataEditor.
*/
export declare function useCustomCells(cells: readonly CustomCellRenderer<any>[]): {
drawCell: DrawCallback;
provideEditor: ProvideEditorCallback<GridCell>;
coercePasteValue: NonNullable<DataEditorProps["coercePasteValue"]>;
customRenderers: NonNullable<DataEditorProps["customRenderers"]>;
};
export {};

@@ -8,5 +8,5 @@ import * as React from "react";

readonly onColumnMoved?: (startIndex: number, endIndex: number) => void;
readonly onColumnResize?: (column: GridColumn, newSize: number, colIndex: number) => void;
readonly onColumnResizeStart?: (column: GridColumn, newSize: number, colIndex: number) => void;
readonly onColumnResizeEnd?: (column: GridColumn, newSize: number, colIndex: number) => void;
readonly onColumnResize?: (column: GridColumn, newSize: number, colIndex: number, newSizeWithGrow: number) => void;
readonly onColumnResizeStart?: (column: GridColumn, newSize: number, colIndex: number, newSizeWithGrow: number) => void;
readonly onColumnResizeEnd?: (column: GridColumn, newSize: number, colIndex: number, newSizeWithGrow: number) => void;
readonly gridRef?: React.MutableRefObject<DataGridRef | null>;

@@ -13,0 +13,0 @@ readonly maxColumnWidth: number;

import * as React from "react";
import { Theme } from "../common/styles";
import type { GetCellRendererCallback } from "../data-grid/cells/cell-types";
import { EditableGridCell, GridCell, Item, ProvideEditorCallback, Rectangle, ValidatedGridCell } from "../data-grid/data-grid-types";

@@ -18,2 +19,3 @@ import type { OverlayImageEditorProps } from "./private/image-overlay-editor";

readonly imageEditorOverride?: ImageEditorType;
readonly getCellRenderer: GetCellRendererCallback;
readonly markdownDivCreateNode?: (content: string) => DocumentFragment;

@@ -20,0 +22,0 @@ readonly provideEditor?: ProvideEditorCallback<GridCell>;

import * as React from "react";
interface Props {
readonly bubbles: readonly string[];
readonly onKeyDown: (event: React.KeyboardEvent) => void;
}
declare const BubblesOverlayEditor: React.FunctionComponent<Props>;
export default BubblesOverlayEditor;

@@ -5,5 +5,4 @@ import type { DrilldownCellData } from "../../data-grid/data-grid-types";

readonly drilldowns: readonly DrilldownCellData[];
readonly onKeyDown: (event: React.KeyboardEvent) => void;
}
declare const DrilldownOverlayEditor: React.FunctionComponent<Props>;
export default DrilldownOverlayEditor;

@@ -7,3 +7,2 @@ import * as React from "react";

readonly onChange: (newImage: string) => void;
readonly onKeyDown: (event: React.KeyboardEvent) => void;
readonly onEditClick?: () => void;

@@ -10,0 +9,0 @@ readonly renderImage?: (url: string) => React.ReactNode;

@@ -6,3 +6,2 @@ import * as React from "react";

readonly markdown: string;
readonly onKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
readonly onChange: (ev: React.ChangeEvent<HTMLTextAreaElement>) => void;

@@ -9,0 +8,0 @@ readonly forceEditMode: boolean;

@@ -7,3 +7,2 @@ import * as React from "react";

disabled?: boolean;
onKeyDown: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
onChange: (values: NumberFormatValues) => void;

@@ -10,0 +9,0 @@ highlight: boolean;

@@ -5,3 +5,2 @@ import * as React from "react";

readonly uri: string;
readonly onKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
readonly onChange: (ev: React.ChangeEvent<HTMLTextAreaElement>) => void;

@@ -8,0 +7,0 @@ readonly forceEditMode: boolean;

@@ -1,7 +0,4 @@

/// <reference types="react" />
import type { OverlayImageEditorProps, Theme } from "../..";
import type ImageWindowLoader from "../../common/image-window-loader";
import type { Theme } from "../..";
import type { SpriteManager } from "../data-grid-sprites";
import type { InnerGridCell, Rectangle } from "../data-grid-types";
export declare type ImageEditorType = React.ComponentType<OverlayImageEditorProps>;
import type { InnerGridCell, Rectangle, ImageWindowLoader, CustomCell, ProvideEditorCallback } from "../data-grid-types";
export interface BaseDrawArgs {

@@ -12,6 +9,3 @@ ctx: CanvasRenderingContext2D;

row: number;
x: number;
y: number;
w: number;
h: number;
rect: Rectangle;
highlighted: boolean;

@@ -24,4 +18,5 @@ hoverAmount: number;

hyperWrapping: boolean;
requestAnimationFrame: () => void;
}
interface DrawArgs<T extends InnerGridCell> extends BaseDrawArgs {
export interface DrawArgs<T extends InnerGridCell> extends BaseDrawArgs {
cell: T;

@@ -35,32 +30,28 @@ }

}
declare type DrawCallback<T extends InnerGridCell> = (args: DrawArgs<T>) => void;
export declare type DrawCallback<T extends InnerGridCell> = (args: DrawArgs<T>, cell: T) => void;
declare type PrepCallback = (args: BaseDrawArgs, lastPrep?: PrepResult) => Partial<PrepResult>;
declare type DeprepCallback = (args: Pick<BaseDrawArgs, "ctx">) => void;
declare type ProvideEditorCallback<T extends InnerGridCell> = (cell: T) => React.FunctionComponent<{
readonly onChange: (newValue: T) => void;
readonly onKeyDown: (event: React.KeyboardEvent) => void;
readonly onFinishedEditing: (newValue?: T) => void;
readonly isHighlighted: boolean;
readonly value: T;
readonly imageEditorOverride?: ImageEditorType;
readonly markdownDivCreateNode?: (content: string) => DocumentFragment;
readonly target: Rectangle;
readonly validatedSelection?: number | readonly [number, number];
readonly forceEditMode: boolean;
readonly isValid?: boolean;
}> | undefined;
export interface InternalCellRenderer<T extends InnerGridCell> {
interface BaseCellRenderer<T extends InnerGridCell> {
readonly kind: T["kind"];
readonly renderPrep?: PrepCallback;
readonly render: DrawCallback<T>;
readonly renderDeprep?: DeprepCallback;
readonly needsHover: boolean;
readonly needsHoverPosition: boolean;
readonly useLabel?: boolean;
readonly measure: (ctx: CanvasRenderingContext2D, cell: T, theme: Theme) => number;
readonly draw: DrawCallback<T>;
readonly drawPrep?: PrepCallback;
readonly drawDeprep?: DeprepCallback;
readonly needsHover?: boolean;
readonly needsHoverPosition?: boolean;
readonly measure?: (ctx: CanvasRenderingContext2D, cell: T, theme: Theme) => number;
readonly provideEditor?: ProvideEditorCallback<T>;
readonly onClick?: (cell: T, posX: number, posY: number, bounds: Rectangle) => T | undefined;
readonly onDelete?: (cell: T) => T | undefined;
}
export interface InternalCellRenderer<T extends InnerGridCell> extends BaseCellRenderer<T> {
readonly useLabel?: boolean;
readonly getAccessibilityString: (cell: T) => string;
readonly getEditor?: ProvideEditorCallback<T>;
readonly onPaste: (val: string, cell: T) => T | undefined;
}
export interface CustomRenderer<T extends CustomCell = CustomCell> extends BaseCellRenderer<T> {
readonly isMatch: (cell: CustomCell) => cell is T;
readonly onPaste?: (val: string, cellData: T["data"]) => T["data"] | undefined;
}
export declare type CellRenderer<T extends InnerGridCell> = [T] extends [CustomCell<infer DataType>] ? CustomRenderer<CustomCell<DataType>> : InternalCellRenderer<T>;
export declare type GetCellRendererCallback = <T extends InnerGridCell>(cell: T) => CellRenderer<T> | undefined;
export {};

@@ -1,6 +0,15 @@

import { GridCellKind, InnerGridCell, InnerGridCellKind } from "../data-grid-types";
import type { InternalCellRenderer } from "./cell-types";
declare const asCollapsed: (x: any) => InternalCellRenderer<InnerGridCell>;
declare type RendererKinds = InnerGridCellKind | Exclude<GridCellKind, GridCellKind.Custom>;
export declare const CellRenderers: Record<RendererKinds, ReturnType<typeof asCollapsed>>;
export {};
export declare const CellRenderers: {
marker: import("./cell-types").InternalCellRenderer<import("../data-grid-types").MarkerCell>;
"new-row": import("./cell-types").InternalCellRenderer<import("../data-grid-types").NewRowCell>;
boolean: import("./cell-types").InternalCellRenderer<import("../data-grid-types").BooleanCell>;
bubble: import("./cell-types").InternalCellRenderer<import("../data-grid-types").BubbleCell>;
drilldown: import("./cell-types").InternalCellRenderer<import("../data-grid-types").DrilldownCell>;
image: import("./cell-types").InternalCellRenderer<import("../data-grid-types").ImageCell>;
loading: import("./cell-types").InternalCellRenderer<import("../data-grid-types").LoadingCell>;
markdown: import("./cell-types").InternalCellRenderer<import("../data-grid-types").MarkdownCell>;
number: import("./cell-types").InternalCellRenderer<import("../data-grid-types").NumberCell>;
protected: import("./cell-types").InternalCellRenderer<import("../data-grid-types").ProtectedCell>;
"row-id": import("./cell-types").InternalCellRenderer<import("../data-grid-types").RowIDCell>;
text: import("./cell-types").InternalCellRenderer<import("../data-grid-types").TextCell>;
uri: import("./cell-types").InternalCellRenderer<import("../data-grid-types").UriCell>;
};

@@ -28,3 +28,3 @@ import type { Theme } from "../common/styles";

export declare function drawTextCellExternal(args: DrawArgs, data: string, contentAlign?: BaseGridCell["contentAlign"]): void;
export declare function drawTextCell(args: Pick<BaseDrawArgs, "x" | "y" | "w" | "h" | "ctx" | "theme">, data: string, contentAlign?: BaseGridCell["contentAlign"], allowWrapping?: boolean, hyperWrapping?: boolean): void;
export declare function drawTextCell(args: Pick<BaseDrawArgs, "rect" | "ctx" | "theme">, data: string, contentAlign?: BaseGridCell["contentAlign"], allowWrapping?: boolean, hyperWrapping?: boolean): void;
export declare function drawNewRowCell(args: BaseDrawArgs, data: string, icon?: string): void;

@@ -31,0 +31,0 @@ 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): void;

/// <reference types="react" />
import type ImageWindowLoader from "../common/image-window-loader";
import { GridSelection, DrawHeaderCallback, InnerGridCell, Rectangle, CompactSelection, DrawCustomCellCallback, GridColumnIcon, Item, CellList, GridMouseGroupHeaderEventArgs, TrailingRowType } from "./data-grid-types";
import { GridSelection, DrawHeaderCallback, InnerGridCell, Rectangle, CompactSelection, DrawCustomCellCallback, GridColumnIcon, Item, CellList, GridMouseGroupHeaderEventArgs, TrailingRowType, ImageWindowLoader } from "./data-grid-types";
import type { HoverValues } from "./animation-manager";

@@ -8,3 +7,3 @@ import { MappedGridColumn } from "./data-grid-lib";

import type { Theme } from "../common/styles";
import type { PrepResult } from "./cells/cell-types";
import type { GetCellRendererCallback, PrepResult } from "./cells/cell-types";
declare type HoverInfo = readonly [Item, Item];

@@ -38,3 +37,3 @@ export interface Highlight {

}
export declare function drawCell(ctx: CanvasRenderingContext2D, row: number, cell: InnerGridCell, col: number, x: number, y: number, w: number, h: number, highlighted: boolean, theme: Theme, drawCustomCell: DrawCustomCellCallback | undefined, imageLoader: ImageWindowLoader, spriteManager: SpriteManager, hoverAmount: number, hoverInfo: HoverInfo | undefined, hyperWrapping: boolean, frameTime: number, lastPrep?: PrepResult, enqueue?: (item: Item) => void): PrepResult | undefined;
export declare function drawCell(ctx: CanvasRenderingContext2D, row: number, cell: InnerGridCell, col: number, x: number, y: number, w: number, h: number, highlighted: boolean, theme: Theme, drawCustomCell: DrawCustomCellCallback | undefined, imageLoader: ImageWindowLoader, spriteManager: SpriteManager, hoverAmount: number, hoverInfo: HoverInfo | undefined, hyperWrapping: boolean, frameTime: number, lastPrep: PrepResult | undefined, enqueue: ((item: Item) => void) | undefined, getCellRenderer: GetCellRendererCallback): PrepResult | undefined;
export declare function getActionBoundsForGroup(box: Rectangle, actions: NonNullable<GroupDetails["actions"]>): readonly Rectangle[];

@@ -65,2 +64,3 @@ export declare function pointInRect(rect: Rectangle, x: number, y: number): boolean;

readonly isFocused: boolean;
readonly drawFocus: boolean;
readonly selection: GridSelection;

@@ -87,4 +87,5 @@ readonly fillHandle: boolean;

readonly enqueue: (item: Item) => void;
readonly getCellRenderer: GetCellRendererCallback;
}
export declare function drawGrid(arg: DrawGridArg, lastArg: DrawGridArg | undefined): void;
export {};
import type { Theme } from "../common/styles";
import type React from "react";
import type { CSSProperties } from "react";
import type ImageWindowLoader from "../common/image-window-loader";
import type { SpriteManager } from "./data-grid-sprites";
import type { OverlayImageEditorProps } from "../data-grid-overlay-editor/private/image-overlay-editor";
export interface GridSelection {

@@ -15,2 +15,3 @@ readonly current?: {

}
export declare type ImageEditorType = React.ComponentType<OverlayImageEditorProps>;
export declare type GridMouseEventArgs = GridMouseCellEventArgs | GridMouseHeaderEventArgs | GridMouseOutOfBoundsEventArgs | GridMouseGroupHeaderEventArgs;

@@ -26,2 +27,7 @@ interface PreventableEvent {

}
export interface ImageWindowLoader {
setWindow(newWindow: Rectangle, freezeCols: number): void;
loadOrGetImage(url: string, col: number, row: number): HTMLImageElement | undefined;
setCallback(imageLoaded: (locations: readonly Item[]) => void): void;
}
export declare const BooleanEmpty: null;

@@ -43,3 +49,3 @@ export declare const BooleanIndeterminate: undefined;

readonly button: number;
readonly scrollEdge: readonly [-1 | 0 | 1, -1 | 0 | 1];
readonly scrollEdge: readonly [xDir: -1 | 0 | 1, yDir: -1 | 0 | 1];
}

@@ -81,2 +87,3 @@ export interface GridMouseCellEventArgs extends BaseGridMouseEventArgs, PositionableMouseEventArgs {

readonly cancel: () => void;
readonly rawEvent: React.KeyboardEvent<HTMLElement> | undefined;
}

@@ -163,3 +170,3 @@ interface DragHandler {

export declare type CellArray = readonly (readonly GridCell[])[];
export declare type Item = readonly [number, number];
export declare type Item = readonly [col: number, row: number];
export declare const headerCellCheckboxPrefix = "___gdg_header_cell_";

@@ -222,3 +229,3 @@ export declare const headerCellCheckedMarker: string;

readonly themeOverride?: Partial<Theme>;
readonly span?: readonly [number, number];
readonly span?: readonly [start: number, end: number];
readonly contentAlign?: "left" | "right" | "center";

@@ -257,3 +264,3 @@ readonly cursor?: CSSProperties["cursor"];

export declare type SelectionRange = number | readonly [number, number];
export declare type ProvideEditorComponent<T extends GridCell> = React.FunctionComponent<{
export declare type ProvideEditorComponent<T extends InnerGridCell> = React.FunctionComponent<{
readonly onChange: (newValue: T) => void;

@@ -265,4 +272,9 @@ readonly onFinishedEditing: (newValue?: T) => void;

readonly validatedSelection?: SelectionRange;
readonly imageEditorOverride?: ImageEditorType;
readonly markdownDivCreateNode?: (content: string) => DocumentFragment;
readonly target: Rectangle;
readonly forceEditMode: boolean;
readonly isValid?: boolean;
}>;
declare type ObjectEditorCallbackResult<T extends GridCell> = {
declare type ObjectEditorCallbackResult<T extends InnerGridCell> = {
editor: ProvideEditorComponent<T>;

@@ -274,8 +286,8 @@ deletedValue?: (toDelete: T) => T;

};
declare type ProvideEditorCallbackResult<T extends GridCell> = (ProvideEditorComponent<T> & {
export declare type ProvideEditorCallbackResult<T extends InnerGridCell> = (ProvideEditorComponent<T> & {
disablePadding?: boolean;
disableStyling?: boolean;
}) | ObjectEditorCallbackResult<T> | undefined;
export declare function isObjectEditorCallbackResult<T extends GridCell>(obj: ProvideEditorCallbackResult<T>): obj is ObjectEditorCallbackResult<T>;
export declare type ProvideEditorCallback<T extends GridCell> = (cell: T) => ProvideEditorCallbackResult<T>;
export declare function isObjectEditorCallbackResult<T extends InnerGridCell>(obj: ProvideEditorCallbackResult<T>): obj is ObjectEditorCallbackResult<T>;
export declare type ProvideEditorCallback<T extends InnerGridCell> = (cell: T) => ProvideEditorCallbackResult<T>;
export declare type ValidatedGridCell = EditableGridCell & {

@@ -338,3 +350,3 @@ selectionRange?: SelectionRange;

}
export declare type Slice = Item;
export declare type Slice = [start: number, end: number];
export declare type CompactSelectionRanges = readonly Slice[];

@@ -352,3 +364,3 @@ export declare class CompactSelection {

hasIndex: (index: number) => boolean;
hasAll: (index: Item) => boolean;
hasAll: (index: Slice) => boolean;
some: (predicate: (index: number) => boolean) => boolean;

@@ -355,0 +367,0 @@ equals: (other: CompactSelection) => boolean;

import * as React from "react";
import type { Theme } from "../common/styles";
import { Rectangle, GridSelection, GridMouseEventArgs, GridDragEventArgs, GridKeyEventArgs, InnerGridCell, CompactSelection, DrawCustomCellCallback, Item, DrawHeaderCallback, InnerGridColumn, TrailingRowType } from "./data-grid-types";
import { Rectangle, GridSelection, GridMouseEventArgs, GridDragEventArgs, GridKeyEventArgs, InnerGridCell, CompactSelection, DrawCustomCellCallback, Item, DrawHeaderCallback, InnerGridColumn, TrailingRowType, ImageWindowLoader } from "./data-grid-types";
import { SpriteMap } from "./data-grid-sprites";
import { GetRowThemeCallback, GroupDetailsCallback, Highlight } from "./data-grid-render";
import type { CellRenderer } from "./cells/cell-types";
export interface DataGridProps {

@@ -42,2 +43,3 @@ readonly width: number;

readonly disabledRows?: CompactSelection;
readonly imageWindowLoader?: ImageWindowLoader;
readonly onItemHovered?: (args: GridMouseEventArgs) => void;

@@ -63,2 +65,3 @@ readonly onMouseMove: (args: GridMouseEventArgs) => void;

readonly drawHeader?: DrawHeaderCallback;
readonly drawFocusRing?: boolean;
readonly dragAndDropState?: {

@@ -81,2 +84,3 @@ src: number;

readonly theme: Theme;
readonly getCellRenderer: <T extends InnerGridCell>(cell: T) => CellRenderer<T> | undefined;
}

@@ -83,0 +87,0 @@ declare type DamageUpdateList = readonly {

@@ -7,2 +7,3 @@ export type { OverlayImageEditorProps } from "./data-grid-overlay-editor/private/image-overlay-editor";

export type { DrawArgs } from "./data-editor/custom-cell-draw-args";
export type { CustomRenderer as AdditionalRenderer } from "./data-grid/cells/cell-types";
export * from "./data-editor/data-editor";

@@ -9,0 +10,0 @@ export * from "./data-grid/data-grid-types";

{
"name": "@glideapps/glide-data-grid",
"version": "5.0.0",
"version": "5.0.1-alpha1",
"description": "Super fast, pure canvas Data Grid Editor",

@@ -62,5 +62,5 @@ "sideEffects": [

"marked": "^4.0.10",
"react-responsive-carousel": "^3.2.7",
"react": "^16.12.0 || 17.x || 18.x",
"react-dom": "^16.12.0 || 17.x || 18.x"
"react-dom": "^16.12.0 || 17.x || 18.x",
"react-responsive-carousel": "^3.2.7"
},

@@ -71,2 +71,3 @@ "devDependencies": {

"@skypack/package-check": "^0.2.2",
"@types/jest": "^28.1.8",
"esbuild": "^0.14.47",

@@ -73,0 +74,0 @@ "eslint": "^8.19.0",

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 too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc