@1771technologies/lytenyte-pro 2.1.0 → 2.1.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/column-manager/column-manager.d.ts +2 -1
- package/dist/components/column-manager/column-manager.js +2 -2
- package/dist/components/headless/dialog/container.js +1 -1
- package/dist/components/headless/dialog/context.d.ts +1 -1
- package/dist/components/headless/dialog/root.d.ts +1 -1
- package/dist/components/headless/menu/item/handle-vertical-navigation.js +1 -1
- package/dist/components/headless/menu/submenu/submenu-trigger.js +1 -1
- package/dist/components/headless/menu/use-menu.js +1 -1
- package/dist/components/pill-manager/container.js +2 -1
- package/dist/components/pill-manager/item.js +2 -1
- package/dist/components/smart-select/root.js +1 -1
- package/dist/components/tree-view/root.js +2 -1
- package/dist/data-source-client/hooks/use-flattened-groups.js +2 -1
- package/dist/data-source-client/hooks/use-pivot/use-pivot-columns.js +2 -1
- package/dist/data-source-server/server-data.js +2 -1
- package/dist/data-source-server/source/use-on-view-change.js +1 -1
- package/dist/data-source-server/source/use-source.js +1 -1
- package/dist/hooks/use-transitioned-open.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -379,7 +379,7 @@ See our [AI Skills Overview guide](https://1771technologies.com/docs/ai-skills-o
|
|
|
379
379
|
| ↳ [CSV Export](https://www.1771technologies.com/docs/export-csv) | ✅ | ✅ |
|
|
380
380
|
| ↳ [Parquet Export](https://www.1771technologies.com/docs/export-parquet) | ✅ | ✅ |
|
|
381
381
|
| ↳ [Arrow Export](https://www.1771technologies.com/docs/export-arrow) | ✅ | ✅ |
|
|
382
|
-
| [Clipboard Operations](https://www.1771technologies.com/docs/export-clipboard) |
|
|
382
|
+
| [Clipboard Operations](https://www.1771technologies.com/docs/export-clipboard) | ✅ | ✅ |
|
|
383
383
|
|
|
384
384
|
</details>
|
|
385
385
|
|
|
@@ -5,6 +5,7 @@ export interface ColumnManagerProps<Spec extends GridSpec = GridSpec> {
|
|
|
5
5
|
readonly columns: Column<Spec>[];
|
|
6
6
|
readonly onColumnsChange: (change: Column<Spec>[]) => void;
|
|
7
7
|
readonly base?: Grid.ColumnBase<Spec>;
|
|
8
|
+
readonly rowHeight?: number;
|
|
8
9
|
readonly endElement?: (params: {
|
|
9
10
|
columns: Column<Spec>[];
|
|
10
11
|
row: RowNode<Spec["data"]>;
|
|
@@ -15,4 +16,4 @@ export interface ColumnManagerProps<Spec extends GridSpec = GridSpec> {
|
|
|
15
16
|
*/
|
|
16
17
|
readonly getPillManagerTag?: (column: Column<Spec>) => Record<string, string>;
|
|
17
18
|
}
|
|
18
|
-
export declare function ColumnManager<Spec extends GridSpec = GridSpec>({ columns: provided, base, onColumnsChange, endElement, getPillManagerTag, }: ColumnManagerProps<Spec>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function ColumnManager<Spec extends GridSpec = GridSpec>({ columns: provided, base, rowHeight, onColumnsChange, endElement, getPillManagerTag, }: ColumnManagerProps<Spec>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
|
|
3
3
|
import { TreeView } from "../tree-view/index.js";
|
|
4
4
|
import { Checkbox } from "../checkbox/checkbox.js";
|
|
5
5
|
import { computePathMatrix } from "@1771technologies/lytenyte-shared";
|
|
6
|
-
export function ColumnManager({ columns: provided, base, onColumnsChange, endElement, getPillManagerTag, }) {
|
|
6
|
+
export function ColumnManager({ columns: provided, base, rowHeight = 30, onColumnsChange, endElement, getPillManagerTag, }) {
|
|
7
7
|
const nonAdjacentSplit = useMemo(() => {
|
|
8
8
|
const paths = computePathMatrix(provided);
|
|
9
9
|
const adjusted = [];
|
|
@@ -45,7 +45,7 @@ export function ColumnManager({ columns: provided, base, onColumnsChange, endEle
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
}, [getPillManagerTag]);
|
|
48
|
-
return (_jsx(TreeView, { items: items, rowSelectionEnabled: false, draggable: true, rowHeight:
|
|
48
|
+
return (_jsx(TreeView, { items: items, rowSelectionEnabled: false, draggable: true, rowHeight: rowHeight, rowSelectAllShow: false, getDragTags: getDragItems, defaultExpansion: true, onItemsReordered: (x) => {
|
|
49
49
|
const columns = x.map((x) => provided.find((p) => p.id === x.column.id));
|
|
50
50
|
onColumnsChange(columns);
|
|
51
51
|
}, children: ({ row, leafs, toggle, dragProps, isOver, isBefore }) => {
|
|
@@ -3,9 +3,9 @@ import { forwardRef, useEffect, useRef, useState } from "react";
|
|
|
3
3
|
import { useDialogRoot } from "./context.js";
|
|
4
4
|
import { arrow, autoUpdate, computePosition, flip, hide, inline, offset, shift, } from "../../external/floating-ui.js";
|
|
5
5
|
import { transformOrigin } from "./transform-origin.js";
|
|
6
|
-
import { FocusTrap, getActiveElement, getTabbables, SCROLL_LOCKER } from "@1771technologies/lytenyte-shared";
|
|
7
6
|
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
8
7
|
import { useTransitioned } from "../../../hooks/use-transitioned-open.js";
|
|
8
|
+
import { FocusTrap, getActiveElement, getTabbables, SCROLL_LOCKER } from "@1771technologies/dom-utils";
|
|
9
9
|
function DialogContainerBase(props, ref) {
|
|
10
10
|
const { open, onOpenChange, onOpenChangeComplete, titleId, descriptionId, focusCanReturn, focusCanTrap, focusFallback, focusInitial, focusPreventScroll, focusReturn, focusTrap, lockScroll, lightDismiss, modal = true, anchor, alignOffset, inline: inlineV, placement, shiftPadding, sideOffset, hide: shouldHide, arrow: arrowEl, } = useDialogRoot();
|
|
11
11
|
const [dialog, setDialog] = useState(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Dispatch, type SetStateAction } from "react";
|
|
2
2
|
import type { Placement, ReferenceElement } from "../../external/floating-ui";
|
|
3
|
-
import type { FocusTrapOptions } from "@1771technologies/
|
|
3
|
+
import type { FocusTrapOptions } from "@1771technologies/dom-utils";
|
|
4
4
|
export interface DialogContext {
|
|
5
5
|
readonly open: boolean;
|
|
6
6
|
readonly onOpenChange: (open: boolean) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PropsWithChildren } from "react";
|
|
2
2
|
import type { Placement, ReferenceElement } from "../../external/floating-ui.js";
|
|
3
|
-
import type { FocusTrapOptions } from "@1771technologies/
|
|
3
|
+
import type { FocusTrapOptions } from "@1771technologies/dom-utils";
|
|
4
4
|
export declare const DialogRoot: ({ open: openProp, onOpenChange: onOpenChangeProp, onOpenChangeComplete, openInitial, id: idProvided, descriptionId: descIdProvider, titleId: titleIdProvided, children, focusCanReturn, focusCanTrap, focusFallback, focusInitial, focusPreventScroll, focusReturn, focusTrap, lightDismiss, modal, hide, lockScroll, anchor, placement, shiftPadding, inline, sideOffset, alignOffset, }: PropsWithChildren<DialogRoot.Props>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare namespace DialogRoot {
|
|
6
6
|
interface Props {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getNearestMatching, getTabbables } from "@1771technologies/
|
|
1
|
+
import { getNearestMatching, getTabbables } from "@1771technologies/dom-utils";
|
|
2
2
|
export function handleVerticalNavigation(ev) {
|
|
3
3
|
const nearestMenu = getNearestMatching(ev.currentTarget, (el) => el.getAttribute("data-ln-menu") === "true");
|
|
4
4
|
if (!nearestMenu)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { useSubmenuContext } from "./submenu-context.js";
|
|
4
|
-
import { getNearestMatching, getTabbables } from "@1771technologies/lytenyte-shared";
|
|
5
4
|
import { handleVerticalNavigation } from "../item/handle-vertical-navigation.js";
|
|
6
5
|
import { useCombinedRefs } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
+
import { getNearestMatching, getTabbables } from "@1771technologies/dom-utils";
|
|
7
7
|
function SubmenuTriggerImpl({ disabled, ...props }, ref) {
|
|
8
8
|
const [active, setActive] = useState(false);
|
|
9
9
|
const sub = useSubmenuContext();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef } from "react";
|
|
2
2
|
import { useSubmenuContext } from "./submenu/submenu-context.js";
|
|
3
|
-
import { getNearestMatching } from "@1771technologies/lytenyte-shared";
|
|
4
3
|
import { dispatchActivate, dispatchClose, dispatchDeactivate, getSubmenuRoots } from "./dom.js";
|
|
4
|
+
import { getNearestMatching } from "@1771technologies/dom-utils";
|
|
5
5
|
export function useMenu(el) {
|
|
6
6
|
const sub = useSubmenuContext();
|
|
7
7
|
const mouseOutTime = useRef(null);
|
|
@@ -3,7 +3,8 @@ import { forwardRef, memo, useEffect, useRef, useState } from "react";
|
|
|
3
3
|
import { usePillRoot } from "./root.context.js";
|
|
4
4
|
import { usePillRow } from "./pill-row.context.js";
|
|
5
5
|
import { dragX, dragY, getDragData, useCombinedRefs, useSelector, } from "@1771technologies/lytenyte-core/internal";
|
|
6
|
-
import { equal
|
|
6
|
+
import { equal } from "@1771technologies/js-utils";
|
|
7
|
+
import { getFocusables } from "@1771technologies/dom-utils";
|
|
7
8
|
function ContainerBase(props, forwarded) {
|
|
8
9
|
const { setCloned, cloned, orientation, rows, movedRef, onPillRowChange, onPillItemActiveChange } = usePillRoot();
|
|
9
10
|
const { row } = usePillRow();
|
|
@@ -5,7 +5,8 @@ import { usePillRow } from "./pill-row.context.js";
|
|
|
5
5
|
import { getDragData, getDragDirection, useDraggable, useEvent, } from "@1771technologies/lytenyte-core/internal";
|
|
6
6
|
import { DragDots } from "./icons.js";
|
|
7
7
|
import { usePillRoot } from "./root.context.js";
|
|
8
|
-
import {
|
|
8
|
+
import {} from "@1771technologies/lytenyte-shared";
|
|
9
|
+
import { equal, moveRelative } from "@1771technologies/js-utils";
|
|
9
10
|
function PillItemBase({ item, elementEnd, ...props }, ref) {
|
|
10
11
|
const { expandToggle, expanded, row } = usePillRow();
|
|
11
12
|
const { prevRowId, prevSwapId, movedRef, setDragState, setCloned, cloned, rows, orientation, onPillItemThrown, onPillItemActiveChange, onPillRowChange, } = usePillRoot();
|
|
@@ -7,8 +7,8 @@ import { useSlot } from "../../hooks/use-slot/use-slot.js";
|
|
|
7
7
|
import { SmartSelectContainer } from "./container.js";
|
|
8
8
|
import { Option } from "./option.js";
|
|
9
9
|
import { useAsyncOptions } from "./use-async-options.js";
|
|
10
|
-
import { getNearestMatching } from "@1771technologies/lytenyte-shared";
|
|
11
10
|
import { createPortal } from "react-dom";
|
|
11
|
+
import { getNearestMatching } from "@1771technologies/dom-utils";
|
|
12
12
|
export function SmartSelectRoot(p) {
|
|
13
13
|
const [open, setOpen] = useControlled({ controlled: p.open, default: false });
|
|
14
14
|
const [query, setQuery] = useControlled({ controlled: p.query, default: "" });
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {} from "@1771technologies/lytenyte-shared";
|
|
4
4
|
import { TreeChildren } from "./tree-children.js";
|
|
5
5
|
import { SelectAll } from "./select-all.js";
|
|
6
6
|
import { useClientDataSource } from "../../data-source-client/use-client-data-source.js";
|
|
7
7
|
import { usePiece } from "@1771technologies/lytenyte-core/internal";
|
|
8
8
|
import { Root } from "../../root/root.js";
|
|
9
9
|
import { Grid } from "@1771technologies/lytenyte-core";
|
|
10
|
+
import { itemsWithIdToMap, moveRelative } from "@1771technologies/js-utils";
|
|
10
11
|
function TreeViewBase({ items, rowSelectAllShow: rowSelectAll = true, defaultExpansion, rowHeight = 28, children = TreeChildren, branchJoinSeparator = "/", rowSelectionEnabled = true, rowSelection, onRowSelectionChange, rowGroupExpansions, onRowGroupExpansionChange, selectAllSlot, draggable, getDragTags, onItemsReordered, }, forwarded) {
|
|
11
12
|
const groupFn = useMemo(() => {
|
|
12
13
|
return (x) => x.data.path;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useMemo, useRef } from "react";
|
|
2
2
|
import { computeField } from "@1771technologies/lytenyte-core/internal";
|
|
3
|
-
import {
|
|
3
|
+
import { measureText } from "@1771technologies/lytenyte-shared";
|
|
4
4
|
import { pivotPaths } from "./auxiliary-functions/pivot-paths.js";
|
|
5
5
|
import { applyReferenceColumn } from "./auxiliary-functions/apply-reference-column.js";
|
|
6
|
+
import { equal, itemsWithIdToMap } from "@1771technologies/js-utils";
|
|
6
7
|
export function usePivotColumns(pivotMode, pivotControlled, model, leafs, filtered, processor) {
|
|
7
8
|
const measures = model?.measures;
|
|
8
9
|
const columns = model?.columns;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from "@1771technologies/lytenyte-shared";
|
|
2
2
|
import { makeAsyncTree } from "./async-tree/make-async-tree.js";
|
|
3
3
|
import { RangeTree } from "./range-tree/range-tree.js";
|
|
4
4
|
import { getRequestId } from "./utils/get-request-id.js";
|
|
5
5
|
import { getNodePath } from "./utils/get-node-path.js";
|
|
6
6
|
import { getNodeDepth } from "./utils/get-node-depth.js";
|
|
7
|
+
import { equal } from "@1771technologies/js-utils";
|
|
7
8
|
const noopFetcher = async () => [];
|
|
8
9
|
export class ServerData {
|
|
9
10
|
#top = { asOf: 0, rows: [] };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEvent } from "@1771technologies/lytenyte-core/internal";
|
|
2
|
-
import { equal } from "@1771technologies/
|
|
2
|
+
import { equal } from "@1771technologies/js-utils";
|
|
3
3
|
export function useOnViewChange(source, requestsForView, setRequestsForView) {
|
|
4
4
|
const onViewChange = useEvent((bounds) => {
|
|
5
5
|
// This will result in the server sending the requests for the current view.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef } from "react";
|
|
2
|
-
import { arrayShallow } from "@1771technologies/lytenyte-shared";
|
|
3
2
|
import { useEvent } from "@1771technologies/lytenyte-core/internal";
|
|
4
3
|
import { ServerData } from "../server-data.js";
|
|
4
|
+
import { arrayShallow } from "@1771technologies/js-utils";
|
|
5
5
|
export function useSource(props, s, globalSignal) {
|
|
6
6
|
const prevQueryKeyRef = useRef(null);
|
|
7
7
|
const queryKey = useMemo(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { onAnimationFinished } from "@1771technologies/dom-utils";
|
|
1
2
|
import { useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { onAnimationFinished } from "@1771technologies/lytenyte-shared";
|
|
3
3
|
export function useTransitioned(open, el, changeComplete) {
|
|
4
4
|
const [m, setM] = useState(open);
|
|
5
5
|
const t = useMemo(() => {
|
package/dist/index.d.ts
CHANGED
|
@@ -113,7 +113,8 @@ export { useServerDataSource } from "./data-source-server/use-server-data-source
|
|
|
113
113
|
export type * from "./data-source-server/types.js";
|
|
114
114
|
export type { RowSourceTree, UseTreeDataSourceParams } from "./data-source-tree/use-tree-data-source.js";
|
|
115
115
|
export { useTreeDataSource } from "./data-source-tree/use-tree-data-source.js";
|
|
116
|
-
export { measureText
|
|
116
|
+
export { measureText } from "@1771technologies/lytenyte-shared";
|
|
117
|
+
export { moveRelative, equal, arrayShallow } from "@1771technologies/js-utils";
|
|
117
118
|
export { getRowDragData, computeField } from "@1771technologies/lytenyte-core/internal";
|
|
118
119
|
export { virtualFromXY } from "./components/virtual-from-coordinates.js";
|
|
119
120
|
export type { Piece, PieceWritable } from "@1771technologies/lytenyte-core";
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,8 @@ Grid.Viewport = GridCore.Viewport;
|
|
|
17
17
|
export { useClientDataSource } from "./data-source-client/use-client-data-source.js";
|
|
18
18
|
export { useServerDataSource } from "./data-source-server/use-server-data-source.js";
|
|
19
19
|
export { useTreeDataSource } from "./data-source-tree/use-tree-data-source.js";
|
|
20
|
-
export { measureText
|
|
20
|
+
export { measureText } from "@1771technologies/lytenyte-shared";
|
|
21
|
+
export { moveRelative, equal, arrayShallow } from "@1771technologies/js-utils";
|
|
21
22
|
export { getRowDragData, computeField } from "@1771technologies/lytenyte-core/internal";
|
|
22
23
|
export { virtualFromXY } from "./components/virtual-from-coordinates.js";
|
|
23
24
|
export { usePiece } from "@1771technologies/lytenyte-core";
|
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": "2.1.
|
|
4
|
+
"version": "2.1.1-dev.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "COMMERCIAL",
|
|
7
7
|
"files": [
|
|
@@ -86,9 +86,11 @@
|
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@1771technologies/lytenyte-
|
|
90
|
-
"@1771technologies/lytenyte-
|
|
91
|
-
"@1771technologies/
|
|
89
|
+
"@1771technologies/lytenyte-shared": "2.1.1-dev.1",
|
|
90
|
+
"@1771technologies/lytenyte-core": "2.1.1-dev.1",
|
|
91
|
+
"@1771technologies/js-utils": "2.1.1-dev.1",
|
|
92
|
+
"@1771technologies/lytenyte-design": "2.1.1-dev.1",
|
|
93
|
+
"@1771technologies/dom-utils": "2.1.1-dev.1"
|
|
92
94
|
},
|
|
93
95
|
"devDependencies": {
|
|
94
96
|
"@1771technologies/grid-sample-data": "2.1.0"
|