@1771technologies/lytenyte-pro 0.0.55 → 0.0.57
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 +13 -4
- package/dist/lytenyte-pro.css +26 -8
- package/package.json +15 -15
package/dist/index.js
CHANGED
|
@@ -95,7 +95,7 @@ function useHeaderCellRenderer(api, column) {
|
|
|
95
95
|
}, [base.headerRenderer, column.headerRenderer, column.id, defaultRenderer, renderers]);
|
|
96
96
|
return Renderer;
|
|
97
97
|
}
|
|
98
|
-
function useHeaderMove(api, column, columnIndex) {
|
|
98
|
+
function useHeaderMove(api, column, columnIndex, ref) {
|
|
99
99
|
const gridId = api.getState().gridId.use();
|
|
100
100
|
const dragProps = useDraggable({
|
|
101
101
|
onDragStart: () => {
|
|
@@ -128,6 +128,14 @@ function useHeaderMove(api, column, columnIndex) {
|
|
|
128
128
|
if (src.includes(target)) return;
|
|
129
129
|
if (isBefore2) api.columnMoveBefore(src, target);
|
|
130
130
|
else api.columnMoveAfter(src, target);
|
|
131
|
+
setTimeout(() => {
|
|
132
|
+
if (!ref.current) return;
|
|
133
|
+
const parent = ref.current.parentElement;
|
|
134
|
+
const movedEl = parent?.querySelector(
|
|
135
|
+
`[data-lng1771-column-id="${src[0]}"]`
|
|
136
|
+
);
|
|
137
|
+
movedEl?.focus();
|
|
138
|
+
}, 10);
|
|
131
139
|
}
|
|
132
140
|
});
|
|
133
141
|
const dragData = dragState.dragData.use();
|
|
@@ -138,7 +146,7 @@ function useHeaderMove(api, column, columnIndex) {
|
|
|
138
146
|
return { moveProps, dropProps, isBefore, canDrop, isOver, dragIndex };
|
|
139
147
|
}
|
|
140
148
|
function DragPlaceholder$1(c) {
|
|
141
|
-
return /* @__PURE__ */ jsxs("div", { className: "lng1771-
|
|
149
|
+
return /* @__PURE__ */ jsxs("div", { className: "lng1771-header-drag-placeholder--default", children: [
|
|
142
150
|
/* @__PURE__ */ jsx(
|
|
143
151
|
"svg",
|
|
144
152
|
{
|
|
@@ -200,14 +208,15 @@ function HeaderCell({
|
|
|
200
208
|
return style2;
|
|
201
209
|
}, [columnIndex, isEnd, isStart, rowEnd, rowStart, rtl, viewportWidth, xPositions]);
|
|
202
210
|
const Renderer = useHeaderCellRenderer(api, column);
|
|
211
|
+
const ref = useRef(null);
|
|
203
212
|
const { moveProps, dropProps, isBefore, isOver, canDrop, dragIndex } = useHeaderMove(
|
|
204
213
|
api,
|
|
205
214
|
column,
|
|
206
|
-
columnIndex
|
|
215
|
+
columnIndex,
|
|
216
|
+
ref
|
|
207
217
|
);
|
|
208
218
|
const sx = api.getState();
|
|
209
219
|
sx.sortModel.use();
|
|
210
|
-
const ref = useRef(null);
|
|
211
220
|
const events = useHeaderFocus(api, ref, columnIndex);
|
|
212
221
|
if (api.columnIsEmpty(column)) {
|
|
213
222
|
return /* @__PURE__ */ jsx(
|
package/dist/lytenyte-pro.css
CHANGED
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
padding-inline: 16px;
|
|
17
17
|
padding-block: 12px;
|
|
18
18
|
}
|
|
19
|
-
.lng1771-header__cell,
|
|
20
|
-
.lng1771-header__cell-expand,
|
|
21
|
-
.lng1771-header__cell-floating,
|
|
22
|
-
.lng1771-header__group,
|
|
23
19
|
.lng1771-cell,
|
|
24
20
|
.lng1771-cell__full-width {
|
|
25
21
|
&:focus {
|
|
@@ -28,6 +24,16 @@
|
|
|
28
24
|
}
|
|
29
25
|
}
|
|
30
26
|
|
|
27
|
+
.lng1771-header__cell,
|
|
28
|
+
.lng1771-header__cell-expand,
|
|
29
|
+
.lng1771-header__cell-floating,
|
|
30
|
+
.lng1771-header__group {
|
|
31
|
+
&:focus {
|
|
32
|
+
outline: 1px solid var(--lng1771-focus-outline);
|
|
33
|
+
outline-offset: -3px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
.lng1771-drag-placeholder {
|
|
32
38
|
padding-inline: 12px;
|
|
33
39
|
padding-block: 8px;
|
|
@@ -93,7 +99,7 @@
|
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
.lng1771-header__cell--over-before::after {
|
|
96
|
-
inset-inline-start:
|
|
102
|
+
inset-inline-start: 0px;
|
|
97
103
|
}
|
|
98
104
|
.lng1771-header__cell--over-after::after {
|
|
99
105
|
inset-inline-end: 1px;
|
|
@@ -101,8 +107,8 @@
|
|
|
101
107
|
.lng1771-header__cell--over::after {
|
|
102
108
|
top: 0px;
|
|
103
109
|
position: absolute;
|
|
104
|
-
width:
|
|
105
|
-
border-radius:
|
|
110
|
+
width: 4px;
|
|
111
|
+
border-radius: 8px;
|
|
106
112
|
height: 100%;
|
|
107
113
|
content: "";
|
|
108
114
|
background-color: var(--lng1771-allowed-to-drop, var(--lng1771-primary-50));
|
|
@@ -111,6 +117,17 @@
|
|
|
111
117
|
.lng1771-header__cell--over-not-allowed {
|
|
112
118
|
--lng1771-allowed-to-drop: red;
|
|
113
119
|
}
|
|
120
|
+
|
|
121
|
+
.lng1771-header-drag-placeholder--default {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
gap: 8px;
|
|
125
|
+
background-color: var(--lng1771-gray-05);
|
|
126
|
+
border: 1px solid var(--lng1771-primary-30);
|
|
127
|
+
border-radius: 6px;
|
|
128
|
+
padding-inline: 8px;
|
|
129
|
+
padding-block: 8px;
|
|
130
|
+
}
|
|
114
131
|
.lng1771-icon-button {
|
|
115
132
|
display: flex;
|
|
116
133
|
align-items: center;
|
|
@@ -1612,7 +1629,8 @@ body.lng1771-drag-on .lng1771-pill-manager__pill-outer[data-pill-active="false"]
|
|
|
1612
1629
|
position: relative;
|
|
1613
1630
|
border-radius: 9999px;
|
|
1614
1631
|
box-sizing: border-box;
|
|
1615
|
-
background-color: var(--lng1771-gray-
|
|
1632
|
+
background-color: var(--lng1771-gray-02);
|
|
1633
|
+
border: 1px solid var(--lng1771-gray-30);
|
|
1616
1634
|
cursor: pointer;
|
|
1617
1635
|
|
|
1618
1636
|
&:focus-within {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1771technologies/lytenyte-pro",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
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.57",
|
|
74
|
+
"@1771technologies/grid-core": "0.0.57",
|
|
75
|
+
"@1771technologies/grid-design": "0.0.57",
|
|
76
|
+
"@1771technologies/grid-provider": "0.0.57",
|
|
77
|
+
"@1771technologies/grid-store-pro": "0.0.57",
|
|
78
|
+
"@1771technologies/grid-tree-data-source": "0.0.57",
|
|
79
|
+
"@1771technologies/grid-types": "0.0.57",
|
|
80
|
+
"@1771technologies/js-utils": "0.0.57",
|
|
81
|
+
"@1771technologies/lytenyte-core": "0.0.57",
|
|
82
|
+
"@1771technologies/react-cascada": "0.0.57",
|
|
83
|
+
"@1771technologies/react-dragon": "0.0.57",
|
|
84
|
+
"@1771technologies/react-sizer": "0.0.57",
|
|
85
|
+
"@1771technologies/react-split-pane": "0.0.57",
|
|
86
|
+
"@1771technologies/react-utils": "0.0.57",
|
|
87
87
|
"@base-ui-components/react": "1.0.0-alpha.7"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|