@glideapps/glide-data-grid
Advanced tools
Comparing version 4.99.0-beta4 to 4.99.0-beta5
import * as React from "react"; | ||
import { EditableGridCell, GridCell, GridSelection, Rectangle, ProvideEditorCallback, DrawCustomCellCallback, GridColumn, GroupHeaderClickedEventArgs, HeaderClickedEventArgs, CellClickedEventArgs, Item } from "../data-grid/data-grid-types"; | ||
import { EditableGridCell, GridCell, GridSelection, Rectangle, ProvideEditorCallback, DrawCustomCellCallback, GridColumn, GroupHeaderClickedEventArgs, HeaderClickedEventArgs, CellClickedEventArgs, Item, ValidatedGridCell } from "../data-grid/data-grid-types"; | ||
import { DataGridSearchProps } from "../data-grid-search/data-grid-search"; | ||
@@ -8,3 +8,3 @@ import type { OverlayImageEditorProps } from "../data-grid-overlay-editor/private/image-overlay-editor"; | ||
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" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onMouseMove" | "onMouseUp" | "onSearchResultsChanged" | "onVisibleRegionChanged" | "rowHeight" | "scrollRef" | "searchColOffset" | "selectedColumns" | "selection" | "theme" | "trailingRowType" | "translateX" | "translateY" | "verticalBorder">; | ||
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" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onMouseMove" | "onMouseUp" | "onSearchResultsChanged" | "onVisibleRegionChanged" | "rowHeight" | "scrollRef" | "searchColOffset" | "selectedColumns" | "selection" | "theme" | "trailingRowType" | "translateX" | "translateY" | "verticalBorder">; | ||
declare type ImageEditorType = React.ComponentType<OverlayImageEditorProps>; | ||
@@ -45,3 +45,3 @@ declare type ReplaceReturnType<T extends (...a: any) => any, TNewReturn> = (...a: Parameters<T>) => TNewReturn; | ||
readonly onCellContextMenu?: (cell: Item, event: CellClickedEventArgs) => void; | ||
readonly validateCell?: (cell: Item, newValue: EditableGridCell, prevValue: GridCell) => boolean | EditableGridCell; | ||
readonly validateCell?: (cell: Item, newValue: EditableGridCell, prevValue: GridCell) => boolean | ValidatedGridCell; | ||
readonly columns: readonly GridColumn[]; | ||
@@ -57,3 +57,3 @@ readonly trailingRowOptions?: { | ||
readonly groupHeaderHeight?: number; | ||
readonly rowMarkers?: "checkbox" | "number" | "both" | "none"; | ||
readonly rowMarkers?: "checkbox" | "number" | "clickable-number" | "both" | "none"; | ||
readonly rowMarkerWidth?: number; | ||
@@ -60,0 +60,0 @@ readonly rowMarkerStartIndex?: number; |
import * as React from "react"; | ||
import { Theme } from "../common/styles"; | ||
import { EditableGridCell, GridCell, Item, ProvideEditorCallback, Rectangle } from "../data-grid/data-grid-types"; | ||
import { EditableGridCell, GridCell, Item, ProvideEditorCallback, Rectangle, ValidatedGridCell } from "../data-grid/data-grid-types"; | ||
import type { OverlayImageEditorProps } from "./private/image-overlay-editor"; | ||
@@ -20,5 +20,5 @@ declare type ImageEditorType = React.ComponentType<OverlayImageEditorProps>; | ||
readonly provideEditor?: ProvideEditorCallback<GridCell>; | ||
readonly validateCell?: (cell: Item, newValue: EditableGridCell, prevValue: GridCell) => boolean | EditableGridCell; | ||
readonly validateCell?: (cell: Item, newValue: EditableGridCell, prevValue: GridCell) => boolean | ValidatedGridCell; | ||
} | ||
declare const DataGridOverlayEditor: React.FunctionComponent<DataGridOverlayEditorProps>; | ||
export default DataGridOverlayEditor; |
import * as React from "react"; | ||
import type { Rectangle } from "../../data-grid/data-grid-types"; | ||
import type { Rectangle, SelectionRange } from "../../data-grid/data-grid-types"; | ||
interface Props { | ||
@@ -10,2 +10,3 @@ readonly targetRect: Rectangle; | ||
readonly onFinish: () => void; | ||
readonly validatedSelection?: SelectionRange; | ||
readonly readonly: boolean; | ||
@@ -12,0 +13,0 @@ createNode?: (content: string) => DocumentFragment; |
import * as React from "react"; | ||
import type { NumberFormatValues } from "react-number-format"; | ||
import type { SelectionRange } from "../../data-grid/data-grid-types"; | ||
interface Props { | ||
@@ -9,4 +10,5 @@ value: number | undefined; | ||
highlight: boolean; | ||
validatedSelection?: SelectionRange; | ||
} | ||
declare const NumberOverlayEditor: React.FunctionComponent<Props>; | ||
export default NumberOverlayEditor; |
import * as React from "react"; | ||
import type { SelectionRange } from "../../data-grid/data-grid-types"; | ||
interface Props { | ||
@@ -8,4 +9,5 @@ readonly uri: string; | ||
readonly readonly: boolean; | ||
readonly validatedSelection?: SelectionRange; | ||
} | ||
declare const UriOverlayEditor: React.FunctionComponent<Props>; | ||
export default UriOverlayEditor; |
@@ -45,2 +45,3 @@ /// <reference types="react" /> | ||
readonly target: Rectangle; | ||
readonly validatedSelection?: number | readonly [number, number]; | ||
readonly forceEditMode: boolean; | ||
@@ -47,0 +48,0 @@ readonly isValid?: boolean; |
@@ -195,3 +195,3 @@ import type { Theme } from "../common/styles"; | ||
export declare type EditableGridCellKind = EditableGridCell["kind"]; | ||
export declare function isEditableGridCell(cell: GridCell): cell is EditableGridCell; | ||
export declare function isEditableGridCell(cell: GridCell): cell is ValidatedGridCell; | ||
export declare function isTextEditableGridCell(cell: GridCell): cell is ReadWriteGridCell; | ||
@@ -248,2 +248,3 @@ export declare function isInnerOnlyCell(cell: InnerGridCell): cell is InnerOnlyGridCell; | ||
} | ||
export declare type SelectionRange = number | readonly [number, number]; | ||
export declare type ProvideEditorComponent<T extends GridCell> = React.FunctionComponent<{ | ||
@@ -255,2 +256,3 @@ readonly onChange: (newValue: T) => void; | ||
readonly initialValue?: string; | ||
readonly validatedSelection?: SelectionRange; | ||
}>; | ||
@@ -270,2 +272,5 @@ declare type ObjectEditorCallbackResult<T extends GridCell> = { | ||
export declare type ProvideEditorCallback<T extends GridCell> = (cell: T) => ProvideEditorCallbackResult<T>; | ||
export declare type ValidatedGridCell = EditableGridCell & { | ||
selectionRange?: SelectionRange; | ||
}; | ||
export interface CustomCell<T extends {} = {}> extends BaseGridCell { | ||
@@ -272,0 +277,0 @@ readonly kind: GridCellKind.Custom; |
@@ -46,2 +46,3 @@ import * as React from "react"; | ||
readonly onMouseUp?: (args: GridMouseEventArgs, isOutside: boolean) => void; | ||
readonly onContextMenu?: (args: GridMouseEventArgs, preventDefault: () => void) => void; | ||
readonly onCanvasFocused?: () => void; | ||
@@ -48,0 +49,0 @@ readonly onCanvasBlur?: () => void; |
import * as React from "react"; | ||
import type { SelectionRange } from "../data-grid/data-grid-types"; | ||
interface Props extends React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> { | ||
@@ -6,4 +7,5 @@ readonly placeholder?: string; | ||
readonly altNewline?: boolean; | ||
readonly validatedSelection?: SelectionRange; | ||
} | ||
declare const GrowingEntry: React.FunctionComponent<Props>; | ||
export default GrowingEntry; |
{ | ||
"name": "@glideapps/glide-data-grid", | ||
"version": "4.99.0-beta4", | ||
"version": "4.99.0-beta5", | ||
"description": "Super fast, pure canvas Data Grid Editor", | ||
@@ -5,0 +5,0 @@ "sideEffects": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
901080
21023