@1771technologies/lytenyte-pro 1.0.0-beta.8 → 1.0.0
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 +581 -65
- package/dist/cell-selection/cell-selection-driver.js +9 -1
- package/dist/cell-selection/update-additive-cell-selection.js +0 -2
- package/dist/cells/cell-editor.js +11 -4
- package/dist/cells/cell.js +1 -1
- package/dist/column-manager/branch.d.ts +9 -3
- package/dist/column-manager/branch.js +20 -4
- package/dist/column-manager/column-manager.d.ts +3 -5
- package/dist/column-manager/column-manager.js +6 -8
- package/dist/column-manager/context.d.ts +2 -2
- package/dist/column-manager/label.d.ts +1 -1
- package/dist/column-manager/label.js +5 -5
- package/dist/column-manager/leaf.d.ts +2 -2
- package/dist/column-manager/leaf.js +22 -4
- package/dist/column-manager/move-handle.d.ts +3 -3
- package/dist/column-manager/move-handle.js +3 -5
- package/dist/column-manager/panel.d.ts +1 -0
- package/dist/column-manager/panel.js +2 -0
- package/dist/column-manager/root.d.ts +6 -7
- package/dist/column-manager/root.js +2 -15
- package/dist/column-manager/use-column-manager.d.ts +9 -18
- package/dist/column-manager/use-column-manager.js +22 -22
- package/dist/column-manager/use-columns-from-context.d.ts +2 -2
- package/dist/column-manager/use-columns-from-context.js +2 -2
- package/dist/column-manager/visibility-checkbox.d.ts +1 -1
- package/dist/column-manager/visibility-checkbox.js +2 -2
- package/dist/filter-tree/branch.d.ts +4 -1
- package/dist/filter-tree/branch.js +1 -1
- package/dist/filter-tree/inclusion-checkbox.d.ts +1 -1
- package/dist/filter-tree/inclusion-checkbox.js +2 -2
- package/dist/filter-tree/label.d.ts +1 -1
- package/dist/filter-tree/label.js +2 -2
- package/dist/filter-tree/root.d.ts +3 -3
- package/dist/filter-tree/root.js +4 -4
- package/dist/grid-box/+types.d.ts +4 -2
- package/dist/grid-box/item.d.ts +4 -1
- package/dist/grid-box/item.js +39 -9
- package/dist/grid-box/use-aggregation-box-items.js +3 -1
- package/dist/grid-box/use-column-box-items.d.ts +6 -2
- package/dist/grid-box/use-column-box-items.js +11 -14
- package/dist/grid-box/use-row-group-box-items.d.ts +2 -2
- package/dist/grid-box/use-row-group-box-items.js +14 -15
- package/dist/grid.d.ts +0 -12
- package/dist/grid.js +0 -12
- package/dist/header/header-cell.d.ts +1 -1
- package/dist/header/header-cell.js +2 -2
- package/dist/header/header-group-cell.js +3 -1
- package/dist/header/resize-handler.d.ts +2 -2
- package/dist/header/resize-handler.js +7 -3
- package/dist/header/use-drag-move.js +9 -2
- package/dist/header/use-header-cell-renderer.js +4 -4
- package/dist/icons/index.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/license.js +1 -1
- package/dist/listbox/item.js +1 -1
- package/dist/row-data-source-client/filter/compute-filtered-rows.js +1 -1
- package/dist/row-data-source-client/use-client-data-source-paginated.d.ts +3 -3
- package/dist/row-data-source-client/use-client-data-source-paginated.js +66 -24
- package/dist/row-data-source-client/use-client-data-source.js +50 -20
- package/dist/row-data-source-client/use-client-tree-data-source.js +49 -20
- package/dist/row-data-source-server/use-server-data-source.js +26 -0
- package/dist/sort-manager/sort-add.d.ts +1 -1
- package/dist/sort-manager/sort-add.js +3 -3
- package/dist/sort-manager/sort-apply.d.ts +1 -1
- package/dist/sort-manager/sort-apply.js +3 -3
- package/dist/sort-manager/sort-cancel.d.ts +1 -1
- package/dist/sort-manager/sort-cancel.js +3 -3
- package/dist/sort-manager/sort-clear.d.ts +1 -1
- package/dist/sort-manager/sort-clear.js +3 -3
- package/dist/sort-manager/sort-column-select.d.ts +1 -1
- package/dist/sort-manager/sort-column-select.js +2 -2
- package/dist/sort-manager/sort-direction-select.d.ts +1 -1
- package/dist/sort-manager/sort-direction-select.js +2 -2
- package/dist/sort-manager/sort-remove.d.ts +1 -1
- package/dist/sort-manager/sort-remove.js +3 -3
- package/dist/sort-manager/sort-value-select.d.ts +1 -1
- package/dist/sort-manager/sort-value-select.js +2 -2
- package/dist/state/+types.d.ts +2 -1
- package/dist/state/api/column-autosize.js +1 -1
- package/dist/state/api/column-from-index.d.ts +1 -1
- package/dist/state/api/column-from-index.js +1 -1
- package/dist/state/api/column-update.d.ts +4 -1
- package/dist/state/api/column-update.js +13 -0
- package/dist/state/api/edit-end.js +1 -1
- package/dist/state/api/export-data-rect.js +1 -1
- package/dist/state/helpers/column-add-row-group.d.ts +2 -1
- package/dist/state/helpers/column-add-row-group.js +9 -1
- package/dist/state/helpers/column-marker.js +1 -1
- package/dist/state/helpers/edit-on-change.js +1 -0
- package/dist/state/helpers/empty-row-data-source.js +1 -0
- package/dist/state/helpers/resolve-column.d.ts +1 -1
- package/dist/state/helpers/resolve-column.js +7 -0
- package/dist/state/use-lytenyte.js +16 -4
- package/dist/tree-view/branch/branch.d.ts +4 -1
- package/dist/tree-view/branch/branch.js +4 -2
- package/dist/tree-view/hooks/use-tree-view-paths.d.ts +1 -1
- package/dist/tree-view/hooks/use-tree-view-paths.js +3 -3
- package/dist/tree-view/leaf.js +1 -0
- package/dist/viewport/begin-editing.js +1 -1
- package/main.css +8 -4
- package/package.json +7 -7
- package/dist/column-manager/passive-scroll.d.ts +0 -2
- package/dist/column-manager/passive-scroll.js +0 -2
|
@@ -4,10 +4,10 @@ import type { UseTreeFilterReturn } from "./hooks/use-filter-tree";
|
|
|
4
4
|
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
5
5
|
export type FilterTreeRootProps<T> = UseTreeFilterReturn<T>["rootProps"] & {
|
|
6
6
|
readonly grid: Grid<T>;
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
7
|
+
readonly loadingAs?: SlotComponent;
|
|
8
|
+
readonly errorAs?: SlotComponent<{
|
|
9
9
|
error: any;
|
|
10
10
|
refetch: () => void;
|
|
11
11
|
}>;
|
|
12
12
|
};
|
|
13
|
-
export declare function Root<T>({ grid, treeRef, filterIn, pivotMode, columnId, children, error, loading,
|
|
13
|
+
export declare function Root<T>({ grid, treeRef, filterIn, pivotMode, columnId, children, error, loading, errorAs, loadingAs, fetchItems, items, applyChangesImmediately, filterInChange, ...rootProps }: PropsWithChildren<FilterTreeRootProps<T>>): import("react/jsx-runtime").JSX.Element;
|
package/dist/filter-tree/root.js
CHANGED
|
@@ -4,7 +4,7 @@ import { GridProvider } from "../grid-provider/provider";
|
|
|
4
4
|
import { TreeRoot } from "../tree-view/root";
|
|
5
5
|
import { FilterTreeContext } from "./context";
|
|
6
6
|
import { useSlot } from "@1771technologies/lytenyte-react-hooks";
|
|
7
|
-
export function Root({ grid, treeRef, filterIn, pivotMode, columnId, children, error, loading,
|
|
7
|
+
export function Root({ grid, treeRef, filterIn, pivotMode, columnId, children, error, loading, errorAs, loadingAs, fetchItems, items, applyChangesImmediately, filterInChange, ...rootProps }) {
|
|
8
8
|
const value = useMemo(() => {
|
|
9
9
|
return {
|
|
10
10
|
filter: filterIn,
|
|
@@ -16,15 +16,15 @@ export function Root({ grid, treeRef, filterIn, pivotMode, columnId, children, e
|
|
|
16
16
|
};
|
|
17
17
|
}, [applyChangesImmediately, columnId, filterIn, filterInChange, items, pivotMode]);
|
|
18
18
|
const loadingSlot = useSlot({
|
|
19
|
-
slot:
|
|
19
|
+
slot: loadingAs ?? _jsx("div", { children: "Loading..." }),
|
|
20
20
|
});
|
|
21
21
|
const errorSlot = useSlot({
|
|
22
|
-
slot:
|
|
22
|
+
slot: errorAs ?? _jsx("div", { children: "Error Occurred Fetching" }),
|
|
23
23
|
state: { error, refetch: fetchItems },
|
|
24
24
|
});
|
|
25
25
|
if (loading)
|
|
26
26
|
return loadingSlot;
|
|
27
27
|
if (error)
|
|
28
28
|
return errorSlot;
|
|
29
|
-
return (_jsx(GridProvider, { value: grid, children: _jsx(FilterTreeContext.Provider, { value: value, children: _jsx(TreeRoot, { selectMode: "none", transitionEnter:
|
|
29
|
+
return (_jsx(GridProvider, { value: grid, children: _jsx(FilterTreeContext.Provider, { value: value, children: _jsx(TreeRoot, { selectMode: "none", transitionEnter: 0, transitionExit: 0, expansionDefault: true, ref: treeRef, ...rootProps, children: children }) }) }));
|
|
30
30
|
}
|
|
@@ -8,6 +8,8 @@ export interface GridBoxItem<T = any> {
|
|
|
8
8
|
readonly draggable: boolean;
|
|
9
9
|
readonly dragPlaceholder?: () => ReactNode;
|
|
10
10
|
readonly onDrop: (p: DropEventParams) => void;
|
|
11
|
-
readonly onAction: () => void;
|
|
12
|
-
readonly onDelete: () => void;
|
|
11
|
+
readonly onAction: (el: HTMLElement) => void;
|
|
12
|
+
readonly onDelete: (el: HTMLElement) => void;
|
|
13
|
+
readonly index: number;
|
|
14
|
+
readonly source: string;
|
|
13
15
|
}
|
package/dist/grid-box/item.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
1
2
|
import type { GridBoxItem } from "./+types";
|
|
2
3
|
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
3
4
|
export interface GridBoxItemProps {
|
|
4
5
|
readonly item: GridBoxItem;
|
|
5
|
-
readonly
|
|
6
|
+
readonly itemAs?: SlotComponent;
|
|
7
|
+
readonly itemClassName?: string;
|
|
8
|
+
readonly itemStyle?: CSSProperties;
|
|
6
9
|
}
|
|
7
10
|
export declare const BoxItem: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & GridBoxItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/grid-box/item.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { Item } from "../listbox/item";
|
|
4
|
-
import { DropWrap, useDraggable } from "@1771technologies/lytenyte-dragon";
|
|
4
|
+
import { dragState, DropWrap, useDraggable } from "@1771technologies/lytenyte-dragon";
|
|
5
5
|
import { useCombinedRefs, useSlot, } from "@1771technologies/lytenyte-react-hooks";
|
|
6
6
|
import { useGridBoxContext } from "./context";
|
|
7
|
-
export const BoxItem = forwardRef(function BoxItem({ item,
|
|
7
|
+
export const BoxItem = forwardRef(function BoxItem({ item, itemAs, itemClassName, itemStyle, children, ...props }, forwarded) {
|
|
8
8
|
const { accepted } = useGridBoxContext();
|
|
9
9
|
const { dragProps } = useDraggable({
|
|
10
10
|
getItems: () => {
|
|
@@ -19,15 +19,45 @@ export const BoxItem = forwardRef(function BoxItem({ item, itemWrap, ...props },
|
|
|
19
19
|
const renderer = useSlot({
|
|
20
20
|
props: [
|
|
21
21
|
{
|
|
22
|
-
children: (_jsx(Item, { ...
|
|
23
|
-
if (ev.key === " ")
|
|
24
|
-
item.onAction?.();
|
|
22
|
+
children: (_jsx(Item, { ...extraProps, onKeyDown: (ev) => {
|
|
23
|
+
if (ev.key === " ") {
|
|
24
|
+
item.onAction?.(ev.currentTarget);
|
|
25
|
+
ev.preventDefault();
|
|
26
|
+
}
|
|
25
27
|
if (ev.key === "Backspace" || ev.key === "Delete")
|
|
26
|
-
item.onDelete?.();
|
|
27
|
-
}, onClick: () => item.onAction() })),
|
|
28
|
+
item.onDelete?.(ev.currentTarget);
|
|
29
|
+
}, onClick: (ev) => item.onAction(ev.currentTarget), className: itemClassName, style: itemStyle, "data-ln-source": item.source, "data-ln-index": item.index, children: children })),
|
|
28
30
|
},
|
|
29
31
|
],
|
|
30
|
-
slot:
|
|
32
|
+
slot: itemAs ?? _jsx("div", {}),
|
|
31
33
|
});
|
|
32
|
-
return _jsx(DropWrap, {
|
|
34
|
+
return (_jsx(DropWrap, { ...props, onEnter: (e) => {
|
|
35
|
+
const data = dragState.active.get();
|
|
36
|
+
const thisSource = e.getAttribute("data-ln-source");
|
|
37
|
+
const dragSource = data?.getAttribute("data-ln-source");
|
|
38
|
+
if (!data)
|
|
39
|
+
return;
|
|
40
|
+
if (thisSource !== dragSource) {
|
|
41
|
+
e.setAttribute("data-ln-is-after", "true");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const overIndex = Number.parseInt(e.getAttribute("data-ln-index"));
|
|
45
|
+
const dragIndex = Number.parseInt(data.getAttribute("data-ln-index"));
|
|
46
|
+
if (Number.isNaN(dragIndex) || Number.isNaN(overIndex) || overIndex === dragIndex)
|
|
47
|
+
return;
|
|
48
|
+
if (overIndex < dragIndex) {
|
|
49
|
+
e.setAttribute("data-ln-is-before", "true");
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
e.setAttribute("data-ln-is-after", "true");
|
|
53
|
+
}
|
|
54
|
+
}, onLeave: (el) => {
|
|
55
|
+
el.removeAttribute("data-ln-is-before");
|
|
56
|
+
el.removeAttribute("data-ln-is-after");
|
|
57
|
+
}, "data-ln-source": item.source, "data-ln-index": item.index, accepted: accepted, onDrop: (e) => {
|
|
58
|
+
const el = e.dropElement;
|
|
59
|
+
el.removeAttribute("data-ln-is-before");
|
|
60
|
+
el.removeAttribute("data-ln-is-after");
|
|
61
|
+
item.onDrop(e);
|
|
62
|
+
}, as: renderer }));
|
|
33
63
|
});
|
|
@@ -4,13 +4,15 @@ export function useAggregationBoxItems({ grid, orientation }) {
|
|
|
4
4
|
const model = grid.state.aggModel.useValue();
|
|
5
5
|
const gridId = grid.state.gridId.useValue();
|
|
6
6
|
const items = useMemo(() => {
|
|
7
|
-
const items = Object.entries(model).map(([id, agg]) => {
|
|
7
|
+
const items = Object.entries(model).map(([id, agg], i) => {
|
|
8
8
|
const column = grid.api.columnById(id);
|
|
9
9
|
const name = column?.name ?? column?.id ?? id;
|
|
10
10
|
const fn = typeof agg.fn === "string" ? agg.fn : "Fn(x)";
|
|
11
11
|
return {
|
|
12
12
|
draggable: false,
|
|
13
13
|
id,
|
|
14
|
+
index: i,
|
|
15
|
+
source: "aggregation",
|
|
14
16
|
data: { id, agg },
|
|
15
17
|
dragData: {},
|
|
16
18
|
label: `${name} ${fn}`,
|
|
@@ -9,6 +9,10 @@ export interface OnDropParams<T> {
|
|
|
9
9
|
export interface OnRootDropParams<T> {
|
|
10
10
|
readonly column: Column<T>;
|
|
11
11
|
}
|
|
12
|
+
export interface OnActionParams<T> {
|
|
13
|
+
readonly column: Column<T>;
|
|
14
|
+
readonly el: HTMLElement;
|
|
15
|
+
}
|
|
12
16
|
export interface UseColumnBoxItemArgs<T> {
|
|
13
17
|
readonly grid: Grid<T>;
|
|
14
18
|
readonly orientation?: "horizontal" | "vertical";
|
|
@@ -16,8 +20,8 @@ export interface UseColumnBoxItemArgs<T> {
|
|
|
16
20
|
readonly itemFilter?: (c: Column<T>) => boolean;
|
|
17
21
|
readonly onRootDrop?: (p: OnRootDropParams<T>) => void;
|
|
18
22
|
readonly onDrop?: (p: OnDropParams<T>) => void;
|
|
19
|
-
readonly onAction?: (c:
|
|
20
|
-
readonly onDelete?: (c:
|
|
23
|
+
readonly onAction?: (c: OnActionParams<T>) => void;
|
|
24
|
+
readonly onDelete?: (c: OnActionParams<T>) => void;
|
|
21
25
|
readonly dragPlaceholder?: (c: Column<T>) => ReactNode;
|
|
22
26
|
}
|
|
23
27
|
export declare function useColumnBoxItems<T>({ grid, onRootDrop, onDrop, onDelete, onAction, orientation, draggable, dragPlaceholder, itemFilter, }: UseColumnBoxItemArgs<T>): {
|
|
@@ -12,7 +12,7 @@ export function useColumnBoxItems({ grid, onRootDrop, onDrop, onDelete, onAction
|
|
|
12
12
|
.filter((c) => {
|
|
13
13
|
return itemFilter ? itemFilter(c) : true;
|
|
14
14
|
})
|
|
15
|
-
.map((c) => {
|
|
15
|
+
.map((c, i) => {
|
|
16
16
|
const canGroup = c.uiHints?.rowGroupable ?? base.uiHints?.rowGroupable ?? false;
|
|
17
17
|
const canAgg = Boolean(c.uiHints?.aggDefault ??
|
|
18
18
|
c.uiHints?.aggDefault?.length ??
|
|
@@ -28,23 +28,22 @@ export function useColumnBoxItems({ grid, onRootDrop, onDrop, onDelete, onAction
|
|
|
28
28
|
return {
|
|
29
29
|
label: c.name ?? c.id,
|
|
30
30
|
id: c.id,
|
|
31
|
+
index: i,
|
|
32
|
+
source: "columns",
|
|
31
33
|
draggable,
|
|
32
34
|
data: c,
|
|
33
35
|
dragData: data,
|
|
34
36
|
dragPlaceholder: dragPlaceholder ? () => dragPlaceholder?.(c) : undefined,
|
|
35
|
-
onAction: () => onAction?.(c),
|
|
36
|
-
onDelete: () => onDelete?.(c),
|
|
37
|
+
onAction: (el) => onAction?.({ column: c, el }),
|
|
38
|
+
onDelete: (el) => onDelete?.({ column: c, el }),
|
|
37
39
|
onDrop: (p) => {
|
|
38
|
-
const target = c;
|
|
39
40
|
const src = p.state.siteLocalData?.[columnId];
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
isBefore = p.moveState.topHalf;
|
|
47
|
-
}
|
|
41
|
+
const target = c;
|
|
42
|
+
const dragIndex = columns.findIndex((x) => x.id === src.id);
|
|
43
|
+
const overIndex = columns.findIndex((x) => x.id === c.id);
|
|
44
|
+
const isBefore = overIndex < dragIndex;
|
|
45
|
+
if (overIndex === dragIndex)
|
|
46
|
+
return;
|
|
48
47
|
onDrop?.({ src, target, isBefore });
|
|
49
48
|
},
|
|
50
49
|
};
|
|
@@ -56,13 +55,11 @@ export function useColumnBoxItems({ grid, onRootDrop, onDrop, onDelete, onAction
|
|
|
56
55
|
columns,
|
|
57
56
|
dragPlaceholder,
|
|
58
57
|
draggable,
|
|
59
|
-
grid.state.rtl,
|
|
60
58
|
gridId,
|
|
61
59
|
itemFilter,
|
|
62
60
|
onAction,
|
|
63
61
|
onDelete,
|
|
64
62
|
onDrop,
|
|
65
|
-
orientation,
|
|
66
63
|
]);
|
|
67
64
|
const onRootDropEv = useEvent((p) => {
|
|
68
65
|
const columnId = `${gridId}-column`;
|
|
@@ -4,10 +4,10 @@ import type { GridBoxItem } from "./+types.js";
|
|
|
4
4
|
export interface UseRowGroupBoxItems<T> {
|
|
5
5
|
readonly grid: Grid<T>;
|
|
6
6
|
readonly orientation?: "horizontal" | "vertical";
|
|
7
|
-
readonly
|
|
7
|
+
readonly dragPlaceholder?: (c: RowGroupModelItem<T>) => ReactNode;
|
|
8
8
|
readonly hideColumnOnGroup?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function useRowGroupBoxItems<T>({ grid, orientation,
|
|
10
|
+
export declare function useRowGroupBoxItems<T>({ grid, orientation, dragPlaceholder, hideColumnOnGroup, }: UseRowGroupBoxItems<T>): {
|
|
11
11
|
rootProps: {
|
|
12
12
|
accepted: string[];
|
|
13
13
|
onRootDrop: (p: DropEventParams) => void;
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { useEvent } from "@1771technologies/lytenyte-react-hooks";
|
|
3
|
-
export function useRowGroupBoxItems({ grid, orientation,
|
|
3
|
+
export function useRowGroupBoxItems({ grid, orientation, dragPlaceholder, hideColumnOnGroup = true, }) {
|
|
4
4
|
const rowGroupModel = grid.state.rowGroupModel.useValue();
|
|
5
5
|
const gridId = grid.state.gridId.useValue();
|
|
6
6
|
const items = useMemo(() => {
|
|
7
7
|
const groupId = `${gridId}-group`;
|
|
8
8
|
return rowGroupModel
|
|
9
|
-
.map((c) => {
|
|
9
|
+
.map((c, i) => {
|
|
10
10
|
const onDelete = () => {
|
|
11
11
|
grid.state.rowGroupModel.set((prev) => prev.filter((x) => x !== c));
|
|
12
12
|
};
|
|
13
13
|
const onDrop = (p) => {
|
|
14
14
|
const target = c;
|
|
15
15
|
const src = p.state.siteLocalData?.[groupId];
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
else {
|
|
22
|
-
isBefore = p.moveState.topHalf;
|
|
23
|
-
}
|
|
16
|
+
const overIndex = rowGroupModel.findIndex((x) => x === c);
|
|
17
|
+
const dragIndex = rowGroupModel.findIndex((x) => x === src);
|
|
18
|
+
const isBefore = overIndex < dragIndex;
|
|
19
|
+
if (overIndex === dragIndex)
|
|
20
|
+
return;
|
|
24
21
|
const srcIndex = rowGroupModel.findIndex((x) => {
|
|
25
22
|
if (typeof src !== typeof x)
|
|
26
23
|
return;
|
|
@@ -58,12 +55,14 @@ export function useRowGroupBoxItems({ grid, orientation, placeholder, hideColumn
|
|
|
58
55
|
dragData: { [groupId]: c },
|
|
59
56
|
data: c,
|
|
60
57
|
draggable: true,
|
|
58
|
+
source: "groups",
|
|
61
59
|
id: c,
|
|
60
|
+
index: i,
|
|
62
61
|
label: column.name ?? column.id,
|
|
63
62
|
onAction: () => { },
|
|
64
63
|
onDelete: onDelete,
|
|
65
64
|
onDrop: onDrop,
|
|
66
|
-
dragPlaceholder:
|
|
65
|
+
dragPlaceholder: dragPlaceholder ? () => dragPlaceholder(c) : undefined,
|
|
67
66
|
};
|
|
68
67
|
}
|
|
69
68
|
else {
|
|
@@ -72,11 +71,13 @@ export function useRowGroupBoxItems({ grid, orientation, placeholder, hideColumn
|
|
|
72
71
|
data: c,
|
|
73
72
|
draggable: true,
|
|
74
73
|
id: c.id,
|
|
74
|
+
source: "groups",
|
|
75
|
+
index: i,
|
|
75
76
|
label: c.name ?? c.id,
|
|
76
77
|
onAction: () => { },
|
|
77
78
|
onDelete: onDelete,
|
|
78
79
|
onDrop,
|
|
79
|
-
dragPlaceholder:
|
|
80
|
+
dragPlaceholder: dragPlaceholder ? () => dragPlaceholder(c) : undefined,
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
83
|
})
|
|
@@ -84,11 +85,9 @@ export function useRowGroupBoxItems({ grid, orientation, placeholder, hideColumn
|
|
|
84
85
|
}, [
|
|
85
86
|
grid.api,
|
|
86
87
|
grid.state.rowGroupModel,
|
|
87
|
-
grid.state.rtl,
|
|
88
88
|
gridId,
|
|
89
89
|
hideColumnOnGroup,
|
|
90
|
-
|
|
91
|
-
placeholder,
|
|
90
|
+
dragPlaceholder,
|
|
92
91
|
rowGroupModel,
|
|
93
92
|
]);
|
|
94
93
|
const onRootDrop = useEvent((p) => {
|
package/dist/grid.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { Root } from "./root/root";
|
|
2
|
-
import { makeClientDataSource, useClientRowDataSource } from "./row-data-source-client/use-client-data-source";
|
|
3
|
-
import { makeClientDataSourcePaginated, useClientRowDataSourcePaginated } from "./row-data-source-client/use-client-data-source-paginated";
|
|
4
|
-
import { makeClientTreeDataSource, useClientTreeDataSource } from "./row-data-source-client/use-client-tree-data-source";
|
|
5
|
-
import { makeServerDataSource, useServerDataSource } from "./row-data-source-server/use-server-data-source";
|
|
6
2
|
import { useLyteNyte } from "./state/use-lytenyte";
|
|
7
3
|
export declare const Grid: {
|
|
8
4
|
Root: typeof Root;
|
|
@@ -19,12 +15,4 @@ export declare const Grid: {
|
|
|
19
15
|
RowsCenter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
16
|
Viewport: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
17
|
useLyteNyte: typeof useLyteNyte;
|
|
22
|
-
useClientRowDataSource: typeof useClientRowDataSource;
|
|
23
|
-
makeClientDataSource: typeof makeClientDataSource;
|
|
24
|
-
makeClientDataSourcePaginated: typeof makeClientDataSourcePaginated;
|
|
25
|
-
useClientRowDataSourcePaginated: typeof useClientRowDataSourcePaginated;
|
|
26
|
-
useClientTreeDataSource: typeof useClientTreeDataSource;
|
|
27
|
-
makeClientTreeDataSource: typeof makeClientTreeDataSource;
|
|
28
|
-
makeServerDataSource: typeof makeServerDataSource;
|
|
29
|
-
useServerDataSource: typeof useServerDataSource;
|
|
30
18
|
};
|
package/dist/grid.js
CHANGED
|
@@ -4,10 +4,6 @@ import { HeaderCell } from "./header/header-cell";
|
|
|
4
4
|
import { HeaderGroupCell } from "./header/header-group-cell";
|
|
5
5
|
import { HeaderRow } from "./header/header-row";
|
|
6
6
|
import { Root } from "./root/root";
|
|
7
|
-
import { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source";
|
|
8
|
-
import { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from "./row-data-source-client/use-client-data-source-paginated";
|
|
9
|
-
import { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source";
|
|
10
|
-
import { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source";
|
|
11
7
|
import { RowFullWidth } from "./rows/row-full-width";
|
|
12
8
|
import { Row } from "./rows/row/row";
|
|
13
9
|
import { RowsContainer } from "./rows/rows-container";
|
|
@@ -29,12 +25,4 @@ export const Grid = {
|
|
|
29
25
|
RowsCenter,
|
|
30
26
|
Viewport,
|
|
31
27
|
useLyteNyte,
|
|
32
|
-
useClientRowDataSource,
|
|
33
|
-
makeClientDataSource,
|
|
34
|
-
makeClientDataSourcePaginated,
|
|
35
|
-
useClientRowDataSourcePaginated,
|
|
36
|
-
useClientTreeDataSource,
|
|
37
|
-
makeClientTreeDataSource,
|
|
38
|
-
makeServerDataSource,
|
|
39
|
-
useServerDataSource,
|
|
40
28
|
};
|
|
@@ -3,7 +3,7 @@ import type { HeaderCellFloating, HeaderCellLayout } from "../+types";
|
|
|
3
3
|
import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
4
4
|
export interface HeaderCellProps<T> {
|
|
5
5
|
readonly cell: HeaderCellLayout<T> | HeaderCellFloating<T>;
|
|
6
|
-
readonly
|
|
6
|
+
readonly resizerAs?: SlotComponent;
|
|
7
7
|
readonly resizerClassName?: string;
|
|
8
8
|
readonly resizerStyle?: CSSProperties;
|
|
9
9
|
}
|
|
@@ -6,7 +6,7 @@ import { fastDeepMemo, useCombinedRefs, } from "@1771technologies/lytenyte-react
|
|
|
6
6
|
import { useHeaderCellRenderer } from "./use-header-cell-renderer";
|
|
7
7
|
import { ResizeHandler } from "./resize-handler";
|
|
8
8
|
import { useDragMove } from "./use-drag-move";
|
|
9
|
-
const HeaderCellImpl = forwardRef(function HeaderCell({ cell,
|
|
9
|
+
const HeaderCellImpl = forwardRef(function HeaderCell({ cell, resizerAs, resizerStyle, resizerClassName, children, ...props }, forwarded) {
|
|
10
10
|
const grid = useGridRoot().grid;
|
|
11
11
|
const ctx = grid.state;
|
|
12
12
|
const xPositions = ctx.xPositions.useValue();
|
|
@@ -19,6 +19,6 @@ const HeaderCellImpl = forwardRef(function HeaderCell({ cell, resizerSlot, resiz
|
|
|
19
19
|
: (cell.column.uiHints?.resizable ?? base.uiHints?.resizable ?? false);
|
|
20
20
|
const { ref, ...dragProps } = useDragMove(grid, cell, props.onDragStart);
|
|
21
21
|
const combined = useCombinedRefs(forwarded, ref);
|
|
22
|
-
return (_jsxs(HeaderCellReact, { ...props, ...dragProps, ref: combined, cell: cell, columnId: cell.column.id, viewportWidth: viewport, isFloating: cell.kind === "floating", rtl: rtl, xPositions: xPositions, children: [children == undefined ? _jsx(Renderer, { column: cell.column, grid: grid }) : children, resizable && cell.kind === "cell" && (_jsx(ResizeHandler, { cell: cell, xPositions: xPositions,
|
|
22
|
+
return (_jsxs(HeaderCellReact, { ...props, ...dragProps, ref: combined, cell: cell, columnId: cell.column.id, viewportWidth: viewport, isFloating: cell.kind === "floating", rtl: rtl, xPositions: xPositions, children: [children == undefined ? _jsx(Renderer, { column: cell.column, grid: grid }) : children, resizable && cell.kind === "cell" && (_jsx(ResizeHandler, { cell: cell, xPositions: xPositions, as: resizerAs, className: resizerClassName, style: resizerStyle }))] }));
|
|
23
23
|
});
|
|
24
24
|
export const HeaderCell = fastDeepMemo(HeaderCellImpl);
|
|
@@ -9,6 +9,8 @@ const HeaderGroupCellImpl = forwardRef(function HeaderCell({ cell, children, ...
|
|
|
9
9
|
const ctx = grid.state;
|
|
10
10
|
const { ref, ...dragProps } = useDragMove(grid, cell, props.onDragStart);
|
|
11
11
|
const combined = useCombinedRefs(ref, forwarded);
|
|
12
|
-
|
|
12
|
+
const isExpanded = grid.state.columnGroupExpansions.useValue()[cell.id] ??
|
|
13
|
+
grid.state.columnGroupDefaultExpansion.get();
|
|
14
|
+
return (_jsx(HeaderGroupCellReact, { ...props, ...dragProps, ref: combined, cell: cell, cellId: cell.id, height: ctx.headerGroupHeight.useValue(), rtl: ctx.rtl.useValue(), viewportWidth: ctx.viewportWidthInner.useValue(), xPositions: ctx.xPositions.useValue(), isHiddenMove: cell.isHiddenMove ?? false, "data-ln-collapsible": cell.isCollapsible, "data-ln-collapsed": !isExpanded, children: children == undefined ? cell.id : children }));
|
|
13
15
|
});
|
|
14
16
|
export const HeaderGroupCell = fastDeepMemo(HeaderGroupCellImpl);
|
|
@@ -2,11 +2,11 @@ import { type SlotComponent } from "@1771technologies/lytenyte-react-hooks";
|
|
|
2
2
|
import type { HeaderCellLayout } from "../+types";
|
|
3
3
|
import { type CSSProperties } from "react";
|
|
4
4
|
interface ResizeHandlerProps<T> {
|
|
5
|
-
readonly
|
|
5
|
+
readonly as?: SlotComponent;
|
|
6
6
|
readonly cell: HeaderCellLayout<T>;
|
|
7
7
|
readonly xPositions: Uint32Array;
|
|
8
8
|
readonly className?: string;
|
|
9
9
|
readonly style?: CSSProperties;
|
|
10
10
|
}
|
|
11
|
-
export declare function ResizeHandler<T>({
|
|
11
|
+
export declare function ResizeHandler<T>({ as, cell, xPositions, style, className, }: ResizeHandlerProps<T>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
12
12
|
export {};
|
|
@@ -5,7 +5,7 @@ import { DEFAULT_COLUMN_WIDTH_MAX, DEFAULT_COLUMN_WIDTH_MIN, getColIndexFromEl,
|
|
|
5
5
|
import { useGridRoot } from "../context";
|
|
6
6
|
import { getComputedStyle, isHTMLElement } from "@1771technologies/lytenyte-dom-utils";
|
|
7
7
|
import { clamp, getClientX } from "@1771technologies/lytenyte-js-utils";
|
|
8
|
-
export function ResizeHandler({
|
|
8
|
+
export function ResizeHandler({ as, cell, xPositions, style, className, }) {
|
|
9
9
|
const width = sizeFromCoord(cell.colStart, xPositions, cell.colSpan);
|
|
10
10
|
const sx = useGridRoot().grid;
|
|
11
11
|
const double = sx.state.columnDoubleClickToAutosize.useValue();
|
|
@@ -57,7 +57,9 @@ export function ResizeHandler({ slot, cell, xPositions, style, className, }) {
|
|
|
57
57
|
const id = sx.state.gridId.get();
|
|
58
58
|
const query = `[data-ln-row][data-ln-gridid="${id}"] [data-ln-cell="true"][data-ln-colindex="${cell.colStart}"]`;
|
|
59
59
|
const headerQuery = `[data-ln-header-row] [data-ln-header-cell="true"][data-ln-header-id="${cell.id}"]`;
|
|
60
|
+
const floatingQuery = `[data-ln-header-row] [data-ln-header-cell="true"][data-ln-header-id="${cell.id}"][data-ln-header-floating="true"]`;
|
|
60
61
|
const header = vp.querySelector(headerQuery);
|
|
62
|
+
const floating = vp.querySelector(floatingQuery);
|
|
61
63
|
if (!header)
|
|
62
64
|
return;
|
|
63
65
|
const pin = header.getAttribute("data-ln-pin");
|
|
@@ -72,6 +74,8 @@ export function ResizeHandler({ slot, cell, xPositions, style, className, }) {
|
|
|
72
74
|
}
|
|
73
75
|
const q = Array.from(vp.querySelectorAll(query));
|
|
74
76
|
q.push(header);
|
|
77
|
+
if (floating)
|
|
78
|
+
q.push(floating);
|
|
75
79
|
q.forEach((c) => {
|
|
76
80
|
if (!isHTMLElement(c))
|
|
77
81
|
return;
|
|
@@ -113,7 +117,7 @@ export function ResizeHandler({ slot, cell, xPositions, style, className, }) {
|
|
|
113
117
|
className,
|
|
114
118
|
style: {
|
|
115
119
|
height: "100%",
|
|
116
|
-
width: "
|
|
120
|
+
width: "6px",
|
|
117
121
|
...style,
|
|
118
122
|
top: "0px",
|
|
119
123
|
insetInlineEnd: cell.colPin !== "end" ? "0px" : undefined,
|
|
@@ -123,7 +127,7 @@ export function ResizeHandler({ slot, cell, xPositions, style, className, }) {
|
|
|
123
127
|
};
|
|
124
128
|
const edge = useSlot({
|
|
125
129
|
props: [defaultProps],
|
|
126
|
-
slot:
|
|
130
|
+
slot: as ?? _jsx("div", {}),
|
|
127
131
|
});
|
|
128
132
|
return edge;
|
|
129
133
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getHoveredColumnIndex, getNearestFocusable, useDraggable, } from "@1771technologies/lytenyte-shared";
|
|
1
|
+
import { COLUMN_MARKER_ID, getHoveredColumnIndex, getNearestFocusable, GROUP_COLUMN_PREFIX, useDraggable, } from "@1771technologies/lytenyte-shared";
|
|
2
2
|
import { useMemo, useRef } from "react";
|
|
3
3
|
export function useDragMove(grid, cell, onDragStart) {
|
|
4
4
|
const ctx = grid.state;
|
|
@@ -12,7 +12,9 @@ export function useDragMove(grid, cell, onDragStart) {
|
|
|
12
12
|
return columns;
|
|
13
13
|
}, [cell.colEnd, cell.colStart, meta.columnsVisible]);
|
|
14
14
|
const isMovable = useMemo(() => {
|
|
15
|
-
return columns.every((c) => c.
|
|
15
|
+
return columns.every((c) => !c.id.startsWith(GROUP_COLUMN_PREFIX) &&
|
|
16
|
+
c.id !== COLUMN_MARKER_ID &&
|
|
17
|
+
(c.uiHints?.movable ?? base.uiHints?.movable ?? false));
|
|
16
18
|
}, [base.uiHints?.movable, columns]);
|
|
17
19
|
const swapDirection = useRef(null);
|
|
18
20
|
const swapIndex = useRef(-1);
|
|
@@ -53,6 +55,11 @@ export function useDragMove(grid, cell, onDragStart) {
|
|
|
53
55
|
});
|
|
54
56
|
if (index == null)
|
|
55
57
|
return;
|
|
58
|
+
const columnTarget = grid.api.columnByIndex(index);
|
|
59
|
+
if (columnTarget) {
|
|
60
|
+
if (columnTarget.id === COLUMN_MARKER_ID || columnTarget.id.startsWith(GROUP_COLUMN_PREFIX))
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
56
63
|
const first = columns[0];
|
|
57
64
|
const currentIndex = grid.api.columnIndex(first);
|
|
58
65
|
const columnIndices = columns.map((c) => grid.api.columnIndex(c));
|
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { useGridRoot } from "../context";
|
|
4
4
|
function DefaultRenderer(p) {
|
|
5
|
-
return _jsx(_Fragment, { children: p.column.id });
|
|
5
|
+
return _jsx(_Fragment, { children: p.column.name ?? p.column.id });
|
|
6
6
|
}
|
|
7
7
|
export function useHeaderCellRenderer(cell) {
|
|
8
8
|
const ctx = useGridRoot().grid;
|
|
@@ -18,16 +18,16 @@ export function useHeaderCellRenderer(cell) {
|
|
|
18
18
|
return renderer;
|
|
19
19
|
}
|
|
20
20
|
else {
|
|
21
|
-
const renderer = cell.column.
|
|
21
|
+
const renderer = cell.column.floatingCellRenderer ?? base.floatingCellRenderer ?? DefaultRenderer;
|
|
22
22
|
if (typeof renderer === "string")
|
|
23
23
|
return floatingRenderers[renderer] ?? DefaultRenderer;
|
|
24
24
|
else
|
|
25
25
|
return renderer;
|
|
26
26
|
}
|
|
27
27
|
}, [
|
|
28
|
-
base.
|
|
28
|
+
base.floatingCellRenderer,
|
|
29
29
|
base.headerRenderer,
|
|
30
|
-
cell.column.
|
|
30
|
+
cell.column.floatingCellRenderer,
|
|
31
31
|
cell.column.headerRenderer,
|
|
32
32
|
cell.kind,
|
|
33
33
|
floatingRenderers,
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1 +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, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, 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";
|
|
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/icons/index.js
CHANGED
|
@@ -1 +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, DeleteIcon, DocsIcon, DownloadIcon, Drag2Icon, DragDotsIcon, DragDotsSmallIcon, DragIcon, DuplicateIcon, EditIcon, EmailIcon, 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";
|
|
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
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
export { GROUP_COLUMN_PREFIX, COLUMN_MARKER_ID, GROUP_COLUMN_SINGLE_ID, GROUP_COLUMN_MULTI_PREFIX, } from "@1771technologies/lytenyte-shared";
|
|
1
2
|
export { Grid } from "./grid.js";
|
|
2
3
|
export { SortManager } from "./sort-manager/sort-manager.js";
|
|
3
4
|
export { FilterTree } from "./filter-tree/filter-tree.js";
|
|
4
5
|
export { ColumnManager } from "./column-manager/column-manager.js";
|
|
5
6
|
export { GridBox } from "./grid-box/grid-box.js";
|
|
7
|
+
export { DropWrap } from "@1771technologies/lytenyte-dragon";
|
|
6
8
|
export { activateLicense } from "./license.js";
|
|
7
9
|
export { measureText } from "@1771technologies/lytenyte-shared";
|
|
10
|
+
export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source";
|
|
11
|
+
export { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from "./row-data-source-client/use-client-data-source-paginated";
|
|
12
|
+
export { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source";
|
|
13
|
+
export { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
export { GROUP_COLUMN_PREFIX, COLUMN_MARKER_ID, GROUP_COLUMN_SINGLE_ID, GROUP_COLUMN_MULTI_PREFIX, } from "@1771technologies/lytenyte-shared";
|
|
1
2
|
export { Grid } from "./grid.js";
|
|
2
3
|
export { SortManager } from "./sort-manager/sort-manager.js";
|
|
3
4
|
export { FilterTree } from "./filter-tree/filter-tree.js";
|
|
4
5
|
export { ColumnManager } from "./column-manager/column-manager.js";
|
|
5
6
|
export { GridBox } from "./grid-box/grid-box.js";
|
|
7
|
+
export { DropWrap } from "@1771technologies/lytenyte-dragon";
|
|
6
8
|
export { activateLicense } from "./license.js";
|
|
7
9
|
export { measureText } from "@1771technologies/lytenyte-shared";
|
|
10
|
+
export { makeClientDataSource, useClientRowDataSource, } from "./row-data-source-client/use-client-data-source";
|
|
11
|
+
export { makeClientDataSourcePaginated, useClientRowDataSourcePaginated, } from "./row-data-source-client/use-client-data-source-paginated";
|
|
12
|
+
export { makeClientTreeDataSource, useClientTreeDataSource, } from "./row-data-source-client/use-client-tree-data-source";
|
|
13
|
+
export { makeServerDataSource, useServerDataSource, } from "./row-data-source-server/use-server-data-source";
|
package/dist/license.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const hashSalt = "faec0f3c45281b1fe12d87e64a6c3271";
|
|
2
|
-
const issueDate = new Date("2025-08-
|
|
2
|
+
const issueDate = new Date("2025-08-19");
|
|
3
3
|
function getHostname() {
|
|
4
4
|
const win = globalThis?.document?.defaultView || (typeof window !== "undefined" ? window : null);
|
|
5
5
|
const loc = win?.location;
|
package/dist/listbox/item.js
CHANGED
|
@@ -9,6 +9,7 @@ export const Item = forwardRef(function Item(props, forwarded) {
|
|
|
9
9
|
const prev = ctx.rtl ? "ArrowRight" : "ArrowLeft";
|
|
10
10
|
if (ev.key !== next && ev.key !== prev)
|
|
11
11
|
return;
|
|
12
|
+
ev.preventDefault();
|
|
12
13
|
const items = getTabbables(ev.currentTarget);
|
|
13
14
|
if (!items.length)
|
|
14
15
|
return;
|
|
@@ -18,7 +19,6 @@ export const Item = forwardRef(function Item(props, forwarded) {
|
|
|
18
19
|
const itemToFocus = items[nextIndex];
|
|
19
20
|
if (!itemToFocus)
|
|
20
21
|
return;
|
|
21
|
-
ev.preventDefault();
|
|
22
22
|
ev.stopPropagation();
|
|
23
23
|
itemToFocus.focus();
|
|
24
24
|
}, ref: forwarded, tabIndex: 0, "data-ln-listbox-item": true }));
|
|
@@ -22,7 +22,7 @@ export function computeFilteredRows(rows, grid, filterModel, filterInModel, quic
|
|
|
22
22
|
const pass = nonIgnored.some((c) => {
|
|
23
23
|
const field = `${grid.api.columnField(c, { data: row.data, kind: "leaf" })}`;
|
|
24
24
|
if (sensitivity === "case-insensitive")
|
|
25
|
-
field.toLowerCase().includes(quickSearch.toLowerCase());
|
|
25
|
+
return field.toLowerCase().includes(quickSearch.toLowerCase());
|
|
26
26
|
return field.includes(quickSearch);
|
|
27
27
|
});
|
|
28
28
|
if (!pass)
|