Skip to content

Commit

Permalink
feat: add onGridFocused()/onGridBlurred() callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSisb committed Jul 31, 2024
1 parent 63f708d commit db88915
Show file tree
Hide file tree
Showing 83 changed files with 57 additions and 86 deletions.
6 changes: 4 additions & 2 deletions dist/cjs/data-editor/data-editor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/data-editor/data-editor.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion dist/cjs/internal/data-grid/data-grid.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cjs/internal/data-grid/data-grid.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/dts/cells/boolean-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type BooleanCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const booleanCellRenderer: InternalCellRenderer<BooleanCell>;
//# sourceMappingURL=boolean-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/bubble-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type BubbleCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const bubbleCellRenderer: InternalCellRenderer<BubbleCell>;
//# sourceMappingURL=bubble-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/drilldown-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type DrilldownCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const drilldownCellRenderer: InternalCellRenderer<DrilldownCell>;
//# sourceMappingURL=drilldown-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/image-cell.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ import { type BaseGridCell, type ImageCell } from "../internal/data-grid/data-gr
import type { BaseDrawArgs, InternalCellRenderer } from "./cell-types.js";
export declare const imageCellRenderer: InternalCellRenderer<ImageCell>;
export declare function drawImage(args: BaseDrawArgs, data: readonly string[], rounding: number, contentAlign?: BaseGridCell["contentAlign"]): void;
//# sourceMappingURL=image-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type InnerGridCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const AllCellRenderers: InternalCellRenderer<InnerGridCell>[];
//# sourceMappingURL=index.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/loading-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type LoadingCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const loadingCellRenderer: InternalCellRenderer<LoadingCell>;
//# sourceMappingURL=loading-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/markdown-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type MarkdownCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const markdownCellRenderer: InternalCellRenderer<MarkdownCell>;
//# sourceMappingURL=markdown-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/marker-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type MarkerCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const markerCellRenderer: InternalCellRenderer<MarkerCell>;
//# sourceMappingURL=marker-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/new-row-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type NewRowCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const newRowCellRenderer: InternalCellRenderer<NewRowCell>;
//# sourceMappingURL=new-row-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/number-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type NumberCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const numberCellRenderer: InternalCellRenderer<NumberCell>;
//# sourceMappingURL=number-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/protected-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type ProtectedCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const protectedCellRenderer: InternalCellRenderer<ProtectedCell>;
//# sourceMappingURL=protected-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/row-id-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type RowIDCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const rowIDCellRenderer: InternalCellRenderer<RowIDCell>;
//# sourceMappingURL=row-id-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/text-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type TextCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const textCellRenderer: InternalCellRenderer<TextCell>;
//# sourceMappingURL=text-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/cells/uri-cell.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { type UriCell } from "../internal/data-grid/data-grid-types.js";
import type { InternalCellRenderer } from "./cell-types.js";
export declare const uriCellRenderer: InternalCellRenderer<UriCell>;
//# sourceMappingURL=uri-cell.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/common/browser-detect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ export declare const browserIsFirefox: Lazy<boolean>;
export declare const browserIsSafari: Lazy<boolean>;
export declare const browserIsOSX: Lazy<boolean>;
export {};
//# sourceMappingURL=browser-detect.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/common/image-window-loader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ declare class ImageWindowLoaderImpl extends WindowingTrackerBase implements Imag
loadOrGetImage(url: string, col: number, row: number): HTMLImageElement | ImageBitmap | undefined;
}
export default ImageWindowLoaderImpl;
//# sourceMappingURL=image-window-loader.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/common/is-hotkey.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ interface HotkeyResultDetails {
}
export declare function isHotkey(hotkey: string, args: GridKeyEventArgs, details: HotkeyResultDetails): boolean;
export {};
//# sourceMappingURL=is-hotkey.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/common/math.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ interface SplitRect {
}
export declare function splitRectIntoRegions(rect: Rectangle, splitIndicies: readonly [number, number, number, number], width: number, height: number, splitLocations: readonly [number, number, number, number]): SplitRect[];
export {};
//# sourceMappingURL=math.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/common/render-state-provider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ export declare class RenderStateProvider extends WindowingTrackerBase {
getValue: (location: Item) => any;
protected clearOutOfWindow: () => void;
}
//# sourceMappingURL=render-state-provider.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/common/resize-detector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ export interface UseResizeDetectorReturn<T> extends ReactResizeDetectorDimension
ref: MutableRefObject<T | null>;
}
export {};
//# sourceMappingURL=resize-detector.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/common/styles.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ export declare const ThemeContext: React.Context<Theme>;
/** @category Hooks */
export declare function useTheme(): Theme;
export declare function mergeAndRealizeTheme(theme: Theme, ...overlays: Partial<Theme | undefined>[]): FullTheme;
//# sourceMappingURL=styles.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/data-editor-all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ export interface DataEditorAllProps extends Omit<DataEditorProps, "renderers" |
imageWindowLoader?: ImageWindowLoader;
}
export declare const DataEditorAll: React.ForwardRefExoticComponent<DataEditorAllProps & React.RefAttributes<DataEditorRef>>;
//# sourceMappingURL=data-editor-all.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/data-editor/copy-paste.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ export declare function getCopyBufferContents(cells: readonly (readonly GridCell
};
export declare function decodeHTML(html: string): CopyBuffer | undefined;
export {};
//# sourceMappingURL=copy-paste.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/data-editor/data-editor-fns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ export declare function copyToClipboard(cells: readonly (readonly GridCell[])[],
* empty + click -> checked
*/
export declare function toggleBoolean(data: boolean | null | undefined): boolean | null | undefined;
//# sourceMappingURL=data-editor-fns.d.ts.map
1 change: 0 additions & 1 deletion dist/dts/data-editor/data-editor-keybindings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ export declare const keybindingDefaults: Keybinds;
export declare function realizeKeybinds(keybinds: Keybinds): RealizedKeybinds;
export declare function useKeybindingsWithDefaults(keybindingsIn?: Partial<Keybinds>): RealizedKeybinds;
export {};
//# sourceMappingURL=data-editor-keybindings.d.ts.map
9 changes: 8 additions & 1 deletion dist/dts/data-editor/data-editor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ export interface DataEditorProps extends Props, Pick<DataGridSearchProps, "image
* @group Events
*/
readonly onCellActivated?: (cell: Item) => void;
/** Emitted when the grid is focused.
* @group Events
*/
readonly onGridFocused?: () => void;
/** Emitted when the grid is blurred.
* @group Events
*/
readonly onGridBlurred?: () => void;
/**
* Emitted whenever the user initiats a pattern fill using the fill handle. This event provides both
* a patternSource region and a fillDestination region, and can be prevented.
Expand Down Expand Up @@ -501,4 +509,3 @@ export interface DataEditorRef {
*/
export declare const DataEditor: React.ForwardRefExoticComponent<DataEditorProps & React.RefAttributes<DataEditorRef>>;
export {};
//# sourceMappingURL=data-editor.d.ts.map
Loading

0 comments on commit db88915

Please sign in to comment.