@onesaz/ui 0.3.13 → 0.3.16
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 +126 -97
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3670,7 +3670,7 @@ var Combobox = React34.forwardRef(
|
|
|
3670
3670
|
disabled,
|
|
3671
3671
|
onClick: () => setOpen(!open),
|
|
3672
3672
|
className: cn(
|
|
3673
|
-
"flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
3673
|
+
"flex min-h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm text-left",
|
|
3674
3674
|
"ring-offset-background",
|
|
3675
3675
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
3676
3676
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -4167,7 +4167,7 @@ var ColumnVisibilityDropdown = ({
|
|
|
4167
4167
|
}
|
|
4168
4168
|
),
|
|
4169
4169
|
open && /* @__PURE__ */ jsxs20("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[180px] rounded-md border border-border bg-popover p-2 shadow-md", children: [
|
|
4170
|
-
/* @__PURE__ */ jsx35("div", { className: "text-
|
|
4170
|
+
/* @__PURE__ */ jsx35("div", { className: "text-xs font-medium text-foreground mb-2 px-2", children: "Show/Hide Columns" }),
|
|
4171
4171
|
/* @__PURE__ */ jsx35("div", { className: "max-h-[300px] overflow-auto", children: allColumns.map((column) => {
|
|
4172
4172
|
const meta = column.columnDef.meta;
|
|
4173
4173
|
const headerName = meta?.headerName || column.id;
|
|
@@ -4183,7 +4183,7 @@ var ColumnVisibilityDropdown = ({
|
|
|
4183
4183
|
onChange: (e) => column.toggleVisibility(e.target.checked)
|
|
4184
4184
|
}
|
|
4185
4185
|
),
|
|
4186
|
-
/* @__PURE__ */ jsx35("span", { className: "text-
|
|
4186
|
+
/* @__PURE__ */ jsx35("span", { className: "text-xs", children: headerName })
|
|
4187
4187
|
]
|
|
4188
4188
|
},
|
|
4189
4189
|
column.id
|
|
@@ -4251,19 +4251,19 @@ var DataGridPagination = ({
|
|
|
4251
4251
|
const startRow = currentPage * pageSize + 1;
|
|
4252
4252
|
const endRow = Math.min((currentPage + 1) * pageSize, totalRows);
|
|
4253
4253
|
return /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-end gap-4 px-4 py-3 border-t border-border bg-background", children: [
|
|
4254
|
-
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 text-
|
|
4254
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2 text-xs text-muted-foreground whitespace-nowrap", children: [
|
|
4255
4255
|
/* @__PURE__ */ jsx35("span", { children: "Rows per page:" }),
|
|
4256
4256
|
/* @__PURE__ */ jsx35(
|
|
4257
4257
|
"select",
|
|
4258
4258
|
{
|
|
4259
4259
|
value: pageSize,
|
|
4260
4260
|
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
4261
|
-
className: "h-8 rounded-md border border-border bg-background px-2 text-
|
|
4261
|
+
className: "h-8 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-ring",
|
|
4262
4262
|
children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx35("option", { value: size, children: size }, size))
|
|
4263
4263
|
}
|
|
4264
4264
|
)
|
|
4265
4265
|
] }),
|
|
4266
|
-
/* @__PURE__ */ jsxs20("span", { className: "text-
|
|
4266
|
+
/* @__PURE__ */ jsxs20("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: [
|
|
4267
4267
|
startRow,
|
|
4268
4268
|
"-",
|
|
4269
4269
|
endRow,
|
|
@@ -4402,7 +4402,7 @@ var ExportDropdown = ({
|
|
|
4402
4402
|
/* @__PURE__ */ jsxs20(
|
|
4403
4403
|
"button",
|
|
4404
4404
|
{
|
|
4405
|
-
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-
|
|
4405
|
+
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-xs hover:bg-muted",
|
|
4406
4406
|
onClick: exportToCSV,
|
|
4407
4407
|
children: [
|
|
4408
4408
|
/* @__PURE__ */ jsxs20("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
@@ -4416,7 +4416,7 @@ var ExportDropdown = ({
|
|
|
4416
4416
|
onExport && /* @__PURE__ */ jsxs20(
|
|
4417
4417
|
"button",
|
|
4418
4418
|
{
|
|
4419
|
-
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-
|
|
4419
|
+
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-xs hover:bg-muted",
|
|
4420
4420
|
onClick: handleCustomExport,
|
|
4421
4421
|
children: [
|
|
4422
4422
|
/* @__PURE__ */ jsxs20("svg", { className: "h-4 w-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
@@ -4463,7 +4463,7 @@ var MoreOptionsDropdown = ({
|
|
|
4463
4463
|
open && /* @__PURE__ */ jsx35("div", { className: "absolute right-0 top-full mt-1 z-50 min-w-[160px] rounded-md border border-border bg-popover p-1 shadow-md", children: options.map((option, index) => /* @__PURE__ */ jsxs20(
|
|
4464
4464
|
"button",
|
|
4465
4465
|
{
|
|
4466
|
-
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-
|
|
4466
|
+
className: "flex w-full items-center gap-2 rounded px-3 py-2 text-xs hover:bg-muted",
|
|
4467
4467
|
onClick: () => {
|
|
4468
4468
|
option.onClick();
|
|
4469
4469
|
setOpen(false);
|
|
@@ -4845,91 +4845,117 @@ var PinnedRowsRenderer = ({
|
|
|
4845
4845
|
globalWrapText = false,
|
|
4846
4846
|
columnWidths,
|
|
4847
4847
|
pinnedColumnOffsets,
|
|
4848
|
-
position
|
|
4848
|
+
position,
|
|
4849
|
+
columnVisibility
|
|
4849
4850
|
}) => {
|
|
4850
4851
|
const pinnedTable = useReactTable({
|
|
4851
4852
|
data: pinnedData,
|
|
4852
4853
|
columns: tanstackColumns,
|
|
4853
4854
|
getCoreRowModel: getCoreRowModel(),
|
|
4854
|
-
getRowId: getRowIdFn ? (row) => String(getRowIdFn(row)) : void 0
|
|
4855
|
+
getRowId: getRowIdFn ? (row) => String(getRowIdFn(row)) : void 0,
|
|
4856
|
+
state: { columnVisibility }
|
|
4855
4857
|
});
|
|
4856
4858
|
const pinnedRows = pinnedTable.getRowModel().rows;
|
|
4857
4859
|
if (pinnedRows.length === 0) return null;
|
|
4858
|
-
return /* @__PURE__ */ jsx35(
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4860
|
+
return /* @__PURE__ */ jsx35("tbody", { children: pinnedRows.map((row, rowIndex) => {
|
|
4861
|
+
const customClassName = getRowClassName?.({ row: row.original, rowIndex });
|
|
4862
|
+
const visibleCells = row.getVisibleCells();
|
|
4863
|
+
const colSpanSkipSet = /* @__PURE__ */ new Set();
|
|
4864
|
+
const colSpanValues = /* @__PURE__ */ new Map();
|
|
4865
|
+
visibleCells.forEach((cell, cellIndex) => {
|
|
4866
|
+
if (colSpanSkipSet.has(cellIndex)) return;
|
|
4867
|
+
const meta = cell.column.columnDef.meta;
|
|
4868
|
+
const colSpanDef = meta?.colSpan;
|
|
4869
|
+
if (colSpanDef) {
|
|
4870
|
+
const value = cell.getValue();
|
|
4871
|
+
let span;
|
|
4872
|
+
if (typeof colSpanDef === "function") {
|
|
4873
|
+
span = colSpanDef({ row: row.original, value, field: cell.column.id, rowIndex });
|
|
4874
|
+
} else if (typeof colSpanDef === "number") {
|
|
4875
|
+
span = colSpanDef;
|
|
4876
|
+
}
|
|
4877
|
+
if (span && span > 1) {
|
|
4878
|
+
colSpanValues.set(cellIndex, span);
|
|
4879
|
+
for (let j = 1; j < span && cellIndex + j < visibleCells.length; j++) {
|
|
4880
|
+
colSpanSkipSet.add(cellIndex + j);
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
});
|
|
4885
|
+
return /* @__PURE__ */ jsx35(
|
|
4886
|
+
"tr",
|
|
4887
|
+
{
|
|
4888
|
+
className: cn(
|
|
4889
|
+
"sticky z-[2] border-b border-border bg-muted font-medium",
|
|
4890
|
+
position === "top" && "top-0 border-b-2 border-b-border",
|
|
4891
|
+
position === "bottom" && "bottom-0 border-t-2 border-t-border",
|
|
4892
|
+
customClassName
|
|
4893
|
+
),
|
|
4894
|
+
children: visibleCells.map((cell, cellIndex) => {
|
|
4895
|
+
if (colSpanSkipSet.has(cellIndex)) return null;
|
|
4896
|
+
const meta = cell.column.columnDef.meta;
|
|
4897
|
+
const align = meta?.align || "left";
|
|
4898
|
+
const wrapText = meta?.wrapText !== void 0 ? meta.wrapText : globalWrapText;
|
|
4899
|
+
const scrollable = meta?.scrollable || false;
|
|
4900
|
+
const maxCellHeight = meta?.maxCellHeight || 100;
|
|
4901
|
+
const cellClassName = meta?.cellClassName;
|
|
4902
|
+
const colWidth = columnWidths.get(cell.column.id);
|
|
4903
|
+
const width = colWidth?.width || cell.column.getSize();
|
|
4904
|
+
const pinnedInfo = pinnedColumnOffsets?.get(cell.column.id);
|
|
4905
|
+
const htmlColSpan = colSpanValues.get(cellIndex);
|
|
4906
|
+
let totalWidth = width;
|
|
4907
|
+
if (htmlColSpan && htmlColSpan > 1) {
|
|
4908
|
+
for (let j = 1; j < htmlColSpan && cellIndex + j < visibleCells.length; j++) {
|
|
4909
|
+
const spannedCell = visibleCells[cellIndex + j];
|
|
4910
|
+
const spannedColWidth = columnWidths.get(spannedCell.column.id);
|
|
4911
|
+
totalWidth += spannedColWidth?.width || spannedCell.column.getSize();
|
|
4912
|
+
}
|
|
4913
|
+
}
|
|
4914
|
+
return /* @__PURE__ */ jsx35(
|
|
4915
|
+
"td",
|
|
4916
|
+
{
|
|
4917
|
+
colSpan: htmlColSpan,
|
|
4918
|
+
className: cn(
|
|
4919
|
+
"px-4 overflow-hidden bg-muted border-b border-border",
|
|
4920
|
+
showCellVerticalBorder && "border-r border-border",
|
|
4921
|
+
pinnedInfo && "sticky z-[3]",
|
|
4922
|
+
pinnedInfo?.side === "left" && "border-r border-border",
|
|
4923
|
+
pinnedInfo?.side === "right" && "border-l border-border"
|
|
4924
|
+
),
|
|
4925
|
+
style: {
|
|
4926
|
+
height: wrapText || scrollable ? "auto" : rowHeight,
|
|
4927
|
+
minHeight: rowHeight,
|
|
4928
|
+
textAlign: align,
|
|
4929
|
+
width: htmlColSpan && htmlColSpan > 1 ? totalWidth : width,
|
|
4930
|
+
maxWidth: htmlColSpan && htmlColSpan > 1 ? void 0 : colWidth?.maxWidth || width,
|
|
4931
|
+
minWidth: colWidth?.minWidth || cell.column.columnDef.minSize,
|
|
4932
|
+
...pinnedInfo ? {
|
|
4933
|
+
position: "sticky",
|
|
4934
|
+
[pinnedInfo.side]: pinnedInfo.offset
|
|
4935
|
+
} : {}
|
|
4936
|
+
},
|
|
4937
|
+
children: /* @__PURE__ */ jsx35(
|
|
4938
|
+
"div",
|
|
4889
4939
|
{
|
|
4890
4940
|
className: cn(
|
|
4891
|
-
"
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
pinnedInfo?.side === "left" && "border-r border-border",
|
|
4895
|
-
pinnedInfo?.side === "right" && "border-l border-border"
|
|
4941
|
+
wrapText ? "whitespace-normal break-words" : scrollable ? "overflow-auto" : "truncate",
|
|
4942
|
+
scrollable && "max-h-[100px]",
|
|
4943
|
+
cellClassName
|
|
4896
4944
|
),
|
|
4897
4945
|
style: {
|
|
4898
|
-
|
|
4899
|
-
minHeight: rowHeight,
|
|
4900
|
-
textAlign: align,
|
|
4901
|
-
width,
|
|
4902
|
-
maxWidth: colWidth?.maxWidth || width,
|
|
4903
|
-
minWidth: colWidth?.minWidth || cell.column.columnDef.minSize,
|
|
4904
|
-
...pinnedInfo ? {
|
|
4905
|
-
position: "sticky",
|
|
4906
|
-
[pinnedInfo.side]: pinnedInfo.offset
|
|
4907
|
-
} : {}
|
|
4946
|
+
maxHeight: scrollable ? `${maxCellHeight}px` : void 0
|
|
4908
4947
|
},
|
|
4909
|
-
children:
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
4921
|
-
}
|
|
4922
|
-
)
|
|
4923
|
-
},
|
|
4924
|
-
cell.id
|
|
4925
|
-
);
|
|
4926
|
-
})
|
|
4927
|
-
},
|
|
4928
|
-
row.id
|
|
4929
|
-
);
|
|
4930
|
-
})
|
|
4931
|
-
}
|
|
4932
|
-
);
|
|
4948
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
4949
|
+
}
|
|
4950
|
+
)
|
|
4951
|
+
},
|
|
4952
|
+
cell.id
|
|
4953
|
+
);
|
|
4954
|
+
})
|
|
4955
|
+
},
|
|
4956
|
+
row.id
|
|
4957
|
+
);
|
|
4958
|
+
}) });
|
|
4933
4959
|
};
|
|
4934
4960
|
var ColumnGroupHeader = ({
|
|
4935
4961
|
columnGroupingModel,
|
|
@@ -4985,12 +5011,12 @@ var ColumnGroupHeader = ({
|
|
|
4985
5011
|
});
|
|
4986
5012
|
return cells;
|
|
4987
5013
|
}, [fieldToGroup, gridColumns, columnWidths, columnVisibility, checkboxSelection, pinnedColumnOffsets]);
|
|
4988
|
-
return /* @__PURE__ */ jsx35("tr", { className: "bg-muted
|
|
5014
|
+
return /* @__PURE__ */ jsx35("tr", { className: "bg-muted", children: groupCells.map((cell, idx) => /* @__PURE__ */ jsx35(
|
|
4989
5015
|
"th",
|
|
4990
5016
|
{
|
|
4991
5017
|
colSpan: cell.colSpan,
|
|
4992
5018
|
className: cn(
|
|
4993
|
-
"px-4 text-center font-semibold text-muted-foreground border-b
|
|
5019
|
+
"px-4 text-center font-semibold text-muted-foreground border-b border-border bg-muted overflow-hidden",
|
|
4994
5020
|
showColumnVerticalBorder && "border-r last:border-r-0",
|
|
4995
5021
|
cell.pinnedInfo && "sticky z-[2]"
|
|
4996
5022
|
),
|
|
@@ -5033,7 +5059,7 @@ function DataGrid({
|
|
|
5033
5059
|
height = 400,
|
|
5034
5060
|
minHeight,
|
|
5035
5061
|
maxHeight,
|
|
5036
|
-
density = "
|
|
5062
|
+
density = "compact",
|
|
5037
5063
|
showCellVerticalBorder = false,
|
|
5038
5064
|
showColumnVerticalBorder = false,
|
|
5039
5065
|
hideFooter = false,
|
|
@@ -5056,6 +5082,7 @@ function DataGrid({
|
|
|
5056
5082
|
columnGroupingModel
|
|
5057
5083
|
}) {
|
|
5058
5084
|
const tableContainerRef = React35.useRef(null);
|
|
5085
|
+
const effectiveVirtualized = virtualized && !columns.some((col) => col.rowSpan);
|
|
5059
5086
|
const computedInitialSort = React35.useMemo(() => {
|
|
5060
5087
|
if (initialSortModel && initialSortModel.length > 0) {
|
|
5061
5088
|
return initialSortModel.map((s) => ({ id: s.field, desc: s.sort === "desc" }));
|
|
@@ -5151,7 +5178,7 @@ function DataGrid({
|
|
|
5151
5178
|
data: rows,
|
|
5152
5179
|
columns: tanstackColumns,
|
|
5153
5180
|
getCoreRowModel: getCoreRowModel(),
|
|
5154
|
-
getPaginationRowModel:
|
|
5181
|
+
getPaginationRowModel: effectiveVirtualized ? void 0 : paginationMode === "client" ? getPaginationRowModel() : void 0,
|
|
5155
5182
|
getSortedRowModel: sortingMode === "client" ? getSortedRowModel() : void 0,
|
|
5156
5183
|
getFilteredRowModel: filterMode === "client" ? getFilteredRowModel() : void 0,
|
|
5157
5184
|
getRowId: getRowId ? (row) => String(getRowId(row)) : void 0,
|
|
@@ -5159,7 +5186,7 @@ function DataGrid({
|
|
|
5159
5186
|
sorting,
|
|
5160
5187
|
globalFilter,
|
|
5161
5188
|
rowSelection,
|
|
5162
|
-
pagination:
|
|
5189
|
+
pagination: effectiveVirtualized ? void 0 : pagination,
|
|
5163
5190
|
columnVisibility,
|
|
5164
5191
|
columnSizing
|
|
5165
5192
|
},
|
|
@@ -5170,7 +5197,7 @@ function DataGrid({
|
|
|
5170
5197
|
setRowSelection(newValue);
|
|
5171
5198
|
onRowSelectionModelChange?.(newValue);
|
|
5172
5199
|
},
|
|
5173
|
-
onPaginationChange:
|
|
5200
|
+
onPaginationChange: effectiveVirtualized ? void 0 : (updater) => {
|
|
5174
5201
|
const newValue = typeof updater === "function" ? updater(pagination) : updater;
|
|
5175
5202
|
setPagination(newValue);
|
|
5176
5203
|
onPaginationModelChange?.({ page: newValue.pageIndex, pageSize: newValue.pageSize });
|
|
@@ -5196,10 +5223,10 @@ function DataGrid({
|
|
|
5196
5223
|
}
|
|
5197
5224
|
},
|
|
5198
5225
|
enableRowSelection: checkboxSelection,
|
|
5199
|
-
manualPagination:
|
|
5226
|
+
manualPagination: effectiveVirtualized ? true : paginationMode === "server",
|
|
5200
5227
|
manualSorting: sortingMode === "server",
|
|
5201
5228
|
manualFiltering: filterMode === "server",
|
|
5202
|
-
pageCount:
|
|
5229
|
+
pageCount: effectiveVirtualized ? void 0 : paginationMode === "server" && rowCount ? Math.ceil(rowCount / pagination.pageSize) : void 0
|
|
5203
5230
|
});
|
|
5204
5231
|
const rowHeight = densityRowHeights[density];
|
|
5205
5232
|
const showQuickFilter = slotProps?.toolbar?.showQuickFilter !== false;
|
|
@@ -5225,7 +5252,7 @@ function DataGrid({
|
|
|
5225
5252
|
"div",
|
|
5226
5253
|
{
|
|
5227
5254
|
className: cn(
|
|
5228
|
-
"rounded-lg border border-border bg-background overflow-hidden flex flex-col",
|
|
5255
|
+
"rounded-lg border border-border bg-background overflow-hidden flex flex-col text-xs",
|
|
5229
5256
|
className
|
|
5230
5257
|
),
|
|
5231
5258
|
style: containerStyle,
|
|
@@ -5255,7 +5282,7 @@ function DataGrid({
|
|
|
5255
5282
|
className: "relative flex-1 overflow-auto",
|
|
5256
5283
|
children: [
|
|
5257
5284
|
loading && /* @__PURE__ */ jsx35("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center z-10", children: /* @__PURE__ */ jsx35(Spinner, { size: "lg" }) }),
|
|
5258
|
-
/* @__PURE__ */ jsxs20("table", { className: "w-full border-
|
|
5285
|
+
/* @__PURE__ */ jsxs20("table", { className: "w-full border-separate border-spacing-0 table-fixed", children: [
|
|
5259
5286
|
/* @__PURE__ */ jsx35("colgroup", { children: table.getVisibleLeafColumns().map((column) => {
|
|
5260
5287
|
const colWidth = columnWidths.get(column.id);
|
|
5261
5288
|
return /* @__PURE__ */ jsx35(
|
|
@@ -5270,7 +5297,7 @@ function DataGrid({
|
|
|
5270
5297
|
column.id
|
|
5271
5298
|
);
|
|
5272
5299
|
}) }),
|
|
5273
|
-
/* @__PURE__ */ jsxs20("thead", { className: "sticky top-0 z-[
|
|
5300
|
+
/* @__PURE__ */ jsxs20("thead", { className: "sticky top-0 z-[3] bg-muted", children: [
|
|
5274
5301
|
columnGroupingModel && columnGroupingModel.length > 0 && /* @__PURE__ */ jsx35(
|
|
5275
5302
|
ColumnGroupHeader,
|
|
5276
5303
|
{
|
|
@@ -5294,13 +5321,13 @@ function DataGrid({
|
|
|
5294
5321
|
"th",
|
|
5295
5322
|
{
|
|
5296
5323
|
className: cn(
|
|
5297
|
-
"px-4 text-left font-medium text-muted-foreground border-b border-border bg-muted overflow-hidden relative",
|
|
5324
|
+
"px-4 text-left text-xs font-medium text-muted-foreground border-b border-border bg-muted overflow-hidden relative",
|
|
5298
5325
|
showColumnVerticalBorder && "border-r last:border-r-0",
|
|
5299
5326
|
header.column.getCanSort() && "cursor-pointer select-none hover:bg-muted/80",
|
|
5300
5327
|
// Add cursor class when resizing
|
|
5301
5328
|
header.column.getIsResizing() && "cursor-col-resize",
|
|
5302
5329
|
// Pinned column styling
|
|
5303
|
-
pinnedInfo && "sticky z-[
|
|
5330
|
+
pinnedInfo && "sticky z-[4]",
|
|
5304
5331
|
pinnedInfo?.side === "left" && "border-r border-border",
|
|
5305
5332
|
pinnedInfo?.side === "right" && "border-l border-border"
|
|
5306
5333
|
),
|
|
@@ -5351,10 +5378,11 @@ function DataGrid({
|
|
|
5351
5378
|
globalWrapText: wrapText,
|
|
5352
5379
|
columnWidths,
|
|
5353
5380
|
pinnedColumnOffsets,
|
|
5381
|
+
columnVisibility,
|
|
5354
5382
|
position: "top"
|
|
5355
5383
|
}
|
|
5356
5384
|
),
|
|
5357
|
-
|
|
5385
|
+
effectiveVirtualized ? /* @__PURE__ */ jsx35(
|
|
5358
5386
|
VirtualizedTableBody,
|
|
5359
5387
|
{
|
|
5360
5388
|
table,
|
|
@@ -5400,6 +5428,7 @@ function DataGrid({
|
|
|
5400
5428
|
globalWrapText: wrapText,
|
|
5401
5429
|
columnWidths,
|
|
5402
5430
|
pinnedColumnOffsets,
|
|
5431
|
+
columnVisibility,
|
|
5403
5432
|
position: "bottom"
|
|
5404
5433
|
}
|
|
5405
5434
|
)
|
|
@@ -5407,7 +5436,7 @@ function DataGrid({
|
|
|
5407
5436
|
]
|
|
5408
5437
|
}
|
|
5409
5438
|
),
|
|
5410
|
-
!
|
|
5439
|
+
!effectiveVirtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */ jsx35(
|
|
5411
5440
|
DataGridPagination,
|
|
5412
5441
|
{
|
|
5413
5442
|
table,
|
|
@@ -5416,7 +5445,7 @@ function DataGrid({
|
|
|
5416
5445
|
paginationMode
|
|
5417
5446
|
}
|
|
5418
5447
|
),
|
|
5419
|
-
|
|
5448
|
+
effectiveVirtualized && !hideFooter && /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-end gap-4 px-4 py-3 border-t border-border bg-background", children: /* @__PURE__ */ jsxs20("span", { className: "text-xs text-muted-foreground whitespace-nowrap", children: [
|
|
5420
5449
|
table.getFilteredRowModel().rows.length,
|
|
5421
5450
|
" total rows (virtualized)"
|
|
5422
5451
|
] }) })
|