@codezee/sixtify-brahma 0.2.129 → 0.2.131

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.
Files changed (51) hide show
  1. package/package.json +6 -2
  2. package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.d.ts.map +1 -1
  3. package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/FacetedFilter.js +1 -0
  4. package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.d.ts.map +1 -1
  5. package/packages/shared-components/dist/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.js +19 -8
  6. package/packages/shared-components/dist/SmartGrid/Components/FilterStatusPanel.d.ts.map +1 -1
  7. package/packages/shared-components/dist/SmartGrid/Components/FilterStatusPanel.js +11 -2
  8. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.d.ts +10 -0
  9. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.d.ts.map +1 -0
  10. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderCell.js +15 -0
  11. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.d.ts +13 -0
  12. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.d.ts.map +1 -0
  13. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/DraggableHeaderGroupRows.js +24 -0
  14. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/GroupingIcons.d.ts +8 -0
  15. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/GroupingIcons.d.ts.map +1 -0
  16. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/GroupingIcons.js +41 -0
  17. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.d.ts +20 -0
  18. package/packages/shared-components/dist/SmartGrid/Components/HeaderCells/HeaderCell.d.ts.map +1 -0
  19. package/packages/shared-components/dist/SmartGrid/Components/{HeaderCell.js → HeaderCells/HeaderCell.js} +31 -13
  20. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DateRangeInput/DateRangeInput.d.ts.map +1 -1
  21. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DateRangeInput/StyleDateRangeWrapper.js +1 -1
  22. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DebouncedInput.d.ts.map +1 -1
  23. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/DebouncedInput.js +2 -0
  24. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/GetRenderInputs.d.ts +1 -2
  25. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/GetRenderInputs.d.ts.map +1 -1
  26. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/GetRenderInputs.js +16 -11
  27. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/SearchFilterRow.d.ts.map +1 -1
  28. package/packages/shared-components/dist/SmartGrid/Components/SearchFilterRow/SearchFilterRow.js +2 -2
  29. package/packages/shared-components/dist/SmartGrid/SmartGrid.d.ts.map +1 -1
  30. package/packages/shared-components/dist/SmartGrid/SmartGrid.js +22 -14
  31. package/packages/shared-components/dist/SmartGrid/hooks/useCellSelection.d.ts.map +1 -1
  32. package/packages/shared-components/dist/SmartGrid/hooks/useGetColumnWidth.d.ts.map +1 -1
  33. package/packages/shared-components/dist/SmartGrid/hooks/useGetColumnWidth.js +10 -1
  34. package/packages/shared-components/dist/SmartGrid/hooks/useGetDragMethods.d.ts +13 -0
  35. package/packages/shared-components/dist/SmartGrid/hooks/useGetDragMethods.d.ts.map +1 -0
  36. package/packages/shared-components/dist/SmartGrid/hooks/useGetDragMethods.js +101 -0
  37. package/packages/shared-components/dist/SmartGrid/hooks/useGetFacetedFilter.d.ts.map +1 -1
  38. package/packages/shared-components/dist/SmartGrid/hooks/useGetFacetedFilter.js +5 -0
  39. package/packages/shared-components/dist/SmartGrid/hooks/useGetPinStyle.d.ts +1 -1
  40. package/packages/shared-components/dist/SmartGrid/hooks/useGetPinStyle.d.ts.map +1 -1
  41. package/packages/shared-components/dist/SmartGrid/hooks/useGetRowSelection.d.ts.map +1 -1
  42. package/packages/shared-components/dist/SmartGrid/hooks/useGetRowSelection.js +7 -0
  43. package/packages/shared-components/dist/SmartGrid/hooks/useTableState.d.ts.map +1 -1
  44. package/packages/shared-components/dist/SmartGrid/hooks/useTableState.js +3 -0
  45. package/packages/shared-components/dist/SmartGrid/types/index.d.ts +2 -1
  46. package/packages/shared-components/dist/SmartGrid/types/index.d.ts.map +1 -1
  47. package/packages/shared-components/dist/SmartGrid/utils/helper.d.ts +2 -0
  48. package/packages/shared-components/dist/SmartGrid/utils/helper.d.ts.map +1 -0
  49. package/packages/shared-components/dist/SmartGrid/utils/helper.js +12 -0
  50. package/packages/shared-components/dist/SmartGrid/Components/HeaderCell.d.ts +0 -10
  51. package/packages/shared-components/dist/SmartGrid/Components/HeaderCell.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codezee/sixtify-brahma",
3
- "version": "0.2.129",
3
+ "version": "0.2.131",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -16,7 +16,8 @@
16
16
  "dev": "turbo dev -- -p 4201",
17
17
  "clean": "turbo clean",
18
18
  "check:types": "turbo check:types",
19
- "check:format": "turbo check:format"
19
+ "check:format": "turbo check:format",
20
+ "start": "turbo start"
20
21
  },
21
22
  "main": "packages/shared-components/dist/index.js",
22
23
  "types": "packages/shared-components/dist/index.d.ts",
@@ -51,6 +52,9 @@
51
52
  "react-hook-form": "^7.51.5"
52
53
  },
53
54
  "dependencies": {
55
+ "@dnd-kit/core": "^6.3.1",
56
+ "@dnd-kit/sortable": "^10.0.0",
57
+ "@dnd-kit/utilities": "^3.2.2",
54
58
  "@emotion/react": "^11.11.4",
55
59
  "@emotion/styled": "^11.11.5",
56
60
  "@hookform/resolvers": "^3.6.0",
@@ -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,4CAmTvB,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,4CAoTvB,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 ?? [])
@@ -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,6CAsJ7D,CAAC"}
1
+ {"version":3,"file":"VirtualCheckboxList.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/FacetedFilter/VirtualCheckboxList.tsx"],"names":[],"mappings":"AAIA,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,6CA2K7D,CAAC"}
@@ -4,6 +4,7 @@ exports.VirtualCheckboxList = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const react_1 = require("react");
7
+ const helper_1 = require("../../utils/helper");
7
8
  exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options }) => {
8
9
  const theme = (0, material_1.useTheme)();
9
10
  const { butterflyBlue, sapphireBlue } = theme.palette.app.color;
@@ -28,12 +29,16 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
28
29
  const visibleItems = (0, react_1.useMemo)(() => {
29
30
  return options.slice(visibleRange.start, visibleRange.end);
30
31
  }, [options, visibleRange.start, visibleRange.end]);
32
+ // useCallback is used to memoize the handler and prevent unnecessary re-creations
33
+ // when passed to event listeners inside the list items.
31
34
  const handleMouseDown = (0, react_1.useCallback)((value) => {
32
35
  setIsMouseDown(true);
33
36
  const isAlreadyChecked = checkedMap[value];
34
37
  setDragMode(isAlreadyChecked ? "unCheck" : "check");
35
38
  onToggle(value);
36
39
  }, [onToggle, checkedMap]);
40
+ // useCallback ensures stable reference when attached to multiple items’ mouse events,
41
+ // avoiding re-binding on every render and improving performance.
37
42
  const handleMouseEnter = (0, react_1.useCallback)((value) => {
38
43
  if (isMouseDown && dragMode) {
39
44
  const isChecked = checkedMap[value];
@@ -43,10 +48,13 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
43
48
  }
44
49
  }
45
50
  }, [isMouseDown, dragMode, checkedMap, onToggle]);
51
+ // useCallback memoizes this function so the global mouseup listener
52
+ // remains stable across renders, preventing multiple event bindings.
46
53
  const handleMouseUp = (0, react_1.useCallback)(() => {
47
54
  setIsMouseDown(false);
48
55
  setDragMode(null);
49
56
  }, []);
57
+ // Stop drag globally when mouse released anywhere
50
58
  (0, react_1.useMemo)(() => {
51
59
  document.addEventListener("mouseup", handleMouseUp);
52
60
  return () => document.removeEventListener("mouseup", handleMouseUp);
@@ -68,23 +76,26 @@ exports.VirtualCheckboxList = (0, react_1.memo)(({ checkedMap, onToggle, options
68
76
  width: "100%",
69
77
  }, children: visibleItems.map((value) => {
70
78
  const isChecked = checkedMap[value] || false;
71
- return ((0, jsx_runtime_1.jsxs)(material_1.Typography, { onMouseDown: () => handleMouseDown(value), onMouseEnter: () => handleMouseEnter(value), style: {
72
- alignItems: "center",
79
+ return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { onMouseDown: () => handleMouseDown(value), onMouseEnter: () => handleMouseEnter(value), style: {
73
80
  backgroundColor: isChecked
74
81
  ? sapphireBlue[400]
75
82
  : "transparent",
76
83
  cursor: "pointer",
77
- display: "flex",
78
- fontSize: "12px",
79
- gap: "4px",
80
- height: `${ITEM_HEIGHT}px`,
81
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: isChecked, onChange: (e) => {
84
+ }, flexDirection: "row", alignItems: "center", gap: "5px", height: `${ITEM_HEIGHT}px`, children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: isChecked, onChange: (e) => {
82
85
  e.stopPropagation();
83
86
  onToggle(value);
84
87
  }, onMouseDown: (e) => e.stopPropagation(), size: "small", style: {
85
88
  color: isChecked ? butterflyBlue[900] : "",
86
89
  padding: "4px",
87
- } }), value] }, value));
90
+ } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", color: "black", sx: {
91
+ WebkitBoxOrient: "vertical",
92
+ WebkitLineClamp: "1",
93
+ // eslint-disable-next-line sort-keys
94
+ display: "-webkit-box",
95
+ overflow: "hidden",
96
+ textOverflow: "ellipsis",
97
+ width: "150px",
98
+ }, children: (0, helper_1.formatDateValue)(value) })] }, value));
88
99
  }) }) }) }));
89
100
  });
90
101
  exports.VirtualCheckboxList.displayName = "VirtualCheckboxList";
@@ -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,4CAoI3B,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;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD,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"}
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const icons_material_1 = require("@mui/icons-material");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_1 = require("react");
8
+ const helper_1 = require("../utils/helper");
8
9
  const FilterStatusPanel = ({ clearAllFilters, table, }) => {
9
10
  const theme = (0, material_1.useTheme)();
10
11
  const { brown, butterflyBlue, iron, slate } = theme.palette.app.color;
@@ -16,20 +17,24 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
16
17
  overflow: "auto",
17
18
  width: "100%",
18
19
  }, children: (() => {
20
+ // Helper function to extract filter values from different filter types
19
21
  const extractFilterValues = (filter) => {
20
22
  if (!filter) {
21
23
  return { facets: [], search: [] };
22
24
  }
23
25
  const { facets: filterFacets, search: filterSearch } = filter;
26
+ // Handle array filters
24
27
  if (Array.isArray(filter)) {
25
28
  return { facets: filter.map(String), search: [] };
26
29
  }
30
+ // Handle primitive filters (string/number)
27
31
  if (typeof filter === "string" || typeof filter === "number") {
28
32
  return {
29
33
  facets: filter !== "" ? [String(filter)] : [],
30
34
  search: [],
31
35
  };
32
36
  }
37
+ // Handle object filters with facets and search
33
38
  if (typeof filter === "object" && filter != null) {
34
39
  const facets = Array.isArray(filterFacets) ? filterFacets : [];
35
40
  const search = filterSearch != null && filterSearch !== ""
@@ -39,15 +44,17 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
39
44
  }
40
45
  return { facets: [], search: [] };
41
46
  };
47
+ // Build applied filters list
42
48
  const appliedFilters = getHeaderGroups()
43
49
  .flatMap((group) => group.headers)
44
50
  .map((header) => {
45
51
  const filter = header.column.getFilterValue();
46
52
  const { facets, search } = extractFilterValues(filter);
47
53
  const hasValues = facets.length > 0 || search.length > 0;
48
- 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;
54
+ 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.map(helper_1.formatDateValue).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
55
  })
50
56
  .filter(Boolean);
57
+ // Don't render if no filters applied
51
58
  if (!appliedFilters.length) {
52
59
  return null;
53
60
  }
@@ -63,7 +70,9 @@ const FilterStatusPanel = ({ clearAllFilters, table, }) => {
63
70
  overflow: "hidden",
64
71
  textOverflow: "ellipsis",
65
72
  whiteSpace: "nowrap",
66
- }, children: appliedFilters.map((filter, index) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [!!index && (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", children: "," }), filter] }, index + 1))) })] }));
73
+ }, children: appliedFilters.map((filter, index) => (
74
+ // eslint-disable-next-line sonarjs/no-array-index-key
75
+ (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
76
  })() }));
68
77
  };
69
78
  exports.FilterStatusPanel = FilterStatusPanel;
@@ -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"}
@@ -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"}
@@ -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,8 @@
1
+ type GroupingIconsProps = {
2
+ groupedIndex: number;
3
+ isGrouped: boolean;
4
+ loading: boolean;
5
+ };
6
+ export declare const GroupingIcons: ({ groupedIndex, isGrouped, loading, }: GroupingIconsProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=GroupingIcons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupingIcons.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/HeaderCells/GroupingIcons.tsx"],"names":[],"mappings":"AAKA,KAAK,kBAAkB,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,uCAI3B,kBAAkB,4CA6EpB,CAAC"}
@@ -0,0 +1,41 @@
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.GroupingIcons = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const BlurOffRounded_1 = __importDefault(require("@mui/icons-material/BlurOffRounded"));
9
+ const BlurOnRounded_1 = __importDefault(require("@mui/icons-material/BlurOnRounded"));
10
+ const material_1 = require("@mui/material");
11
+ const react_1 = require("react");
12
+ const GroupingIcons = ({ groupedIndex, isGrouped, loading, }) => {
13
+ const theme = (0, material_1.useTheme)();
14
+ const { iron } = theme.palette.app.color;
15
+ const [open, setOpen] = (0, react_1.useState)(false);
16
+ const clickBlockRef = (0, react_1.useRef)(false);
17
+ const handleClick = (el) => {
18
+ clickBlockRef.current = true;
19
+ setOpen(false);
20
+ el?.blur?.();
21
+ setTimeout(() => (clickBlockRef.current = false), 250);
22
+ };
23
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: isGrouped && !loading ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Ungroup", arrow: true, open: open, placement: "top-start", onOpen: () => {
24
+ if (!clickBlockRef.current) {
25
+ setOpen(true);
26
+ }
27
+ }, onClose: () => setOpen(false), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { flexDirection: "row", alignItems: "center", onMouseEnter: () => {
28
+ if (!clickBlockRef.current) {
29
+ setOpen(true);
30
+ }
31
+ }, onMouseLeave: () => setOpen(false), onClick: (e) => handleClick(e.currentTarget), children: [(0, jsx_runtime_1.jsx)(BlurOffRounded_1.default, {}), (0, jsx_runtime_1.jsxs)(material_1.Typography, { color: iron[400], variant: "caption", children: ["(", groupedIndex + 1, ")", " "] })] }) })) : ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: "Grouping", arrow: true, placement: "top-start", open: open, onOpen: () => {
32
+ if (!clickBlockRef.current) {
33
+ setOpen(true);
34
+ }
35
+ }, onClose: () => setOpen(false), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onMouseEnter: () => {
36
+ if (!clickBlockRef.current) {
37
+ setOpen(true);
38
+ }
39
+ }, onMouseLeave: () => setOpen(false), onClick: (e) => handleClick(e.currentTarget), children: (0, jsx_runtime_1.jsx)(BlurOnRounded_1.default, {}) }) })) }));
40
+ };
41
+ exports.GroupingIcons = GroupingIcons;
@@ -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;AAIpD,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,uBAAuB,CAAC;AAQhE,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,4CA6KpB,CAAC"}
@@ -5,15 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.HeaderCell = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const BlurOffRounded_1 = __importDefault(require("@mui/icons-material/BlurOffRounded"));
9
- const BlurOnRounded_1 = __importDefault(require("@mui/icons-material/BlurOnRounded"));
8
+ const utilities_1 = require("@dnd-kit/utilities");
9
+ const DragIndicator_1 = __importDefault(require("@mui/icons-material/DragIndicator"));
10
10
  const material_1 = require("@mui/material");
11
11
  const react_table_1 = require("@tanstack/react-table");
12
- const Tooltip_1 = require("../../Tooltip");
13
- const useGetGroupedColumn_1 = require("../hooks/useGetGroupedColumn");
14
- const useGetSortedColumn_1 = require("../hooks/useGetSortedColumn");
15
- const FacetedFilter_1 = require("./FacetedFilter/FacetedFilter");
16
- const HeaderCell = ({ defaultGrouping, header, loading = false, resetAllFilters, }) => {
12
+ const Tooltip_1 = require("../../../Tooltip");
13
+ const useGetGroupedColumn_1 = require("../../hooks/useGetGroupedColumn");
14
+ const useGetSortedColumn_1 = require("../../hooks/useGetSortedColumn");
15
+ const FacetedFilter_1 = require("../FacetedFilter/FacetedFilter");
16
+ const GroupingIcons_1 = require("./GroupingIcons");
17
+ const HeaderCell = ({ defaultGrouping, dragAttributes, dragListeners, dragRef, dragTransform, dragTransition, header, isDragOver = false, isDragging = false, isReorderable = false, loading = false, resetAllFilters, }) => {
17
18
  const theme = (0, material_1.useTheme)();
18
19
  const { butterflyBlue, iron, slate } = theme.palette.app.color;
19
20
  const { isSortable, mutipleSortCounts, sortableIcon } = (0, useGetSortedColumn_1.useGetSortedColumn)({
@@ -24,18 +25,28 @@ const HeaderCell = ({ defaultGrouping, header, loading = false, resetAllFilters,
24
25
  });
25
26
  const { columnDef, getAfter, getCanResize, getIsPinned, getSize, getStart, getToggleGroupingHandler, getToggleSortingHandler, } = header.column;
26
27
  const showFacetedFilter = columnDef?.facetedFilter;
28
+ const isSmartSelectFilter = columnDef?.filterVariant === "smartSelectFilter";
27
29
  const headerDynamicWidth = getIsPinned() ? getSize() - 8 : getSize();
28
- return ((0, jsx_runtime_1.jsxs)("th", { colSpan: header.colSpan, "data-column-id": header.id, style: {
29
- backgroundColor: `${slate[800]}`,
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,
30
38
  borderBottom: `1px solid ${iron[700]}`,
31
39
  height: "40px",
32
40
  left: getIsPinned() === "left" ? `${getStart("left")}px` : undefined,
33
41
  maxWidth: headerDynamicWidth,
34
42
  minWidth: headerDynamicWidth,
43
+ opacity: isDragging ? 0.85 : 1,
35
44
  padding: "0px 0px 0px 8px",
36
45
  position: getIsPinned() ? "sticky" : "relative",
37
46
  right: getIsPinned() === "right" ? `${getAfter("right")}px` : undefined,
38
47
  textAlign: "left",
48
+ transform: transformStyle,
49
+ transition: dragTransition,
39
50
  width: headerDynamicWidth,
40
51
  zIndex: getIsPinned() ? 3 : 1,
41
52
  }, children: [(0, jsx_runtime_1.jsxs)("div", { style: {
@@ -43,8 +54,15 @@ const HeaderCell = ({ defaultGrouping, header, loading = false, resetAllFilters,
43
54
  borderRight: `2px solid ${iron[700]}`,
44
55
  display: "flex",
45
56
  flexGrow: 1,
46
- gap: "10px",
47
- }, children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", { style: {
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: {
48
66
  color: iron[400],
49
67
  fontFamily: "Poppins",
50
68
  fontSize: "14px",
@@ -54,11 +72,11 @@ const HeaderCell = ({ defaultGrouping, header, loading = false, resetAllFilters,
54
72
  textOverflow: "ellipsis",
55
73
  textWrap: "nowrap",
56
74
  }, children: !header.isPlaceholder &&
57
- (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, 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(),
75
+ (0, react_table_1.flexRender)(columnDef.header, header.getContext()) }) }), showFacetedFilter && !loading && !isSmartSelectFilter && ((0, jsx_runtime_1.jsx)(FacetedFilter_1.FacetedFilter, { header: header, resetAllFilters: resetAllFilters })), isSortable && !loading && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { toolTipLabel: "Sorting", children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { flexDirection: "row", alignItems: "center", 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: "caption", children: ["(", mutipleSortCounts + 1, ")"] }))] }) })), isGroupable && !defaultGrouping?.length && !loading && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: getToggleGroupingHandler(),
58
76
  style: {
59
77
  cursor: "pointer",
60
78
  padding: 0,
61
- }, 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: {
79
+ }, children: (0, jsx_runtime_1.jsx)(GroupingIcons_1.GroupingIcons, { groupedIndex: groupedIndex, isGrouped: isGrouped, loading: loading }) }))] }), getCanResize() && !loading && ((0, jsx_runtime_1.jsx)("div", { style: {
62
80
  background: "transparent",
63
81
  cursor: "col-resize",
64
82
  height: "100%",
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../../../../src/SmartGrid/Components/SearchFilterRow/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AAmBA,KAAK,mBAAmB,GAAG;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,CAAC;AAYF,eAAO,MAAM,cAAc,GAAI,mCAI5B,mBAAmB,4CAyLrB,CAAC"}
1
+ {"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../../../../src/SmartGrid/Components/SearchFilterRow/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AAmBA,KAAK,mBAAmB,GAAG;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,CAAC;AAYF,eAAO,MAAM,cAAc,GAAI,mCAI5B,mBAAmB,4CA0LrB,CAAC"}
@@ -12,7 +12,7 @@ const StyleDateRangeWrapper = ({ children, }) => {
12
12
  display: none;
13
13
  }
14
14
  .inline-date-range .rdrMonthAndYearWrapper {
15
- padding: 10px 12px;
15
+ padding: 10px 12px !important;
16
16
  background: white;
17
17
  height: auto;
18
18
  }
@@ -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,4CAwCrB,CAAC"}
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"}
@@ -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);
@@ -2,9 +2,8 @@ import type { Header } from "@tanstack/react-table";
2
2
  type GetRenderInputsProps<T> = {
3
3
  filterVariant?: "smartTextFilter" | "smartNumberFilter" | "smartDateFilter" | "smartSelectFilter";
4
4
  header: Header<T, unknown>;
5
- headerDyanmicWidth: number;
6
5
  resetAllFilters: boolean;
7
6
  };
8
- export declare const GetRenderInputs: <T>({ filterVariant, header, headerDyanmicWidth, resetAllFilters, }: GetRenderInputsProps<T>) => import("react/jsx-runtime").JSX.Element | null;
7
+ export declare const GetRenderInputs: <T>({ filterVariant, header, resetAllFilters, }: GetRenderInputsProps<T>) => import("react/jsx-runtime").JSX.Element | null;
9
8
  export {};
10
9
  //# sourceMappingURL=GetRenderInputs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GetRenderInputs.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/SearchFilterRow/GetRenderInputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAMpD,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,aAAa,CAAC,EACV,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,mBAAmB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,EAAG,iEAKjC,oBAAoB,CAAC,CAAC,CAAC,mDA0HzB,CAAC"}
1
+ {"version":3,"file":"GetRenderInputs.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/SearchFilterRow/GetRenderInputs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAMpD,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,aAAa,CAAC,EACV,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,mBAAmB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,EAAG,6CAIjC,oBAAoB,CAAC,CAAC,CAAC,mDA+HzB,CAAC"}
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const DateRangeInput_1 = require("./DateRangeInput/DateRangeInput");
7
7
  const DebouncedInput_1 = require("./DebouncedInput");
8
- const GetRenderInputs = ({ filterVariant, header, headerDyanmicWidth, resetAllFilters, }) => {
8
+ const GetRenderInputs = ({ filterVariant, header, resetAllFilters, }) => {
9
9
  const { columnDef, getFilterValue, setFilterValue } = header.column;
10
10
  const { facetedFilter, filterParams, filterVariant: hasFilterVariant, } = columnDef;
11
11
  const isCombinedFilter = facetedFilter && hasFilterVariant;
@@ -21,31 +21,36 @@ const GetRenderInputs = ({ filterVariant, header, headerDyanmicWidth, resetAllFi
21
21
  });
22
22
  }
23
23
  };
24
- const commonInputStyle = { width: headerDyanmicWidth - 20 };
25
- const commonSelectStyle = { width: headerDyanmicWidth - 10 };
26
24
  const getValue = () => isCombinedFilter
27
25
  ? (combinedFilterValue?.search ?? "")
28
26
  : // eslint-disable-next-line sonarjs/no-nested-conditional
29
- typeof rawFilterValue === "string"
27
+ typeof rawFilterValue === "string" ||
28
+ typeof rawFilterValue === "boolean" ||
29
+ typeof rawFilterValue === "number"
30
30
  ? rawFilterValue
31
31
  : "";
32
- const setValue = (value) => isCombinedFilter
33
- ? updateCombinedFilter({ search: value })
34
- : setFilterValue(value);
35
- const renderDebouncedInput = (type) => ((0, jsx_runtime_1.jsx)(DebouncedInput_1.DebouncedInput, { onChange: (value) => setValue(resetAllFilters ? "" : value), type: type, value: resetAllFilters ? "" : getValue(), style: commonInputStyle }));
32
+ const setValue = (value) => {
33
+ if (isCombinedFilter) {
34
+ return updateCombinedFilter({ search: value.toString() });
35
+ }
36
+ return setFilterValue(value);
37
+ };
38
+ const renderDebouncedInput = (type) => ((0, jsx_runtime_1.jsx)(DebouncedInput_1.DebouncedInput, { onChange: (value) => setValue(resetAllFilters ? "" : value), type: type, value: resetAllFilters ? "" : getValue().toString(), style: { width: "100%" } }));
36
39
  const renderSelectInput = () => {
37
40
  const options = filterParams?.filterOptions ?? [];
38
41
  const value = isCombinedFilter
39
42
  ? (combinedFilterValue?.search ?? "")
40
43
  : // eslint-disable-next-line sonarjs/no-nested-conditional
41
- typeof rawFilterValue === "string"
44
+ typeof rawFilterValue === "string" ||
45
+ typeof rawFilterValue === "boolean" ||
46
+ typeof rawFilterValue === "number"
42
47
  ? rawFilterValue
43
48
  : "";
44
49
  const selected = options.find((opt) => opt.value === value) || null;
45
50
  const handleChange = (_, newValue) => setValue(newValue ? newValue.value : "");
46
51
  return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { options: options, getOptionLabel: (option) => option.label || "", value: selected, onChange: handleChange, renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, { ...params, variant: "outlined", placeholder: "All", sx: {
47
52
  "& .MuiInputBase-root": { height: 28 },
48
- } })), size: "small", sx: commonSelectStyle, slotProps: {
53
+ } })), size: "small", sx: { width: "100%" }, slotProps: {
49
54
  paper: {
50
55
  sx: {
51
56
  "& .MuiAutocomplete-option": { fontSize: 12 },
@@ -59,7 +64,7 @@ const GetRenderInputs = ({ filterVariant, header, headerDyanmicWidth, resetAllFi
59
64
  case "smartNumberFilter":
60
65
  return renderDebouncedInput("number");
61
66
  case "smartDateFilter":
62
- return ((0, jsx_runtime_1.jsx)(DateRangeInput_1.DateRangeInput, { width: commonInputStyle.width, initialValue: Array.isArray(rawFilterValue)
67
+ return ((0, jsx_runtime_1.jsx)(DateRangeInput_1.DateRangeInput, { width: "100%", initialValue: Array.isArray(rawFilterValue)
63
68
  ? rawFilterValue
64
69
  : undefined, onApply: (dates) => setFilterValue(dates) }));
65
70
  case "smartSelectFilter":
@@ -1 +1 @@
1
- {"version":3,"file":"SearchFilterRow.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/SearchFilterRow/SearchFilterRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,EAAG,8BAGjC,oBAAoB,CAAC,CAAC,CAAC,4CAgDzB,CAAC"}
1
+ {"version":3,"file":"SearchFilterRow.d.ts","sourceRoot":"","sources":["../../../../src/SmartGrid/Components/SearchFilterRow/SearchFilterRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAKpD,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAC7B,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,EAAG,8BAGjC,oBAAoB,CAAC,CAAC,CAAC,4CA+CzB,CAAC"}
@@ -21,7 +21,7 @@ const SearchFilterRow = ({ header, resetAllFilters, }) => {
21
21
  : undefined,
22
22
  maxWidth: headerDyanmicWidth,
23
23
  minWidth: headerDyanmicWidth,
24
- padding: "0px 0px 0px 8px",
24
+ padding: "0px 8px 0px 8px",
25
25
  position: header.column.getIsPinned() ? "sticky" : "relative",
26
26
  right: header.column.getIsPinned() === "right"
27
27
  ? `${header.column.getAfter("right")}px`
@@ -29,6 +29,6 @@ const SearchFilterRow = ({ header, resetAllFilters, }) => {
29
29
  textAlign: "left",
30
30
  width: headerDyanmicWidth,
31
31
  zIndex: header.column.getIsPinned() ? 3 : 0,
32
- }, children: filterVariant ? ((0, jsx_runtime_1.jsx)(GetRenderInputs_1.GetRenderInputs, { filterVariant: filterVariant, header: header, headerDyanmicWidth: headerDyanmicWidth, resetAllFilters: resetAllFilters })) : ("-") }));
32
+ }, children: filterVariant ? ((0, jsx_runtime_1.jsx)(GetRenderInputs_1.GetRenderInputs, { filterVariant: filterVariant, header: header, resetAllFilters: resetAllFilters })) : ("-") }));
33
33
  };
34
34
  exports.SearchFilterRow = SearchFilterRow;
@@ -1 +1 @@
1
- {"version":3,"file":"SmartGrid.d.ts","sourceRoot":"","sources":["../../src/SmartGrid/SmartGrid.tsx"],"names":[],"mappings":"AAIA,OAAO,KAON,MAAM,OAAO,CAAC;AAef,OAAO,KAAK,EAEV,cAAc,EAGf,MAAM,SAAS,CAAC;AA6BjB,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,EAwVjB,aAAa,CAAC"}
1
+ {"version":3,"file":"SmartGrid.d.ts","sourceRoot":"","sources":["../../src/SmartGrid/SmartGrid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAON,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAEV,cAAc,EAGf,MAAM,SAAS,CAAC;AAgCjB,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,13 +2,13 @@
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");
8
9
  const CircularLoader_1 = require("./Components/CircularLoader");
9
10
  const DataNotFound_1 = require("./Components/DataNotFound");
10
11
  const FilterStatusPanel_1 = require("./Components/FilterStatusPanel");
11
- const HeaderCell_1 = require("./Components/HeaderCell");
12
12
  const SearchFilterRow_1 = require("./Components/SearchFilterRow/SearchFilterRow");
13
13
  const TableFooterComponent_1 = require("./Components/TableFooterComponent/TableFooterComponent");
14
14
  const TableRowComponent_1 = require("./Components/TableRowComponent");
@@ -19,6 +19,9 @@ const useGetColumnWidth_1 = require("./hooks/useGetColumnWidth");
19
19
  const useGetRowSelection_1 = require("./hooks/useGetRowSelection");
20
20
  const useTableState_1 = require("./hooks/useTableState");
21
21
  const summaryCalculations_1 = require("./utils/summaryCalculations");
22
+ const useGetDragMethods_1 = require("./hooks/useGetDragMethods");
23
+ const DraggableHeaderGroupRows_1 = require("./Components/HeaderCells/DraggableHeaderGroupRows");
24
+ const HeaderCell_1 = require("./Components/HeaderCells/HeaderCell");
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
- // Cell selection functionality
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: getHeaderGroups().map((headerGroup) => ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [headerGroup.headers
167
- .filter((h) => h.column.getIsPinned() === "left")
168
- .map((header) => ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id))), headerGroup.headers
169
- .filter((h) => !h.column.getIsPinned())
170
- .map((header) => ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id))), headerGroup.headers
171
- .filter((h) => h.column.getIsPinned() === "right")
172
- .map((header) => ((0, jsx_runtime_1.jsx)(HeaderCell_1.HeaderCell, { header: header, loading: loading, resetAllFilters: resetAllFilters }, header.id)))] }, headerGroup.id), enableSecondRowFilter &&
173
- headerGroup.depth ===
174
- table.getHeaderGroups().length - 1 &&
175
- !loading && ((0, jsx_runtime_1.jsx)("tr", { children: headerGroup.headers.map((header) => header.subHeaders.length === 0 ? ((0, jsx_runtime_1.jsx)(SearchFilterRow_1.SearchFilterRow, { header: header, resetAllFilters: resetAllFilters }, header.id)) : ((0, jsx_runtime_1.jsx)("th", {}, header.id) // empty cell under grouped headers
176
- )) }))] }, headerGroup.id))) }), (0, jsx_runtime_1.jsx)("tbody", { style: {
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;AAEnD,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
+ {"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;;CAkE3B,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
- }, [columnSizing, columns.length, rowDataLength, updateColumnWidths]);
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;;;;;CA4J7B,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 { Cell } from "@tanstack/react-table";
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,EAAE,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
+ {"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;;CA8H5B,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":"AAoBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,aAAa,GAAI,CAAC,EAAE,OAAO,cAAc,CAAC,CAAC,CAAC;;CAiFxD,CAAC"}
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,
@@ -52,7 +52,7 @@ export type AppColumnDef<TData> = ColumnDef<TData> & {
52
52
  filterParams?: {
53
53
  filterOptions: {
54
54
  label: string;
55
- value: string;
55
+ value: string | boolean | number;
56
56
  }[];
57
57
  };
58
58
  filterVariant?: "smartTextFilter" | "smartNumberFilter" | "smartDateFilter" | "smartSelectFilter";
@@ -133,6 +133,7 @@ export type SmartGridProps<T> = {
133
133
  rowHeight?: number;
134
134
  rowSelection?: boolean;
135
135
  summary?: SummaryRecord<T>;
136
+ swipeableColumns?: boolean;
136
137
  sx?: SxProps<Theme>;
137
138
  totalCount: number;
138
139
  };
@@ -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,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,KAAK,EACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE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AC,CAAC,CAAC,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const formatDateValue: (value: string) => string;
2
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/utils/helper.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,WAQ5C,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatDateValue = void 0;
4
+ const luxon_1 = require("luxon");
5
+ const formatDateValue = (value) => {
6
+ const date = luxon_1.DateTime.fromISO(value);
7
+ if (date.isValid) {
8
+ return date.toFormat("dd-MM-yyyy");
9
+ }
10
+ return value;
11
+ };
12
+ exports.formatDateValue = formatDateValue;
@@ -1,10 +0,0 @@
1
- import { type Header } from "@tanstack/react-table";
2
- type HeaderCellProps<T> = {
3
- defaultGrouping?: (keyof T)[];
4
- header: Header<T, unknown>;
5
- loading: boolean;
6
- resetAllFilters: boolean;
7
- };
8
- export declare const HeaderCell: <T>({ defaultGrouping, header, loading, resetAllFilters, }: HeaderCellProps<T>) => import("react/jsx-runtime").JSX.Element;
9
- export {};
10
- //# sourceMappingURL=HeaderCell.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HeaderCell.d.ts","sourceRoot":"","sources":["../../../src/SmartGrid/Components/HeaderCell.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAc,MAAM,uBAAuB,CAAC;AAQhE,KAAK,eAAe,CAAC,CAAC,IAAI;IACxB,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,UAAU,GAAI,CAAC,EAAG,wDAK5B,eAAe,CAAC,CAAC,CAAC,4CA0IpB,CAAC"}