@omnigrid/react 0.1.34 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -77
- package/dist/OmniGrid.d.ts +1 -1
- package/dist/OmniGrid.js +27 -27
- package/dist/cellTooltip.d.ts +2 -2
- package/dist/content.d.ts +1 -1
- package/dist/content.js +1 -1
- package/dist/controls.d.ts +1 -1
- package/dist/groupCell.d.ts +1 -1
- package/dist/groupCell.js +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.js +6 -6
- package/dist/pooledRow.d.ts +2 -2
- package/dist/pooledRow.js +1 -1
- package/dist/popup.d.ts +1 -1
- package/dist/popup.js +1 -1
- package/dist/styling.d.ts +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/useGrid.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
# @omnigrid/react
|
|
2
|
-
|
|
3
|
-
React adapter and renderer for OmniGrid. Renders the headless core engine into the DOM using React.
|
|
4
|
-
|
|
5
|
-
## What it provides
|
|
6
|
-
|
|
7
|
-
- **`<OmniGrid />`** — React component that accepts `GridOptions` and renders a fully virtualized, 2D scrolled data grid
|
|
8
|
-
- **`useGrid()`** — hook that creates and manages a `GridCore` instance with full lifecycle handling
|
|
9
|
-
- **Cell / Row pooling** — reusable React content via DOM-pool integration for minimal re-renders
|
|
10
|
-
- **Styles and default theme** — required structural styles and light/dark default colors are included automatically
|
|
11
|
-
- **`transpilePackages`-ready** — works out of the box with Next.js and other bundlers
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import { OmniGrid } from "@omnigrid/react";
|
|
17
|
-
import { useMemo } from "react";
|
|
18
|
-
|
|
19
|
-
const columns = useMemo(() => [...], []);
|
|
20
|
-
const data = [...];
|
|
21
|
-
|
|
22
|
-
<OmniGrid columns={columns} data={data} />;
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Set `animateRows` to animate visible rows when filtering or sorting changes their
|
|
26
|
-
positions. Row animation uses a separate CSS transform component, so virtualized
|
|
27
|
-
positioning and scrolling remain independent. It is disabled by default; provide
|
|
28
|
-
a stable `getRowId` to animate rows reliably across reorderings.
|
|
29
|
-
|
|
30
|
-
During fast vertical scrolling, the React adapter keeps the current row pool
|
|
31
|
-
visually in place while the native scrollbar continues moving. It repositions
|
|
32
|
-
the existing row layers rather than creating a second copy of the rows, then
|
|
33
|
-
updates the pool after scrolling has been idle for 150 ms. The core tracks the
|
|
34
|
-
live scroll position without store notifications or scroll-driven React renders.
|
|
35
|
-
|
|
36
|
-
Column `headerRenderer` callbacks provide the header's primary content. The adapter owns the
|
|
37
|
-
shared header layout and keeps sorting, filtering, and registered plugin extensions alongside it,
|
|
38
|
-
so plugins can add controls without replacing or duplicating the header renderer.
|
|
39
|
-
|
|
40
|
-
## Overlays
|
|
41
|
-
|
|
42
|
-
Automatic loading, no-rows, and no-matching-rows overlays cover the body below the sticky
|
|
43
|
-
header. They hide vertical scrolling while preserving its gutter, so columns do not shift;
|
|
44
|
-
horizontal scrolling remains available. Automatic error overlays cover the full grid.
|
|
45
|
-
Any active overlay hides vertical scrolling and preserves its gutter, regardless of scope.
|
|
46
|
-
Manual overlays default to body-only, except errors default to full-grid; set `scope` to
|
|
47
|
-
`"bodyOnly"` or `"full"` to choose the placement. `blockScroll: true` locks horizontal
|
|
48
|
-
scrolling; vertical scrolling is always locked while an overlay is active.
|
|
49
|
-
|
|
50
|
-
```tsx
|
|
51
|
-
import { OmniGrid, type OverlayComponentProps } from "@omnigrid/react";
|
|
52
|
-
|
|
53
|
-
function LoadError<T>({ message }: OverlayComponentProps<T>) {
|
|
54
|
-
return <div role="alert">{message ?? "Unable to load rows"}</div>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
<OmniGrid
|
|
58
|
-
columns={columns}
|
|
59
|
-
data={data}
|
|
60
|
-
overlayComponents={{ error: LoadError }}
|
|
61
|
-
onGridReady={(grid) => grid.showOverlay({ type: "error", message: "Please retry" })}
|
|
62
|
-
/>;
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
To customize the table's color style, install a compatible `@omnigrid/*-theme`
|
|
66
|
-
package and import it in the application after `@omnigrid/react`. Theme packages
|
|
67
|
-
include their own light and dark variants; they are not light/dark mode toggles.
|
|
68
|
-
|
|
69
|
-
## Links
|
|
70
|
-
|
|
71
|
-
- **Source:** https://github.com/KRZK-Apps/omnigrid/tree/main/adapters/react
|
|
72
|
-
- **Demo:** https://omnigrid.cc/
|
|
73
|
-
- **Issues:** https://github.com/KRZK-Apps/omnigrid/issues
|
|
74
|
-
|
|
75
|
-
## License
|
|
76
|
-
|
|
77
|
-
MIT © KRZK Apps
|
|
1
|
+
# @omnigrid/react
|
|
2
|
+
|
|
3
|
+
React adapter and renderer for OmniGrid. Renders the headless core engine into the DOM using React.
|
|
4
|
+
|
|
5
|
+
## What it provides
|
|
6
|
+
|
|
7
|
+
- **`<OmniGrid />`** — React component that accepts `GridOptions` and renders a fully virtualized, 2D scrolled data grid
|
|
8
|
+
- **`useGrid()`** — hook that creates and manages a `GridCore` instance with full lifecycle handling
|
|
9
|
+
- **Cell / Row pooling** — reusable React content via DOM-pool integration for minimal re-renders
|
|
10
|
+
- **Styles and default theme** — required structural styles and light/dark default colors are included automatically
|
|
11
|
+
- **`transpilePackages`-ready** — works out of the box with Next.js and other bundlers
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { OmniGrid } from "@omnigrid/react";
|
|
17
|
+
import { useMemo } from "react";
|
|
18
|
+
|
|
19
|
+
const columns = useMemo(() => [...], []);
|
|
20
|
+
const data = [...];
|
|
21
|
+
|
|
22
|
+
<OmniGrid columns={columns} data={data} />;
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Set `animateRows` to animate visible rows when filtering or sorting changes their
|
|
26
|
+
positions. Row animation uses a separate CSS transform component, so virtualized
|
|
27
|
+
positioning and scrolling remain independent. It is disabled by default; provide
|
|
28
|
+
a stable `getRowId` to animate rows reliably across reorderings.
|
|
29
|
+
|
|
30
|
+
During fast vertical scrolling, the React adapter keeps the current row pool
|
|
31
|
+
visually in place while the native scrollbar continues moving. It repositions
|
|
32
|
+
the existing row layers rather than creating a second copy of the rows, then
|
|
33
|
+
updates the pool after scrolling has been idle for 150 ms. The core tracks the
|
|
34
|
+
live scroll position without store notifications or scroll-driven React renders.
|
|
35
|
+
|
|
36
|
+
Column `headerRenderer` callbacks provide the header's primary content. The adapter owns the
|
|
37
|
+
shared header layout and keeps sorting, filtering, and registered plugin extensions alongside it,
|
|
38
|
+
so plugins can add controls without replacing or duplicating the header renderer.
|
|
39
|
+
|
|
40
|
+
## Overlays
|
|
41
|
+
|
|
42
|
+
Automatic loading, no-rows, and no-matching-rows overlays cover the body below the sticky
|
|
43
|
+
header. They hide vertical scrolling while preserving its gutter, so columns do not shift;
|
|
44
|
+
horizontal scrolling remains available. Automatic error overlays cover the full grid.
|
|
45
|
+
Any active overlay hides vertical scrolling and preserves its gutter, regardless of scope.
|
|
46
|
+
Manual overlays default to body-only, except errors default to full-grid; set `scope` to
|
|
47
|
+
`"bodyOnly"` or `"full"` to choose the placement. `blockScroll: true` locks horizontal
|
|
48
|
+
scrolling; vertical scrolling is always locked while an overlay is active.
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { OmniGrid, type OverlayComponentProps } from "@omnigrid/react";
|
|
52
|
+
|
|
53
|
+
function LoadError<T>({ message }: OverlayComponentProps<T>) {
|
|
54
|
+
return <div role="alert">{message ?? "Unable to load rows"}</div>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
<OmniGrid
|
|
58
|
+
columns={columns}
|
|
59
|
+
data={data}
|
|
60
|
+
overlayComponents={{ error: LoadError }}
|
|
61
|
+
onGridReady={(grid) => grid.showOverlay({ type: "error", message: "Please retry" })}
|
|
62
|
+
/>;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
To customize the table's color style, install a compatible `@omnigrid/*-theme`
|
|
66
|
+
package and import it in the application after `@omnigrid/react`. Theme packages
|
|
67
|
+
include their own light and dark variants; they are not light/dark mode toggles.
|
|
68
|
+
|
|
69
|
+
## Links
|
|
70
|
+
|
|
71
|
+
- **Source:** https://github.com/KRZK-Apps/omnigrid/tree/main/adapters/react
|
|
72
|
+
- **Demo:** https://omnigrid.cc/demo/react/quick-start
|
|
73
|
+
- **Issues:** https://github.com/KRZK-Apps/omnigrid/issues
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT © KRZK Apps
|
package/dist/OmniGrid.d.ts
CHANGED
package/dist/OmniGrid.js
CHANGED
|
@@ -2,17 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { createElement, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, } from "react";
|
|
3
3
|
import { flushSync } from "react-dom";
|
|
4
4
|
import { DomPool, flattenColumns, isActiveCondition } from "@omnigrid/core";
|
|
5
|
-
import { CellTooltipLayer } from "./cellTooltip";
|
|
6
|
-
import { contentToReactNode, hasRenderableContent } from "./content";
|
|
7
|
-
import { getCollapsedGroupDisplay, getGroupColumnRole, getTreeDataLeafIndent, isGroupRowNode, poolGetRowId, renderGroupCellContent, renderGroupCellPlaceholder, } from "./groupCell";
|
|
8
|
-
import { computeGroupSegments } from "./groupHeader";
|
|
9
|
-
import { renderDefaultOverlay } from "./overlays";
|
|
10
|
-
import { PooledRowPane } from "./pooledRow";
|
|
11
|
-
import { PopupHost } from "./popup";
|
|
12
|
-
import { createCellRoot } from "./reactRoot";
|
|
13
|
-
import { getRowRenderParams } from "./rowRenderParams";
|
|
14
|
-
import { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling";
|
|
15
|
-
import { useGrid } from "./useGrid";
|
|
5
|
+
import { CellTooltipLayer } from "./cellTooltip.js";
|
|
6
|
+
import { contentToReactNode, hasRenderableContent } from "./content.js";
|
|
7
|
+
import { getCollapsedGroupDisplay, getGroupColumnRole, getTreeDataLeafIndent, isGroupRowNode, poolGetRowId, renderGroupCellContent, renderGroupCellPlaceholder, } from "./groupCell.js";
|
|
8
|
+
import { computeGroupSegments } from "./groupHeader.js";
|
|
9
|
+
import { renderDefaultOverlay } from "./overlays.js";
|
|
10
|
+
import { PooledRowPane } from "./pooledRow.js";
|
|
11
|
+
import { PopupHost } from "./popup.js";
|
|
12
|
+
import { createCellRoot } from "./reactRoot.js";
|
|
13
|
+
import { getRowRenderParams } from "./rowRenderParams.js";
|
|
14
|
+
import { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling.js";
|
|
15
|
+
import { useGrid } from "./useGrid.js";
|
|
16
16
|
function getCellValue(row, column) {
|
|
17
17
|
if (column.valueGetter)
|
|
18
18
|
return column.valueGetter(row);
|
|
@@ -1403,28 +1403,28 @@ export function OmniGrid({ className, style, slotComponents, cellTooltipRenderer
|
|
|
1403
1403
|
* leaf header row. Each pane renders its own stack with the same geometry;
|
|
1404
1404
|
* without groups this is exactly the previous single header row.
|
|
1405
1405
|
*/
|
|
1406
|
-
const renderHeader = (columns, originX, width, isPinned = false) => (
|
|
1406
|
+
const renderHeader = (columns, originX, width, isPinned = false) => (_jsx("div", { className: "omnigrid-header", style: {
|
|
1407
1407
|
height: headerHeight,
|
|
1408
1408
|
overflow: "visible",
|
|
1409
1409
|
position: "sticky",
|
|
1410
1410
|
top: 0,
|
|
1411
1411
|
zIndex: isPinned ? 4 : 2,
|
|
1412
1412
|
width,
|
|
1413
|
-
}, children: [Array.from({ length: headerRowCount }, (_, depth) => (_jsx("div", { role: "row", className: "omnigrid-header-row omnigrid-header-group-row", style: {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1413
|
+
}, children: _jsxs("div", { role: "rowgroup", children: [Array.from({ length: headerRowCount }, (_, depth) => (_jsx("div", { role: "row", className: "omnigrid-header-row omnigrid-header-group-row", style: {
|
|
1414
|
+
height: rowHeight,
|
|
1415
|
+
left: 0,
|
|
1416
|
+
overflow: "hidden",
|
|
1417
|
+
position: "absolute",
|
|
1418
|
+
top: depth * rowHeight,
|
|
1419
|
+
width: "100%",
|
|
1420
|
+
}, children: renderGroupCells(depth, columns, originX) }, `group-row-${depth}`))), _jsx("div", { role: "row", className: "omnigrid-header-row", style: {
|
|
1421
|
+
height: rowHeight,
|
|
1422
|
+
left: 0,
|
|
1423
|
+
overflow: "visible",
|
|
1424
|
+
position: "absolute",
|
|
1425
|
+
top: headerRowCount * rowHeight,
|
|
1426
|
+
width: "100%",
|
|
1427
|
+
}, children: renderHeaderCells(columns, originX) })] }) }));
|
|
1428
1428
|
const renderRowsLayer = (ref, width) => (_jsx("div", { ref: ref, "data-pool-layer": "true", style: {
|
|
1429
1429
|
// The layer's height follows the measured row heights — it is
|
|
1430
1430
|
// updated imperatively (see `syncPool`) so a measurement does
|
package/dist/cellTooltip.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode, type RefObject } from "react";
|
|
2
|
-
import type { CellTooltipRenderer } from "./reactColumnDef";
|
|
3
|
-
import type { CellTooltipOptions } from "./types";
|
|
2
|
+
import type { CellTooltipRenderer } from "./reactColumnDef.js";
|
|
3
|
+
import type { CellTooltipOptions } from "./types.js";
|
|
4
4
|
export declare function isTextOverflowed(textWidth: number, containerWidth: number): boolean;
|
|
5
5
|
/** Props for the delegated tooltip layer mounted by the grid. */
|
|
6
6
|
export interface CellTooltipLayerProps {
|
package/dist/content.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { CheckboxControl, SlotNodeContent } from "@omnigrid/core";
|
|
3
|
-
import type { ContentBridge } from "./types";
|
|
3
|
+
import type { ContentBridge } from "./types.js";
|
|
4
4
|
export type { ContentBridge };
|
|
5
5
|
export declare function isCheckboxControl(value: unknown): value is CheckboxControl;
|
|
6
6
|
export declare function isSlotHtmlContent(value: unknown): value is {
|
package/dist/content.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cloneElement, createElement, Fragment, isValidElement } from "react";
|
|
2
|
-
import { isUIControlDescriptor, renderControl } from "./controls";
|
|
2
|
+
import { isUIControlDescriptor, renderControl } from "./controls.js";
|
|
3
3
|
export function isCheckboxControl(value) {
|
|
4
4
|
return typeof value === "object" && value !== null && value.type === "@omnigrid/checkbox";
|
|
5
5
|
}
|
package/dist/controls.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { UIControlDescriptor } from "@omnigrid/core";
|
|
3
|
-
import type { DebouncedInputProps } from "./types";
|
|
3
|
+
import type { DebouncedInputProps } from "./types.js";
|
|
4
4
|
export type { DebouncedInputProps };
|
|
5
5
|
/** Type guard for core `UIControlDescriptor` objects. */
|
|
6
6
|
export declare function isUIControlDescriptor(value: unknown): value is UIControlDescriptor;
|
package/dist/groupCell.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { ColumnLeafDef, GridApi, GroupRowNode, RowId } from "@omnigrid/core";
|
|
3
|
-
import { type ContentBridge } from "./content";
|
|
3
|
+
import { type ContentBridge } from "./content.js";
|
|
4
4
|
export declare function getTreeDataLeafIndent<T>(row: unknown, column: ColumnLeafDef<T>, grid: GridApi<T>): number | undefined;
|
|
5
5
|
/**
|
|
6
6
|
* Checks whether an arbitrary row node represents a grouping tree node.
|
package/dist/groupCell.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement } from "react";
|
|
2
|
-
import { contentToReactNode } from "./content";
|
|
2
|
+
import { contentToReactNode } from "./content.js";
|
|
3
3
|
const TREE_DATA_LEVEL_INDENT = 20;
|
|
4
4
|
// Align leaf labels with group labels after the 24px toggle and 6px gap.
|
|
5
5
|
const TREE_DATA_LEAF_CONTROL_OFFSET = 30;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "@omnigrid/style";
|
|
2
2
|
import "@omnigrid/default-theme";
|
|
3
3
|
export * from "@omnigrid/core";
|
|
4
|
-
export type { CellTooltipRenderer, CellTooltipRenderContext, ReactCellRenderer, ReactColumnDef, ReactColumnDef as ColumnDef, ReactColumnGroupDef, ReactColumnGroupDef as ColumnGroupDef, ReactColumnLeafDef, ReactColumnLeafDef as ColumnLeafDef, ReactGridOptions, ReactGridOptions as GridOptions, } from "./reactColumnDef";
|
|
5
|
-
export { PooledRowPane } from "./pooledRow";
|
|
6
|
-
export type { ContentBridge, PooledCellRenderInfo, PooledColumn, PooledRowCallbacks, PooledRowModifiers } from "./types";
|
|
7
|
-
export { OmniGrid } from "./OmniGrid";
|
|
8
|
-
export type { GridProps, OverlayComponent, OverlayComponentProps, SlotRendererRegistry } from "./types";
|
|
9
|
-
export { useGrid } from "./useGrid";
|
|
10
|
-
export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls";
|
|
11
|
-
export type { DebouncedInputProps } from "./controls";
|
|
12
|
-
export { PopupHost } from "./popup";
|
|
13
|
-
export type { PopupHostProps } from "./types";
|
|
14
|
-
export type { UseGridResult } from "./types";
|
|
15
|
-
export { type ResolvedColumnPresentation, resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling";
|
|
4
|
+
export type { CellTooltipRenderer, CellTooltipRenderContext, ReactCellRenderer, ReactColumnDef, ReactColumnDef as ColumnDef, ReactColumnGroupDef, ReactColumnGroupDef as ColumnGroupDef, ReactColumnLeafDef, ReactColumnLeafDef as ColumnLeafDef, ReactGridOptions, ReactGridOptions as GridOptions, } from "./reactColumnDef.js";
|
|
5
|
+
export { PooledRowPane } from "./pooledRow.js";
|
|
6
|
+
export type { ContentBridge, PooledCellRenderInfo, PooledColumn, PooledRowCallbacks, PooledRowModifiers } from "./types.js";
|
|
7
|
+
export { OmniGrid } from "./OmniGrid.js";
|
|
8
|
+
export type { GridProps, OverlayComponent, OverlayComponentProps, SlotRendererRegistry } from "./types.js";
|
|
9
|
+
export { useGrid } from "./useGrid.js";
|
|
10
|
+
export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls.js";
|
|
11
|
+
export type { DebouncedInputProps } from "./controls.js";
|
|
12
|
+
export { PopupHost } from "./popup.js";
|
|
13
|
+
export type { PopupHostProps } from "./types.js";
|
|
14
|
+
export type { UseGridResult } from "./types.js";
|
|
15
|
+
export { type ResolvedColumnPresentation, resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling.js";
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "@omnigrid/style";
|
|
2
2
|
import "@omnigrid/default-theme";
|
|
3
3
|
export * from "@omnigrid/core";
|
|
4
|
-
export { PooledRowPane } from "./pooledRow";
|
|
5
|
-
export { OmniGrid } from "./OmniGrid";
|
|
6
|
-
export { useGrid } from "./useGrid";
|
|
7
|
-
export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls";
|
|
8
|
-
export { PopupHost } from "./popup";
|
|
9
|
-
export { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling";
|
|
4
|
+
export { PooledRowPane } from "./pooledRow.js";
|
|
5
|
+
export { OmniGrid } from "./OmniGrid.js";
|
|
6
|
+
export { useGrid } from "./useGrid.js";
|
|
7
|
+
export { DebouncedInput, isUIControlDescriptor, renderControl } from "./controls.js";
|
|
8
|
+
export { PopupHost } from "./popup.js";
|
|
9
|
+
export { resolveCellClasses, resolveCellStyle, resolveColumnPresentation, resolveGroupHeaderClasses, resolveGroupHeaderStyle, resolveHeaderClasses, resolveHeaderStyle, } from "./styling.js";
|
package/dist/pooledRow.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PooledRow, RowSpanLayout } from "@omnigrid/core";
|
|
2
|
-
import { type ContentBridge } from "./content";
|
|
3
|
-
import type { PooledColumn, PooledRowCallbacks } from "./types";
|
|
2
|
+
import { type ContentBridge } from "./content.js";
|
|
3
|
+
import type { PooledColumn, PooledRowCallbacks } from "./types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Reusable row panel: holds a fixed set of cells, lays them out for the
|
|
6
6
|
* horizontal column window via `translateX`, and updates content in-place
|
package/dist/pooledRow.js
CHANGED
package/dist/popup.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { PopupHostProps } from "./types";
|
|
2
|
+
import type { PopupHostProps } from "./types.js";
|
|
3
3
|
export declare function clampPopupLeft(desiredLeft: number, popupWidth: number, minLeft: number, maxRight: number): number;
|
|
4
4
|
/**
|
|
5
5
|
* Renders the grid's active `UIPopupDescriptor`. Popup state lives here, so
|
package/dist/popup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
2
|
-
import { contentToReactNode } from "./content";
|
|
2
|
+
import { contentToReactNode } from "./content.js";
|
|
3
3
|
const VIEWPORT_MARGIN = 8;
|
|
4
4
|
export function clampPopupLeft(desiredLeft, popupWidth, minLeft, maxRight) {
|
|
5
5
|
const maxLeft = Math.max(minLeft, maxRight - popupWidth);
|
package/dist/styling.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CellRenderParams, ColumnGroupDef, ColumnLeafDef, ColumnStyle, ColumnStyleParams, HeaderGroupRenderParams, HeaderRenderParams, HeaderStyle, RowStyle } from "@omnigrid/core";
|
|
2
|
-
import type { ResolvedColumnPresentation } from "./types";
|
|
2
|
+
import type { ResolvedColumnPresentation } from "./types.js";
|
|
3
3
|
export type { ResolvedColumnPresentation };
|
|
4
4
|
/**
|
|
5
5
|
* Resolves column-level presentation once for the entire column across the entire dataset.
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
import type { SlotRenderContext, UIInputControl } from "@omnigrid/core";
|
|
3
|
-
import type { CellRoot } from "./reactRoot";
|
|
4
|
-
import type { CellTooltipRenderer, ReactGridOptions } from "./reactColumnDef";
|
|
3
|
+
import type { CellRoot } from "./reactRoot.js";
|
|
4
|
+
import type { CellTooltipRenderer, ReactGridOptions } from "./reactColumnDef.js";
|
|
5
5
|
/** Tooltip overrides resolved for a particular data column. */
|
|
6
6
|
export interface CellTooltipOptions {
|
|
7
7
|
/** Custom renderer for the truncated cell's full text. */
|
package/dist/useGrid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UseGridResult } from "./types";
|
|
2
|
-
import type { ReactGridOptions } from "./reactColumnDef";
|
|
1
|
+
import type { UseGridResult } from "./types.js";
|
|
2
|
+
import type { ReactGridOptions } from "./reactColumnDef.js";
|
|
3
3
|
/**
|
|
4
4
|
* Binds the Grid instance from @omnigrid/core to the React lifecycle.
|
|
5
5
|
*
|