@glideapps/glide-data-grid
Advanced tools
Comparing version 5.3.1-alpha1 to 5.3.1-alpha2
@@ -1,2 +0,2 @@ | ||
import { MutableRefObject } from "react"; | ||
import { type MutableRefObject } from "react"; | ||
interface ReactResizeDetectorDimensions { | ||
@@ -3,0 +3,0 @@ height?: number; |
@@ -13,3 +13,3 @@ import * as React from "react"; | ||
export declare const getSquareWidth: (maxSize: number, containerHeight: number, verticalPadding: number) => number; | ||
declare type BoundingBox = { | ||
type BoundingBox = { | ||
x1: number; | ||
@@ -16,0 +16,0 @@ y1: number; |
import type { DataGridSearchProps } from "../data-grid-search/data-grid-search"; | ||
import { GridCell, GridSelection } from "../data-grid/data-grid-types"; | ||
import { type GridCell, type GridSelection } from "../data-grid/data-grid-types"; | ||
export declare function expandSelection(newVal: GridSelection, getCellsForSelection: DataGridSearchProps["getCellsForSelection"], rowMarkerOffset: number, spanRangeBehavior: "allowPartial" | "default", abortController: AbortController): GridSelection; | ||
@@ -4,0 +4,0 @@ export declare function unquote(str: string): string[][]; |
import * as React from "react"; | ||
import { EditableGridCell, GridCell, GridSelection, Rectangle, CompactSelection, ProvideEditorCallback, DrawCustomCellCallback, GridColumn, GroupHeaderClickedEventArgs, HeaderClickedEventArgs, CellClickedEventArgs, Item, ValidatedGridCell, ImageEditorType, CustomCell } from "../data-grid/data-grid-types"; | ||
import { DataGridSearchProps } from "../data-grid-search/data-grid-search"; | ||
import { Theme } from "../common/styles"; | ||
import { type EditableGridCell, type GridCell, type GridSelection, type Rectangle, CompactSelection, type ProvideEditorCallback, type DrawCustomCellCallback, type GridColumn, type GroupHeaderClickedEventArgs, type HeaderClickedEventArgs, type CellClickedEventArgs, type Item, type ValidatedGridCell, type ImageEditorType, type CustomCell } from "../data-grid/data-grid-types"; | ||
import { type DataGridSearchProps } from "../data-grid-search/data-grid-search"; | ||
import { type Theme } from "../common/styles"; | ||
import type { DataGridRef } from "../data-grid/data-grid"; | ||
import { SelectionBlending } from "../data-grid/use-selection-behavior"; | ||
import { type SelectionBlending } from "../data-grid/use-selection-behavior"; | ||
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" | "onVisibleRegionChanged" | "rowHeight" | "rows" | "scrollRef" | "searchInputRef" | "selectedColumns" | "selection" | "theme" | "trailingRowType" | "translateX" | "translateY" | "verticalBorder">>; | ||
declare type EditListItem = { | ||
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">>; | ||
type EditListItem = { | ||
location: Item; | ||
value: EditableGridCell; | ||
}; | ||
declare type EmitEvents = "copy" | "paste" | "delete" | "fill-right" | "fill-down"; | ||
type EmitEvents = "copy" | "paste" | "delete" | "fill-right" | "fill-down"; | ||
interface Keybinds { | ||
@@ -419,3 +419,3 @@ readonly selectAll: boolean; | ||
} | ||
declare type ScrollToFn = (col: number | { | ||
type ScrollToFn = (col: number | { | ||
amount: number; | ||
@@ -422,0 +422,0 @@ unit: "cell" | "px"; |
import * as React from "react"; | ||
import { EditableGridCell, GridCell, GridColumn, Item } from "../../data-grid/data-grid-types"; | ||
import { type EditableGridCell, type GridCell, type GridColumn, type Item } from "../../data-grid/data-grid-types"; | ||
import type { DataEditorProps } from "../data-editor"; | ||
@@ -8,21 +8,11 @@ /** | ||
export declare function lossyCopyData<T extends EditableGridCell>(source: EditableGridCell, target: T): EditableGridCell; | ||
export declare type GridColumnWithMockingInfo = GridColumn & { | ||
export type GridColumnWithMockingInfo = GridColumn & { | ||
getContent(): GridCell; | ||
}; | ||
export declare function getGridColumn(columnWithMock: GridColumnWithMockingInfo): GridColumn; | ||
export declare const ColumnAddButton: import("@linaria/react").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: React.ElementType<any> | undefined; | ||
}>; | ||
export declare const BeautifulStyle: import("@linaria/react").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: React.ElementType<any> | undefined; | ||
}>; | ||
export declare const PropName: import("@linaria/react").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & Record<string, unknown> & { | ||
as?: React.ElementType<any> | undefined; | ||
}>; | ||
export declare const Description: import("@linaria/react").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLParagraphElement> & React.HTMLAttributes<HTMLParagraphElement> & Record<string, unknown> & { | ||
as?: React.ElementType<any> | undefined; | ||
}>; | ||
export declare const MoreInfo: import("@linaria/react").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLParagraphElement> & React.HTMLAttributes<HTMLParagraphElement> & Record<string, unknown> & { | ||
as?: React.ElementType<any> | undefined; | ||
}>; | ||
export declare const ColumnAddButton: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
export declare const BeautifulStyle: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
export declare const PropName: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>; | ||
export declare const Description: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLParagraphElement> & React.HTMLAttributes<HTMLParagraphElement> & Record<never, unknown>>; | ||
export declare const MoreInfo: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLParagraphElement> & React.HTMLAttributes<HTMLParagraphElement> & Record<never, unknown>>; | ||
interface BeautifulProps { | ||
@@ -47,5 +37,3 @@ title: string; | ||
}; | ||
export declare const KeyName: import("@linaria/react").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement> & Record<string, unknown> & { | ||
as?: React.ElementType<any> | undefined; | ||
}>; | ||
export declare const KeyName: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement> & Record<never, unknown>>; | ||
export declare const defaultProps: Partial<DataEditorProps>; | ||
@@ -52,0 +40,0 @@ export declare function clearCell(cell: GridCell): GridCell; |
import type { DataGridSearchProps } from "../data-grid-search/data-grid-search"; | ||
import { CellArray } from "../data-grid/data-grid-types"; | ||
import { type CellArray } from "../data-grid/data-grid-types"; | ||
import type { DataEditorProps } from "./data-editor"; | ||
declare type CellsForSelectionCallback = NonNullable<DataGridSearchProps["getCellsForSelection"]>; | ||
type CellsForSelectionCallback = NonNullable<DataGridSearchProps["getCellsForSelection"]>; | ||
export declare function useCellsForSelection(getCellsForSelectionIn: CellsForSelectionCallback | true | undefined, getCellContent: DataEditorProps["getCellContent"], rowMarkerOffset: number, abortController: AbortController, rows: number): readonly [((selection: import("../data-grid/data-grid-types").Rectangle, abortSignal: AbortSignal) => import("../data-grid/data-grid-types").GetCellsThunk | CellArray) | undefined, ((selection: import("../data-grid/data-grid-types").Rectangle, abortSignal: AbortSignal) => import("../data-grid/data-grid-types").GetCellsThunk | CellArray) | undefined]; | ||
export {}; | ||
//# sourceMappingURL=use-cells-for-selection.d.ts.map |
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"; | ||
import { type CellArray, type GridColumn, type InnerGridColumn, type 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, getCellRenderer: GetCellRendererCallback): SizedGridColumn; | ||
@@ -6,0 +6,0 @@ /** @category Hooks */ |
import type { CustomRenderer } from "../data-grid/cells/cell-types"; | ||
import { CustomCell } from "../data-grid/data-grid-types"; | ||
import { type CustomCell } from "../data-grid/data-grid-types"; | ||
import type { DataEditorProps } from "./data-editor"; | ||
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
export declare type CustomCellRenderer<T extends CustomCell> = Omit<CustomRenderer<T>, "kind">; | ||
export type CustomCellRenderer<T extends CustomCell> = Omit<CustomRenderer<T>, "kind">; | ||
/** | ||
@@ -11,0 +11,0 @@ * @category Hooks |
import * as React from "react"; | ||
import { DataGridProps, DataGridRef } from "../data-grid/data-grid"; | ||
import { type DataGridProps, type DataGridRef } from "../data-grid/data-grid"; | ||
import type { GridColumn } from "../data-grid/data-grid-types"; | ||
declare type Props = Omit<DataGridProps, "dragAndDropState" | "isResizing" | "isDragging" | "onMouseMoveRaw" | "allowResize">; | ||
type Props = Omit<DataGridProps, "dragAndDropState" | "isResizing" | "isDragging" | "onMouseMoveRaw" | "allowResize">; | ||
export interface DataGridDndProps extends Props { | ||
@@ -6,0 +6,0 @@ /** |
@@ -8,6 +8,4 @@ /// <reference types="react" /> | ||
} | ||
export declare const DataGridOverlayEditorStyle: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const DataGridOverlayEditorStyle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props>; | ||
export {}; | ||
//# sourceMappingURL=data-grid-overlay-editor-style.d.ts.map |
import * as React from "react"; | ||
import { Theme } from "../common/styles"; | ||
import { type 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"; | ||
import { type EditableGridCell, type GridCell, type Item, type ProvideEditorCallback, type Rectangle, type ValidatedGridCell } from "../data-grid/data-grid-types"; | ||
import type { OverlayImageEditorProps } from "./private/image-overlay-editor"; | ||
declare type ImageEditorType = React.ComponentType<OverlayImageEditorProps>; | ||
type ImageEditorType = React.ComponentType<OverlayImageEditorProps>; | ||
interface DataGridOverlayEditorProps { | ||
@@ -8,0 +8,0 @@ readonly target: Rectangle; |
/// <reference types="react" /> | ||
export declare const BubblesOverlayEditorStyle: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const BubblesOverlayEditorStyle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
//# sourceMappingURL=bubbles-overlay-editor-style.d.ts.map |
/// <reference types="react" /> | ||
export declare const ImageOverlayEditorStyle: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const ImageOverlayEditorStyle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
//# sourceMappingURL=image-overlay-editor-style.d.ts.map |
@@ -5,6 +5,4 @@ /// <reference types="react" /> | ||
} | ||
export declare const MarkdownOverlayEditorStyle: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const MarkdownOverlayEditorStyle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Props>; | ||
export {}; | ||
//# sourceMappingURL=markdown-overlay-editor-style.d.ts.map |
/// <reference types="react" /> | ||
export declare const NumberOverlayEditorStyle: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const NumberOverlayEditorStyle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
//# sourceMappingURL=number-overlay-editor-style.d.ts.map |
/// <reference types="react" /> | ||
export declare const UriOverlayEditorStyle: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const UriOverlayEditorStyle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
//# sourceMappingURL=uri-overlay-editor-style.d.ts.map |
/// <reference types="react" /> | ||
export declare const SearchWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & { | ||
export declare const SearchWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & { | ||
showSearch: boolean; | ||
} & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
//# sourceMappingURL=data-grid-search-style.d.ts.map |
import * as React from "react"; | ||
import { CellArray, GetCellsThunk, Item, Rectangle } from "../data-grid/data-grid-types"; | ||
import { ScrollingDataGridProps } from "../scrolling-data-grid/scrolling-data-grid"; | ||
import { type CellArray, type GetCellsThunk, type Item, type Rectangle } from "../data-grid/data-grid-types"; | ||
import { type ScrollingDataGridProps } from "../scrolling-data-grid/scrolling-data-grid"; | ||
export interface DataGridSearchProps extends Omit<ScrollingDataGridProps, "prelightCells"> { | ||
@@ -5,0 +5,0 @@ readonly getCellsForSelection?: (selection: Rectangle, abortSignal: AbortSignal) => GetCellsThunk | CellArray; |
import type { Item } from "./data-grid-types"; | ||
declare type StateItem = { | ||
type StateItem = { | ||
item: Item; | ||
hoverAmount: number; | ||
}; | ||
export declare type HoverValues = readonly Readonly<StateItem>[]; | ||
export declare type StepCallback = (values: HoverValues) => void; | ||
export type HoverValues = readonly Readonly<StateItem>[]; | ||
export type StepCallback = (values: HoverValues) => void; | ||
export declare class AnimationManager { | ||
@@ -9,0 +9,0 @@ private callback; |
@@ -1,2 +0,2 @@ | ||
import { BooleanCell } from "../data-grid-types"; | ||
import { type BooleanCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,4 +0,4 @@ | ||
import { BubbleCell } from "../data-grid-types"; | ||
import { type BubbleCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const bubbleCellRenderer: InternalCellRenderer<BubbleCell>; | ||
//# sourceMappingURL=bubble-cell.d.ts.map |
@@ -32,4 +32,4 @@ import type { Theme } from "../.."; | ||
/** @category Renderers */ | ||
export declare type DrawCallback<T extends InnerGridCell> = (args: DrawArgs<T>, cell: T) => void; | ||
declare type PrepCallback = (args: BaseDrawArgs, lastPrep?: PrepResult) => Partial<PrepResult>; | ||
export type DrawCallback<T extends InnerGridCell> = (args: DrawArgs<T>, cell: T) => void; | ||
type PrepCallback = (args: BaseDrawArgs, lastPrep?: PrepResult) => Partial<PrepResult>; | ||
interface BaseCellRenderer<T extends InnerGridCell> { | ||
@@ -73,6 +73,6 @@ readonly kind: T["kind"]; | ||
/** @category Renderers */ | ||
export declare type CellRenderer<T extends InnerGridCell> = [T] extends [CustomCell<infer DataType>] ? CustomRenderer<CustomCell<DataType>> : InternalCellRenderer<T>; | ||
export type CellRenderer<T extends InnerGridCell> = [T] extends [CustomCell<infer DataType>] ? CustomRenderer<CustomCell<DataType>> : InternalCellRenderer<T>; | ||
/** @category Renderers */ | ||
export declare type GetCellRendererCallback = <T extends InnerGridCell>(cell: T) => CellRenderer<T> | undefined; | ||
export type GetCellRendererCallback = <T extends InnerGridCell>(cell: T) => CellRenderer<T> | undefined; | ||
export {}; | ||
//# sourceMappingURL=cell-types.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { DrilldownCell } from "../data-grid-types"; | ||
import { type DrilldownCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const drilldownCellRenderer: InternalCellRenderer<DrilldownCell>; | ||
//# sourceMappingURL=drilldown-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { ImageCell } from "../data-grid-types"; | ||
import { type ImageCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const imageCellRenderer: InternalCellRenderer<ImageCell>; | ||
//# sourceMappingURL=image-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { LoadingCell } from "../data-grid-types"; | ||
import { type LoadingCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const loadingCellRenderer: InternalCellRenderer<LoadingCell>; | ||
//# sourceMappingURL=loading-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { MarkdownCell } from "../data-grid-types"; | ||
import { type MarkdownCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const markdownCellRenderer: InternalCellRenderer<MarkdownCell>; | ||
//# sourceMappingURL=markdown-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { MarkerCell } from "../data-grid-types"; | ||
import { type MarkerCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const markerCellRenderer: InternalCellRenderer<MarkerCell>; | ||
//# sourceMappingURL=marker-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { NewRowCell } from "../data-grid-types"; | ||
import { type NewRowCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const newRowCellRenderer: InternalCellRenderer<NewRowCell>; | ||
//# sourceMappingURL=new-row-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { NumberCell } from "../data-grid-types"; | ||
import { type NumberCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const numberCellRenderer: InternalCellRenderer<NumberCell>; | ||
//# sourceMappingURL=number-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { ProtectedCell } from "../data-grid-types"; | ||
import { type ProtectedCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const protectedCellRenderer: InternalCellRenderer<ProtectedCell>; | ||
//# sourceMappingURL=protected-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { RowIDCell } from "../data-grid-types"; | ||
import { type RowIDCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const rowIDCellRenderer: InternalCellRenderer<RowIDCell>; | ||
//# sourceMappingURL=row-id-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { TextCell } from "../data-grid-types"; | ||
import { type TextCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const textCellRenderer: InternalCellRenderer<TextCell>; | ||
//# sourceMappingURL=text-cell.d.ts.map |
@@ -1,4 +0,4 @@ | ||
import { UriCell } from "../data-grid-types"; | ||
import { type UriCell } from "../data-grid-types"; | ||
import type { InternalCellRenderer } from "./cell-types"; | ||
export declare const uriCellRenderer: InternalCellRenderer<UriCell>; | ||
//# sourceMappingURL=uri-cell.d.ts.map |
import type { Theme } from "../common/styles"; | ||
import { DrilldownCellData, Item, GridSelection, InnerGridCell, SizedGridColumn, Rectangle, BaseGridCell, BooleanEmpty, BooleanIndeterminate } from "./data-grid-types"; | ||
import { type DrilldownCellData, type Item, type GridSelection, type InnerGridCell, type SizedGridColumn, type Rectangle, type BaseGridCell, BooleanEmpty, BooleanIndeterminate } from "./data-grid-types"; | ||
import type { BaseDrawArgs, PrepResult } from "./cells/cell-types"; | ||
@@ -4,0 +4,0 @@ export interface MappedGridColumn extends SizedGridColumn { |
/// <reference types="react" /> | ||
import { GridSelection, DrawHeaderCallback, InnerGridCell, Rectangle, CompactSelection, DrawCustomCellCallback, GridColumnIcon, Item, CellList, GridMouseGroupHeaderEventArgs, TrailingRowType, ImageWindowLoader } from "./data-grid-types"; | ||
import { type GridSelection, type DrawHeaderCallback, type InnerGridCell, type Rectangle, CompactSelection, type DrawCustomCellCallback, GridColumnIcon, type Item, type CellList, type GridMouseGroupHeaderEventArgs, type TrailingRowType, type ImageWindowLoader } from "./data-grid-types"; | ||
import type { HoverValues } from "./animation-manager"; | ||
import { MappedGridColumn } from "./data-grid-lib"; | ||
import { type MappedGridColumn } from "./data-grid-lib"; | ||
import type { SpriteManager } from "./data-grid-sprites"; | ||
import type { Theme } from "../common/styles"; | ||
import type { GetCellRendererCallback, PrepResult } from "./cells/cell-types"; | ||
declare type HoverInfo = readonly [Item, Item]; | ||
type HoverInfo = readonly [Item, Item]; | ||
export interface Highlight { | ||
@@ -24,4 +24,4 @@ readonly color: string; | ||
} | ||
export declare type GroupDetailsCallback = (groupName: string) => GroupDetails; | ||
export declare type GetRowThemeCallback = (row: number) => Partial<Theme> | undefined; | ||
export type GroupDetailsCallback = (groupName: string) => GroupDetails; | ||
export type GetRowThemeCallback = (row: number) => Partial<Theme> | undefined; | ||
export interface BlitData { | ||
@@ -28,0 +28,0 @@ readonly cellXOffset: number; |
import type { Theme } from "../common/styles"; | ||
import type { SpriteProps } from "../common/utils"; | ||
import { HeaderIconMap } from "./sprites"; | ||
import { type HeaderIconMap } from "./sprites"; | ||
/** | ||
@@ -9,3 +9,3 @@ * A known icon identifier | ||
*/ | ||
export declare type HeaderIcon = keyof HeaderIconMap; | ||
export type HeaderIcon = keyof HeaderIconMap; | ||
/** | ||
@@ -17,3 +17,3 @@ * A method that produces an SVG array from | ||
*/ | ||
export declare type Sprite = (props: SpriteProps) => string; | ||
export type Sprite = (props: SpriteProps) => string; | ||
/** | ||
@@ -25,5 +25,5 @@ * A method that maps from icon names to functions | ||
*/ | ||
export declare type SpriteMap = Record<string | HeaderIcon, Sprite>; | ||
export type SpriteMap = Record<string | HeaderIcon, Sprite>; | ||
/** @category Columns */ | ||
export declare type SpriteVariant = "normal" | "selected" | "special"; | ||
export type SpriteVariant = "normal" | "selected" | "special"; | ||
/** @category Columns */ | ||
@@ -30,0 +30,0 @@ export declare class SpriteManager { |
@@ -18,5 +18,5 @@ import type { Theme } from "../common/styles"; | ||
/** @category Types */ | ||
export declare type ImageEditorType = React.ComponentType<OverlayImageEditorProps>; | ||
export type ImageEditorType = React.ComponentType<OverlayImageEditorProps>; | ||
/** @category Types */ | ||
export declare type GridMouseEventArgs = GridMouseCellEventArgs | GridMouseHeaderEventArgs | GridMouseOutOfBoundsEventArgs | GridMouseGroupHeaderEventArgs; | ||
export type GridMouseEventArgs = GridMouseCellEventArgs | GridMouseHeaderEventArgs | GridMouseOutOfBoundsEventArgs | GridMouseGroupHeaderEventArgs; | ||
interface PreventableEvent { | ||
@@ -45,5 +45,5 @@ preventDefault: () => void; | ||
/** @category Types */ | ||
export declare type BooleanEmpty = null; | ||
export type BooleanEmpty = null; | ||
/** @category Types */ | ||
export declare type BooleanIndeterminate = undefined; | ||
export type BooleanIndeterminate = undefined; | ||
interface PositionableMouseEventArgs { | ||
@@ -119,7 +119,7 @@ readonly localEventX: number; | ||
/** @category Types */ | ||
export declare type GridDragEventArgs = GridMouseEventArgs & DragHandler; | ||
export type GridDragEventArgs = GridMouseEventArgs & DragHandler; | ||
/** @category Types */ | ||
export declare type TrailingRowType = "sticky" | "appended" | "none"; | ||
export type TrailingRowType = "sticky" | "appended" | "none"; | ||
/** @category Types */ | ||
export declare type DrawCustomCellCallback = (args: { | ||
export type DrawCustomCellCallback = (args: { | ||
ctx: CanvasRenderingContext2D; | ||
@@ -139,3 +139,3 @@ cell: GridCell; | ||
/** @category Types */ | ||
export declare type DrawHeaderCallback = (args: { | ||
export type DrawHeaderCallback = (args: { | ||
ctx: CanvasRenderingContext2D; | ||
@@ -200,3 +200,3 @@ column: GridColumn; | ||
/** @category Types */ | ||
export declare type CellArray = readonly (readonly GridCell[])[]; | ||
export type CellArray = readonly (readonly GridCell[])[]; | ||
/** | ||
@@ -213,3 +213,3 @@ * This type is used to specify the coordinates of | ||
*/ | ||
export declare type Item = readonly [col: number, row: number]; | ||
export type Item = readonly [col: number, row: number]; | ||
/** @category Types */ | ||
@@ -254,15 +254,15 @@ export declare const headerCellCheckboxPrefix = "___gdg_header_cell_"; | ||
/** @category Types */ | ||
export declare type GetCellsThunk = () => Promise<CellArray>; | ||
export type GetCellsThunk = () => Promise<CellArray>; | ||
/** @category Columns */ | ||
export declare type GridColumn = SizedGridColumn | AutoGridColumn; | ||
export type GridColumn = SizedGridColumn | AutoGridColumn; | ||
/** @category Columns */ | ||
export declare type InnerGridColumn = SizedGridColumn & { | ||
export type InnerGridColumn = SizedGridColumn & { | ||
growOffset?: number; | ||
}; | ||
/** @category Cells */ | ||
export declare type ReadWriteGridCell = TextCell | NumberCell | MarkdownCell | UriCell | CustomCell | BooleanCell; | ||
export type ReadWriteGridCell = TextCell | NumberCell | MarkdownCell | UriCell | CustomCell | BooleanCell; | ||
/** @category Cells */ | ||
export declare type EditableGridCell = TextCell | ImageCell | BooleanCell | MarkdownCell | UriCell | NumberCell | CustomCell; | ||
export type EditableGridCell = TextCell | ImageCell | BooleanCell | MarkdownCell | UriCell | NumberCell | CustomCell; | ||
/** @category Cells */ | ||
export declare type EditableGridCellKind = EditableGridCell["kind"]; | ||
export type EditableGridCellKind = EditableGridCell["kind"]; | ||
/** @category Cells */ | ||
@@ -277,8 +277,8 @@ export declare function isEditableGridCell(cell: GridCell): cell is ValidatedGridCell; | ||
/** @category Cells */ | ||
export declare type GridCell = EditableGridCell | BubbleCell | RowIDCell | LoadingCell | ProtectedCell | DrilldownCell | CustomCell; | ||
declare type InnerOnlyGridCell = NewRowCell | MarkerCell; | ||
export type GridCell = EditableGridCell | BubbleCell | RowIDCell | LoadingCell | ProtectedCell | DrilldownCell | CustomCell; | ||
type InnerOnlyGridCell = NewRowCell | MarkerCell; | ||
/** @category Cells */ | ||
export declare type InnerGridCell = GridCell | InnerOnlyGridCell; | ||
export type InnerGridCell = GridCell | InnerOnlyGridCell; | ||
/** @category Cells */ | ||
export declare type CellList = readonly Item[]; | ||
export type CellList = readonly Item[]; | ||
/** @category Types */ | ||
@@ -343,5 +343,5 @@ export interface Rectangle { | ||
/** @category Renderers */ | ||
export declare type SelectionRange = number | readonly [number, number]; | ||
export type SelectionRange = number | readonly [number, number]; | ||
/** @category Renderers */ | ||
export declare type ProvideEditorComponent<T extends InnerGridCell> = React.FunctionComponent<{ | ||
export type ProvideEditorComponent<T extends InnerGridCell> = React.FunctionComponent<{ | ||
readonly onChange: (newValue: T) => void; | ||
@@ -359,3 +359,3 @@ readonly onFinishedEditing: (newValue?: T, movement?: readonly [-1 | 0 | 1, -1 | 0 | 1]) => void; | ||
}>; | ||
declare type ObjectEditorCallbackResult<T extends InnerGridCell> = { | ||
type ObjectEditorCallbackResult<T extends InnerGridCell> = { | ||
editor: ProvideEditorComponent<T>; | ||
@@ -368,3 +368,3 @@ deletedValue?: (toDelete: T) => T; | ||
/** @category Renderers */ | ||
export declare type ProvideEditorCallbackResult<T extends InnerGridCell> = (ProvideEditorComponent<T> & { | ||
export type ProvideEditorCallbackResult<T extends InnerGridCell> = (ProvideEditorComponent<T> & { | ||
disablePadding?: boolean; | ||
@@ -376,5 +376,5 @@ disableStyling?: boolean; | ||
/** @category Renderers */ | ||
export declare type ProvideEditorCallback<T extends InnerGridCell> = (cell: T) => ProvideEditorCallbackResult<T>; | ||
export type ProvideEditorCallback<T extends InnerGridCell> = (cell: T) => ProvideEditorCallbackResult<T>; | ||
/** @category Cells */ | ||
export declare type ValidatedGridCell = EditableGridCell & { | ||
export type ValidatedGridCell = EditableGridCell & { | ||
selectionRange?: SelectionRange; | ||
@@ -450,5 +450,5 @@ }; | ||
/** @category Selection */ | ||
export declare type Slice = [start: number, end: number]; | ||
export type Slice = [start: number, end: number]; | ||
/** @category Selection */ | ||
export declare type CompactSelectionRanges = readonly Slice[]; | ||
export type CompactSelectionRanges = readonly Slice[]; | ||
/** @category Selection */ | ||
@@ -455,0 +455,0 @@ export declare class CompactSelection { |
import * as React from "react"; | ||
import type { Theme } from "../common/styles"; | ||
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 Rectangle, type GridSelection, type GridMouseEventArgs, type GridDragEventArgs, type GridKeyEventArgs, type InnerGridCell, CompactSelection, type DrawCustomCellCallback, type Item, type DrawHeaderCallback, type InnerGridColumn, type TrailingRowType, type ImageWindowLoader } from "./data-grid-types"; | ||
import { type SpriteMap } from "./data-grid-sprites"; | ||
import { type GetRowThemeCallback, type GroupDetailsCallback, type Highlight } from "./data-grid-render"; | ||
import type { CellRenderer } from "./cells/cell-types"; | ||
@@ -193,3 +193,3 @@ export interface DataGridProps { | ||
} | ||
declare type DamageUpdateList = readonly { | ||
type DamageUpdateList = readonly { | ||
cell: Item; | ||
@@ -196,0 +196,0 @@ }[]; |
@@ -33,3 +33,3 @@ import type { SpriteProps } from "../common/utils"; | ||
}; | ||
export declare type HeaderIconMap = Readonly<typeof sprites>; | ||
export type HeaderIconMap = Readonly<typeof sprites>; | ||
//# sourceMappingURL=sprites.d.ts.map |
@@ -1,7 +0,7 @@ | ||
import { CompactSelection, GridSelection, Slice } from "./data-grid-types"; | ||
declare type SetCallback = (newVal: GridSelection, expand: boolean) => void; | ||
export declare type SelectionBlending = "exclusive" | "mixed"; | ||
declare type SelectionTrigger = "click" | "drag" | "keyboard-nav" | "keyboard-select" | "edit"; | ||
import { CompactSelection, type GridSelection, type Slice } from "./data-grid-types"; | ||
type SetCallback = (newVal: GridSelection, expand: boolean) => void; | ||
export type SelectionBlending = "exclusive" | "mixed"; | ||
type SelectionTrigger = "click" | "drag" | "keyboard-nav" | "keyboard-select" | "edit"; | ||
export declare function useSelectionBehavior(gridSelection: GridSelection, setGridSelection: SetCallback, rangeBehavior: SelectionBlending, columnBehavior: SelectionBlending, rowBehavior: SelectionBlending, rangeSelect: "none" | "cell" | "rect" | "multi-cell" | "multi-rect"): readonly [(value: Pick<NonNullable<GridSelection["current"]>, "cell" | "range"> | undefined, expand: boolean, append: boolean, trigger: SelectionTrigger) => void, (newRows: CompactSelection | undefined, append: Slice | number | undefined, allowMixed: boolean) => void, (newCols: CompactSelection | undefined, append: number | Slice | undefined, allowMixed: boolean) => void]; | ||
export {}; | ||
//# sourceMappingURL=use-selection-behavior.d.ts.map |
/// <reference types="react" /> | ||
export declare const InputBox: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLTextAreaElement> & import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const ShadowBox: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const GrowingEntryStyle: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const InputBox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLTextAreaElement> & import("react").TextareaHTMLAttributes<HTMLTextAreaElement> & Record<never, unknown>>; | ||
export declare const ShadowBox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
export declare const GrowingEntryStyle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
//# sourceMappingURL=growing-entry-style.d.ts.map |
/// <reference types="react" /> | ||
export declare const MarkdownContainer: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<string, unknown> & { | ||
as?: import("react").ElementType<any> | undefined; | ||
}>; | ||
export declare const MarkdownContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>; | ||
//# sourceMappingURL=markdown-container.d.ts.map |
import * as React from "react"; | ||
import { DataGridDndProps } from "../data-grid-dnd/data-grid-dnd"; | ||
import { type DataGridDndProps } from "../data-grid-dnd/data-grid-dnd"; | ||
import type { Rectangle } from "../data-grid/data-grid-types"; | ||
declare type Props = Omit<DataGridDndProps, "width" | "height" | "eventTargetRef">; | ||
type Props = Omit<DataGridDndProps, "width" | "height" | "eventTargetRef">; | ||
export interface ScrollingDataGridProps extends Props { | ||
@@ -6,0 +6,0 @@ readonly className: string | undefined; |
{ | ||
"name": "@glideapps/glide-data-grid", | ||
"version": "5.3.1-alpha1", | ||
"version": "5.3.1-alpha2", | ||
"description": "React data grid for beautifully displaying and editing large amounts of data with amazing performance.", | ||
@@ -28,4 +28,3 @@ "sideEffects": [ | ||
"build-types": "tsc -p tsconfig.types.json", | ||
"lint": "npm run cycle-check && eslint src --ext .ts,.tsx", | ||
"cycle-check": "ts-helper -p ./tsconfig.json -r ./src/index.ts -c", | ||
"lint": "eslint src --ext .ts,.tsx", | ||
"test": "jest", | ||
@@ -70,6 +69,4 @@ "check-package": "package-check" | ||
"@babel/cli": "^7.16.0", | ||
"@glideapps/ts-helper": "0.0.5", | ||
"@skypack/package-check": "^0.2.2", | ||
"@types/jest": "^28.1.8", | ||
"esbuild": "^0.14.47", | ||
"eslint": "^8.19.0", | ||
@@ -76,0 +73,0 @@ "jest": "^27.4.2", |
@@ -1,2 +0,2 @@ | ||
import { AnimationManager, HoverValues } from "../src/data-grid/animation-manager"; | ||
import { AnimationManager, type HoverValues } from "../src/data-grid/animation-manager"; | ||
@@ -3,0 +3,0 @@ const OG_RAF = window.requestAnimationFrame; |
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 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
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
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
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
3135788
8
31649