rez-table-listing-mui 1.3.15 → 1.3.17
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/filter/components/forms/components/Filter-criteria.tsx +12 -9
- package/src/listing/components/filter/components/forms/components/filter-criteria-list.tsx +3 -1
- package/src/listing/components/index.scss +25 -0
- package/src/listing/components/table-head-pin.tsx +7 -1
- package/src/listing/components/table-head-popover.tsx +3 -0
- package/src/listing/components/table-settings/components/quick-tab.tsx +4 -0
- package/src/listing/components/table-settings/index.tsx +3 -0
- package/src/listing/components/topbar/index.tsx +12 -0
package/package.json
CHANGED
|
@@ -49,9 +49,16 @@ const FilterCriteria = ({
|
|
|
49
49
|
} = tableStates;
|
|
50
50
|
|
|
51
51
|
const filterButtonRef = useRef<HTMLButtonElement>(null);
|
|
52
|
-
|
|
53
52
|
const filterButtonWidth = useElementWidth(filterButtonRef);
|
|
54
53
|
|
|
54
|
+
const isSingleEntity = filterComponentOptions?.tabOptions?.isSingleEntity;
|
|
55
|
+
// Disable button if only one filter is allowed
|
|
56
|
+
const isSingleFilter =
|
|
57
|
+
filterComponentOptions?.tabOptions?.isSingleFilter || false;
|
|
58
|
+
const disableButton = useMemo(() => {
|
|
59
|
+
return isSingleFilter && filters?.length > 0;
|
|
60
|
+
}, [filters?.length, isSingleFilter]);
|
|
61
|
+
|
|
55
62
|
const handleAddFilter = (
|
|
56
63
|
attribute: FilterDataMainFilterEntityWiseCriteriaProps
|
|
57
64
|
) => {
|
|
@@ -94,20 +101,16 @@ const FilterCriteria = ({
|
|
|
94
101
|
onChangeFunction && onChangeFunction(newState);
|
|
95
102
|
|
|
96
103
|
setShowFilterOption(false);
|
|
97
|
-
|
|
104
|
+
|
|
105
|
+
if (!isSingleEntity) {
|
|
106
|
+
setSelectedFilterEntity(undefined);
|
|
107
|
+
}
|
|
98
108
|
};
|
|
99
109
|
|
|
100
110
|
const toggleFilterOptions = () => {
|
|
101
111
|
setShowFilterOption((prev) => !prev);
|
|
102
112
|
};
|
|
103
113
|
|
|
104
|
-
// Disable button if only one filter is allowed
|
|
105
|
-
const isSingleFilter =
|
|
106
|
-
filterComponentOptions?.tabOptions?.isSingleFilter || false;
|
|
107
|
-
const disableButton = useMemo(() => {
|
|
108
|
-
return isSingleFilter && filters?.length > 0;
|
|
109
|
-
}, [filters?.length, isSingleFilter]);
|
|
110
|
-
|
|
111
114
|
return (
|
|
112
115
|
<Box>
|
|
113
116
|
<FilterButton
|
|
@@ -67,7 +67,9 @@ const FilterCriteriaList = ({
|
|
|
67
67
|
{shouldShowCloseButton && (
|
|
68
68
|
<IconButton
|
|
69
69
|
size="small"
|
|
70
|
-
onClick={() =>
|
|
70
|
+
onClick={() =>
|
|
71
|
+
!isSingleEntity && setSelectedFilterEntity(undefined)
|
|
72
|
+
}
|
|
71
73
|
>
|
|
72
74
|
<CloseIcon />
|
|
73
75
|
</IconButton>
|
|
@@ -210,3 +210,28 @@
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
+
// Full screen styles fixes
|
|
214
|
+
|
|
215
|
+
:fullscreen {
|
|
216
|
+
width: 100vw !important;
|
|
217
|
+
height: 100vh !important;
|
|
218
|
+
display: flex !important;
|
|
219
|
+
flex-direction: column !important;
|
|
220
|
+
background: var(--white);
|
|
221
|
+
overflow: hidden;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:-webkit-full-screen {
|
|
225
|
+
width: 100vw !important;
|
|
226
|
+
height: 100vh !important;
|
|
227
|
+
display: flex !important;
|
|
228
|
+
flex-direction: column !important;
|
|
229
|
+
background: var(--white);
|
|
230
|
+
overflow: hidden;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// .ts__table__wrapper.is-fullscreen {
|
|
234
|
+
// height: calc(100vh - 56px);
|
|
235
|
+
// max-height: none;
|
|
236
|
+
// overflow-y: auto;
|
|
237
|
+
// }
|
|
@@ -7,7 +7,13 @@ function TableHeadPin<T>({ header }: TableHeaderProps<T>) {
|
|
|
7
7
|
{/* <IconPinOutline /> */}
|
|
8
8
|
</div>
|
|
9
9
|
) : (
|
|
10
|
-
<div
|
|
10
|
+
<div
|
|
11
|
+
className="ts--head--button"
|
|
12
|
+
onClick={(e) => {
|
|
13
|
+
e.stopPropagation();
|
|
14
|
+
header.column.pin(false);
|
|
15
|
+
}}
|
|
16
|
+
>
|
|
11
17
|
<IconPinOffOutline />
|
|
12
18
|
</div>
|
|
13
19
|
);
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
IconPinOutline,
|
|
16
16
|
} from "../../assets/svg";
|
|
17
17
|
import { CraftTableOptionsProps } from "../types/table-options";
|
|
18
|
+
import { useFullscreenPopoverContainer } from "../libs/hooks/useFullScreen";
|
|
18
19
|
|
|
19
20
|
type Props<T> = {
|
|
20
21
|
anchorEl: HTMLElement | null;
|
|
@@ -32,6 +33,7 @@ function TableHeadPopover<T>({
|
|
|
32
33
|
const open = Boolean(anchorEl);
|
|
33
34
|
const column = header.column;
|
|
34
35
|
const isPinned = column.getIsPinned() === "left";
|
|
36
|
+
const { container: fullscreenContainer } = useFullscreenPopoverContainer();
|
|
35
37
|
|
|
36
38
|
const { wrapColumns, setWrapColumns } = tableStates;
|
|
37
39
|
|
|
@@ -49,6 +51,7 @@ function TableHeadPopover<T>({
|
|
|
49
51
|
anchorEl={anchorEl}
|
|
50
52
|
onClose={onClose}
|
|
51
53
|
anchorOrigin={{ vertical: "bottom", horizontal: "left" }}
|
|
54
|
+
container={fullscreenContainer}
|
|
52
55
|
>
|
|
53
56
|
<List dense>
|
|
54
57
|
<ListItemButton onClick={() => column.toggleSorting(false)}>
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
} from "../../../types/filter-settings";
|
|
29
29
|
import { TabsStyles } from "../style";
|
|
30
30
|
import InfoAlert from "../common/info-alert";
|
|
31
|
+
import { useFullscreenPopoverContainer } from "../../../libs/hooks/useFullScreen";
|
|
31
32
|
|
|
32
33
|
const QuickTab = ({
|
|
33
34
|
filterSettingStates,
|
|
@@ -37,6 +38,7 @@ const QuickTab = ({
|
|
|
37
38
|
}: SettingsQuickTabProps) => {
|
|
38
39
|
const { settingsData, setSettingsData, saveButtonError, setSaveButtonError } =
|
|
39
40
|
filterSettingStates;
|
|
41
|
+
const { container: fullscreenContainer } = useFullscreenPopoverContainer();
|
|
40
42
|
|
|
41
43
|
const [searchTerm, setSearchTerm] = useState<string>("");
|
|
42
44
|
const [currentQuickAttribute, setCurrentQuickAttribute] = useState<string>(
|
|
@@ -358,6 +360,7 @@ const QuickTab = ({
|
|
|
358
360
|
},
|
|
359
361
|
}))
|
|
360
362
|
}
|
|
363
|
+
MenuProps={{ container: fullscreenContainer }}
|
|
361
364
|
>
|
|
362
365
|
{columnsData?.column_list
|
|
363
366
|
?.filter((col) => col.datasource_list != null)
|
|
@@ -386,6 +389,7 @@ const QuickTab = ({
|
|
|
386
389
|
},
|
|
387
390
|
}))
|
|
388
391
|
}
|
|
392
|
+
MenuProps={{ container: fullscreenContainer }}
|
|
389
393
|
>
|
|
390
394
|
{sortingOptions.map((option) => (
|
|
391
395
|
<MenuItem key={option?.value} value={option?.value}>
|
|
@@ -21,6 +21,7 @@ import { KANBAN_SETTINGS_TABS, SETTINGS_TABS } from "./constants";
|
|
|
21
21
|
import Loader from "../common/loader/loader";
|
|
22
22
|
import Lane from "./components/lane";
|
|
23
23
|
import GroupBy from "./components/group-by";
|
|
24
|
+
import { useFullscreenPopoverContainer } from "../../libs/hooks/useFullScreen";
|
|
24
25
|
|
|
25
26
|
export function QuickFilterSettings({
|
|
26
27
|
view = "listing",
|
|
@@ -34,6 +35,7 @@ export function QuickFilterSettings({
|
|
|
34
35
|
onSaveSettingsData,
|
|
35
36
|
}: QuickFilterModalProps) {
|
|
36
37
|
const [tabValue, setTabValue] = useState(0);
|
|
38
|
+
const { container: fullscreenContainer } = useFullscreenPopoverContainer();
|
|
37
39
|
|
|
38
40
|
const {
|
|
39
41
|
showListViewSettings,
|
|
@@ -87,6 +89,7 @@ export function QuickFilterSettings({
|
|
|
87
89
|
slots={{
|
|
88
90
|
transition: DialogTransition,
|
|
89
91
|
}}
|
|
92
|
+
container={fullscreenContainer}
|
|
90
93
|
>
|
|
91
94
|
<DialogTitle sx={dialogStyles.dialogTitle}>
|
|
92
95
|
<Typography sx={{ fontSize: "1.125rem" }}>List View Setting</Typography>
|
|
@@ -71,6 +71,17 @@ function Topbar<T>({
|
|
|
71
71
|
table.setColumnOrder(columnOrder);
|
|
72
72
|
}, [columnOrder]);
|
|
73
73
|
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (isFullscreen) {
|
|
76
|
+
// Close all popovers when fullscreen is enabled
|
|
77
|
+
setLayoutAnchorEl(null);
|
|
78
|
+
setSortAnchorEl(null);
|
|
79
|
+
setColumnAnchorEl(null);
|
|
80
|
+
setViewMoreAnchorEl(null);
|
|
81
|
+
setShowColumnHiding(false);
|
|
82
|
+
}
|
|
83
|
+
}, [isFullscreen]);
|
|
84
|
+
|
|
74
85
|
const {
|
|
75
86
|
leftSideComponent,
|
|
76
87
|
rightSideComponent,
|
|
@@ -370,6 +381,7 @@ function Topbar<T>({
|
|
|
370
381
|
onClose={() => setViewMoreAnchorEl(null)}
|
|
371
382
|
anchorOrigin={{ vertical: "bottom", horizontal: "left" }}
|
|
372
383
|
transformOrigin={{ vertical: "top", horizontal: "left" }}
|
|
384
|
+
container={fullscreenContainer}
|
|
373
385
|
// PaperProps={{
|
|
374
386
|
// sx: {
|
|
375
387
|
// mt: 2,
|