@codezee/sixtify-brahma 0.2.129 → 0.2.130
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/package.json +4 -1
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.js +7 -0
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.js +7 -0
- package/packages/shared-components/dist/SmartGrid/Components/FilterStatusPanel.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/FilterStatusPanel.js +9 -1
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.d.ts +10 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.js +15 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.d.ts +13 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.js +24 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.d.ts +20 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.js +94 -0
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DebouncedInput.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DebouncedInput.js +2 -0
- package/packages/shared-components/dist/SmartGrid/SmartGrid.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/SmartGrid.js +21 -13
- package/packages/shared-components/dist/SmartGrid/hooks/useCellSelection.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetColumnWidth.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetColumnWidth.js +10 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetDragMethods.d.ts +13 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useGetDragMethods.d.ts.map +1 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useGetDragMethods.js +101 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useGetFacetedFilter.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetFacetedFilter.js +5 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useGetPinStyle.d.ts +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetPinStyle.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetRowSelection.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useGetRowSelection.js +7 -0
- package/packages/shared-components/dist/SmartGrid/hooks/useTableState.d.ts.map +1 -1
- package/packages/shared-components/dist/SmartGrid/hooks/useTableState.js +3 -0
- package/packages/shared-components/dist/SmartGrid/types/index.d.ts +1 -0
- package/packages/shared-components/dist/SmartGrid/types/index.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codezee/sixtify-brahma",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.130",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
"react-hook-form": "^7.51.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@dnd-kit/core": "^6.3.1",
|
|
55
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
56
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
54
57
|
"@emotion/react": "^11.11.4",
|
|
55
58
|
"@emotion/styled": "^11.11.5",
|
|
56
59
|
"@hookform/resolvers": "^3.6.0",
|
package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FacetedFilter.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/FacetedFilter.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAUpD,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,EAAG,8BAG/B,kBAAkB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"FacetedFilter.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/FacetedFilter.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAUpD,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,EAAG,8BAG/B,kBAAkB,CAAC,CAAC,CAAC,4CA0TvB,CAAC"}
|
|
@@ -24,6 +24,7 @@ const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
|
24
24
|
const columnDef = header.column.columnDef;
|
|
25
25
|
const { facetedFilter, filterVariant } = columnDef;
|
|
26
26
|
const { getFilterValue, setFilterValue } = header.column;
|
|
27
|
+
// Check if this column has both faceted filter and filter variant
|
|
27
28
|
const isCombinedFilter = facetedFilter && filterVariant;
|
|
28
29
|
const filterValue = isCombinedFilter
|
|
29
30
|
? (getFilterValue()?.facets ?? [])
|
|
@@ -92,9 +93,12 @@ const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
|
92
93
|
setLocalFilterData(allOptions);
|
|
93
94
|
}
|
|
94
95
|
};
|
|
96
|
+
// useCallback is needed here because handleApply and handleReset are passed as onClick props
|
|
97
|
+
// to Button components, ensuring stable references for event handlers
|
|
95
98
|
const handleApply = (0, react_1.useCallback)(() => {
|
|
96
99
|
if (localFilterData !== undefined) {
|
|
97
100
|
if (isCombinedFilter) {
|
|
101
|
+
// Update only the facets part of the combined filter
|
|
98
102
|
const currentFilter = getFilterValue() ?? {
|
|
99
103
|
facets: [],
|
|
100
104
|
search: "",
|
|
@@ -109,8 +113,11 @@ const FacetedFilter = ({ header, resetAllFilters, }) => {
|
|
|
109
113
|
setIsOpen(false);
|
|
110
114
|
setSearchValue("");
|
|
111
115
|
}, [localFilterData, header.column, isCombinedFilter]);
|
|
116
|
+
// useCallback is needed here because handleApply and handleReset are passed as onClick props
|
|
117
|
+
// to Button components, ensuring stable references for event handlers
|
|
112
118
|
const handleReset = (0, react_1.useCallback)(() => {
|
|
113
119
|
if (isCombinedFilter) {
|
|
120
|
+
// Reset only the facets part of the combined filter
|
|
114
121
|
const currentFilter = getFilterValue() ?? {
|
|
115
122
|
facets: [],
|
|
116
123
|
search: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualCheckboxList.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.tsx"],"names":[],"mappings":"AAGA,KAAK,wBAAwB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,mBAAmB,0EACM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"VirtualCheckboxList.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.tsx"],"names":[],"mappings":"AAGA,KAAK,wBAAwB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,mBAAmB,0EACM,wBAAwB,6CA6J7D,CAAC"}
|
package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.js
CHANGED
|
@@ -28,12 +28,16 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
|
|
|
28
28
|
const visibleItems = (0, react_1.useMemo)(() => {
|
|
29
29
|
return options.slice(visibleRange.start, visibleRange.end);
|
|
30
30
|
}, [options, visibleRange.start, visibleRange.end]);
|
|
31
|
+
// useCallback is used to memoize the handler and prevent unnecessary re-creations
|
|
32
|
+
// when passed to event listeners inside the list items.
|
|
31
33
|
const handleMouseDown = (0, react_1.useCallback)((value) => {
|
|
32
34
|
setIsMouseDown(true);
|
|
33
35
|
const isAlreadyChecked = checkedMap[value];
|
|
34
36
|
setDragMode(isAlreadyChecked ? "unCheck" : "check");
|
|
35
37
|
onToggle(value);
|
|
36
38
|
}, [onToggle, checkedMap]);
|
|
39
|
+
// useCallback ensures stable reference when attached to multiple items’ mouse events,
|
|
40
|
+
// avoiding re-binding on every render and improving performance.
|
|
37
41
|
const handleMouseEnter = (0, react_1.useCallback)((value) => {
|
|
38
42
|
if (isMouseDown && dragMode) {
|
|
39
43
|
const isChecked = checkedMap[value];
|
|
@@ -43,10 +47,13 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
|
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
}, [isMouseDown, dragMode, checkedMap, onToggle]);
|
|
50
|
+
// useCallback memoizes this function so the global mouseup listener
|
|
51
|
+
// remains stable across renders, preventing multiple event bindings.
|
|
46
52
|
const handleMouseUp = (0, react_1.useCallback)(() => {
|
|
47
53
|
setIsMouseDown(false);
|
|
48
54
|
setDragMode(null);
|
|
49
55
|
}, []);
|
|
56
|
+
// Stop drag globally when mouse released anywhere
|
|
50
57
|
(0, react_1.useMemo)(() => {
|
|
51
58
|
document.addEventListener("mouseup", handleMouseUp);
|
|
52
59
|
return () => document.removeEventListener("mouseup", handleMouseUp);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterStatusPanel.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/Components/FilterStatusPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,KAAK,sBAAsB,CAAC,CAAC,IAAI;IAC/B,eAAe,EAAE,QAAQ,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAG,6BAGnC,sBAAsB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"FilterStatusPanel.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/Components/FilterStatusPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,KAAK,sBAAsB,CAAC,CAAC,IAAI;IAC/B,eAAe,EAAE,QAAQ,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAG,6BAGnC,sBAAsB,CAAC,CAAC,CAAC,4CA2I3B,CAAC"}
|
|
@@ -16,20 +16,24 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
|
|
|
16
16
|
overflow: "auto",
|
|
17
17
|
width: "100%",
|
|
18
18
|
}, children: (() => {
|
|
19
|
+
// Helper function to extract filter values from different filter types
|
|
19
20
|
const extractFilterValues = (filter) => {
|
|
20
21
|
if (!filter) {
|
|
21
22
|
return { facets: [], search: [] };
|
|
22
23
|
}
|
|
23
24
|
const { facets: filterFacets, search: filterSearch } = filter;
|
|
25
|
+
// Handle array filters
|
|
24
26
|
if (Array.isArray(filter)) {
|
|
25
27
|
return { facets: filter.map(String), search: [] };
|
|
26
28
|
}
|
|
29
|
+
// Handle primitive filters (string/number)
|
|
27
30
|
if (typeof filter === "string" || typeof filter === "number") {
|
|
28
31
|
return {
|
|
29
32
|
facets: filter !== "" ? [String(filter)] : [],
|
|
30
33
|
search: [],
|
|
31
34
|
};
|
|
32
35
|
}
|
|
36
|
+
// Handle object filters with facets and search
|
|
33
37
|
if (typeof filter === "object" && filter != null) {
|
|
34
38
|
const facets = Array.isArray(filterFacets) ? filterFacets : [];
|
|
35
39
|
const search = filterSearch != null && filterSearch !== ""
|
|
@@ -39,6 +43,7 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
|
|
|
39
43
|
}
|
|
40
44
|
return { facets: [], search: [] };
|
|
41
45
|
};
|
|
46
|
+
// Build applied filters list
|
|
42
47
|
const appliedFilters = getHeaderGroups()
|
|
43
48
|
.flatMap((group) => group.headers)
|
|
44
49
|
.map((header) => {
|
|
@@ -48,6 +53,7 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
|
|
|
48
53
|
return hasValues ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, { flexDirection: "row", gap: "3px", children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "caption", fontWeight: 600, children: [header.column.columnDef.header, ":"] }), facets.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: butterflyBlue[900] }, children: facets.join(", ") })), facets.length > 0 && search.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", children: "," })), search.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: brown[900] }, children: search.join(", ") }))] }, header.id)) : null;
|
|
49
54
|
})
|
|
50
55
|
.filter(Boolean);
|
|
56
|
+
// Don't render if no filters applied
|
|
51
57
|
if (!appliedFilters.length) {
|
|
52
58
|
return null;
|
|
53
59
|
}
|
|
@@ -63,7 +69,9 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
|
|
|
63
69
|
overflow: "hidden",
|
|
64
70
|
textOverflow: "ellipsis",
|
|
65
71
|
whiteSpace: "nowrap",
|
|
66
|
-
}, children: appliedFilters.map((filter, index) => (
|
|
72
|
+
}, children: appliedFilters.map((filter, index) => (
|
|
73
|
+
// eslint-disable-next-line sonarjs/no-array-index-key
|
|
74
|
+
(0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [index > 0 && (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", children: "," }), filter] }, index))) })] }));
|
|
67
75
|
})() }));
|
|
68
76
|
};
|
|
69
77
|
exports.FilterStatusPanel = FilterStatusPanel;
|
package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Header } from "@tanstack/react-table";
|
|
2
|
+
type DraggableHeaderCellProps<T> = {
|
|
3
|
+
defaultGrouping?: (keyof T)[];
|
|
4
|
+
header: Header<T, unknown>;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
resetAllFilters: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const DraggableHeaderCell: <T>({ defaultGrouping, header, loading, resetAllFilters, }: DraggableHeaderCellProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=DraggableHeaderCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DraggableHeaderCell.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/HeaderCells/DraggableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAIpD,KAAK,wBAAwB,CAAC,CAAC,IAAI;IACjC,eAAe,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAG,wDAKrC,wBAAwB,CAAC,CAAC,CAAC,4CAiC7B,CAAC"}
|
package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraggableHeaderCell = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const HeaderCell_1 = require("./HeaderCell");
|
|
6
|
+
const sortable_1 = require("@dnd-kit/sortable");
|
|
7
|
+
const DraggableHeaderCell = ({ defaultGrouping, header, loading, resetAllFilters, }) => {
|
|
8
|
+
const { attributes, isDragging, isOver, listeners, setNodeRef, transform, transition, } = (0, sortable_1.useSortable)({
|
|
9
|
+
id: header.column.id,
|
|
10
|
+
});
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters, dragAttributes: attributes, dragListeners: listeners
|
|
12
|
+
? listeners
|
|
13
|
+
: undefined, dragRef: setNodeRef, dragTransform: transform, dragTransition: transition, isDragging: isDragging, isDragOver: isOver, isReorderable: true }));
|
|
14
|
+
};
|
|
15
|
+
exports.DraggableHeaderCell = DraggableHeaderCell;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Header, HeaderGroup } from "@tanstack/react-table";
|
|
2
|
+
type DraggableHeaderGroupRowsProps<T> = {
|
|
3
|
+
defaultGrouping: (keyof T)[];
|
|
4
|
+
enableSecondRowFilter: boolean;
|
|
5
|
+
headerGroup: HeaderGroup<T>;
|
|
6
|
+
isHeaderReorderable: (header: Header<T, unknown>, isLeafGroup: boolean) => boolean;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
resetAllFilters: boolean;
|
|
9
|
+
swipeableColumns: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const DraggableHeaderGroupRows: <T>({ defaultGrouping, enableSecondRowFilter, headerGroup, isHeaderReorderable, loading, resetAllFilters, swipeableColumns, }: DraggableHeaderGroupRowsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=DraggableHeaderGroupRows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DraggableHeaderGroupRows.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;IACtC,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAC7B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5B,mBAAmB,EAAE,CACnB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,EAC1B,WAAW,EAAE,OAAO,KACjB,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,CAAC,EAAG,2HAQ1C,6BAA6B,CAAC,CAAC,CAAC,4CA0FlC,CAAC"}
|
package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraggableHeaderGroupRows = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const sortable_1 = require("@dnd-kit/sortable");
|
|
6
|
+
const HeaderCell_1 = require("./HeaderCell");
|
|
7
|
+
const DraggableHeaderCell_1 = require("./DraggableHeaderCell");
|
|
8
|
+
const SearchFilterRow_1 = require("../SearchFilterRow/SearchFilterRow");
|
|
9
|
+
const DraggableHeaderGroupRows = ({ defaultGrouping, enableSecondRowFilter, headerGroup, isHeaderReorderable, loading, resetAllFilters, swipeableColumns, }) => {
|
|
10
|
+
const { depth, headers } = headerGroup;
|
|
11
|
+
const leafDepth = depth ?? 0;
|
|
12
|
+
const leftPinnedHeaders = headers.filter((h) => h.column.getIsPinned() === "left");
|
|
13
|
+
const centerHeaders = headers.filter((h) => !h.column.getIsPinned());
|
|
14
|
+
const rightPinnedHeaders = headers.filter((h) => h.column.getIsPinned() === "right");
|
|
15
|
+
const isLeafGroup = depth === leafDepth;
|
|
16
|
+
const reorderableHeaders = centerHeaders.filter((header) => isHeaderReorderable(header, isLeafGroup));
|
|
17
|
+
const sortableItems = reorderableHeaders.map(({ column: { id } }) => id);
|
|
18
|
+
const headerRow = ((0, jsx_runtime_1.jsxs)("tr", { children: [leftPinnedHeaders.map((header) => ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id))), centerHeaders.map((header) => {
|
|
19
|
+
const canReorder = isHeaderReorderable(header, isLeafGroup);
|
|
20
|
+
return canReorder ? ((0, jsx_runtime_1.jsx)(DraggableHeaderCell_1.DraggableHeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id)) : ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id));
|
|
21
|
+
}), rightPinnedHeaders.map((header) => ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id)))] }, `${headerGroup.id}-row`));
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [swipeableColumns && isLeafGroup && sortableItems.length ? ((0, jsx_runtime_1.jsx)(sortable_1.SortableContext, { items: sortableItems, children: headerRow })) : (headerRow), enableSecondRowFilter && !loading && ((0, jsx_runtime_1.jsx)("tr", { children: headerGroup.headers.map((header) => ((0, jsx_runtime_1.jsx)(SearchFilterRow_1.SearchFilterRow, { header: header, resetAllFilters: resetAllFilters }, header.id))) }))] }));
|
|
23
|
+
};
|
|
24
|
+
exports.DraggableHeaderGroupRows = DraggableHeaderGroupRows;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DraggableAttributes } from "@dnd-kit/core";
|
|
2
|
+
import type { Transform } from "@dnd-kit/utilities";
|
|
3
|
+
import { type Header } from "@tanstack/react-table";
|
|
4
|
+
type HeaderCellProps<T> = {
|
|
5
|
+
defaultGrouping?: (keyof T)[];
|
|
6
|
+
dragAttributes?: DraggableAttributes;
|
|
7
|
+
dragListeners?: Record<string, unknown>;
|
|
8
|
+
dragRef?: (node: HTMLTableCellElement | null) => void;
|
|
9
|
+
dragTransform?: Transform | null;
|
|
10
|
+
dragTransition?: string;
|
|
11
|
+
header: Header<T, unknown>;
|
|
12
|
+
isDragOver?: boolean;
|
|
13
|
+
isDragging?: boolean;
|
|
14
|
+
isReorderable?: boolean;
|
|
15
|
+
loading: boolean;
|
|
16
|
+
resetAllFilters: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const HeaderCell: <T>({ defaultGrouping, dragAttributes, dragListeners, dragRef, dragTransform, dragTransition, header, isDragOver, isDragging, isReorderable, loading, resetAllFilters, }: HeaderCellProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=HeaderCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderCell.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/HeaderCells/HeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAMpD,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,uBAAuB,CAAC;AAOhE,KAAK,eAAe,CAAC,CAAC,IAAI;IACxB,eAAe,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,KAAK,IAAI,CAAC;IACtD,aAAa,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,EAAG,sKAa5B,eAAe,CAAC,CAAC,CAAC,4CAyKpB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.HeaderCell = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const utilities_1 = require("@dnd-kit/utilities");
|
|
9
|
+
const BlurOffRounded_1 = __importDefault(require("@mui/icons-material/BlurOffRounded"));
|
|
10
|
+
const BlurOnRounded_1 = __importDefault(require("@mui/icons-material/BlurOnRounded"));
|
|
11
|
+
const DragIndicator_1 = __importDefault(require("@mui/icons-material/DragIndicator"));
|
|
12
|
+
const material_1 = require("@mui/material");
|
|
13
|
+
const react_table_1 = require("@tanstack/react-table");
|
|
14
|
+
const FacetedFilter_1 = require("../FacetedFilter/FacetedFilter");
|
|
15
|
+
const Tooltip_1 = require("../../../Tooltip");
|
|
16
|
+
const useGetSortedColumn_1 = require("../../hooks/useGetSortedColumn");
|
|
17
|
+
const useGetGroupedColumn_1 = require("../../hooks/useGetGroupedColumn");
|
|
18
|
+
const HeaderCell = ({ defaultGrouping, dragAttributes, dragListeners, dragRef, dragTransform, dragTransition, header, isDragOver = false, isDragging = false, isReorderable = false, loading = false, resetAllFilters, }) => {
|
|
19
|
+
const theme = (0, material_1.useTheme)();
|
|
20
|
+
const { butterflyBlue, iron, slate } = theme.palette.app.color;
|
|
21
|
+
const { isSortable, mutipleSortCounts, sortableIcon } = (0, useGetSortedColumn_1.useGetSortedColumn)({
|
|
22
|
+
header,
|
|
23
|
+
});
|
|
24
|
+
const { groupedIndex, isGroupable, isGrouped } = (0, useGetGroupedColumn_1.useGetGroupedColumn)({
|
|
25
|
+
header,
|
|
26
|
+
});
|
|
27
|
+
const { columnDef, getAfter, getCanResize, getIsPinned, getSize, getStart, getToggleGroupingHandler, getToggleSortingHandler, } = header.column;
|
|
28
|
+
const showFacetedFilter = columnDef?.facetedFilter;
|
|
29
|
+
const headerDynamicWidth = getIsPinned() ? getSize() - 8 : getSize();
|
|
30
|
+
const transformStyle = dragTransform
|
|
31
|
+
? utilities_1.CSS.Transform.toString(dragTransform)
|
|
32
|
+
: undefined;
|
|
33
|
+
const backgroundColor = isReorderable && isDragOver ? slate[700] : slate[800];
|
|
34
|
+
const draggableAttributes = dragAttributes ?? {};
|
|
35
|
+
const draggableListeners = dragListeners ?? {};
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("th", { colSpan: header.colSpan, "data-column-id": header.id, ref: dragRef, style: {
|
|
37
|
+
backgroundColor,
|
|
38
|
+
borderBottom: `1px solid ${iron[700]}`,
|
|
39
|
+
height: "40px",
|
|
40
|
+
left: getIsPinned() === "left" ? `${getStart("left")}px` : undefined,
|
|
41
|
+
maxWidth: headerDynamicWidth,
|
|
42
|
+
minWidth: headerDynamicWidth,
|
|
43
|
+
opacity: isDragging ? 0.85 : 1,
|
|
44
|
+
padding: "0px 0px 0px 8px",
|
|
45
|
+
position: getIsPinned() ? "sticky" : "relative",
|
|
46
|
+
right: getIsPinned() === "right" ? `${getAfter("right")}px` : undefined,
|
|
47
|
+
textAlign: "left",
|
|
48
|
+
transform: transformStyle,
|
|
49
|
+
transition: dragTransition,
|
|
50
|
+
width: headerDynamicWidth,
|
|
51
|
+
zIndex: getIsPinned() ? 3 : 1,
|
|
52
|
+
}, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
|
|
53
|
+
alignItems: "center",
|
|
54
|
+
borderRight: `2px solid ${iron[700]}`,
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexGrow: 1,
|
|
57
|
+
gap: "8px",
|
|
58
|
+
}, children: [isReorderable && !loading && ((0, jsx_runtime_1.jsx)("span", { ...draggableAttributes, ...draggableListeners, style: {
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
color: iron[400],
|
|
61
|
+
cursor: isDragging ? "grabbing" : "grab",
|
|
62
|
+
display: "flex",
|
|
63
|
+
paddingRight: "2px",
|
|
64
|
+
touchAction: "none",
|
|
65
|
+
}, children: (0, jsx_runtime_1.jsx)(DragIndicator_1.default, { fontSize: "small" }) })), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", { style: {
|
|
66
|
+
color: iron[400],
|
|
67
|
+
fontFamily: "Poppins",
|
|
68
|
+
fontSize: "14px",
|
|
69
|
+
fontWeight: 600,
|
|
70
|
+
lineHeight: "20px",
|
|
71
|
+
overflow: "hidden",
|
|
72
|
+
textOverflow: "ellipsis",
|
|
73
|
+
textWrap: "nowrap",
|
|
74
|
+
}, children: !header.isPlaceholder &&
|
|
75
|
+
(0, react_table_1.flexRender)(columnDef.header, header.getContext()) }) }), showFacetedFilter && !loading && ((0, jsx_runtime_1.jsx)(FacetedFilter_1.FacetedFilter, { header: header, resetAllFilters: resetAllFilters })), isSortable && !loading && ((0, jsx_runtime_1.jsxs)(Tooltip_1.Tooltip, { toolTipLabel: "Sorting", children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: { padding: 0 }, onClick: getToggleSortingHandler(), children: sortableIcon }), isSortable && mutipleSortCounts > 0 && ((0, jsx_runtime_1.jsxs)(material_1.Typography, { color: iron[400], variant: "body2", children: ["(", mutipleSortCounts + 1, ")"] }))] })), isGroupable && !defaultGrouping?.length && !loading && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: getToggleGroupingHandler(),
|
|
76
|
+
style: {
|
|
77
|
+
cursor: "pointer",
|
|
78
|
+
padding: 0,
|
|
79
|
+
}, children: isGrouped && !loading ? ((0, jsx_runtime_1.jsxs)(Tooltip_1.Tooltip, { toolTipLabel: "Ungroup", children: [(0, jsx_runtime_1.jsx)(BlurOffRounded_1.default, {}), " ", `(${groupedIndex + 1}) `] })) : ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: "Grouping", children: (0, jsx_runtime_1.jsx)(BlurOnRounded_1.default, {}) })) }))] }), getCanResize() && !loading && ((0, jsx_runtime_1.jsx)("div", { style: {
|
|
80
|
+
background: "transparent",
|
|
81
|
+
cursor: "col-resize",
|
|
82
|
+
height: "100%",
|
|
83
|
+
position: "absolute",
|
|
84
|
+
right: 0,
|
|
85
|
+
top: 0,
|
|
86
|
+
width: "3px",
|
|
87
|
+
zIndex: 1,
|
|
88
|
+
}, onMouseDown: header.getResizeHandler(), onMouseEnter: (e) => {
|
|
89
|
+
e.currentTarget.style.backgroundColor = butterflyBlue[900];
|
|
90
|
+
}, onMouseLeave: (e) => {
|
|
91
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
92
|
+
} }))] }));
|
|
93
|
+
};
|
|
94
|
+
exports.HeaderCell = HeaderCell;
|
package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DebouncedInput.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebouncedInput.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/SearchFilterRow/DebouncedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAI/D,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc,GAAI,yFAQ5B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"DebouncedInput.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/SearchFilterRow/DebouncedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAI/D,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc,GAAI,yFAQ5B,mBAAmB,4CA0CrB,CAAC"}
|
package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DebouncedInput.js
CHANGED
|
@@ -8,9 +8,11 @@ const usehooks_ts_1 = require("usehooks-ts");
|
|
|
8
8
|
const DebouncedInput = ({ debounce = 500, inputFontSize = "14px", inputHeight = "10px", onChange, type = "text", value: initialValue, ...props }) => {
|
|
9
9
|
const [value, setValue] = (0, react_1.useState)(initialValue);
|
|
10
10
|
const [debouncedValue] = (0, usehooks_ts_1.useDebounceValue)(value, debounce);
|
|
11
|
+
// Sync local state when initialValue changes from parent
|
|
11
12
|
(0, react_1.useEffect)(() => {
|
|
12
13
|
setValue(initialValue);
|
|
13
14
|
}, [initialValue]);
|
|
15
|
+
// Call onChange when debounced value changes
|
|
14
16
|
(0, react_1.useEffect)(() => {
|
|
15
17
|
if (debouncedValue !== initialValue) {
|
|
16
18
|
onChange(debouncedValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartGrid.d.ts","sourceRoot":"","sources":["../../src/SmartGrid/SmartGrid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SmartGrid.d.ts","sourceRoot":"","sources":["../../src/SmartGrid/SmartGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAON,MAAM,OAAO,CAAC;AAef,OAAO,KAAK,EAEV,cAAc,EAGf,MAAM,SAAS,CAAC;AA+BjB,KAAK,aAAa,GAAG,KAAK,CAAC,yBAAyB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,GAC3E,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAErE,eAAO,MAAM,SAAS,EAgYjB,aAAa,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SmartGrid = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const core_1 = require("@dnd-kit/core");
|
|
5
6
|
const material_1 = require("@mui/material");
|
|
6
7
|
const react_virtual_1 = require("@tanstack/react-virtual");
|
|
7
8
|
const react_1 = require("react");
|
|
@@ -19,6 +20,8 @@ const useGetColumnWidth_1 = require("./hooks/useGetColumnWidth");
|
|
|
19
20
|
const useGetRowSelection_1 = require("./hooks/useGetRowSelection");
|
|
20
21
|
const useTableState_1 = require("./hooks/useTableState");
|
|
21
22
|
const summaryCalculations_1 = require("./utils/summaryCalculations");
|
|
23
|
+
const useGetDragMethods_1 = require("./hooks/useGetDragMethods");
|
|
24
|
+
const DraggableHeaderGroupRows_1 = require("./Components/HeaderCells/DraggableHeaderGroupRows");
|
|
22
25
|
const calculateGroupSummary = (groupRow, globalSummary, dynamicSummaryConfig) => {
|
|
23
26
|
const { subRows } = groupRow;
|
|
24
27
|
if (dynamicSummaryConfig && subRows) {
|
|
@@ -27,7 +30,7 @@ const calculateGroupSummary = (groupRow, globalSummary, dynamicSummaryConfig) =>
|
|
|
27
30
|
}
|
|
28
31
|
return globalSummary ? globalSummary : {};
|
|
29
32
|
};
|
|
30
|
-
exports.SmartGrid = (0, react_1.forwardRef)(({ defaultGrouping = [], dynamicRowSelection = () => true, emptyMessage = "No data found", enableCellSelection = false, exportActions = [], exportData = false, height = "calc(100vh - 130px)", loading = false, rowHeight = 38, rowSelection = false, totalCount = 0, ...props }, ref) => {
|
|
33
|
+
exports.SmartGrid = (0, react_1.forwardRef)(({ defaultGrouping = [], dynamicRowSelection = () => true, emptyMessage = "No data found", enableCellSelection = false, exportActions = [], exportData = false, height = "calc(100vh - 130px)", loading = false, rowHeight = 38, rowSelection = false, swipeableColumns = false, totalCount = 0, ...props }, ref) => {
|
|
31
34
|
const theme = (0, material_1.useTheme)();
|
|
32
35
|
const { butterflyBlue } = theme.palette.app.color;
|
|
33
36
|
const [resetAllFilters, setResetAllFilters] = (0, react_1.useState)(false);
|
|
@@ -49,7 +52,11 @@ exports.SmartGrid = (0, react_1.forwardRef)(({ defaultGrouping = [], dynamicRowS
|
|
|
49
52
|
});
|
|
50
53
|
const { getHeaderGroups, getRowModel, getSelectedRowModel } = table;
|
|
51
54
|
const rows = getRowModel().rows;
|
|
52
|
-
//
|
|
55
|
+
// Drag and drop Methoda
|
|
56
|
+
const { handleDragEnd, isHeaderReorderable, sensors } = (0, useGetDragMethods_1.useGetDragMethods)({
|
|
57
|
+
swipeableColumns,
|
|
58
|
+
table,
|
|
59
|
+
});
|
|
53
60
|
const cellSelection = (0, useCellSelection_1.useCellSelection)({
|
|
54
61
|
enabled: enableCellSelection,
|
|
55
62
|
table,
|
|
@@ -126,6 +133,7 @@ exports.SmartGrid = (0, react_1.forwardRef)(({ defaultGrouping = [], dynamicRowS
|
|
|
126
133
|
setResetAllFilters(false);
|
|
127
134
|
}, 100);
|
|
128
135
|
};
|
|
136
|
+
const headerGroups = getHeaderGroups();
|
|
129
137
|
return ((0, jsx_runtime_1.jsxs)(CellSelectionContext_1.CellSelectionProvider, { value: {
|
|
130
138
|
...cellSelection,
|
|
131
139
|
enabled: enableCellSelection,
|
|
@@ -163,17 +171,17 @@ exports.SmartGrid = (0, react_1.forwardRef)(({ defaultGrouping = [], dynamicRowS
|
|
|
163
171
|
position: "sticky",
|
|
164
172
|
top: 0,
|
|
165
173
|
zIndex: 10,
|
|
166
|
-
}, children:
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
}, children: swipeableColumns ? ((0, jsx_runtime_1.jsx)(core_1.DndContext, { sensors: sensors, collisionDetection: core_1.closestCenter, onDragEnd: handleDragEnd, children: headerGroups.map((headerGroup) => {
|
|
175
|
+
return ((0, jsx_runtime_1.jsx)(DraggableHeaderGroupRows_1.DraggableHeaderGroupRows, { defaultGrouping: defaultGrouping, enableSecondRowFilter: enableSecondRowFilter, headerGroup: headerGroup, isHeaderReorderable: isHeaderReorderable, loading: loading, resetAllFilters: resetAllFilters, swipeableColumns: swipeableColumns }, headerGroup.id));
|
|
176
|
+
}) })) : (headerGroups.map((headerGroup) => {
|
|
177
|
+
const leftPinnedHeaders = headerGroup.headers.filter((h) => h.column.getIsPinned() === "left");
|
|
178
|
+
const centerHeaders = headerGroup.headers.filter((h) => !h.column.getIsPinned());
|
|
179
|
+
const rightPinnedHeaders = headerGroup.headers.filter((h) => h.column.getIsPinned() === "right");
|
|
180
|
+
const headerRow = ((0, jsx_runtime_1.jsxs)("tr", { children: [leftPinnedHeaders.map((header) => ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id))), centerHeaders.map((header) => {
|
|
181
|
+
return ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id));
|
|
182
|
+
}), rightPinnedHeaders.map((header) => ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { defaultGrouping: defaultGrouping, header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id)))] }, `${headerGroup.id}-row`));
|
|
183
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [headerRow, enableSecondRowFilter && !loading && ((0, jsx_runtime_1.jsx)("tr", { children: headerGroup.headers.map((header) => ((0, jsx_runtime_1.jsx)(SearchFilterRow_1.SearchFilterRow, { header: header, resetAllFilters: resetAllFilters }, header.id))) }))] }, headerGroup.id));
|
|
184
|
+
})) }), (0, jsx_runtime_1.jsx)("tbody", { style: {
|
|
177
185
|
filter: loading ? "blur(2px)" : "none",
|
|
178
186
|
height: `${rowVirtualizer.getTotalSize()}px`,
|
|
179
187
|
position: "relative",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCellSelection.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useCellSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useCellSelection.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useCellSelection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAA2B,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE5E,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,qBAGjC,oBAAoB,CAAC,CAAC,CAAC;;;gCAsMqB,MAAM,EAAE,EAAE;4BAhB7C,MAAM,YAAY,MAAM,KAAG,OAAO;;;gCAlGlC,MAAM,YAAY,MAAM,iBAAgB,OAAO;;iCA0C/C,MAAM,YAAY,MAAM;CA+KnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetColumnWidth.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetColumnWidth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,sBAAsB,CAAC,CAAC,IAAI;IAC/B,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;IACpD,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,gCAIlC,sBAAsB,CAAC,CAAC,CAAC;;
|
|
1
|
+
{"version":3,"file":"useGetColumnWidth.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetColumnWidth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,sBAAsB,CAAC,CAAC,IAAI;IAC/B,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;IACpD,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,gCAIlC,sBAAsB,CAAC,CAAC,CAAC;;CA4E3B,CAAC"}
|
|
@@ -6,10 +6,13 @@ const useGetColumnWidth = ({ columns, headerRef, table, }) => {
|
|
|
6
6
|
const [columnWidths, setColumnWidths] = (0, react_1.useState)([]);
|
|
7
7
|
const { getColumn, getRowModel, getState } = table;
|
|
8
8
|
const columnSizing = getState().columnSizing;
|
|
9
|
+
const columnOrder = getState().columnOrder;
|
|
9
10
|
const rowDataLength = getRowModel().rows.length;
|
|
10
11
|
const updateColumnWidths = (0, react_1.useCallback)(() => {
|
|
11
12
|
if (headerRef.current) {
|
|
13
|
+
// Find all header rows
|
|
12
14
|
const headerRows = headerRef.current.querySelectorAll("tr");
|
|
15
|
+
// Get the last row which contains the actual data column headers (not grouped headers)
|
|
13
16
|
const lastHeaderRow = headerRows[headerRows.length - 1];
|
|
14
17
|
if (lastHeaderRow) {
|
|
15
18
|
const headerCells = lastHeaderRow.querySelectorAll("th");
|
|
@@ -50,7 +53,13 @@ const useGetColumnWidth = ({ columns, headerRef, table, }) => {
|
|
|
50
53
|
window.removeEventListener("resize", updateColumnWidths);
|
|
51
54
|
observer.disconnect();
|
|
52
55
|
};
|
|
53
|
-
}, [
|
|
56
|
+
}, [
|
|
57
|
+
columnSizing,
|
|
58
|
+
columnOrder,
|
|
59
|
+
columns.length,
|
|
60
|
+
rowDataLength,
|
|
61
|
+
updateColumnWidths,
|
|
62
|
+
]);
|
|
54
63
|
return { columnWidths };
|
|
55
64
|
};
|
|
56
65
|
exports.useGetColumnWidth = useGetColumnWidth;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type DragEndEvent } from "@dnd-kit/core";
|
|
2
|
+
import type { Header, Table } from "@tanstack/react-table";
|
|
3
|
+
type UseGetDragMethodsArgs<T> = {
|
|
4
|
+
swipeableColumns: boolean;
|
|
5
|
+
table: Table<T>;
|
|
6
|
+
};
|
|
7
|
+
export declare const useGetDragMethods: <T>({ swipeableColumns, table, }: UseGetDragMethodsArgs<T>) => {
|
|
8
|
+
handleDragEnd: (event: DragEndEvent) => void;
|
|
9
|
+
isHeaderReorderable: (header: Header<T, unknown>, isLeaf: boolean) => boolean;
|
|
10
|
+
sensors: import("@dnd-kit/core").SensorDescriptor<import("@dnd-kit/core").SensorOptions>[];
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=useGetDragMethods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetDragMethods.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetDragMethods.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAI3D,KAAK,qBAAqB,CAAC,CAAC,IAAI;IAC9B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,8BAGlC,qBAAqB,CAAC,CAAC,CAAC;2BA0Df,YAAY;kCAjCX,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,OAAO;;CAoH/C,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGetDragMethods = void 0;
|
|
4
|
+
const core_1 = require("@dnd-kit/core");
|
|
5
|
+
const sortable_1 = require("@dnd-kit/sortable");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const useGetDragMethods = ({ swipeableColumns, table, }) => {
|
|
8
|
+
// Memoize non-reorderable column IDs to avoid recreating the Set on every render
|
|
9
|
+
const nonReorderableColumnIds = (0, react_1.useMemo)(() => new Set(["select", "action"]), []);
|
|
10
|
+
// Initialize DnD sensors with pointer detection and minimal activation distance
|
|
11
|
+
const sensors = (0, core_1.useSensors)((0, core_1.useSensor)(core_1.PointerSensor, {
|
|
12
|
+
activationConstraint: {
|
|
13
|
+
distance: 5,
|
|
14
|
+
},
|
|
15
|
+
}));
|
|
16
|
+
/**
|
|
17
|
+
* useCallback is used here to memoize the function
|
|
18
|
+
* so it doesn’t get re-created on every render.
|
|
19
|
+
*
|
|
20
|
+
* Checks if a header (column) is reorderable.
|
|
21
|
+
* Returns false for pinned, placeholder, or disabled columns.
|
|
22
|
+
*/
|
|
23
|
+
const isHeaderReorderable = (0, react_1.useCallback)((header, isLeaf) => {
|
|
24
|
+
if (!swipeableColumns || !isLeaf || header.isPlaceholder) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
const columnId = header.column.id;
|
|
28
|
+
const columnDef = header.column.columnDef;
|
|
29
|
+
const accessorKey = columnDef?.accessorKey;
|
|
30
|
+
const { enableColumnOrdering } = columnDef;
|
|
31
|
+
return (enableColumnOrdering !== false &&
|
|
32
|
+
accessorKey !== "action" &&
|
|
33
|
+
!nonReorderableColumnIds.has(columnId));
|
|
34
|
+
}, [swipeableColumns, nonReorderableColumnIds]);
|
|
35
|
+
/**
|
|
36
|
+
* useCallback is used again to memoize `handleDragEnd`
|
|
37
|
+
* to ensure stable reference across renders.
|
|
38
|
+
*
|
|
39
|
+
* Handles column drag-and-drop reordering:
|
|
40
|
+
* - Skips pinned columns
|
|
41
|
+
* - Updates the column order in the TanStack Table instance
|
|
42
|
+
*/
|
|
43
|
+
const handleDragEnd = (0, react_1.useCallback)((event) => {
|
|
44
|
+
if (!swipeableColumns) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const { active, over } = event;
|
|
48
|
+
if (!over || active.id === over.id) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const activeId = String(active.id);
|
|
52
|
+
const overId = String(over.id);
|
|
53
|
+
const activeColumn = table.getColumn(activeId);
|
|
54
|
+
const overColumn = table.getColumn(overId);
|
|
55
|
+
if (!activeColumn || !overColumn) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (activeColumn.getIsPinned() || overColumn.getIsPinned()) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const allLeafColumns = table.getAllLeafColumns();
|
|
62
|
+
const currentOrder = table.getState().columnOrder.length > 0
|
|
63
|
+
? table.getState().columnOrder
|
|
64
|
+
: allLeafColumns.map((column) => column.id);
|
|
65
|
+
const { center, left, right } = currentOrder.reduce((acc, columnId) => {
|
|
66
|
+
const column = table.getColumn(columnId);
|
|
67
|
+
if (!column) {
|
|
68
|
+
return acc;
|
|
69
|
+
}
|
|
70
|
+
const pinState = column.getIsPinned();
|
|
71
|
+
if (pinState === "left") {
|
|
72
|
+
acc.left.push(columnId);
|
|
73
|
+
}
|
|
74
|
+
else if (pinState === "right") {
|
|
75
|
+
acc.right.push(columnId);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
acc.center.push(columnId);
|
|
79
|
+
}
|
|
80
|
+
return acc;
|
|
81
|
+
}, {
|
|
82
|
+
center: [],
|
|
83
|
+
left: [],
|
|
84
|
+
right: [],
|
|
85
|
+
});
|
|
86
|
+
const activeIndex = center.indexOf(activeId);
|
|
87
|
+
const overIndex = center.indexOf(overId);
|
|
88
|
+
if (activeIndex === -1 || overIndex === -1) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const updatedCenterOrder = (0, sortable_1.arrayMove)(center, activeIndex, overIndex);
|
|
92
|
+
const newOrder = [...left, ...updatedCenterOrder, ...right];
|
|
93
|
+
table.setColumnOrder(newOrder);
|
|
94
|
+
}, [swipeableColumns, table]);
|
|
95
|
+
return {
|
|
96
|
+
handleDragEnd,
|
|
97
|
+
isHeaderReorderable,
|
|
98
|
+
sensors,
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
exports.useGetDragMethods = useGetDragMethods;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetFacetedFilter.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetFacetedFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,UAAU,CAAC;AAE7D,KAAK,wBAAwB,CAAC,CAAC,IAAI;IACjC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAE,cAEpC,wBAAwB,CAAC,CAAC,CAAC;;;;;
|
|
1
|
+
{"version":3,"file":"useGetFacetedFilter.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetFacetedFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,UAAU,CAAC;AAE7D,KAAK,wBAAwB,CAAC,CAAC,IAAI;IACjC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,CAAC,EAAE,cAEpC,wBAAwB,CAAC,CAAC,CAAC;;;;;CAiK7B,CAAC"}
|
|
@@ -22,14 +22,17 @@ const useGetFacetedFilter = ({ columns, }) => {
|
|
|
22
22
|
}
|
|
23
23
|
const cellValue = row.getValue(columnId);
|
|
24
24
|
const cellValueStr = cellValue != null ? String(cellValue) : "";
|
|
25
|
+
// Handle combined filter object
|
|
25
26
|
if (typeof filterValue === "object" && !Array.isArray(filterValue)) {
|
|
26
27
|
const combinedFilterValue = filterValue;
|
|
27
28
|
const { facets, search } = combinedFilterValue;
|
|
28
29
|
let matches = true;
|
|
30
|
+
// Check search filter
|
|
29
31
|
if (search && search.trim() !== "") {
|
|
30
32
|
matches =
|
|
31
33
|
matches && cellValueStr.toLowerCase().includes(search.toLowerCase());
|
|
32
34
|
}
|
|
35
|
+
// Check facets filter
|
|
33
36
|
if (facets && facets.length > 0) {
|
|
34
37
|
matches =
|
|
35
38
|
matches &&
|
|
@@ -37,6 +40,7 @@ const useGetFacetedFilter = ({ columns, }) => {
|
|
|
37
40
|
}
|
|
38
41
|
return matches;
|
|
39
42
|
}
|
|
43
|
+
// Fallback to original logic for backward compatibility
|
|
40
44
|
if (Array.isArray(filterValue)) {
|
|
41
45
|
return filterValue.some((filterVal) => String(filterVal) === cellValueStr);
|
|
42
46
|
}
|
|
@@ -84,6 +88,7 @@ const useGetFacetedFilter = ({ columns, }) => {
|
|
|
84
88
|
return columns.map((col) => {
|
|
85
89
|
const appCol = col;
|
|
86
90
|
const { facetedFilter, filterVariant } = appCol;
|
|
91
|
+
// If column has both facetedFilter and filterVariant, use combined filter
|
|
87
92
|
if (facetedFilter && filterVariant) {
|
|
88
93
|
return {
|
|
89
94
|
...col,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Cell } from "@tanstack/react-table";
|
|
2
2
|
import { type CSSProperties } from "react";
|
|
3
3
|
export declare const useGetPinStyle: <T>() => (cell: Cell<T, unknown>, cellIndex: number, allCells: Cell<T, unknown>[]) => CSSProperties;
|
|
4
4
|
//# sourceMappingURL=useGetPinStyle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetPinStyle.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetPinStyle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useGetPinStyle.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetPinStyle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAExD,eAAO,MAAM,cAAc,GAAI,CAAC,cAOpB,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,aACX,MAAM,YACP,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,KAC3B,aAsCN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetRowSelection.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetRowSelection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,uBAAuB,CAAC,CAAC,IAAI;IAChC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACjC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC;IAC9C,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAG,uDAIpC,uBAAuB,CAAC,CAAC,CAAC;;
|
|
1
|
+
{"version":3,"file":"useGetRowSelection.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useGetRowSelection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,uBAAuB,CAAC,CAAC,IAAI;IAChC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACjC,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC;IAC9C,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAG,uDAIpC,uBAAuB,CAAC,CAAC,CAAC;;CAqI5B,CAAC"}
|
|
@@ -5,7 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const IndeterminateCheckbox_1 = require("../Components/IndeterminateCheckbox");
|
|
7
7
|
const useGetRowSelection = ({ defaultColumn, dynamicRowSelection, rowSelection, }) => {
|
|
8
|
+
// Stable cell renderer
|
|
8
9
|
const renderSelectionCell = (0, react_1.useCallback)((info) => {
|
|
10
|
+
// Check if row is selectable
|
|
9
11
|
const isSelectable = dynamicRowSelection
|
|
10
12
|
? dynamicRowSelection(info.row.original)
|
|
11
13
|
: true;
|
|
@@ -14,13 +16,17 @@ const useGetRowSelection = ({ defaultColumn, dynamicRowSelection, rowSelection,
|
|
|
14
16
|
}
|
|
15
17
|
return ((0, jsx_runtime_1.jsx)(IndeterminateCheckbox_1.IndeterminateCheckbox, { checked: info.row.getIsSelected(), disabled: !info.row.getCanSelect(), indeterminate: info.row.getIsSomeSelected(), onChange: info.row.getToggleSelectedHandler() }));
|
|
16
18
|
}, [dynamicRowSelection]);
|
|
19
|
+
// Stable header renderer
|
|
17
20
|
const renderSelectionHeader = (0, react_1.useCallback)((info) => {
|
|
18
21
|
if (!dynamicRowSelection) {
|
|
22
|
+
// Fast path: no dynamic selection
|
|
19
23
|
return ((0, jsx_runtime_1.jsx)(IndeterminateCheckbox_1.IndeterminateCheckbox, { checked: info.table.getIsAllRowsSelected(), indeterminate: info.table.getIsSomeRowsSelected(), onChange: info.table.getToggleAllRowsSelectedHandler() }));
|
|
20
24
|
}
|
|
25
|
+
// Use a simple event handler that doesn't rely on state
|
|
21
26
|
const handleToggleAll = (e) => {
|
|
22
27
|
const { checked } = e.target;
|
|
23
28
|
const rows = info.table.getRowModel().rows;
|
|
29
|
+
// Use table's batch selection for better performance
|
|
24
30
|
info.table.setRowSelection((old) => {
|
|
25
31
|
const newSelection = { ...old };
|
|
26
32
|
// eslint-disable-next-line sonarjs/no-nested-functions
|
|
@@ -37,6 +43,7 @@ const useGetRowSelection = ({ defaultColumn, dynamicRowSelection, rowSelection,
|
|
|
37
43
|
return newSelection;
|
|
38
44
|
});
|
|
39
45
|
};
|
|
46
|
+
// Calculate state only when rendering, not in event handler
|
|
40
47
|
const rows = info.table.getRowModel().rows;
|
|
41
48
|
const rowSelection = info.table.getState().rowSelection;
|
|
42
49
|
let selectableCount = 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableState.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useTableState.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTableState.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/hooks/useTableState.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,OAAO,cAAc,CAAC,CAAC,CAAC;;CAqFxD,CAAC"}
|
|
@@ -19,6 +19,7 @@ const useTableState = (props) => {
|
|
|
19
19
|
});
|
|
20
20
|
const [columnPinning, setColumnPinning] = (0, react_1.useState)(initialPinning);
|
|
21
21
|
const [columnFilters, setColumnFilters] = (0, react_1.useState)([]);
|
|
22
|
+
const [columnOrder, setColumnOrder] = (0, react_1.useState)([]);
|
|
22
23
|
const { enableExpanding = true, enableGrouping = true, enablePinning = hasPinnedColumns, enableRowSelection = true, enableSorting = true, } = props;
|
|
23
24
|
const table = (0, react_table_1.useReactTable)({
|
|
24
25
|
autoResetExpanded: false,
|
|
@@ -46,6 +47,7 @@ const useTableState = (props) => {
|
|
|
46
47
|
getGroupedRowModel: (0, react_table_1.getGroupedRowModel)(),
|
|
47
48
|
getSortedRowModel: (0, react_table_1.getSortedRowModel)(),
|
|
48
49
|
onColumnFiltersChange: setColumnFilters,
|
|
50
|
+
onColumnOrderChange: setColumnOrder,
|
|
49
51
|
onColumnPinningChange: setColumnPinning,
|
|
50
52
|
onExpandedChange: setExpanded,
|
|
51
53
|
onGroupingChange: setGrouping,
|
|
@@ -53,6 +55,7 @@ const useTableState = (props) => {
|
|
|
53
55
|
onSortingChange: setSorting,
|
|
54
56
|
state: {
|
|
55
57
|
columnFilters,
|
|
58
|
+
columnOrder,
|
|
56
59
|
columnPinning,
|
|
57
60
|
expanded,
|
|
58
61
|
grouping,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,E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