@adecore/database 0.25.9 → 0.26.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.
- package/dist/grid/DataGrid.js +1 -1
- package/dist/locales/en.js +4 -4
- package/dist/locales/nl.js +4 -4
- package/package.json +7 -7
- package/src/grid/DataGrid.tsx +1 -0
- package/src/locales/en.ts +4 -4
- package/src/locales/nl.ts +4 -4
package/dist/grid/DataGrid.js
CHANGED
|
@@ -520,5 +520,5 @@ export function DataGrid({ columns, rows, label, editable = false, selectedKeys,
|
|
|
520
520
|
rowKeys: selection.has(menuRow.key) ? rows.filter((row) => selection.has(row.key)).map((row) => row.key) : [menuRow.key],
|
|
521
521
|
cell: menuTarget.column === null ? null : { rowKey: menuRow.key, column: menuTarget.column }
|
|
522
522
|
};
|
|
523
|
-
return (_jsx("div", { ref: attach, role: "grid", "aria-label": label, "aria-rowcount": rows.length + 1, "aria-colcount": order.length + 1, "aria-activedescendant": pickedColumns.length > 0 ? headerId(pickedColumns[0]) : focusCell === null ? undefined : cellId(focusCell.row, focusCell.column), tabIndex: 0, className: clsx('group/grid relative min-h-0 flex-1 overflow-auto bg-surface text-text outline-none', className), onKeyDown: handleKeyDown, onScroll: (event) => setScrolledBlock(scrollBlock(event.currentTarget.scrollTop - HEADER_HEIGHT)), children: _jsxs("div", { className: "relative min-w-full", style: { width: totalWidth }, children: [_jsxs("div", { role: "row", "aria-rowindex": 1, className: "sticky top-0 z-20 flex w-full border-b border-border bg-surface", style: { height: HEADER_HEIGHT }, children: [_jsxs("div", { className: PINNED_GROUP, children: [_jsx("div", { className: "shrink-0 border-r border-border bg-surface bg-clip-border", style: { width: gutter } }), headerCells.slice(0, pinnedShown)] }), headerCells.slice(pinnedShown)] }), _jsxs(ContextMenu.Root, { children: [_jsx(ContextMenu.Trigger, { role: "rowgroup", className: "relative", style: { height: rows.length * ROW_HEIGHT }, children: Array.from({ length: range.end - range.start }, (_, offset) => renderRow(range.start + offset)) }), _jsxs(ContextMenu.Popup, { children: [_jsxs(ContextMenu.Item, { disabled: menuCell === null, onClick: copyCell, children: [_jsx(Icon, { icon: Copy, size: 14 }), t('grid.copyValue'), _jsx(Kbd, { shortcut: EDIT_SHORTCUTS.copy })] }), _jsx(CopyAsMenu, { disabled: block === null, formats: sqlTarget === undefined ? COPY_FORMATS.filter((format) => format !== 'sql') : COPY_FORMATS, onCopy: (format) => void copyAs(format) }), menuContext !== null && menuCell !== null && queryMenu !== undefined && (_jsxs(_Fragment, { children: [_jsx(ContextMenu.Separator, {}), queryMenu(menuContext)] })), _jsx(ContextMenu.Separator, {}), editable && menuCell !== null && (_jsxs(_Fragment, { children: [_jsxs(ContextMenu.Item, { disabled: !settable || !nullable, onClick: () => commitValue(null), children: [_jsx(Icon, { icon: Ban, size: 14 }), t('grid.setNull')] }), hasDefault && (_jsxs(ContextMenu.Item, { disabled: !settable, onClick: () => commitValue({ kind: 'default' }), children: [_jsx(Icon, { icon: RotateCcw, size: 14 }), t('grid.setDefault')] }))] })), menuContext !== null && menu?.(menuContext)] })] }), rows.length === 0 && empty !== undefined && _jsx("div", { className: "sticky left-0 w-fit px-4 py-6 text-xs text-text-muted", children: empty })] }) }));
|
|
523
|
+
return (_jsx("div", { ref: attach, role: "grid", "aria-label": label, "aria-rowcount": rows.length + 1, "aria-colcount": order.length + 1, "aria-activedescendant": pickedColumns.length > 0 ? headerId(pickedColumns[0]) : focusCell === null ? undefined : cellId(focusCell.row, focusCell.column), tabIndex: 0, className: clsx('group/grid relative min-h-0 flex-1 overflow-auto bg-surface text-text outline-none', className), onKeyDown: handleKeyDown, onScroll: (event) => setScrolledBlock(scrollBlock(event.currentTarget.scrollTop - HEADER_HEIGHT)), children: _jsxs("div", { className: "relative min-w-full", style: { width: totalWidth }, children: [_jsxs("div", { role: "row", "aria-rowindex": 1, className: "sticky top-0 z-20 flex w-full border-b border-border bg-surface", style: { height: HEADER_HEIGHT }, children: [_jsxs("div", { className: PINNED_GROUP, children: [_jsx("div", { className: "shrink-0 border-r border-border bg-surface bg-clip-border", style: { width: gutter } }), headerCells.slice(0, pinnedShown)] }), headerCells.slice(pinnedShown)] }), _jsxs(ContextMenu.Root, { children: [_jsx(ContextMenu.Trigger, { role: "rowgroup", className: "relative", style: { height: rows.length * ROW_HEIGHT }, children: Array.from({ length: range.end - range.start }, (_, offset) => renderRow(range.start + offset)) }), _jsxs(ContextMenu.Popup, { children: [_jsxs(ContextMenu.Item, { disabled: menuCell === null, onClick: copyCell, children: [_jsx(Icon, { icon: Copy, size: 14 }), t('grid.copyValue'), _jsx(Kbd, { shortcut: EDIT_SHORTCUTS.copy })] }), _jsx(CopyAsMenu, { disabled: block === null, formats: sqlTarget === undefined ? COPY_FORMATS.filter((format) => format !== 'sql') : COPY_FORMATS, onCopy: (format) => void copyAs(format) }), menuContext !== null && menuCell !== null && queryMenu !== undefined && (_jsxs(_Fragment, { children: [_jsx(ContextMenu.Separator, {}), queryMenu(menuContext)] })), _jsx(ContextMenu.Separator, {}), editable && menuCell !== null && (_jsxs(_Fragment, { children: [_jsxs(ContextMenu.Item, { disabled: !settable || !nullable, onClick: () => commitValue(null), children: [_jsx(Icon, { icon: Ban, size: 14 }), t('grid.setNull')] }), hasDefault && (_jsxs(ContextMenu.Item, { disabled: !settable, onClick: () => commitValue({ kind: 'default' }), children: [_jsx(Icon, { icon: RotateCcw, size: 14 }), t('grid.setDefault')] }))] })), _jsx(ContextMenu.Separator, {}), menuContext !== null && menu?.(menuContext)] })] }), rows.length === 0 && empty !== undefined && _jsx("div", { className: "sticky left-0 w-fit px-4 py-6 text-xs text-text-muted", children: empty })] }) }));
|
|
524
524
|
}
|
package/dist/locales/en.js
CHANGED
|
@@ -148,13 +148,13 @@ export default {
|
|
|
148
148
|
editConnection: 'Edit connection',
|
|
149
149
|
copyDdl: 'Copy DDL',
|
|
150
150
|
rename: {
|
|
151
|
-
action: 'Rename',
|
|
151
|
+
action: 'Rename…',
|
|
152
152
|
title: 'Rename "{{name}}"',
|
|
153
153
|
field: 'New name',
|
|
154
154
|
confirm: 'Rename'
|
|
155
155
|
},
|
|
156
156
|
truncate: {
|
|
157
|
-
action: 'Truncate',
|
|
157
|
+
action: 'Truncate…',
|
|
158
158
|
title: 'Truncate "{{name}}"?',
|
|
159
159
|
description: 'Deletes every row in "{{name}}". This cannot be undone.',
|
|
160
160
|
confirm: 'Truncate'
|
|
@@ -163,13 +163,13 @@ export default {
|
|
|
163
163
|
field: 'Type "{{name}}" to confirm',
|
|
164
164
|
mismatch: 'The name does not match.',
|
|
165
165
|
table: {
|
|
166
|
-
action: 'Drop',
|
|
166
|
+
action: 'Drop…',
|
|
167
167
|
title: 'Drop "{{name}}"?',
|
|
168
168
|
description: 'Deletes the table and every row in it. This cannot be undone.',
|
|
169
169
|
confirm: 'Drop table'
|
|
170
170
|
},
|
|
171
171
|
view: {
|
|
172
|
-
action: 'Drop view',
|
|
172
|
+
action: 'Drop view…',
|
|
173
173
|
title: 'Drop "{{name}}"?',
|
|
174
174
|
description: 'Deletes the view. The tables behind it are not touched.',
|
|
175
175
|
confirm: 'Drop view'
|
package/dist/locales/nl.js
CHANGED
|
@@ -148,13 +148,13 @@ export default {
|
|
|
148
148
|
editConnection: 'Verbinding bewerken',
|
|
149
149
|
copyDdl: 'DDL kopiëren',
|
|
150
150
|
rename: {
|
|
151
|
-
action: 'Hernoemen',
|
|
151
|
+
action: 'Hernoemen…',
|
|
152
152
|
title: '"{{name}}" hernoemen',
|
|
153
153
|
field: 'Nieuwe naam',
|
|
154
154
|
confirm: 'Hernoemen'
|
|
155
155
|
},
|
|
156
156
|
truncate: {
|
|
157
|
-
action: 'Leegmaken',
|
|
157
|
+
action: 'Leegmaken…',
|
|
158
158
|
title: '"{{name}}" leegmaken?',
|
|
159
159
|
description: 'Verwijdert elke rij in "{{name}}". Dit kan niet ongedaan worden gemaakt.',
|
|
160
160
|
confirm: 'Leegmaken'
|
|
@@ -163,13 +163,13 @@ export default {
|
|
|
163
163
|
field: 'Typ "{{name}}" om te bevestigen',
|
|
164
164
|
mismatch: 'De naam komt niet overeen.',
|
|
165
165
|
table: {
|
|
166
|
-
action: 'Verwijderen',
|
|
166
|
+
action: 'Verwijderen…',
|
|
167
167
|
title: '"{{name}}" verwijderen?',
|
|
168
168
|
description: 'Verwijdert de tabel en elke rij erin. Dit kan niet ongedaan worden gemaakt.',
|
|
169
169
|
confirm: 'Tabel verwijderen'
|
|
170
170
|
},
|
|
171
171
|
view: {
|
|
172
|
-
action: 'View verwijderen',
|
|
172
|
+
action: 'View verwijderen…',
|
|
173
173
|
title: '"{{name}}" verwijderen?',
|
|
174
174
|
description: 'Verwijdert de view. De tabellen erachter blijven ongemoeid.',
|
|
175
175
|
confirm: 'View verwijderen'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/database",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.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",
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
"lucide-react": "^1.47.0"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
|
-
"@adecore/database-darwin-arm64": "0.
|
|
65
|
-
"@adecore/database-linux-arm64": "0.
|
|
66
|
-
"@adecore/database-linux-x64": "0.
|
|
67
|
-
"@adecore/database-win32-x64": "0.
|
|
64
|
+
"@adecore/database-darwin-arm64": "0.26.0",
|
|
65
|
+
"@adecore/database-linux-arm64": "0.26.0",
|
|
66
|
+
"@adecore/database-linux-x64": "0.26.0",
|
|
67
|
+
"@adecore/database-win32-x64": "0.26.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@adecore/ui": "^0.
|
|
70
|
+
"@adecore/ui": "^0.26.0",
|
|
71
71
|
"i18next": "^26.4.2",
|
|
72
72
|
"react": "^19.3.0",
|
|
73
73
|
"react-dom": "^19.3.0",
|
|
74
74
|
"react-i18next": "^17.0.15"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@adecore/ui": "0.
|
|
77
|
+
"@adecore/ui": "0.26.0",
|
|
78
78
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
79
79
|
"@types/bun": "^1.4.2",
|
|
80
80
|
"@types/node": "^24.13.6",
|
package/src/grid/DataGrid.tsx
CHANGED
package/src/locales/en.ts
CHANGED
|
@@ -148,13 +148,13 @@ export default {
|
|
|
148
148
|
editConnection: 'Edit connection',
|
|
149
149
|
copyDdl: 'Copy DDL',
|
|
150
150
|
rename: {
|
|
151
|
-
action: 'Rename',
|
|
151
|
+
action: 'Rename…',
|
|
152
152
|
title: 'Rename "{{name}}"',
|
|
153
153
|
field: 'New name',
|
|
154
154
|
confirm: 'Rename'
|
|
155
155
|
},
|
|
156
156
|
truncate: {
|
|
157
|
-
action: 'Truncate',
|
|
157
|
+
action: 'Truncate…',
|
|
158
158
|
title: 'Truncate "{{name}}"?',
|
|
159
159
|
description: 'Deletes every row in "{{name}}". This cannot be undone.',
|
|
160
160
|
confirm: 'Truncate'
|
|
@@ -163,13 +163,13 @@ export default {
|
|
|
163
163
|
field: 'Type "{{name}}" to confirm',
|
|
164
164
|
mismatch: 'The name does not match.',
|
|
165
165
|
table: {
|
|
166
|
-
action: 'Drop',
|
|
166
|
+
action: 'Drop…',
|
|
167
167
|
title: 'Drop "{{name}}"?',
|
|
168
168
|
description: 'Deletes the table and every row in it. This cannot be undone.',
|
|
169
169
|
confirm: 'Drop table'
|
|
170
170
|
},
|
|
171
171
|
view: {
|
|
172
|
-
action: 'Drop view',
|
|
172
|
+
action: 'Drop view…',
|
|
173
173
|
title: 'Drop "{{name}}"?',
|
|
174
174
|
description: 'Deletes the view. The tables behind it are not touched.',
|
|
175
175
|
confirm: 'Drop view'
|
package/src/locales/nl.ts
CHANGED
|
@@ -148,13 +148,13 @@ export default {
|
|
|
148
148
|
editConnection: 'Verbinding bewerken',
|
|
149
149
|
copyDdl: 'DDL kopiëren',
|
|
150
150
|
rename: {
|
|
151
|
-
action: 'Hernoemen',
|
|
151
|
+
action: 'Hernoemen…',
|
|
152
152
|
title: '"{{name}}" hernoemen',
|
|
153
153
|
field: 'Nieuwe naam',
|
|
154
154
|
confirm: 'Hernoemen'
|
|
155
155
|
},
|
|
156
156
|
truncate: {
|
|
157
|
-
action: 'Leegmaken',
|
|
157
|
+
action: 'Leegmaken…',
|
|
158
158
|
title: '"{{name}}" leegmaken?',
|
|
159
159
|
description: 'Verwijdert elke rij in "{{name}}". Dit kan niet ongedaan worden gemaakt.',
|
|
160
160
|
confirm: 'Leegmaken'
|
|
@@ -163,13 +163,13 @@ export default {
|
|
|
163
163
|
field: 'Typ "{{name}}" om te bevestigen',
|
|
164
164
|
mismatch: 'De naam komt niet overeen.',
|
|
165
165
|
table: {
|
|
166
|
-
action: 'Verwijderen',
|
|
166
|
+
action: 'Verwijderen…',
|
|
167
167
|
title: '"{{name}}" verwijderen?',
|
|
168
168
|
description: 'Verwijdert de tabel en elke rij erin. Dit kan niet ongedaan worden gemaakt.',
|
|
169
169
|
confirm: 'Tabel verwijderen'
|
|
170
170
|
},
|
|
171
171
|
view: {
|
|
172
|
-
action: 'View verwijderen',
|
|
172
|
+
action: 'View verwijderen…',
|
|
173
173
|
title: '"{{name}}" verwijderen?',
|
|
174
174
|
description: 'Verwijdert de view. De tabellen erachter blijven ongemoeid.',
|
|
175
175
|
confirm: 'View verwijderen'
|