@1771technologies/lytenyte-pro 1.0.0-beta.14 → 1.0.0-beta.15
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.
|
@@ -21,8 +21,10 @@ export const Branch = forwardRef(function Branch({ item, label, ...props }, forw
|
|
|
21
21
|
}, [columns, grid.api, isVisible]);
|
|
22
22
|
return (_jsx(ColumnItemContext, { value: useMemo(() => ({ item }), [item]), children: _jsx(TreeBranch, { ...props, itemId: item.branch.data.idOccurrence, ref: forwarded, ...item.attrs, onKeyDown: (ev) => {
|
|
23
23
|
props.onKeyDown?.(ev);
|
|
24
|
-
if (ev.key === " ")
|
|
24
|
+
if (ev.key === " ") {
|
|
25
25
|
toggle();
|
|
26
|
+
ev.preventDefault();
|
|
27
|
+
}
|
|
26
28
|
}, labelWrap: _jsx(DropWrap, { "data-ln-column-manager-branch": true, "data-ln-column-id": item.branch.data.idOccurrence, accepted: [accepted], onEnter: (el) => {
|
|
27
29
|
const data = dragState.data
|
|
28
30
|
.get()
|
|
@@ -38,7 +40,8 @@ export const Branch = forwardRef(function Branch({ item, label, ...props }, forw
|
|
|
38
40
|
return;
|
|
39
41
|
const thisIndex = allColumns.findIndex((c) => c.id === columns[0].id);
|
|
40
42
|
const isBefore = thisIndex > moveIndex;
|
|
41
|
-
|
|
43
|
+
// Flipped since our source is the one moving
|
|
44
|
+
if (!isBefore) {
|
|
42
45
|
el.setAttribute("data-ln-is-before", "true");
|
|
43
46
|
}
|
|
44
47
|
else {
|
|
@@ -38,7 +38,8 @@ export const Leaf = forwardRef(function ColumnManagerLeaf({ item, ...props }, fo
|
|
|
38
38
|
return;
|
|
39
39
|
const thisIndex = allColumns.findIndex((c) => c.id === columns[0].id);
|
|
40
40
|
const isBefore = thisIndex > moveIndex;
|
|
41
|
-
|
|
41
|
+
// Flipped since our source is the one moving
|
|
42
|
+
if (!isBefore) {
|
|
42
43
|
el.setAttribute("data-ln-is-before", "true");
|
|
43
44
|
}
|
|
44
45
|
else {
|
|
@@ -51,6 +52,7 @@ export const Leaf = forwardRef(function ColumnManagerLeaf({ item, ...props }, fo
|
|
|
51
52
|
props.onKeyDown?.(ev);
|
|
52
53
|
if (ev.key === " ") {
|
|
53
54
|
toggle();
|
|
55
|
+
ev.preventDefault();
|
|
54
56
|
}
|
|
55
57
|
}, "data-ln-column-manager-leaf": true, "data-ln-column-id": item.leaf.data.id }) }) }));
|
|
56
58
|
});
|
package/dist/grid-box/item.js
CHANGED
|
@@ -19,17 +19,19 @@ export const BoxItem = forwardRef(function BoxItem({ item, itemAs, itemClassName
|
|
|
19
19
|
const renderer = useSlot({
|
|
20
20
|
props: [
|
|
21
21
|
{
|
|
22
|
-
children: (_jsx(Item, { ...
|
|
23
|
-
if (ev.key === " ")
|
|
22
|
+
children: (_jsx(Item, { ...extraProps, onKeyDown: (ev) => {
|
|
23
|
+
if (ev.key === " ") {
|
|
24
24
|
item.onAction?.(ev.currentTarget);
|
|
25
|
+
ev.preventDefault();
|
|
26
|
+
}
|
|
25
27
|
if (ev.key === "Backspace" || ev.key === "Delete")
|
|
26
28
|
item.onDelete?.(ev.currentTarget);
|
|
27
|
-
}, onClick: (ev) => item.onAction(ev.currentTarget), className: itemClassName, style: itemStyle })),
|
|
29
|
+
}, onClick: (ev) => item.onAction(ev.currentTarget), className: itemClassName, style: itemStyle, "data-ln-source": item.source })),
|
|
28
30
|
},
|
|
29
31
|
],
|
|
30
32
|
slot: itemAs ?? _jsx("div", {}),
|
|
31
33
|
});
|
|
32
|
-
return (_jsx(DropWrap, { onEnter: (e) => {
|
|
34
|
+
return (_jsx(DropWrap, { ...props, onEnter: (e) => {
|
|
33
35
|
const data = dragState.active.get();
|
|
34
36
|
const thisSource = e.getAttribute("data-ln-source");
|
|
35
37
|
const dragSource = data?.getAttribute("data-ln-source");
|
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 }));
|
package/dist/tree-view/leaf.js
CHANGED
|
@@ -13,6 +13,7 @@ export const TreeLeaf = forwardRef(function TreeLeaf({ itemId, ...props }, forwa
|
|
|
13
13
|
e.ctrlKey ||
|
|
14
14
|
e.shiftKey)
|
|
15
15
|
return;
|
|
16
|
+
e.preventDefault();
|
|
16
17
|
const nodes = getFocusables(e.currentTarget);
|
|
17
18
|
const index = nodes.indexOf(document.activeElement);
|
|
18
19
|
if (index === -1) {
|
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.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.15",
|
|
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-
|
|
53
|
-
"@1771technologies/lytenyte-
|
|
54
|
-
"@1771technologies/lytenyte-
|
|
55
|
-
"@1771technologies/lytenyte-
|
|
56
|
-
"@1771technologies/lytenyte-
|
|
57
|
-
"@1771technologies/lytenyte-
|
|
52
|
+
"@1771technologies/lytenyte-core": "1.0.0-beta.15",
|
|
53
|
+
"@1771technologies/lytenyte-dragon": "1.0.0-beta.15",
|
|
54
|
+
"@1771technologies/lytenyte-dom-utils": "1.0.0-beta.15",
|
|
55
|
+
"@1771technologies/lytenyte-js-utils": "1.0.0-beta.15",
|
|
56
|
+
"@1771technologies/lytenyte-shared": "1.0.0-beta.15",
|
|
57
|
+
"@1771technologies/lytenyte-react-hooks": "1.0.0-beta.15"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": "^18.0.0 || ^19.0.0",
|