@alaarab/ogrid 1.4.0 → 1.5.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.
|
@@ -106,7 +106,7 @@ function DataGridTableInner(props) {
|
|
|
106
106
|
textAlign: col.type === 'numeric' ? 'right' : col.type === 'boolean' ? 'center' : undefined,
|
|
107
107
|
}, children: renderCellContent(item, col, rowIndex, colIdx) }, col.columnId));
|
|
108
108
|
})] }, rowIdStr));
|
|
109
|
-
}) }))] }), _jsx(MarchingAntsOverlay, { containerRef: tableContainerRef, selectionRange: selectionRange, copyRange: copyRange, cutRange: cutRange, colOffset: colOffset }), showEmptyInGrid && emptyState && (_jsx("div", { className: styles.emptyStateInGrid, children: _jsx("div", { children: emptyState.render ? (emptyState.render()) : (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.emptyStateInGridTitle, children: "No results found" }), _jsx("div", { className: styles.emptyStateInGridMessage, children: emptyState.message != null ? (emptyState.message) : emptyState.hasActiveFilters ? (_jsxs(_Fragment, { children: ["No items match your current filters. Try adjusting your search or", ' ', _jsx("button", { type: "button", className: styles.emptyStateInGridLink, onClick: emptyState.onClearAll, children: "clear all filters" }), ' ', "to see all items."] })) : ('There are no items available at this time.') })] })) }) }))] }) }), statusBarConfig && (_jsx(StatusBar, { totalCount: statusBarConfig.totalCount, filteredCount: statusBarConfig.filteredCount, selectedCount: statusBarConfig.selectedCount ?? selectedRowIds.size, selectedCellCount: selectionRange ? (Math.abs(selectionRange.endRow - selectionRange.startRow) + 1) * (Math.abs(selectionRange.endCol - selectionRange.startCol) + 1) : undefined, aggregation: statusBarConfig.aggregation }))] }), contextMenu &&
|
|
109
|
+
}) }))] }), _jsx(MarchingAntsOverlay, { containerRef: tableContainerRef, selectionRange: selectionRange, copyRange: copyRange, cutRange: cutRange, colOffset: colOffset }), showEmptyInGrid && emptyState && (_jsx("div", { className: styles.emptyStateInGrid, children: _jsx("div", { children: emptyState.render ? (emptyState.render()) : (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.emptyStateInGridTitle, children: "No results found" }), _jsx("div", { className: styles.emptyStateInGridMessage, children: emptyState.message != null ? (emptyState.message) : emptyState.hasActiveFilters ? (_jsxs(_Fragment, { children: ["No items match your current filters. Try adjusting your search or", ' ', _jsx("button", { type: "button", className: styles.emptyStateInGridLink, onClick: emptyState.onClearAll, children: "clear all filters" }), ' ', "to see all items."] })) : ('There are no items available at this time.') })] })) }) }))] }) }), statusBarConfig && (_jsx(StatusBar, { totalCount: statusBarConfig.totalCount, filteredCount: statusBarConfig.filteredCount, selectedCount: statusBarConfig.selectedCount ?? selectedRowIds.size, selectedCellCount: selectionRange ? (Math.abs(selectionRange.endRow - selectionRange.startRow) + 1) * (Math.abs(selectionRange.endCol - selectionRange.startCol) + 1) : undefined, aggregation: statusBarConfig.aggregation, suppressRowCount: statusBarConfig.suppressRowCount }))] }), contextMenu &&
|
|
110
110
|
createPortal(_jsx(GridContextMenu, { x: contextMenu.x, y: contextMenu.y, hasSelection: hasCellSelection, canUndo: canUndo, canRedo: canRedo, onUndo: onUndo ?? (() => { }), onRedo: onRedo ?? (() => { }), onCopy: handleCopy, onCut: handleCut, onPaste: () => void handlePaste(), onSelectAll: handleSelectAllCells, onClose: closeContextMenu }), document.body)] }));
|
|
111
111
|
}
|
|
112
112
|
export const DataGridTable = React.memo(DataGridTableInner);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
.tableScrollContent {
|
|
2
3
|
display: flex;
|
|
3
4
|
flex-direction: column;
|
|
4
5
|
width: 100%;
|
|
5
6
|
min-width: 0;
|
|
7
|
+
min-height: 100%;
|
|
6
8
|
background: var(--ogrid-bg, #fff);
|
|
7
9
|
}
|
|
8
10
|
|
|
@@ -156,21 +158,29 @@
|
|
|
156
158
|
background: var(--ogrid-header-bg, #f5f5f5);
|
|
157
159
|
}
|
|
158
160
|
|
|
159
|
-
/* Column resize handle */
|
|
161
|
+
/* Column resize handle — wide hit area with narrow visual indicator */
|
|
160
162
|
.resizeHandle {
|
|
161
163
|
position: absolute;
|
|
162
164
|
top: 0;
|
|
163
|
-
right:
|
|
165
|
+
right: -3px;
|
|
164
166
|
bottom: 0;
|
|
165
|
-
width:
|
|
167
|
+
width: 8px;
|
|
166
168
|
cursor: col-resize;
|
|
167
169
|
user-select: none;
|
|
168
170
|
z-index: 1;
|
|
169
171
|
}
|
|
170
|
-
.resizeHandle
|
|
172
|
+
.resizeHandle::after {
|
|
173
|
+
content: "";
|
|
174
|
+
position: absolute;
|
|
175
|
+
top: 0;
|
|
176
|
+
right: 3px;
|
|
177
|
+
bottom: 0;
|
|
178
|
+
width: 2px;
|
|
179
|
+
}
|
|
180
|
+
.resizeHandle:hover::after {
|
|
171
181
|
background-color: var(--ogrid-accent, #0078d4);
|
|
172
182
|
}
|
|
173
|
-
.resizeHandle:active {
|
|
183
|
+
.resizeHandle:active::after {
|
|
174
184
|
background-color: var(--ogrid-accent-dark, #005a9e);
|
|
175
185
|
}
|
|
176
186
|
|
|
@@ -305,6 +315,7 @@
|
|
|
305
315
|
background: var(--ogrid-bg-subtle, #f3f2f1);
|
|
306
316
|
border-top: 1px solid var(--ogrid-border, #e0e0e0);
|
|
307
317
|
min-height: 28px;
|
|
318
|
+
margin-top: auto;
|
|
308
319
|
}
|
|
309
320
|
|
|
310
321
|
.statusBarItem {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "OGrid default (Radix) – Data grid with sorting, filtering, pagination, column chooser, and CSV export. Packed with Radix UI; no Fluent or Material required.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"node": ">=18"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@alaarab/ogrid-core": "^1.
|
|
44
|
+
"@alaarab/ogrid-core": "^1.5.0",
|
|
45
45
|
"@radix-ui/react-checkbox": "^1.1.2",
|
|
46
46
|
"@radix-ui/react-popover": "^1.1.2"
|
|
47
47
|
},
|