@postxl/ui-components 1.3.10 → 1.3.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/index.d.ts +260 -257
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3926,11 +3926,12 @@ const DataGridRow = React$29.memo(DataGridRowImpl, (prev, next) => {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
if (prev.selectionSize !== next.selectionSize) return false;
|
|
3928
3928
|
if (prev.visibleColumnIds !== next.visibleColumnIds) return false;
|
|
3929
|
+
if (prev.columnPinningKey !== next.columnPinningKey) return false;
|
|
3929
3930
|
if (prev.isHighlighted !== next.isHighlighted) return false;
|
|
3930
3931
|
if (prev.columnDefsVersion !== next.columnDefsVersion) return false;
|
|
3931
3932
|
return true;
|
|
3932
3933
|
});
|
|
3933
|
-
function DataGridRowImpl({ row, virtualRowIndex, virtualStart, rowVirtualizer, rowMapRef, rowHeight, focusedCell, editingCell: _editingCell, selectionSize: _selectionSize, visibleColumnIds: _visibleColumnIds, columnDefsVersion: _columnDefsVersion, isHighlighted = false, onRowClick, ref, className,...props }) {
|
|
3934
|
+
function DataGridRowImpl({ row, virtualRowIndex, virtualStart, rowVirtualizer, rowMapRef, rowHeight, focusedCell, editingCell: _editingCell, selectionSize: _selectionSize, visibleColumnIds: _visibleColumnIds, columnPinningKey: _columnPinningKey, columnDefsVersion: _columnDefsVersion, isHighlighted = false, onRowClick, ref, className,...props }) {
|
|
3934
3935
|
const rowRef = useComposedRefs(ref, (node) => {
|
|
3935
3936
|
if (node && typeof virtualRowIndex !== "undefined") {
|
|
3936
3937
|
rowVirtualizer.measureElement(node);
|
|
@@ -4144,6 +4145,8 @@ function DataGrid({ dataGridRef, headerRef, rowMapRef, footerRef, table, rowVirt
|
|
|
4144
4145
|
const onRowClick = meta?.onRowClick;
|
|
4145
4146
|
const columnDefsVersion = meta?.columnDefsVersion ?? 0;
|
|
4146
4147
|
const visibleColumnIds = table.getVisibleLeafColumns().map((c) => c.id).join(",");
|
|
4148
|
+
const pinningState = table.getState().columnPinning;
|
|
4149
|
+
const columnPinningKey = `${(pinningState.left ?? []).join(",")}|${(pinningState.right ?? []).join(",")}`;
|
|
4147
4150
|
const prevVisibleColumnIdsRef = React$25.useRef(visibleColumnIds);
|
|
4148
4151
|
if (prevVisibleColumnIdsRef.current !== visibleColumnIds) {
|
|
4149
4152
|
rowMapRef.current.clear();
|
|
@@ -4255,6 +4258,7 @@ function DataGrid({ dataGridRef, headerRef, rowMapRef, footerRef, table, rowVirt
|
|
|
4255
4258
|
editingCell,
|
|
4256
4259
|
selectionSize,
|
|
4257
4260
|
visibleColumnIds,
|
|
4261
|
+
columnPinningKey,
|
|
4258
4262
|
columnDefsVersion,
|
|
4259
4263
|
isHighlighted: highlightedRowIndex === virtualItem.index,
|
|
4260
4264
|
onRowClick
|
|
@@ -5633,6 +5637,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
|
|
|
5633
5637
|
setRenameValue("");
|
|
5634
5638
|
setDeletingViewId(null);
|
|
5635
5639
|
setUpdatingViewId(null);
|
|
5640
|
+
setSearchQuery("");
|
|
5636
5641
|
}
|
|
5637
5642
|
const tableColumnOrder = table.getState().columnOrder;
|
|
5638
5643
|
React$14.useEffect(() => {
|
|
@@ -6005,6 +6010,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
|
|
|
6005
6010
|
isCreating ? /* @__PURE__ */ jsxs("div", {
|
|
6006
6011
|
className: "px-2 pb-2 space-y-1",
|
|
6007
6012
|
children: [/* @__PURE__ */ jsx(Input, {
|
|
6013
|
+
variant: "simple",
|
|
6008
6014
|
value: newViewName,
|
|
6009
6015
|
onChange: (e) => setNewViewName(e.target.value),
|
|
6010
6016
|
onKeyDown: (e) => {
|
|
@@ -6027,7 +6033,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
|
|
|
6027
6033
|
"Share with all users"
|
|
6028
6034
|
]
|
|
6029
6035
|
}), /* @__PURE__ */ jsxs("div", {
|
|
6030
|
-
className: "flex items-center gap-1",
|
|
6036
|
+
className: "ml-auto flex items-center gap-1 py-1",
|
|
6031
6037
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
6032
6038
|
variant: "ghost",
|
|
6033
6039
|
size: "sm",
|
|
@@ -6098,7 +6104,7 @@ function DataGridViewMenu({ table, savedViews, activeViewId, currentUserId, isAd
|
|
|
6098
6104
|
}),
|
|
6099
6105
|
/* @__PURE__ */ jsx("span", {
|
|
6100
6106
|
className: "truncate",
|
|
6101
|
-
children: column.columnDef.meta?.label ?? column.id
|
|
6107
|
+
children: column.columnDef.meta?.label ?? (typeof column.columnDef.header === "string" ? column.columnDef.header : column.id)
|
|
6102
6108
|
}),
|
|
6103
6109
|
/* @__PURE__ */ jsx(CheckIcon$1, { className: cn(
|
|
6104
6110
|
"ml-auto size-4 shrink-0",
|