rez-table-listing-mui 1.3.52 → 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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/listing/components/common/saved-filter-modal/index.tsx +1 -1
- package/src/listing/components/table-body.tsx +6 -1
- package/src/listing/components/table-settings/components/column.tsx +1 -0
- package/src/listing/libs/utils/common.ts +6 -0
- package/src/view/ListingView.tsx +3 -1
package/package.json
CHANGED
|
@@ -15,7 +15,10 @@ import {
|
|
|
15
15
|
horizontalListSortingStrategy,
|
|
16
16
|
SortableContext,
|
|
17
17
|
} from "@dnd-kit/sortable";
|
|
18
|
-
import {
|
|
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 ? (
|
|
@@ -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";
|
package/src/view/ListingView.tsx
CHANGED
|
@@ -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?.
|
|
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}
|