rez-table-listing-mui 1.3.53 → 1.3.54

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez-table-listing-mui",
3
- "version": "1.3.53",
3
+ "version": "1.3.54",
4
4
  "type": "module",
5
5
  "description": "A rez table listing component built on TanStack Table",
6
6
  "main": "dist/index.js",
@@ -15,7 +15,10 @@ import {
15
15
  horizontalListSortingStrategy,
16
16
  SortableContext,
17
17
  } from "@dnd-kit/sortable";
18
- import { getColumnPinningStylesBody } from "../libs/utils/common";
18
+ import {
19
+ getColumnPinningStylesBody,
20
+ getDepthBackground,
21
+ } from "../libs/utils/common";
19
22
  import Checkbox from "./inputs/checkbox";
20
23
 
21
24
  interface TableBodyProps<T> {
@@ -47,6 +50,7 @@ function TableBody<T>({
47
50
  position: "sticky",
48
51
  left: 0,
49
52
  width: "50px",
53
+ backgroundColor: getDepthBackground(row.depth),
50
54
  }}
51
55
  >
52
56
  <Checkbox
@@ -70,6 +74,7 @@ function TableBody<T>({
70
74
  }),
71
75
  } as React.CSSProperties,
72
76
  align: (cell.column.columnDef.meta as align)?.align || "left",
77
+ backgroundColor: getDepthBackground(row.depth),
73
78
  };
74
79
 
75
80
  return enableColumnReordering ? (
@@ -80,6 +80,7 @@ const ColumnTab = ({
80
80
 
81
81
  const mappedColumns: ColumnItem[] =
82
82
  columnTabAttributes?.map((column) => ({
83
+ ...column,
83
84
  label: column?.name,
84
85
  value: column?.attribute_key,
85
86
  })) || [];
@@ -76,6 +76,12 @@ export function customDebounce<T extends (...args: any[]) => any>(
76
76
  };
77
77
  }
78
78
 
79
+ export const getDepthBackground = (depth: number) => {
80
+ if (depth === 0) return "white";
81
+ const shade = 255 - depth * 8; // reduce brightness per level
82
+ return `rgb(${shade}, ${shade}, ${shade})`;
83
+ };
84
+
79
85
  //ENTITY TYPE
80
86
  const ENVIRONMENT = "crm_dev";
81
87
  export const ENTITY_TYPE = "LEAD";
@@ -543,7 +543,9 @@ function ListingView() {
543
543
  columnsDataLoading={metaQuery.isPending}
544
544
  quickTabAttributes={quickTabAttributes?.data}
545
545
  quickTabAttributesLoading={quickTabAttributes?.isLoading}
546
- columnTabAttributes={settingsColumnAttributes?.data?.slice(0, 25)}
546
+ columnTabAttributes={settingsColumnAttributes?.data?.filter(
547
+ (item) => item.attribute_key
548
+ )}
547
549
  columnAttributesLoading={settingsColumnAttributes?.isLoading}
548
550
  sortingTabAttributes={sortingTabAttributes?.data}
549
551
  sortingTabAttributesLoading={sortingTabAttributes?.isLoading}