@1771technologies/lytenyte-pro 0.0.53 → 0.0.55
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/index.js +14 -3
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { useEvent, useIsoEffect } from "@1771technologies/react-utils";
|
|
|
6
6
|
import { context } from "@1771technologies/grid-provider";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import { useContext, useMemo, useEffect, useRef, useState, useCallback, memo } from "react";
|
|
9
|
-
import { sizeFromCoord, clsx, getClientX, IsoResizeObserver, getPreciseElementDimensions, getClientY, getFocusableElements, clamp, getRelativeXPosition, getRelativeYPosition } from "@1771technologies/js-utils";
|
|
9
|
+
import { sizeFromCoord, clsx, getClientX, IsoResizeObserver, getPreciseElementDimensions, getClientY, getFocusableElements, clamp, equal, getRelativeXPosition, getRelativeYPosition } from "@1771technologies/js-utils";
|
|
10
10
|
import { useDraggable, useDroppable, dragState } from "@1771technologies/react-dragon";
|
|
11
11
|
import { getHoveredRowIndex, getHoveredColumnIndex, getRootCell } from "@1771technologies/grid-core";
|
|
12
12
|
import { c as useGrid$1, u as useControlled, a as useTransitionStatus, b as useScrollLock, G as GridProvider } from "./useScrollLock-D4UY33Sb.js";
|
|
@@ -2078,7 +2078,7 @@ function CellSelectionDriver() {
|
|
|
2078
2078
|
});
|
|
2079
2079
|
};
|
|
2080
2080
|
const pointerDown = (event) => {
|
|
2081
|
-
if (!
|
|
2081
|
+
if (!isNormalClick(event)) {
|
|
2082
2082
|
document.removeEventListener("pointermove", pointerMove);
|
|
2083
2083
|
event.preventDefault();
|
|
2084
2084
|
return;
|
|
@@ -2214,9 +2214,15 @@ function CellSelectionDriver() {
|
|
|
2214
2214
|
},
|
|
2215
2215
|
{ signal: controller.signal }
|
|
2216
2216
|
);
|
|
2217
|
+
let previousPos = state.internal.navigatePosition.peek();
|
|
2217
2218
|
const unsub = state.internal.navigatePosition.watch(() => {
|
|
2218
2219
|
const pos = state.internal.navigatePosition.peek();
|
|
2219
|
-
if (!pos)
|
|
2220
|
+
if (!pos || state.internal.cellSelectionSoftFocus.peek()) {
|
|
2221
|
+
state.internal.cellSelectionSoftFocus.set(false);
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
if (equal(previousPos, pos)) return;
|
|
2225
|
+
previousPos = pos;
|
|
2220
2226
|
if (pos.kind !== GRID_CELL_POSITION) return state.cellSelections.set([]);
|
|
2221
2227
|
else {
|
|
2222
2228
|
const rect = adjustRectForRowAndCellSpan(api, {
|
|
@@ -2238,6 +2244,7 @@ function CellSelectionDriver() {
|
|
|
2238
2244
|
mode,
|
|
2239
2245
|
state.cellSelections,
|
|
2240
2246
|
state.internal.cellSelectionPivot,
|
|
2247
|
+
state.internal.cellSelectionSoftFocus,
|
|
2241
2248
|
state.internal.navigatePosition,
|
|
2242
2249
|
viewport
|
|
2243
2250
|
]);
|
|
@@ -2915,6 +2922,7 @@ function ContextMenuDriver() {
|
|
|
2915
2922
|
setOpen(true);
|
|
2916
2923
|
}
|
|
2917
2924
|
}, [menu]);
|
|
2925
|
+
const soft = !!(menu?.hoveredRow != null && menu.hoveredColumn != null && grid.api.cellSelectionIsSelected(menu.hoveredRow, menu.hoveredColumn));
|
|
2918
2926
|
return /* @__PURE__ */ jsx(
|
|
2919
2927
|
MenuRoot,
|
|
2920
2928
|
{
|
|
@@ -2923,6 +2931,9 @@ function ContextMenuDriver() {
|
|
|
2923
2931
|
setOpen(c);
|
|
2924
2932
|
},
|
|
2925
2933
|
onOpenChangeComplete: (c) => {
|
|
2934
|
+
if (c) {
|
|
2935
|
+
grid.state.internal.cellSelectionSoftFocus.set(soft);
|
|
2936
|
+
}
|
|
2926
2937
|
if (!c) {
|
|
2927
2938
|
grid.api.contextMenuClose();
|
|
2928
2939
|
setMenu(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1771technologies/lytenyte-pro",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -70,20 +70,20 @@
|
|
|
70
70
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@1771technologies/grid-client-data-source-pro": "0.0.
|
|
74
|
-
"@1771technologies/grid-core": "0.0.
|
|
75
|
-
"@1771technologies/grid-design": "0.0.
|
|
76
|
-
"@1771technologies/grid-provider": "0.0.
|
|
77
|
-
"@1771technologies/grid-store-pro": "0.0.
|
|
78
|
-
"@1771technologies/grid-tree-data-source": "0.0.
|
|
79
|
-
"@1771technologies/grid-types": "0.0.
|
|
80
|
-
"@1771technologies/js-utils": "0.0.
|
|
81
|
-
"@1771technologies/lytenyte-core": "0.0.
|
|
82
|
-
"@1771technologies/react-cascada": "0.0.
|
|
83
|
-
"@1771technologies/react-dragon": "0.0.
|
|
84
|
-
"@1771technologies/react-sizer": "0.0.
|
|
85
|
-
"@1771technologies/react-split-pane": "0.0.
|
|
86
|
-
"@1771technologies/react-utils": "0.0.
|
|
73
|
+
"@1771technologies/grid-client-data-source-pro": "0.0.55",
|
|
74
|
+
"@1771technologies/grid-core": "0.0.55",
|
|
75
|
+
"@1771technologies/grid-design": "0.0.55",
|
|
76
|
+
"@1771technologies/grid-provider": "0.0.55",
|
|
77
|
+
"@1771technologies/grid-store-pro": "0.0.55",
|
|
78
|
+
"@1771technologies/grid-tree-data-source": "0.0.55",
|
|
79
|
+
"@1771technologies/grid-types": "0.0.55",
|
|
80
|
+
"@1771technologies/js-utils": "0.0.55",
|
|
81
|
+
"@1771technologies/lytenyte-core": "0.0.55",
|
|
82
|
+
"@1771technologies/react-cascada": "0.0.55",
|
|
83
|
+
"@1771technologies/react-dragon": "0.0.55",
|
|
84
|
+
"@1771technologies/react-sizer": "0.0.55",
|
|
85
|
+
"@1771technologies/react-split-pane": "0.0.55",
|
|
86
|
+
"@1771technologies/react-utils": "0.0.55",
|
|
87
87
|
"@base-ui-components/react": "1.0.0-alpha.7"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|