@adecore/database 0.73.5 → 0.74.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.
@@ -142,29 +142,6 @@ export function DataGrid({ columns, rows, label, editable = false, selectedKeys,
142
142
  const [top, bottom, list] = blockKey.split(':');
143
143
  reportRange.current?.({ top: Number(top), bottom: Number(bottom), columns: list === '' ? [] : list.split(',').map(Number) });
144
144
  }, [blockKey]);
145
- useEffect(() => {
146
- if (focusRequest === null || focusRequest === undefined) {
147
- return;
148
- }
149
- const index = rows.findIndex((row) => row.key === focusRequest.rowKey);
150
- if (index >= 0) {
151
- focusAt({ row: index, column: focusRequest.column });
152
- if (focusRequest.quiet !== true) {
153
- scroller.current?.focus();
154
- }
155
- }
156
- // Only a new request moves the focus; the rows changing under a request already handled must not.
157
- // oxlint-disable-next-line react-hooks/exhaustive-deps
158
- }, [focusRequest]);
159
- useEffect(() => {
160
- if (columnRequest !== null && columnRequest !== undefined && displayOf.has(columnRequest.column)) {
161
- pickColumn(columnRequest.column);
162
- revealColumn(columnRequest.column);
163
- scroller.current?.focus();
164
- }
165
- // Only a new request moves the pick; the columns changing under a request already handled must not.
166
- // oxlint-disable-next-line react-hooks/exhaustive-deps
167
- }, [columnRequest]);
168
145
  useEffect(() => {
169
146
  const stop = () => {
170
147
  dragging.current = false;
@@ -223,6 +200,32 @@ export function DataGrid({ columns, rows, label, editable = false, selectedKeys,
223
200
  setFocused(position);
224
201
  reveal(position);
225
202
  };
203
+ useEffect(() => {
204
+ if (focusRequest === null || focusRequest === undefined) {
205
+ return;
206
+ }
207
+ const index = rows.findIndex((row) => row.key === focusRequest.rowKey);
208
+ if (index >= 0) {
209
+ // A focus request is a command from the owner, so it lands in the state the grid keeps itself.
210
+ // oxlint-disable-next-line react/set-state-in-effect
211
+ focusAt({ row: index, column: focusRequest.column });
212
+ if (focusRequest.quiet !== true) {
213
+ scroller.current?.focus();
214
+ }
215
+ }
216
+ // Only a new request moves the focus; the rows changing under a request already handled must not.
217
+ // oxlint-disable-next-line react-hooks/exhaustive-deps
218
+ }, [focusRequest]);
219
+ useEffect(() => {
220
+ if (columnRequest !== null && columnRequest !== undefined && displayOf.has(columnRequest.column)) {
221
+ // oxlint-disable-next-line react/set-state-in-effect
222
+ pickColumn(columnRequest.column);
223
+ revealColumn(columnRequest.column);
224
+ scroller.current?.focus();
225
+ }
226
+ // Only a new request moves the pick; the columns changing under a request already handled must not.
227
+ // oxlint-disable-next-line react-hooks/exhaustive-deps
228
+ }, [columnRequest]);
226
229
  const step = (from, input) => {
227
230
  const next = moveFocus(isShown(from) ? toDisplay(from) : null, input, { rows: rows.length, columns: order.length, page });
228
231
  return next === null ? null : fromDisplay(next);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/database",
3
- "version": "0.73.5",
3
+ "version": "0.74.0",
4
4
  "description": "Browse, query and edit SQLite and MySQL databases: React views for the page, a host for the backend and a native helper that talks to the server.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "author": "Bas Milius",
@@ -56,34 +56,34 @@
56
56
  "helper:test": "cargo test --locked --manifest-path helper/Cargo.toml"
57
57
  },
58
58
  "dependencies": {
59
- "@adecore/utils": "0.73.5",
59
+ "@adecore/utils": "0.74.0",
60
60
  "@base-ui/react": "^1.9.0",
61
61
  "clsx": "^2.1.1",
62
- "lucide-react": "^1.73.0"
62
+ "lucide-react": "^1.81.0"
63
63
  },
64
64
  "optionalDependencies": {
65
- "@adecore/database-darwin-arm64": "0.73.5",
66
- "@adecore/database-linux-arm64": "0.73.5",
67
- "@adecore/database-linux-x64": "0.73.5",
68
- "@adecore/database-win32-x64": "0.73.5"
65
+ "@adecore/database-darwin-arm64": "0.74.0",
66
+ "@adecore/database-linux-arm64": "0.74.0",
67
+ "@adecore/database-linux-x64": "0.74.0",
68
+ "@adecore/database-win32-x64": "0.74.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "@adecore/ui": "^0.73.5",
71
+ "@adecore/ui": "^0.74.0",
72
72
  "i18next": "^26.4.2 || ^27.0.0",
73
73
  "react": "^19.3.0",
74
74
  "react-dom": "^19.3.0",
75
75
  "react-i18next": "^17.0.15 || ^18.0.0"
76
76
  },
77
77
  "devDependencies": {
78
- "@adecore/ui": "0.73.5",
79
- "@types/bun": "^1.4.4",
80
- "@types/node": "^26.6.6",
81
- "@types/react": "^19.3.0",
78
+ "@adecore/ui": "0.74.0",
79
+ "@types/bun": "^1.4.5",
80
+ "@types/node": "^26.6.11",
81
+ "@types/react": "^19.3.3",
82
82
  "@types/react-dom": "^19.3.0",
83
- "i18next": "^27.1.3",
83
+ "i18next": "^27.2.9",
84
84
  "react": "^19.3.1",
85
85
  "react-dom": "^19.3.1",
86
- "react-i18next": "^18.0.2",
86
+ "react-i18next": "^18.0.3",
87
87
  "typescript": "^7.0.2"
88
88
  }
89
89
  }
@@ -302,34 +302,6 @@ export function DataGrid({
302
302
  reportRange.current?.({ top: Number(top), bottom: Number(bottom), columns: list === '' ? [] : list!.split(',').map(Number) });
303
303
  }, [blockKey]);
304
304
 
305
- useEffect(() => {
306
- if (focusRequest === null || focusRequest === undefined) {
307
- return;
308
- }
309
-
310
- const index = rows.findIndex((row) => row.key === focusRequest.rowKey);
311
-
312
- if (index >= 0) {
313
- focusAt({ row: index, column: focusRequest.column });
314
-
315
- if (focusRequest.quiet !== true) {
316
- scroller.current?.focus();
317
- }
318
- }
319
- // Only a new request moves the focus; the rows changing under a request already handled must not.
320
- // oxlint-disable-next-line react-hooks/exhaustive-deps
321
- }, [focusRequest]);
322
-
323
- useEffect(() => {
324
- if (columnRequest !== null && columnRequest !== undefined && displayOf.has(columnRequest.column)) {
325
- pickColumn(columnRequest.column);
326
- revealColumn(columnRequest.column);
327
- scroller.current?.focus();
328
- }
329
- // Only a new request moves the pick; the columns changing under a request already handled must not.
330
- // oxlint-disable-next-line react-hooks/exhaustive-deps
331
- }, [columnRequest]);
332
-
333
305
  useEffect(() => {
334
306
  const stop = (): void => {
335
307
  dragging.current = false;
@@ -410,6 +382,37 @@ export function DataGrid({
410
382
  reveal(position);
411
383
  };
412
384
 
385
+ useEffect(() => {
386
+ if (focusRequest === null || focusRequest === undefined) {
387
+ return;
388
+ }
389
+
390
+ const index = rows.findIndex((row) => row.key === focusRequest.rowKey);
391
+
392
+ if (index >= 0) {
393
+ // A focus request is a command from the owner, so it lands in the state the grid keeps itself.
394
+ // oxlint-disable-next-line react/set-state-in-effect
395
+ focusAt({ row: index, column: focusRequest.column });
396
+
397
+ if (focusRequest.quiet !== true) {
398
+ scroller.current?.focus();
399
+ }
400
+ }
401
+ // Only a new request moves the focus; the rows changing under a request already handled must not.
402
+ // oxlint-disable-next-line react-hooks/exhaustive-deps
403
+ }, [focusRequest]);
404
+
405
+ useEffect(() => {
406
+ if (columnRequest !== null && columnRequest !== undefined && displayOf.has(columnRequest.column)) {
407
+ // oxlint-disable-next-line react/set-state-in-effect
408
+ pickColumn(columnRequest.column);
409
+ revealColumn(columnRequest.column);
410
+ scroller.current?.focus();
411
+ }
412
+ // Only a new request moves the pick; the columns changing under a request already handled must not.
413
+ // oxlint-disable-next-line react-hooks/exhaustive-deps
414
+ }, [columnRequest]);
415
+
413
416
  const step = (from: CellPosition | null, input: NavigationKey): CellPosition | null => {
414
417
  const next = moveFocus(isShown(from) ? toDisplay(from) : null, input, { rows: rows.length, columns: order.length, page });
415
418