rez-table-listing-mui 1.0.48 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/App.tsx +25 -13
- package/src/components/filter/components/forms/components/Date.tsx +68 -108
- package/src/components/filter/components/forms/components/Filter-criteria.tsx +2 -2
- package/src/components/filter/components/forms/index.tsx +9 -5
- package/src/components/filter/components/main-filter.tsx +3 -0
- package/src/components/filter/components/saved-edit-filter.tsx +6 -0
- package/src/components/filter/components/saved-filter.tsx +3 -0
- package/src/components/filter/components/search/index.tsx +18 -1
- package/src/components/filter/index.tsx +18 -3
- package/src/components/table-settings/common/listing-values.tsx +60 -27
- package/src/components/table-settings/components/column.tsx +2 -9
- package/src/components/table-settings/components/quick-tab.tsx +4 -0
- package/src/components/table-settings/components/sorting.tsx +0 -11
- package/src/libs/hooks/useCraftTable.tsx +5 -0
- package/src/libs/hooks/useElementWidth.tsx +2 -2
- package/src/libs/hooks/useEntityTableAPI.tsx +1 -1
- package/src/libs/utils/common.ts +1 -1
- package/src/types/table-options.ts +2 -0
|
@@ -343,6 +343,8 @@ const QuickTab = ({
|
|
|
343
343
|
});
|
|
344
344
|
};
|
|
345
345
|
|
|
346
|
+
const enableDND = quickTabStates?.sorting === "custom" ? true : false;
|
|
347
|
+
|
|
346
348
|
return (
|
|
347
349
|
<Box
|
|
348
350
|
sx={{
|
|
@@ -437,6 +439,7 @@ const QuickTab = ({
|
|
|
437
439
|
containerId="list"
|
|
438
440
|
tabsApiDataLoading={tabsApiDataLoading}
|
|
439
441
|
onItemToggle={handleItemToggle}
|
|
442
|
+
enableDragAndDrop={enableDND}
|
|
440
443
|
/>
|
|
441
444
|
<ListingValues
|
|
442
445
|
buttonText="Hide All"
|
|
@@ -446,6 +449,7 @@ const QuickTab = ({
|
|
|
446
449
|
containerId="tabs"
|
|
447
450
|
// tabsApiDataLoading={tabsApiDataLoading}
|
|
448
451
|
onItemToggle={handleItemToggle}
|
|
452
|
+
enableDragAndDrop={enableDND}
|
|
449
453
|
/>
|
|
450
454
|
</Grid>
|
|
451
455
|
</DndContext>
|
|
@@ -93,16 +93,6 @@ const Sorting = ({
|
|
|
93
93
|
// }
|
|
94
94
|
}, [quickTabStates?.show_list]);
|
|
95
95
|
|
|
96
|
-
// useEffect(() => {
|
|
97
|
-
// const hasEmptySortBy = false;
|
|
98
|
-
|
|
99
|
-
// if (isSortingDefault !== undefined && isSortingDefault) {
|
|
100
|
-
// console.log("first");
|
|
101
|
-
// } else {
|
|
102
|
-
// console.log("second");
|
|
103
|
-
// }
|
|
104
|
-
// }, [isSortingDefault]);
|
|
105
|
-
|
|
106
96
|
const sensors = useSensors(useSensor(PointerSensor));
|
|
107
97
|
|
|
108
98
|
const activeTabIndex = sortingTabState?.tabs?.findIndex(
|
|
@@ -265,7 +255,6 @@ const Sorting = ({
|
|
|
265
255
|
};
|
|
266
256
|
|
|
267
257
|
const { showList, hideList } = getCurrentLists();
|
|
268
|
-
console.log("showList", showList);
|
|
269
258
|
|
|
270
259
|
return (
|
|
271
260
|
<Box sx={{ display: "flex", flexDirection: "column", gap: "0.75rem" }}>
|
|
@@ -40,6 +40,9 @@ export function useCraftTable(paginationPageSize: number = 25) {
|
|
|
40
40
|
|
|
41
41
|
const [showTableFilter, setShowTableFilter] = useState<boolean>(false);
|
|
42
42
|
|
|
43
|
+
//For filter criteria paper
|
|
44
|
+
const [showFilterOptions, setShowFilterOption] = useState<boolean>(false);
|
|
45
|
+
|
|
43
46
|
if (pagination.pageIndex < 0 || pagination.pageSize <= 0) {
|
|
44
47
|
throw new Error(
|
|
45
48
|
"Invalid pagination values: pageIndex and pageSize must be positive."
|
|
@@ -69,6 +72,8 @@ export function useCraftTable(paginationPageSize: number = 25) {
|
|
|
69
72
|
setFilterMaster: setFilterMaster,
|
|
70
73
|
showTableFilter: showTableFilter,
|
|
71
74
|
setShowTableFilter: setShowTableFilter,
|
|
75
|
+
showFilterOptions: showFilterOptions,
|
|
76
|
+
setShowFilterOption: setShowFilterOption,
|
|
72
77
|
};
|
|
73
78
|
|
|
74
79
|
return craftTableOptions;
|
|
@@ -11,7 +11,7 @@ const useElementWidth = (ref: React.RefObject<HTMLElement>) => {
|
|
|
11
11
|
// ResizeObserver callback function
|
|
12
12
|
const resizeObserver = new ResizeObserver(() => {
|
|
13
13
|
if (ref.current) {
|
|
14
|
-
setWidth(ref.current.
|
|
14
|
+
setWidth(ref.current.clientWidth); // Update width state
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ const useElementWidth = (ref: React.RefObject<HTMLElement>) => {
|
|
|
20
20
|
|
|
21
21
|
// Clean up observer on component unmount
|
|
22
22
|
return () => resizeObserver.disconnect();
|
|
23
|
-
}, [ref]);
|
|
23
|
+
}, [ref, ref.current?.clientWidth]);
|
|
24
24
|
|
|
25
25
|
return width; // Return the current width
|
|
26
26
|
};
|
|
@@ -258,7 +258,7 @@ export const useSettingsDropDownAPI = ({
|
|
|
258
258
|
// queryFn: () =>
|
|
259
259
|
// saveSettingsData({
|
|
260
260
|
// entity_type: "LAP",
|
|
261
|
-
// mapped_entity_type: "
|
|
261
|
+
// mapped_entity_type: "AYR",
|
|
262
262
|
// layout_json: payload,
|
|
263
263
|
// }),
|
|
264
264
|
// enabled: !!payload && !!Object.entries(payload).length,
|
package/src/libs/utils/common.ts
CHANGED
|
@@ -43,6 +43,8 @@ export interface CraftTableOptionsProps {
|
|
|
43
43
|
setFilterMaster: Dispatch<SetStateAction<FilterMasterStateProps | null>>;
|
|
44
44
|
showTableFilter: boolean;
|
|
45
45
|
setShowTableFilter: Dispatch<SetStateAction<boolean>>;
|
|
46
|
+
showFilterOptions: boolean;
|
|
47
|
+
setShowFilterOption: Dispatch<SetStateAction<boolean>>;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
export interface craftTableFilterSettingsOptionsProps {
|