@1771technologies/lytenyte-pro 1.0.7 → 1.0.9
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/cell-selection/cell-selection-containers.js +5 -5
- package/dist/cell-selection/cell-selection-driver.js +9 -9
- package/dist/cell-selection/cell-style-row.js +1 -1
- package/dist/cell-selection/split-on-pivot.js +1 -1
- package/dist/cells/+types.cell.d.ts +13 -0
- package/dist/cells/+types.cell.js +1 -0
- package/dist/cells/cell-editor.js +2 -2
- package/dist/cells/cell-spacer.d.ts +9 -3
- package/dist/cells/cell-spacer.js +10 -13
- package/dist/cells/cell.js +20 -17
- package/dist/cells/use-cell-style.d.ts +3 -0
- package/dist/cells/use-cell-style.js +51 -0
- package/dist/column-manager/branch.js +4 -4
- package/dist/column-manager/column-manager.d.ts +7 -7
- package/dist/column-manager/column-manager.js +8 -8
- package/dist/column-manager/label.js +1 -1
- package/dist/column-manager/leaf.js +4 -4
- package/dist/column-manager/move-handle.js +3 -3
- package/dist/column-manager/panel.js +1 -1
- package/dist/column-manager/root.js +3 -3
- package/dist/column-manager/use-column-manager.js +1 -1
- package/dist/column-manager/visibility-checkbox.js +3 -3
- package/dist/filter-tree/branch.js +3 -3
- package/dist/filter-tree/context.d.ts +2 -2
- package/dist/filter-tree/hooks/use-filter-tree.js +1 -1
- package/dist/filter-tree/inclusion-checkbox.js +1 -1
- package/dist/filter-tree/label.js +1 -1
- package/dist/filter-tree/leaf.js +3 -3
- package/dist/filter-tree/root.js +3 -3
- package/dist/grid-box/grid-box.d.ts +5 -5
- package/dist/grid-box/grid-box.js +6 -6
- package/dist/grid-box/item.js +2 -2
- package/dist/grid-box/panel.js +2 -2
- package/dist/grid-box/root.d.ts +1 -1
- package/dist/grid-box/root.js +3 -3
- package/dist/grid.d.ts +8 -8
- package/dist/grid.js +12 -12
- package/dist/header/header-cell.js +4 -4
- package/dist/header/header-group-cell.js +2 -2
- package/dist/header/header-row.js +1 -1
- package/dist/header/header.js +1 -1
- package/dist/header/resize-handler.js +1 -1
- package/dist/header/use-header-cell-renderer.js +1 -1
- package/dist/icons/index.js +3 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/listbox/item.js +1 -1
- package/dist/listbox/panel.js +1 -1
- package/dist/listbox/root.js +1 -1
- package/dist/root/dialog-driver.js +1 -1
- package/dist/root/popover-driver.js +1 -1
- package/dist/root/root.js +5 -5
- package/dist/row-data-source-client/pivots/create-agg-model.d.ts +2 -2
- package/dist/row-data-source-client/pivots/create-agg-model.js +1 -1
- package/dist/row-data-source-client/use-client-data-source-paginated.js +2 -0
- package/dist/row-data-source-client/use-client-data-source.js +2 -0
- package/dist/row-data-source-client/use-client-tree-data-source.js +2 -0
- package/dist/rows/row/context.d.ts +8 -0
- package/dist/rows/row/context.js +11 -1
- package/dist/rows/row/row.d.ts +1 -1
- package/dist/rows/row/row.js +9 -7
- package/dist/rows/row/use-row-context-value.d.ts +4 -4
- package/dist/rows/row/use-row-context-value.js +18 -3
- package/dist/rows/row-detail-row.js +1 -1
- package/dist/rows/row-full-width.js +7 -5
- package/dist/rows/rows-container.js +1 -1
- package/dist/rows/rows-sections.js +3 -3
- package/dist/rows/scrollers/native-scroller.js +1 -15
- package/dist/sort-manager/root.d.ts +1 -1
- package/dist/sort-manager/root.js +1 -1
- package/dist/sort-manager/sort-add.js +1 -1
- package/dist/sort-manager/sort-apply.js +2 -2
- package/dist/sort-manager/sort-cancel.js +2 -2
- package/dist/sort-manager/sort-clear.js +1 -1
- package/dist/sort-manager/sort-column-select.js +1 -1
- package/dist/sort-manager/sort-direction-select.js +1 -1
- package/dist/sort-manager/sort-manager.d.ts +11 -11
- package/dist/sort-manager/sort-manager.js +12 -12
- package/dist/sort-manager/sort-remove.js +1 -1
- package/dist/sort-manager/sort-row.d.ts +1 -1
- package/dist/sort-manager/sort-row.js +2 -2
- package/dist/sort-manager/sort-rows.js +1 -1
- package/dist/sort-manager/sort-value-select.js +1 -1
- package/dist/state/+types.d.ts +2 -0
- package/dist/state/api/cell-root.js +2 -2
- package/dist/state/helpers/row-layout/row-layout.js +8 -7
- package/dist/state/use-lytenyte.js +12 -2
- package/dist/tree-view/root.js +1 -1
- package/dist/viewport/viewport.js +2 -2
- package/package.json +7 -7
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Root } from "./root";
|
|
2
|
-
import { SortRow } from "./sort-row";
|
|
3
|
-
import { SortRows } from "./sort-rows";
|
|
4
|
-
import { useSortManager } from "./hooks/use-sort-manager";
|
|
5
|
-
import { SortColumnSelect } from "./sort-column-select";
|
|
6
|
-
import { SortValueSelect } from "./sort-value-select";
|
|
7
|
-
import { SortDirectionSelect } from "./sort-direction-select";
|
|
8
|
-
import { SortAdd } from "./sort-add";
|
|
9
|
-
import { SortRemove } from "./sort-remove";
|
|
10
|
-
import { SortCancel } from "./sort-cancel";
|
|
11
|
-
import { SortClear } from "./sort-clear";
|
|
12
|
-
import { SortApply } from "./sort-apply";
|
|
1
|
+
import { Root } from "./root.js";
|
|
2
|
+
import { SortRow } from "./sort-row.js";
|
|
3
|
+
import { SortRows } from "./sort-rows.js";
|
|
4
|
+
import { useSortManager } from "./hooks/use-sort-manager.js";
|
|
5
|
+
import { SortColumnSelect } from "./sort-column-select.js";
|
|
6
|
+
import { SortValueSelect } from "./sort-value-select.js";
|
|
7
|
+
import { SortDirectionSelect } from "./sort-direction-select.js";
|
|
8
|
+
import { SortAdd } from "./sort-add.js";
|
|
9
|
+
import { SortRemove } from "./sort-remove.js";
|
|
10
|
+
import { SortCancel } from "./sort-cancel.js";
|
|
11
|
+
import { SortClear } from "./sort-clear.js";
|
|
12
|
+
import { SortApply } from "./sort-apply.js";
|
|
13
13
|
export const SortManager = {
|
|
14
14
|
Root,
|
|
15
15
|
Row: SortRow,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useSlot } from "@1771technologies/lytenyte-react-hooks";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
import { useSortRowCtx } from "./context";
|
|
4
|
+
import { useSortRowCtx } from "./context.js";
|
|
5
5
|
export const SortRemove = forwardRef(function SortRemove({ as, ...props }, forwarded) {
|
|
6
6
|
const row = useSortRowCtx();
|
|
7
7
|
const renderer = useSlot({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { Item } from "../listbox/item";
|
|
4
|
-
import { rowContext } from "./context";
|
|
3
|
+
import { Item } from "../listbox/item.js";
|
|
4
|
+
import { rowContext } from "./context.js";
|
|
5
5
|
export const SortRow = forwardRef(function SortRow({ row, ...props }, forwarded) {
|
|
6
6
|
return (_jsx(rowContext.Provider, { value: row, children: _jsx(Item, { ...props, ref: forwarded }) }));
|
|
7
7
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { Panel } from "../listbox/panel";
|
|
3
|
+
import { Panel } from "../listbox/panel.js";
|
|
4
4
|
export const SortRows = forwardRef(function SortRows(props, forwarded) {
|
|
5
5
|
return _jsx(Panel, { ...props, ref: forwarded });
|
|
6
6
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useSlot } from "@1771technologies/lytenyte-react-hooks";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
|
-
import { useSortRowCtx } from "./context";
|
|
4
|
+
import { useSortRowCtx } from "./context.js";
|
|
5
5
|
export const SortValueSelect = forwardRef(function SortValueSelect({ as, ...props }, forwarded) {
|
|
6
6
|
const row = useSortRowCtx();
|
|
7
7
|
const el = (_jsxs("select", { "aria-label": "Select sort value", value: row.sortSelected?.value ?? "", onChange: (e) => {
|
package/dist/state/+types.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export interface InternalAtoms {
|
|
|
8
8
|
readonly xScroll: GridAtom<number>;
|
|
9
9
|
readonly yScroll: GridAtom<number>;
|
|
10
10
|
readonly layout: LayoutState;
|
|
11
|
+
readonly hasSpans: GridAtomReadonly<boolean>;
|
|
12
|
+
readonly colBounds: GridAtomReadonly<[number, number]>;
|
|
11
13
|
readonly focusActive: GridAtom<PositionUnion | null>;
|
|
12
14
|
readonly focusPrevColIndex: GridAtom<number | null>;
|
|
13
15
|
readonly focusPrevRowIndex: GridAtom<number | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CONTAINS_DEAD_CELLS, FULL_WIDTH, updateLayout } from "@1771technologies/lytenyte-shared";
|
|
2
|
-
import { getSpanFn } from "../helpers/get-span-callback";
|
|
3
|
-
import { getFullWidthCallback } from "../helpers/get-full-width-callback";
|
|
2
|
+
import { getSpanFn } from "../helpers/get-span-callback.js";
|
|
3
|
+
import { getFullWidthCallback } from "../helpers/get-full-width-callback.js";
|
|
4
4
|
export const makeCellRoot = (grid) => {
|
|
5
5
|
return (row, column) => {
|
|
6
6
|
const l = grid.internal.layout;
|
|
@@ -69,9 +69,6 @@ const partition = (n, row) => {
|
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
function handleViewLayout({ columns, spanLayout: n, rowStart, rowEnd, rowPin, layout, viewCache, container, rowForIndex, }) {
|
|
72
|
-
/**
|
|
73
|
-
* TOP ROW LAYOUT START
|
|
74
|
-
*/
|
|
75
72
|
for (let r = rowStart; r < rowEnd; r++) {
|
|
76
73
|
const status = layout.special[r];
|
|
77
74
|
const computed = layout.computed[r];
|
|
@@ -87,7 +84,9 @@ function handleViewLayout({ columns, spanLayout: n, rowStart, rowEnd, rowPin, la
|
|
|
87
84
|
const rowLastPinTop = n.rowTopEnd - 1 === r ? true : undefined;
|
|
88
85
|
if (status === FULL_WIDTH) {
|
|
89
86
|
const row = {
|
|
90
|
-
id
|
|
87
|
+
get id() {
|
|
88
|
+
return node.get()?.id ?? `${r}`;
|
|
89
|
+
},
|
|
91
90
|
rowIndex: r,
|
|
92
91
|
kind: "full-width",
|
|
93
92
|
rowPin,
|
|
@@ -155,7 +154,7 @@ function handleViewLayout({ columns, spanLayout: n, rowStart, rowEnd, rowPin, la
|
|
|
155
154
|
rowIndex: r,
|
|
156
155
|
rowSpan: cellSpec?.[c * 4] || 1,
|
|
157
156
|
colSpan: cellSpec?.[c * 4 + 1] || 1,
|
|
158
|
-
rowPin
|
|
157
|
+
rowPin,
|
|
159
158
|
colPin: "end",
|
|
160
159
|
isDeadCol,
|
|
161
160
|
isDeadRow,
|
|
@@ -166,11 +165,13 @@ function handleViewLayout({ columns, spanLayout: n, rowStart, rowEnd, rowPin, la
|
|
|
166
165
|
});
|
|
167
166
|
}
|
|
168
167
|
const row = {
|
|
169
|
-
id
|
|
168
|
+
get id() {
|
|
169
|
+
return node.get()?.id ?? `${r}`;
|
|
170
|
+
},
|
|
170
171
|
rowIndex: r,
|
|
171
172
|
kind: "row",
|
|
172
173
|
cells: cellLayout,
|
|
173
|
-
rowPin
|
|
174
|
+
rowPin,
|
|
174
175
|
row: node,
|
|
175
176
|
rowLastPinTop,
|
|
176
177
|
};
|
|
@@ -246,6 +246,10 @@ export function makeLyteNyte(p) {
|
|
|
246
246
|
});
|
|
247
247
|
return bounds;
|
|
248
248
|
}, { dirty: (prev, next) => !equal(prev, next) });
|
|
249
|
+
const internal_colBounds = computed(() => {
|
|
250
|
+
const b = bounds();
|
|
251
|
+
return [b.colCenterStart, b.colCenterEnd];
|
|
252
|
+
}, { dirty: (l, r) => !equal(l, r) });
|
|
249
253
|
/**
|
|
250
254
|
* COLUMN VIEW
|
|
251
255
|
* Compute the column layout. This impacts both the row layout and header layout. Column layout
|
|
@@ -390,6 +394,10 @@ export function makeLyteNyte(p) {
|
|
|
390
394
|
}, innerHeight - headerHeight);
|
|
391
395
|
});
|
|
392
396
|
const heightTotal = computed(() => yPositions().at(-1));
|
|
397
|
+
const hasSpans = computed(() => {
|
|
398
|
+
const visible = columnMeta().columnsVisible;
|
|
399
|
+
return cellSelectionMode() !== "none" || !visible.every((c) => !(c.colSpan || c.rowSpan));
|
|
400
|
+
});
|
|
393
401
|
const rowView = computed(() => {
|
|
394
402
|
if (!viewport())
|
|
395
403
|
return {
|
|
@@ -412,7 +420,7 @@ export function makeLyteNyte(p) {
|
|
|
412
420
|
const rowScan = rowScanDistance();
|
|
413
421
|
const columns = columnMeta().columnsVisible;
|
|
414
422
|
const rds = rowDataSource();
|
|
415
|
-
const { layout } = layoutState$();
|
|
423
|
+
const { layout, cache } = layoutState$();
|
|
416
424
|
const topCount = rowDataStore.rowTopCount.$();
|
|
417
425
|
const botCount = rowDataStore.rowBottomCount.$();
|
|
418
426
|
const rowCount = rowDataStore.rowCount.$();
|
|
@@ -441,7 +449,7 @@ export function makeLyteNyte(p) {
|
|
|
441
449
|
const focus = internal_focusActive();
|
|
442
450
|
const view = makeRowLayout({
|
|
443
451
|
view: n,
|
|
444
|
-
viewCache:
|
|
452
|
+
viewCache: cache,
|
|
445
453
|
layout,
|
|
446
454
|
rds: rowDataStore,
|
|
447
455
|
columns,
|
|
@@ -609,6 +617,8 @@ export function makeLyteNyte(p) {
|
|
|
609
617
|
xScroll: makeAtom(xScroll),
|
|
610
618
|
yScroll: makeAtom(yScroll),
|
|
611
619
|
layout: layoutState,
|
|
620
|
+
colBounds: makeAtom(internal_colBounds),
|
|
621
|
+
hasSpans: makeAtom(hasSpans),
|
|
612
622
|
focusActive: makeAtom(internal_focusActive),
|
|
613
623
|
focusPrevColIndex: makeAtom(internal_focusPrevCol),
|
|
614
624
|
focusPrevRowIndex: makeAtom(internal_focusPrevRow),
|
package/dist/tree-view/root.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { context } from "./context";
|
|
3
|
+
import { context } from "./context.js";
|
|
4
4
|
import { useCombinedRefs, useEvent } from "@1771technologies/lytenyte-react-hooks";
|
|
5
5
|
import { getAllIds } from "./navigation/get-all-ids.js";
|
|
6
6
|
import { getIdsBetweenNodes } from "./utils/get-ids-between-nodes.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { useCombinedRefs } from "@1771technologies/lytenyte-react-hooks";
|
|
4
|
-
import { useGridRoot } from "../context";
|
|
4
|
+
import { useGridRoot } from "../context.js";
|
|
5
5
|
import { handleNavigationKeys, handleSkipInner, useFocusTracking, } from "@1771technologies/lytenyte-shared";
|
|
6
|
-
import { beginEditing } from "./begin-editing";
|
|
6
|
+
import { beginEditing } from "./begin-editing.js";
|
|
7
7
|
export const Viewport = forwardRef(function Viewport({ children, style, ...props }, forwarded) {
|
|
8
8
|
const ctx = useGridRoot();
|
|
9
9
|
const ref = useCombinedRefs(ctx.ref, forwarded);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1771technologies/lytenyte-pro",
|
|
3
3
|
"description": "Blazingly fast headless React data grid with 100s of features.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "COMMERCIAL",
|
|
7
7
|
"files": [
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@1771technologies/atom": "^1.0.2",
|
|
52
|
-
"@1771technologies/lytenyte-core": "1.0.
|
|
53
|
-
"@1771technologies/lytenyte-
|
|
54
|
-
"@1771technologies/lytenyte-
|
|
55
|
-
"@1771technologies/lytenyte-
|
|
56
|
-
"@1771technologies/lytenyte-
|
|
57
|
-
"@1771technologies/lytenyte-
|
|
52
|
+
"@1771technologies/lytenyte-core": "1.0.9",
|
|
53
|
+
"@1771technologies/lytenyte-dom-utils": "1.0.9",
|
|
54
|
+
"@1771technologies/lytenyte-react-hooks": "1.0.9",
|
|
55
|
+
"@1771technologies/lytenyte-dragon": "1.0.9",
|
|
56
|
+
"@1771technologies/lytenyte-js-utils": "1.0.9",
|
|
57
|
+
"@1771technologies/lytenyte-shared": "1.0.9"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": "^18.0.0 || ^19.0.0",
|