@alaarab/ogrid-react-material 2.1.9 → 2.1.11
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/esm/index.js +20 -16
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -15,8 +15,8 @@ var STYLES = `
|
|
|
15
15
|
.ogrid-mat-row--selected > td { background-color: var(--ogrid-selection-bg, rgba(25, 118, 210, 0.08)); }
|
|
16
16
|
|
|
17
17
|
.ogrid-mat-td { position: relative; padding: 0; height: 1px; border-bottom: 1px solid var(--ogrid-border, rgba(224,224,224,1)); }
|
|
18
|
-
.ogrid-mat-td--pinned-left { position: sticky; left: 0; z-index: 6; background-color: var(--ogrid-paper-bg, #fff); will-change: transform; border-right: 1px solid var(--ogrid-border, rgba(224,224,224,1)); box-shadow: 2px 0 4px -1px rgba(0,0,0,0.1); }
|
|
19
|
-
.ogrid-mat-td--pinned-right { position: sticky; right: 0; z-index: 6; background-color: var(--ogrid-paper-bg, #fff); will-change: transform; border-left: 1px solid var(--ogrid-border, rgba(224,224,224,1)); box-shadow: -2px 0 4px -1px rgba(0,0,0,0.1); }
|
|
18
|
+
.ogrid-mat-td--pinned-left { position: sticky; left: 0; z-index: var(--ogrid-z-pinned, 6); background-color: var(--ogrid-paper-bg, #fff); will-change: transform; border-right: 1px solid var(--ogrid-border, rgba(224,224,224,1)); box-shadow: 2px 0 4px -1px rgba(0,0,0,0.1); }
|
|
19
|
+
.ogrid-mat-td--pinned-right { position: sticky; right: 0; z-index: var(--ogrid-z-pinned, 6); background-color: var(--ogrid-paper-bg, #fff); will-change: transform; border-left: 1px solid var(--ogrid-border, rgba(224,224,224,1)); box-shadow: -2px 0 4px -1px rgba(0,0,0,0.1); }
|
|
20
20
|
|
|
21
21
|
.ogrid-mat-cell { width: 100%; height: 100%; display: flex; align-items: center; min-width: 0; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: none; outline: none; }
|
|
22
22
|
.ogrid-mat-cell:focus-visible { outline: 2px solid var(--ogrid-primary, #1976d2); outline-offset: -2px; z-index: 3; }
|
|
@@ -25,22 +25,22 @@ var STYLES = `
|
|
|
25
25
|
.ogrid-mat-cell--boolean { justify-content: center; text-align: center; }
|
|
26
26
|
.ogrid-mat-cell--editable { cursor: cell; }
|
|
27
27
|
|
|
28
|
-
.ogrid-mat-cell--active { outline: 2px solid var(--ogrid-selection, #217346); outline-offset: -1px; z-index: 2; position: relative; overflow: visible; background-color: var(--ogrid-hover-bg); }
|
|
28
|
+
.ogrid-mat-cell--active { outline: 2px solid var(--ogrid-selection, #217346); outline-offset: -1px; z-index: var(--ogrid-z-active-cell, 2); position: relative; overflow: visible; background-color: var(--ogrid-hover-bg); }
|
|
29
29
|
.ogrid-mat-cell--active:focus-visible { outline: 2px solid var(--ogrid-selection, #217346); outline-offset: -1px; }
|
|
30
30
|
.ogrid-mat-cell--range { background-color: var(--ogrid-bg-range, rgba(33,115,70,0.12)); }
|
|
31
31
|
.ogrid-mat-cell--range:focus-visible { outline: none; }
|
|
32
32
|
.ogrid-mat-cell--cut { background-color: var(--ogrid-hover-bg); opacity: 0.7; }
|
|
33
33
|
|
|
34
|
-
.ogrid-mat-fill-handle { position: absolute; right: -3px; bottom: -3px; width: 7px; height: 7px; background-color: var(--ogrid-selection, #217346); border: 1px solid var(--ogrid-bg, #fff); border-radius: 1px; cursor: crosshair; pointer-events: auto; z-index: 3; }
|
|
34
|
+
.ogrid-mat-fill-handle { position: absolute; right: -3px; bottom: -3px; width: 7px; height: 7px; background-color: var(--ogrid-selection, #217346); border: 1px solid var(--ogrid-bg, #fff); border-radius: 1px; cursor: crosshair; pointer-events: auto; z-index: var(--ogrid-z-fill-handle, 3); }
|
|
35
35
|
|
|
36
36
|
.ogrid-mat-checkbox-wrapper { display: flex; align-items: center; justify-content: center; }
|
|
37
37
|
|
|
38
|
-
.ogrid-mat-row-number { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ogrid-fg-secondary); background-color: var(--ogrid-hover-bg); position: sticky; z-index:
|
|
38
|
+
.ogrid-mat-row-number { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ogrid-fg-secondary); background-color: var(--ogrid-hover-bg); position: sticky; z-index: var(--ogrid-z-row-number, 5); }
|
|
39
39
|
|
|
40
40
|
.ogrid-mat-tbody tr:last-child > td { border-bottom: none; }
|
|
41
41
|
|
|
42
|
-
.ogrid-mat-wrapper [data-drag-range] { background-color: rgba(33,115,70,0.12)
|
|
43
|
-
.ogrid-mat-wrapper [data-drag-anchor] { background-color: var(--ogrid-paper-bg, #fff)
|
|
42
|
+
.ogrid-mat-wrapper [data-drag-range] { background-color: rgba(33,115,70,0.12); }
|
|
43
|
+
.ogrid-mat-wrapper [data-drag-anchor] { background-color: var(--ogrid-paper-bg, #fff); }
|
|
44
44
|
`;
|
|
45
45
|
var injected = false;
|
|
46
46
|
function injectDataGridStyles() {
|
|
@@ -310,6 +310,8 @@ var ColumnHeaderFilter = React3.memo((props) => {
|
|
|
310
310
|
size: "small",
|
|
311
311
|
onClick: handlers.handleFilterIconClick,
|
|
312
312
|
"aria-label": `Filter ${columnName}`,
|
|
313
|
+
"aria-expanded": isFilterOpen,
|
|
314
|
+
"aria-haspopup": "dialog",
|
|
313
315
|
title: `Filter ${columnName}`,
|
|
314
316
|
color: hasActiveFilter || isFilterOpen ? "primary" : "default",
|
|
315
317
|
sx: { p: 0.25, position: "relative" },
|
|
@@ -837,11 +839,12 @@ function DataGridTableInner(props) {
|
|
|
837
839
|
rowHeight,
|
|
838
840
|
rowNumberOffset,
|
|
839
841
|
headerRows,
|
|
840
|
-
allowOverflowX,
|
|
842
|
+
allowOverflowX: _allowOverflowX,
|
|
841
843
|
fitToContent,
|
|
842
844
|
editCallbacks,
|
|
843
845
|
interactionHandlers,
|
|
844
846
|
cellDescriptorInputRef,
|
|
847
|
+
cellDescriptorCacheRef,
|
|
845
848
|
pendingEditorValueRef,
|
|
846
849
|
popoverAnchorElRef,
|
|
847
850
|
handleSingleRowClick,
|
|
@@ -850,7 +853,7 @@ function DataGridTableInner(props) {
|
|
|
850
853
|
hasCheckboxCol,
|
|
851
854
|
hasRowNumbersCol,
|
|
852
855
|
colOffset,
|
|
853
|
-
minTableWidth,
|
|
856
|
+
minTableWidth: _minTableWidth,
|
|
854
857
|
columnSizingOverrides,
|
|
855
858
|
measuredColumnWidths,
|
|
856
859
|
selectedRowIds,
|
|
@@ -927,15 +930,15 @@ function DataGridTableInner(props) {
|
|
|
927
930
|
minHeight: isLoading && items.length === 0 ? 200 : 0,
|
|
928
931
|
width: fitToContent ? "fit-content" : "100%",
|
|
929
932
|
maxWidth: "100%",
|
|
930
|
-
overflowX: suppressHorizontalScroll ? "hidden" :
|
|
933
|
+
overflowX: suppressHorizontalScroll ? "hidden" : "auto",
|
|
931
934
|
overflowY: "auto",
|
|
932
935
|
bgcolor: "background.paper",
|
|
933
936
|
willChange: "scroll-position"
|
|
934
|
-
}), [fitToContent, suppressHorizontalScroll,
|
|
937
|
+
}), [fitToContent, suppressHorizontalScroll, isLoading, items.length]);
|
|
935
938
|
const cellDensityStyle = DENSITY_CELL_STYLES[density] ?? DENSITY_CELL_STYLES.normal;
|
|
936
939
|
const renderCellContent = useCallback(
|
|
937
940
|
(item, col, rowIndex, colIdx) => {
|
|
938
|
-
const descriptor = getCellRenderDescriptor(item, col, rowIndex, colIdx, cellDescriptorInputRef.current);
|
|
941
|
+
const descriptor = getCellRenderDescriptor(item, col, rowIndex, colIdx, cellDescriptorInputRef.current, cellDescriptorCacheRef.current);
|
|
939
942
|
const rowId = getRowId(item);
|
|
940
943
|
let cellContent;
|
|
941
944
|
if (descriptor.mode === "editing-inline") {
|
|
@@ -986,7 +989,7 @@ function DataGridTableInner(props) {
|
|
|
986
989
|
}
|
|
987
990
|
return /* @__PURE__ */ jsx(CellErrorBoundary, { onError: onCellError, children: cellContent }, `${rowId}-${col.columnId}`);
|
|
988
991
|
},
|
|
989
|
-
[editCallbacks, interactionHandlers, handleFillHandleMouseDown, setPopoverAnchorEl, cancelPopoverEdit, getRowId, onCellError, cellDescriptorInputRef, cellDensityStyle, pendingEditorValueRef, popoverAnchorElRef]
|
|
992
|
+
[editCallbacks, interactionHandlers, handleFillHandleMouseDown, setPopoverAnchorEl, cancelPopoverEdit, getRowId, onCellError, cellDescriptorInputRef, cellDescriptorCacheRef, cellDensityStyle, pendingEditorValueRef, popoverAnchorElRef]
|
|
990
993
|
);
|
|
991
994
|
return /* @__PURE__ */ jsxs(Box, { sx: gridRootSx, children: [
|
|
992
995
|
/* @__PURE__ */ jsxs(
|
|
@@ -1002,17 +1005,18 @@ function DataGridTableInner(props) {
|
|
|
1002
1005
|
},
|
|
1003
1006
|
onKeyDown: handleGridKeyDown,
|
|
1004
1007
|
onContextMenu: PREVENT_DEFAULT,
|
|
1005
|
-
"data-overflow-x": allowOverflowX ? "true" : "false",
|
|
1006
1008
|
"data-density": density,
|
|
1009
|
+
"data-suppress-scroll": o.suppressHorizontalScroll ? "true" : void 0,
|
|
1007
1010
|
className: "ogrid-mat-wrapper",
|
|
1008
1011
|
sx: wrapperSx,
|
|
1009
1012
|
children: [
|
|
1010
|
-
/* @__PURE__ */ jsx(Box, { sx: WRAPPER_SCROLL_SX, children: /* @__PURE__ */ jsx("div", { style: { minWidth:
|
|
1013
|
+
/* @__PURE__ */ jsx(Box, { sx: WRAPPER_SCROLL_SX, children: /* @__PURE__ */ jsx("div", { style: { minWidth: "100%" }, children: /* @__PURE__ */ jsxs(Box, { ref: tableContainerRef, sx: isLoading && items.length > 0 ? TABLE_WRAPPER_LOADING_SX : TABLE_WRAPPER_SX, style: { width: "max-content", minWidth: "100%", overflow: "clip" }, children: [
|
|
1011
1014
|
/* @__PURE__ */ jsxs(
|
|
1012
1015
|
Table,
|
|
1013
1016
|
{
|
|
1014
1017
|
size: "small",
|
|
1015
|
-
|
|
1018
|
+
role: "grid",
|
|
1019
|
+
sx: { minWidth: "max-content", width: "100%", borderCollapse: "separate", borderSpacing: 0 },
|
|
1016
1020
|
children: [
|
|
1017
1021
|
/* @__PURE__ */ jsx(TableHead, { sx: STICKY_HEADER_SX, children: headerRows.map((row, rowIdx) => /* @__PURE__ */ jsxs(TableRow, { sx: HEADER_ROW_SX, children: [
|
|
1018
1022
|
rowIdx === headerRows.length - 1 && hasCheckboxCol && /* @__PURE__ */ jsx(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alaarab/ogrid-react-material",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.11",
|
|
4
4
|
"description": "OGrid React Material implementation – MUI Table–based data grid with sorting, filtering, pagination, column chooser, spreadsheet selection, and CSV export.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"node": ">=18"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@alaarab/ogrid-react": "2.1.
|
|
42
|
+
"@alaarab/ogrid-react": "2.1.11"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@emotion/react": "^11.0.0",
|