@1771technologies/lytenyte-pro 1.0.0-beta.1 → 1.0.0-beta.11
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/dist/+types.d.ts +24 -7
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.d.ts +1 -1
- package/dist/cell-selection/adjust-rect-for-row-and-cell-span.js +1 -1
- package/dist/cell-selection/are-rects-equal.d.ts +1 -1
- package/dist/cell-selection/bound-selection-rect.d.ts +1 -1
- package/dist/cell-selection/cell-selection-driver.js +9 -1
- package/dist/cell-selection/deselect-rect-range.d.ts +1 -1
- package/dist/cell-selection/deselect-rect-range.js +1 -1
- package/dist/cell-selection/expand-cell-selection-down.d.ts +2 -2
- package/dist/cell-selection/expand-cell-selection-down.js +1 -1
- package/dist/cell-selection/expand-cell-selection-end.d.ts +2 -2
- package/dist/cell-selection/expand-cell-selection-end.js +1 -1
- package/dist/cell-selection/expand-cell-selection-start.d.ts +2 -2
- package/dist/cell-selection/expand-cell-selection-start.js +1 -1
- package/dist/cell-selection/expand-cell-selection-up.d.ts +2 -2
- package/dist/cell-selection/expand-cell-selection-up.js +1 -1
- package/dist/cell-selection/full-width-start-end-index.d.ts +1 -1
- package/dist/cell-selection/get-root-cell.d.ts +1 -1
- package/dist/cell-selection/get-root-cell.js +2 -2
- package/dist/cell-selection/is-bottom-rect.d.ts +1 -1
- package/dist/cell-selection/is-center-col-rect.d.ts +1 -1
- package/dist/cell-selection/is-center-rect.d.ts +1 -1
- package/dist/cell-selection/is-end-rect.d.ts +1 -1
- package/dist/cell-selection/is-overlapping-rect.d.ts +1 -1
- package/dist/cell-selection/is-start-rect.d.ts +1 -1
- package/dist/cell-selection/is-top-rect.d.ts +1 -1
- package/dist/cell-selection/is-within-selection-rect.d.ts +1 -1
- package/dist/cell-selection/split-cell-selection-rect.d.ts +1 -1
- package/dist/cell-selection/update-additive-cell-selection.d.ts +2 -2
- package/dist/cell-selection/update-additive-cell-selection.js +4 -4
- package/dist/cell-selection/use-edge-scroll.d.ts +2 -2
- package/dist/cells/cell.js +2 -1
- package/dist/column-manager/use-column-manager.d.ts +2 -2
- package/dist/column-manager/use-column-manager.js +1 -1
- package/dist/column-manager/use-columns-from-context.d.ts +2 -2
- package/dist/column-manager/use-columns-from-context.js +1 -1
- package/dist/filter-tree/filter-tree.d.ts +7 -7
- package/dist/filter-tree/filter-tree.js +8 -8
- package/dist/filter-tree/hooks/use-tree-item.d.ts +2 -2
- package/dist/filter-tree/hooks/use-tree-item.js +2 -2
- package/dist/grid-box/+types.d.ts +1 -1
- package/dist/grid-box/context.d.ts +1 -1
- package/dist/grid-box/use-aggregation-box-items.d.ts +2 -2
- package/dist/grid-box/use-column-box-items.d.ts +2 -2
- package/dist/grid-box/use-row-group-box-items.d.ts +2 -2
- package/dist/grid-provider/context.d.ts +2 -2
- package/dist/grid-provider/provider.d.ts +2 -2
- package/dist/grid-provider/provider.js +1 -1
- package/dist/grid-provider/use-grid.d.ts +2 -2
- package/dist/grid-provider/use-grid.js +1 -1
- package/dist/grid.d.ts +1 -0
- package/dist/grid.js +2 -0
- package/dist/header/resize-handler.js +1 -0
- package/dist/header/use-drag-move.d.ts +2 -2
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/row-data-source-client/built-ins/built-ins.d.ts +1 -1
- package/dist/row-data-source-client/built-ins/built-ins.js +1 -1
- package/dist/row-data-source-client/pivots/create-pivot-columns.js +2 -2
- package/dist/row-data-source-client/tree/evaluator-aggregation.d.ts +1 -1
- package/dist/row-data-source-client/tree/evaluator-group.d.ts +1 -1
- package/dist/row-data-source-client/tree/traverse.d.ts +1 -1
- package/dist/row-data-source-client/tree/traverse.js +1 -1
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +2 -2
- package/dist/row-data-source-client/use-client-data-source-paginated.js +41 -25
- package/dist/row-data-source-client/use-client-data-source.d.ts +2 -2
- package/dist/row-data-source-client/use-client-data-source.js +43 -27
- package/dist/row-data-source-client/use-client-tree-data-source.d.ts +1 -1
- package/dist/row-data-source-client/use-client-tree-data-source.js +41 -25
- package/dist/row-data-source-server/async-tree/apply-delete-action-to-tree.js +1 -1
- package/dist/row-data-source-server/async-tree/make-async-tree.js +3 -3
- package/dist/row-data-source-server/use-server-data-source.d.ts +1 -1
- package/dist/row-data-source-server/use-server-data-source.js +8 -5
- package/dist/sort-manager/context.d.ts +3 -3
- package/dist/sort-manager/hooks/use-sort-manager.d.ts +2 -2
- package/dist/sort-manager/hooks/use-sort-manager.js +2 -2
- package/dist/sort-manager/hooks/use-sort-row-item.d.ts +1 -1
- package/dist/sort-manager/hooks/use-sort-row-item.js +1 -1
- package/dist/sort-manager/utils/sort-item-to-sort-model.d.ts +1 -1
- package/dist/sort-manager/utils/sort-model-to-sort-items.d.ts +1 -1
- package/dist/state/api/column-autosize.d.ts +1 -1
- package/dist/state/api/column-autosize.js +1 -1
- package/dist/state/api/column-move.js +1 -1
- package/dist/state/api/dialog-frame.d.ts +1 -1
- package/dist/state/api/edit-begin.d.ts +1 -1
- package/dist/state/api/edit-begin.js +1 -1
- package/dist/state/api/edit-end.d.ts +1 -1
- package/dist/state/api/edit-is-cell-active.d.ts +1 -1
- package/dist/state/api/edit-update.d.ts +1 -1
- package/dist/state/api/edit-update.js +1 -1
- package/dist/state/api/export-csv.js +1 -1
- package/dist/state/api/export-data-rect.js +1 -1
- package/dist/state/api/focus-cell.d.ts +1 -1
- package/dist/state/api/popover-frame.d.ts +2 -2
- package/dist/state/api/row-detail-rendered-height.d.ts +2 -2
- package/dist/state/helpers/empty-row-data-source.js +1 -0
- package/package.json +15 -9
package/dist/+types.d.ts
CHANGED
|
@@ -892,7 +892,8 @@ export interface HeaderGroupCellLayout {
|
|
|
892
892
|
*/
|
|
893
893
|
readonly isCollapsible: boolean;
|
|
894
894
|
/**
|
|
895
|
-
*
|
|
895
|
+
* The id for the header group. Note this is not unique across all header groups. In particular
|
|
896
|
+
* split header groups with the same path will share the same id. Prefer `idOccurrence` for unique keys.
|
|
896
897
|
*/
|
|
897
898
|
readonly id: string;
|
|
898
899
|
/**
|
|
@@ -1704,12 +1705,12 @@ export interface ClientRowDataSourceParams<T> {
|
|
|
1704
1705
|
*/
|
|
1705
1706
|
readonly rowIdLeaf?: (d: RowLeaf<T>, i: number) => string;
|
|
1706
1707
|
/**
|
|
1707
|
-
* Callback that transforms a column in
|
|
1708
|
+
* Callback that transforms a set of values for a given column into the in filter items LyteNyte Grid should use.
|
|
1708
1709
|
*/
|
|
1709
1710
|
readonly transformInFilterItem?: (params: {
|
|
1710
|
-
field: unknown;
|
|
1711
1711
|
column: Column<T>;
|
|
1712
|
-
|
|
1712
|
+
values: unknown[];
|
|
1713
|
+
}) => FilterInFilterItem[];
|
|
1713
1714
|
}
|
|
1714
1715
|
/**
|
|
1715
1716
|
* Parameters for initializing a tree-structured data source in LyteNyte Grid.
|
|
@@ -1740,12 +1741,12 @@ export interface ClientTreeDataSourceParams<T> {
|
|
|
1740
1741
|
*/
|
|
1741
1742
|
readonly rowIdLeaf?: (d: RowLeaf<T>, i: number) => string;
|
|
1742
1743
|
/**
|
|
1743
|
-
* Callback that transforms a column in
|
|
1744
|
+
* Callback that transforms a set of values for a given column into the in filter items LyteNyte Grid should use.
|
|
1744
1745
|
*/
|
|
1745
1746
|
readonly transformInFilterItem?: (params: {
|
|
1746
|
-
field: unknown;
|
|
1747
1747
|
column: Column<T>;
|
|
1748
|
-
|
|
1748
|
+
values: unknown[];
|
|
1749
|
+
}) => FilterInFilterItem[];
|
|
1749
1750
|
/**
|
|
1750
1751
|
* Returns the hierarchical path to group a given data row in tree mode.
|
|
1751
1752
|
*/
|
|
@@ -1806,6 +1807,10 @@ export interface RowDataSourceClientPaginated<T> {
|
|
|
1806
1807
|
* Adds new rows to the grid optionally at a specific index, beginning, or end.
|
|
1807
1808
|
*/
|
|
1808
1809
|
readonly rowAdd: (newRows: any[], atIndex?: number | "beginning" | "end") => void;
|
|
1810
|
+
/**
|
|
1811
|
+
* Sets the data for the center rows (scrollable rows) of the grid. Effectively replacing the current row data.
|
|
1812
|
+
*/
|
|
1813
|
+
readonly rowSetCenterData: (newRows: any[]) => void;
|
|
1809
1814
|
/**
|
|
1810
1815
|
* Sets the data for rows pinned to the top section.
|
|
1811
1816
|
*/
|
|
@@ -1899,6 +1904,10 @@ export interface RowDataSourceClient<T> {
|
|
|
1899
1904
|
* Adds new rows to the grid optionally at a specific index, beginning, or end.
|
|
1900
1905
|
*/
|
|
1901
1906
|
readonly rowAdd: (newRows: any[], atIndex?: number | "beginning" | "end") => void;
|
|
1907
|
+
/**
|
|
1908
|
+
* Sets the data for the center rows (scrollable rows) of the grid. Effectively replacing the current row data.
|
|
1909
|
+
*/
|
|
1910
|
+
readonly rowSetCenterData: (newRows: any[]) => void;
|
|
1902
1911
|
/**
|
|
1903
1912
|
* Sets the data for rows pinned to the top section.
|
|
1904
1913
|
*/
|
|
@@ -1966,6 +1975,10 @@ export interface RowDataSource<T> {
|
|
|
1966
1975
|
* Adds new rows to the grid optionally at a specific index, beginning, or end.
|
|
1967
1976
|
*/
|
|
1968
1977
|
readonly rowAdd: (newRows: any[], atIndex?: number | "beginning" | "end") => void;
|
|
1978
|
+
/**
|
|
1979
|
+
* Sets the data for the center rows (scrollable rows) of the grid. Effectively replacing the current row data.
|
|
1980
|
+
*/
|
|
1981
|
+
readonly rowSetCenterData: (newRows: any[]) => void;
|
|
1969
1982
|
/**
|
|
1970
1983
|
* Sets the data for rows pinned to the top section.
|
|
1971
1984
|
*/
|
|
@@ -2039,6 +2052,10 @@ export interface RowDataSourceServer<T> {
|
|
|
2039
2052
|
* Adds new rows to the grid optionally at a specific index, beginning, or end.
|
|
2040
2053
|
*/
|
|
2041
2054
|
readonly rowAdd: (newRows: any[], atIndex?: number | "beginning" | "end") => void;
|
|
2055
|
+
/**
|
|
2056
|
+
* Sets the data for the center rows (scrollable rows) of the grid. Effectively replacing the current row data.
|
|
2057
|
+
*/
|
|
2058
|
+
readonly rowSetCenterData: (newRows: any[]) => void;
|
|
2042
2059
|
/**
|
|
2043
2060
|
* Sets the data for rows pinned to the top section.
|
|
2044
2061
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect, Grid } from "../+types";
|
|
1
|
+
import type { DataRect, Grid } from "../+types.js";
|
|
2
2
|
export declare function adjustRectForRowAndCellSpan<T>(grid: Grid<T>, rect: DataRect): DataRect;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect } from "../+types";
|
|
1
|
+
import type { DataRect } from "../+types.js";
|
|
2
2
|
export declare function areRectsEqual(left: DataRect, right: DataRect): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect, Grid } from "../+types";
|
|
1
|
+
import type { DataRect, Grid } from "../+types.js";
|
|
2
2
|
export declare function boundSelectionRect(grid: Grid<any>, rect: DataRect): DataRect;
|
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { useGridRoot } from "../context";
|
|
4
4
|
import { useEdgeScroll } from "./use-edge-scroll";
|
|
5
|
-
import { getClientX, getClientY, getRelativeXPosition, getRelativeYPosition, } from "@1771technologies/lytenyte-js-utils";
|
|
5
|
+
import { equal, getClientX, getClientY, getRelativeXPosition, getRelativeYPosition, } from "@1771technologies/lytenyte-js-utils";
|
|
6
6
|
import { getNearestFocusable, getPositionFromFocusable } from "@1771technologies/lytenyte-shared";
|
|
7
7
|
import { isHTMLElement } from "@1771technologies/lytenyte-dom-utils";
|
|
8
8
|
import { updateAdditiveCellSelection } from "./update-additive-cell-selection";
|
|
@@ -238,8 +238,16 @@ export function CellSelectionDriver() {
|
|
|
238
238
|
};
|
|
239
239
|
}, [cancelX, cancelY, edgeScrollX, edgeScrollY, grid, mode, viewport]);
|
|
240
240
|
useEffect(() => {
|
|
241
|
+
let prev = null;
|
|
241
242
|
return grid.internal.focusActive.watch(() => {
|
|
242
243
|
const focus = grid.internal.focusActive.get();
|
|
244
|
+
// If the focus is null, then we should just return. This keeps the existing selection
|
|
245
|
+
// in place - for things like copy and paste.
|
|
246
|
+
if (!focus)
|
|
247
|
+
return;
|
|
248
|
+
if (equal(prev, focus))
|
|
249
|
+
return;
|
|
250
|
+
prev = focus;
|
|
243
251
|
if (focus?.kind !== "cell" && focus?.kind !== "full-width") {
|
|
244
252
|
grid.state.cellSelections.set([]);
|
|
245
253
|
grid.internal.cellSelectionPivot.set(null);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect } from "../+types";
|
|
1
|
+
import type { DataRect } from "../+types.js";
|
|
2
2
|
export declare function deselectRectRange(rect: DataRect, deselectRect: DataRect): DataRect[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Grid } from "../+types";
|
|
2
|
-
import type { InternalAtoms } from "../state/+types";
|
|
1
|
+
import type { Grid } from "../+types.js";
|
|
2
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
3
3
|
export declare function expandCellSelectionDown(grid: Grid<any> & {
|
|
4
4
|
internal: InternalAtoms;
|
|
5
5
|
}, meta: boolean): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Grid } from "../+types";
|
|
2
|
-
import type { InternalAtoms } from "../state/+types";
|
|
1
|
+
import type { Grid } from "../+types.js";
|
|
2
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
3
3
|
export declare function expandCellSelectionEnd(grid: Grid<any> & {
|
|
4
4
|
internal: InternalAtoms;
|
|
5
5
|
}, meta: boolean): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRootCell } from "./get-root-cell";
|
|
1
|
+
import { getRootCell } from "./get-root-cell.js";
|
|
2
2
|
export function expandCellSelectionEnd(grid, meta) {
|
|
3
3
|
const selections = grid.state.cellSelections.get();
|
|
4
4
|
const cellSelectionPivot = grid.internal.cellSelectionPivot.get();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InternalAtoms } from "../state/+types";
|
|
2
|
-
import type { Grid } from "../+types";
|
|
1
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
2
|
+
import type { Grid } from "../+types.js";
|
|
3
3
|
export declare function expandCellSelectionStart(grid: Grid<any> & {
|
|
4
4
|
internal: InternalAtoms;
|
|
5
5
|
}, meta: boolean): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRootCell } from "./get-root-cell";
|
|
1
|
+
import { getRootCell } from "./get-root-cell.js";
|
|
2
2
|
export function expandCellSelectionStart(grid, meta) {
|
|
3
3
|
const selections = grid.state.cellSelections.get();
|
|
4
4
|
const cellSelectionPivot = grid.internal.cellSelectionPivot.get();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InternalAtoms } from "../state/+types";
|
|
2
|
-
import type { Grid } from "../+types";
|
|
1
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
2
|
+
import type { Grid } from "../+types.js";
|
|
3
3
|
export declare function expandCellSelectionUp(grid: Grid<any> & {
|
|
4
4
|
internal: InternalAtoms;
|
|
5
5
|
}, meta: boolean): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRootCell } from "./get-root-cell";
|
|
1
|
+
import { getRootCell } from "./get-root-cell.js";
|
|
2
2
|
export function expandCellSelectionUp(grid, meta) {
|
|
3
3
|
const selections = grid.state.cellSelections.get();
|
|
4
4
|
const cellSelectionPivot = grid.internal.cellSelectionPivot.get();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Grid } from "../+types";
|
|
1
|
+
import type { Grid } from "../+types.js";
|
|
2
2
|
export declare function fullWidthStartEndIndex(grid: Grid<any>): number[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Grid, PositionGridCell } from "../+types";
|
|
1
|
+
import type { Grid, PositionGridCell } from "../+types.js";
|
|
2
2
|
export declare const getRootCell: (grid: Grid<any>, rowIndex: number, columnIndex: number) => PositionGridCell["root"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getSpanFn } from "../state/helpers/get-span-callback";
|
|
2
|
-
import { getFullWidthCallback } from "../state/helpers/get-full-width-callback";
|
|
1
|
+
import { getSpanFn } from "../state/helpers/get-span-callback.js";
|
|
2
|
+
import { getFullWidthCallback } from "../state/helpers/get-full-width-callback.js";
|
|
3
3
|
import { applyLayoutUpdate } from "@1771technologies/lytenyte-shared";
|
|
4
4
|
export const getRootCell = (grid, rowIndex, columnIndex) => {
|
|
5
5
|
const rds = grid.state.rowDataSource.get();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect, Grid } from "../+types";
|
|
1
|
+
import type { DataRect, Grid } from "../+types.js";
|
|
2
2
|
export declare function isBottomRect(grid: Grid<any>, rect: DataRect): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect, Grid } from "../+types";
|
|
1
|
+
import type { DataRect, Grid } from "../+types.js";
|
|
2
2
|
export declare function isCenterRect(grid: Grid<any>, rect: DataRect): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect } from "../+types";
|
|
1
|
+
import type { DataRect } from "../+types.js";
|
|
2
2
|
export declare function isOverlappingRect(rect1: DataRect, rect2: DataRect): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect, Grid } from "../+types";
|
|
1
|
+
import type { DataRect, Grid } from "../+types.js";
|
|
2
2
|
export declare function isTopRect(grid: Grid<any>, rect: DataRect): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DataRect } from "../+types";
|
|
1
|
+
import type { DataRect } from "../+types.js";
|
|
2
2
|
export declare function isWithinSelectionRect(rect: DataRect, r: number, c: number): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DataRect, Grid } from "../+types";
|
|
2
|
-
import type { InternalAtoms } from "../state/+types";
|
|
1
|
+
import type { DataRect, Grid } from "../+types.js";
|
|
2
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
3
3
|
export declare function updateAdditiveCellSelection(grid: Grid<any> & {
|
|
4
4
|
internal: InternalAtoms;
|
|
5
5
|
}, rect: DataRect): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { boundSelectionRect } from "./bound-selection-rect";
|
|
2
|
-
import { adjustRectForRowAndCellSpan } from "./adjust-rect-for-row-and-cell-span";
|
|
3
|
-
import { areRectsEqual } from "./are-rects-equal";
|
|
4
|
-
import { splitCellSelectionRect } from "./split-cell-selection-rect";
|
|
1
|
+
import { boundSelectionRect } from "./bound-selection-rect.js";
|
|
2
|
+
import { adjustRectForRowAndCellSpan } from "./adjust-rect-for-row-and-cell-span.js";
|
|
3
|
+
import { areRectsEqual } from "./are-rects-equal.js";
|
|
4
|
+
import { splitCellSelectionRect } from "./split-cell-selection-rect.js";
|
|
5
5
|
export function updateAdditiveCellSelection(grid, rect) {
|
|
6
6
|
const s = grid.state.columnMeta.get();
|
|
7
7
|
const ds = grid.state.rowDataStore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Grid } from "../+types";
|
|
2
|
-
import type { InternalAtoms } from "../state/+types";
|
|
1
|
+
import type { Grid } from "../+types.js";
|
|
2
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
3
3
|
export declare function useEdgeScroll(grid: Grid<any> & {
|
|
4
4
|
internal: InternalAtoms;
|
|
5
5
|
}): {
|
package/dist/cells/cell.js
CHANGED
|
@@ -10,9 +10,10 @@ const CellImpl = forwardRef(function Cell({ cell, children, ...props }, forwarde
|
|
|
10
10
|
const grid = useGridRoot().grid;
|
|
11
11
|
const cx = grid.state;
|
|
12
12
|
grid.internal.refreshKey.useValue();
|
|
13
|
+
const base = grid.state.columnBase.useValue();
|
|
13
14
|
const row = cell.row.useValue();
|
|
14
15
|
const renderers = cx.cellRenderers.useValue();
|
|
15
|
-
const providedRenderer = children ?? cell.column.cellRenderer;
|
|
16
|
+
const providedRenderer = children ?? cell.column.cellRenderer ?? base.cellRenderer;
|
|
16
17
|
const Renderer = providedRenderer
|
|
17
18
|
? typeof providedRenderer === "string"
|
|
18
19
|
? (renderers[providedRenderer] ?? CellDefault)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Dispatch, type JSX, type SetStateAction } from "react";
|
|
2
|
-
import type { Column, Grid } from "../+types";
|
|
3
|
-
import type { TreeVirtualItem } from "../tree-view/virtualized/make-virtual-tree";
|
|
2
|
+
import type { Column, Grid } from "../+types.js";
|
|
3
|
+
import type { TreeVirtualItem } from "../tree-view/virtualized/make-virtual-tree.js";
|
|
4
4
|
import type { PathRoot } from "@1771technologies/lytenyte-shared";
|
|
5
5
|
export interface UseColumnManagerReturn<T> {
|
|
6
6
|
readonly rootProps: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { useVirtualizedTree } from "../tree-view/virtualized/use-virtualized-tree";
|
|
2
|
+
import { useVirtualizedTree } from "../tree-view/virtualized/use-virtualized-tree.js";
|
|
3
3
|
export function useColumnManager(grid) {
|
|
4
4
|
const [expansions, onExpansionChange] = useState({});
|
|
5
5
|
const columns = grid.state.columns.useValue();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TreeVirtualItem } from "../tree-view/virtualized/make-virtual-tree";
|
|
2
|
-
import type { Column } from "../+types";
|
|
1
|
+
import type { TreeVirtualItem } from "../tree-view/virtualized/make-virtual-tree.js";
|
|
2
|
+
import type { Column } from "../+types.js";
|
|
3
3
|
export declare function useColumnsFromContext(item: TreeVirtualItem<Column<any>>): Column<any>[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { useBranchLookup } from "./branch-lookup-context";
|
|
2
|
+
import { useBranchLookup } from "./branch-lookup-context.js";
|
|
3
3
|
export function useColumnsFromContext(item) {
|
|
4
4
|
const lookup = useBranchLookup();
|
|
5
5
|
const columns = useMemo(() => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ForceSyncScrolling } from "../tree-view/virtualized/force-sync-scrolling";
|
|
2
|
-
import { InclusionCheckbox } from "./inclusion-checkbox";
|
|
3
|
-
import { Root } from "./root";
|
|
4
|
-
import { useFilterTree } from "./hooks/use-filter-tree";
|
|
1
|
+
import { ForceSyncScrolling } from "../tree-view/virtualized/force-sync-scrolling.js";
|
|
2
|
+
import { InclusionCheckbox } from "./inclusion-checkbox.js";
|
|
3
|
+
import { Root } from "./root.js";
|
|
4
|
+
import { useFilterTree } from "./hooks/use-filter-tree.js";
|
|
5
5
|
export declare const FilterTree: {
|
|
6
6
|
Root: typeof Root;
|
|
7
7
|
Panel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
8
8
|
PassiveScroll: typeof ForceSyncScrolling;
|
|
9
|
-
Leaf: import("react").ForwardRefExoticComponent<Omit<import("./leaf").FilterTreeLeafProps & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
10
|
-
Branch: import("react").ForwardRefExoticComponent<Omit<import("./branch").FilterTreeBranch & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
11
|
-
Label: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("./label").LabelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Leaf: import("react").ForwardRefExoticComponent<Omit<import("./leaf.js").FilterTreeLeafProps & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
10
|
+
Branch: import("react").ForwardRefExoticComponent<Omit<import("./branch.js").FilterTreeBranch & import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
11
|
+
Label: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("./label.js").LabelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
12
|
Checkbox: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & InclusionCheckbox, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
13
|
useFilterTree: typeof useFilterTree;
|
|
14
14
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { TreePanel } from "../tree-view/panel/panel";
|
|
2
|
-
import { ForceSyncScrolling } from "../tree-view/virtualized/force-sync-scrolling";
|
|
3
|
-
import { Branch } from "./branch";
|
|
4
|
-
import { InclusionCheckbox } from "./inclusion-checkbox";
|
|
5
|
-
import { Label } from "./label";
|
|
6
|
-
import { Leaf } from "./leaf";
|
|
7
|
-
import { Root } from "./root";
|
|
8
|
-
import { useFilterTree } from "./hooks/use-filter-tree";
|
|
1
|
+
import { TreePanel } from "../tree-view/panel/panel.js";
|
|
2
|
+
import { ForceSyncScrolling } from "../tree-view/virtualized/force-sync-scrolling.js";
|
|
3
|
+
import { Branch } from "./branch.js";
|
|
4
|
+
import { InclusionCheckbox } from "./inclusion-checkbox.js";
|
|
5
|
+
import { Label } from "./label.js";
|
|
6
|
+
import { Leaf } from "./leaf.js";
|
|
7
|
+
import { Root } from "./root.js";
|
|
8
|
+
import { useFilterTree } from "./hooks/use-filter-tree.js";
|
|
9
9
|
export const FilterTree = {
|
|
10
10
|
Root,
|
|
11
11
|
Panel: TreePanel,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FilterInFilterItem } from "../../+types";
|
|
2
|
-
import type { TreeVirtualItem } from "../../tree-view/virtualized/make-virtual-tree";
|
|
1
|
+
import type { FilterInFilterItem } from "../../+types.js";
|
|
2
|
+
import type { TreeVirtualItem } from "../../tree-view/virtualized/make-virtual-tree.js";
|
|
3
3
|
export declare function useTreeItem(item: TreeVirtualItem<FilterInFilterItem>): {
|
|
4
4
|
onCheckChange: (b?: boolean) => void;
|
|
5
5
|
isChecked: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react";
|
|
2
|
-
import { useGrid } from "../../grid-provider/use-grid";
|
|
3
|
-
import { useTreeContext } from "../context";
|
|
2
|
+
import { useGrid } from "../../grid-provider/use-grid.js";
|
|
3
|
+
import { useTreeContext } from "../context.js";
|
|
4
4
|
function isSelectAll(item) {
|
|
5
5
|
return item.kind === "leaf" && item.leaf.data.id === "__LNG__SELECT_ALL";
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AggModelFn, DropEventParams, Grid } from "../+types";
|
|
2
|
-
import type { GridBoxItem } from "./+types";
|
|
1
|
+
import type { AggModelFn, DropEventParams, Grid } from "../+types.js";
|
|
2
|
+
import type { GridBoxItem } from "./+types.js";
|
|
3
3
|
export interface UseAggregationBoxItemsProps<T> {
|
|
4
4
|
readonly grid: Grid<T>;
|
|
5
5
|
readonly orientation?: "horizontal" | "vertical";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { Column, DropEventParams, Grid } from "../+types";
|
|
3
|
-
import type { GridBoxItem } from "./+types";
|
|
2
|
+
import type { Column, DropEventParams, Grid } from "../+types.js";
|
|
3
|
+
import type { GridBoxItem } from "./+types.js";
|
|
4
4
|
export interface OnDropParams<T> {
|
|
5
5
|
readonly target: Column<T>;
|
|
6
6
|
readonly src: Column<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import type { DropEventParams, Grid, RowGroupModelItem } from "../+types";
|
|
3
|
-
import type { GridBoxItem } from "./+types";
|
|
2
|
+
import type { DropEventParams, Grid, RowGroupModelItem } from "../+types.js";
|
|
3
|
+
import type { GridBoxItem } from "./+types.js";
|
|
4
4
|
export interface UseRowGroupBoxItems<T> {
|
|
5
5
|
readonly grid: Grid<T>;
|
|
6
6
|
readonly orientation?: "horizontal" | "vertical";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Grid } from "../+types";
|
|
2
|
-
import type { InternalAtoms } from "../state/+types";
|
|
1
|
+
import type { Grid } from "../+types.js";
|
|
2
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
3
3
|
export declare const gridContext: import("react").Context<Grid<any> & {
|
|
4
4
|
internal: InternalAtoms;
|
|
5
5
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const GridProvider: import("react").Provider<import("../+types").Grid<any> & {
|
|
2
|
-
internal: import("../state/+types").InternalAtoms;
|
|
1
|
+
export declare const GridProvider: import("react").Provider<import("../+types.js").Grid<any> & {
|
|
2
|
+
internal: import("../state/+types.js").InternalAtoms;
|
|
3
3
|
}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { gridContext } from "./context";
|
|
1
|
+
import { gridContext } from "./context.js";
|
|
2
2
|
export const GridProvider = gridContext.Provider;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useGrid: () => import("../+types").Grid<any> & {
|
|
2
|
-
internal: import("../state/+types").InternalAtoms;
|
|
1
|
+
export declare const useGrid: () => import("../+types.js").Grid<any> & {
|
|
2
|
+
internal: import("../state/+types.js").InternalAtoms;
|
|
3
3
|
};
|
package/dist/grid.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const Grid: {
|
|
|
15
15
|
RowsContainer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
RowsBottom: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
17
|
RowsTop: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Row: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "onDrag"> & import("./rows/row/row").RowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
19
|
RowsCenter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
20
|
Viewport: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
21
|
useLyteNyte: typeof useLyteNyte;
|
package/dist/grid.js
CHANGED
|
@@ -9,6 +9,7 @@ import { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from
|
|
|
9
9
|
import { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source";
|
|
10
10
|
import { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source";
|
|
11
11
|
import { RowFullWidth } from "./rows/row-full-width";
|
|
12
|
+
import { Row } from "./rows/row/row";
|
|
12
13
|
import { RowsContainer } from "./rows/rows-container";
|
|
13
14
|
import { RowsBottom, RowsCenter, RowsTop } from "./rows/rows-sections";
|
|
14
15
|
import { useLyteNyte } from "./state/use-lytenyte";
|
|
@@ -24,6 +25,7 @@ export const Grid = {
|
|
|
24
25
|
RowsContainer,
|
|
25
26
|
RowsBottom,
|
|
26
27
|
RowsTop,
|
|
28
|
+
Row,
|
|
27
29
|
RowsCenter,
|
|
28
30
|
Viewport,
|
|
29
31
|
useLyteNyte,
|
|
@@ -11,6 +11,7 @@ export function ResizeHandler({ slot, cell, xPositions, style, className, }) {
|
|
|
11
11
|
const double = sx.state.columnDoubleClickToAutosize.useValue();
|
|
12
12
|
const defaultProps = {
|
|
13
13
|
role: "button",
|
|
14
|
+
"data-ln-header-resizer": "true",
|
|
14
15
|
"aria-label": `Resize ${cell.column.name ?? cell.column.id}`,
|
|
15
16
|
tabIndex: -1,
|
|
16
17
|
onDoubleClick: () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Grid, HeaderCellFloating, HeaderCellLayout, HeaderGroupCellLayout } from "../+types";
|
|
1
|
+
import type { Grid, HeaderCellFloating, HeaderCellLayout, HeaderGroupCellLayout } from "../+types.js";
|
|
2
2
|
import { type JSX } from "react";
|
|
3
|
-
import type { InternalAtoms } from "../state/+types";
|
|
3
|
+
import type { InternalAtoms } from "../state/+types.js";
|
|
4
4
|
export declare function useDragMove<T>(grid: Grid<T> & {
|
|
5
5
|
internal: InternalAtoms;
|
|
6
6
|
}, cell: HeaderGroupCellLayout | HeaderCellLayout<T> | HeaderCellFloating<T>, onDragStart?: JSX.IntrinsicElements["div"]["onDragStart"]): {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AddIcon, AddSmallIcon, AggregateIcon, AggregationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightCurvedIcon, ArrowRightIcon, ArrowUpIcon, AutosizeIcon, BackIcon, BookmarkIcon, BooleanIcon, CalendarIcon, ChartIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Close2Icon, CloseIcon, CollapseGroupIcon, Columns2Icon, ColumnsIcon, CopyIcon, CornerRadiusIcon, CustomizeThemeIcon, CutIcon, CsvIcon, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, ExcelIcon, ExpandGroupIcon, ExpandIcon, Expression2Icon, ExpressionIcon, ExternalLinkIcon, File2Icon, FileIcon, FilterIcon, FolderIcon, GlobeIcon, GridViewIcon, GroupByColIcon, HamburgerIcon, HelpIcon, HiddenIcon, HistoryIcon, ImportIcon, LinkIcon, ListViewIcon, LoadingIcon, LocationIcon, ModalIcon, MoreIcon, MoreVerticalIcon, MultilineIcon, NumberIcon, PasteIcon, PieIcon, PinColumnIcon, RefreshIcon, SearchIcon, SettingsIcon, ShareIcon, SingleLineIcon, Sort2Icon, SortIcon, SpacingHIcon, SpacingIcon, StickColumnIcon, SwapIcon, TagIcon, TaskIcon, TextIcon, ThemesIcon, Tickmark2Icon, TickmarkIcon, TimeIcon, UploadIcon, UserIcon, ViewIcon, } from "@1771technologies/lytenyte-core/icons";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AddIcon, AddSmallIcon, AggregateIcon, AggregationIcon, ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightCurvedIcon, ArrowRightIcon, ArrowUpIcon, AutosizeIcon, BackIcon, BookmarkIcon, BooleanIcon, CalendarIcon, ChartIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, Close2Icon, CloseIcon, CollapseGroupIcon, Columns2Icon, ColumnsIcon, CopyIcon, CornerRadiusIcon, CustomizeThemeIcon, CutIcon, CsvIcon, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, ExcelIcon, ExpandGroupIcon, ExpandIcon, Expression2Icon, ExpressionIcon, ExternalLinkIcon, File2Icon, FileIcon, FilterIcon, FolderIcon, GlobeIcon, GridViewIcon, GroupByColIcon, HamburgerIcon, HelpIcon, HiddenIcon, HistoryIcon, ImportIcon, LinkIcon, ListViewIcon, LoadingIcon, LocationIcon, ModalIcon, MoreIcon, MoreVerticalIcon, MultilineIcon, NumberIcon, PasteIcon, PieIcon, PinColumnIcon, RefreshIcon, SearchIcon, SettingsIcon, ShareIcon, SingleLineIcon, Sort2Icon, SortIcon, SpacingHIcon, SpacingIcon, StickColumnIcon, SwapIcon, TagIcon, TaskIcon, TextIcon, ThemesIcon, Tickmark2Icon, TickmarkIcon, TimeIcon, UploadIcon, UserIcon, ViewIcon, } from "@1771technologies/lytenyte-core/icons";
|
package/dist/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { FilterTree } from "./filter-tree/filter-tree.js";
|
|
|
4
4
|
export { ColumnManager } from "./column-manager/column-manager.js";
|
|
5
5
|
export { GridBox } from "./grid-box/grid-box.js";
|
|
6
6
|
export { activateLicense } from "./license.js";
|
|
7
|
+
export { measureText } from "@1771technologies/lytenyte-shared";
|
package/dist/index.js
CHANGED
|
@@ -4,3 +4,4 @@ export { FilterTree } from "./filter-tree/filter-tree.js";
|
|
|
4
4
|
export { ColumnManager } from "./column-manager/column-manager.js";
|
|
5
5
|
export { GridBox } from "./grid-box/grid-box.js";
|
|
6
6
|
export { activateLicense } from "./license.js";
|
|
7
|
+
export { measureText } from "@1771technologies/lytenyte-shared";
|
|
@@ -10,7 +10,7 @@ import { sum } from "./sum.js";
|
|
|
10
10
|
* Collection of built-in array utility functions for numerical and statistical operations.
|
|
11
11
|
* Each function handles null and undefined values gracefully.
|
|
12
12
|
* @example
|
|
13
|
-
* import { builtIns } from './builtIns';
|
|
13
|
+
* import { builtIns } from './builtIns.js';
|
|
14
14
|
*
|
|
15
15
|
* const data = [1, null, 3, 2];
|
|
16
16
|
* builtIns.sum(data); // Returns 6
|