rez-table-listing-mui 1.3.51 → 1.3.53
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 +1 -0
- 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 +46 -37
- package/src/listing/components/filter/index.tsx +4 -0
- package/src/listing/types/filter.ts +1 -0
- package/src/view/ListingView.tsx +1 -0
package/package.json
CHANGED
|
@@ -38,6 +38,7 @@ interface SavedFilterModalViewProps {
|
|
|
38
38
|
columnsData: FilterFormComponentProps | undefined;
|
|
39
39
|
hasSavedFilters?: boolean;
|
|
40
40
|
forceShowSharingControls?: boolean;
|
|
41
|
+
disableShareFilter?: boolean;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
const SavedFilterModalView = ({
|
|
@@ -47,7 +48,7 @@ const SavedFilterModalView = ({
|
|
|
47
48
|
filterMaster,
|
|
48
49
|
setFilterMaster,
|
|
49
50
|
columnsData,
|
|
50
|
-
|
|
51
|
+
disableShareFilter = false,
|
|
51
52
|
forceShowSharingControls = false,
|
|
52
53
|
}: SavedFilterModalViewProps) => {
|
|
53
54
|
const [shareWithTeam, setShareWithTeam] = useState<boolean>(false);
|
|
@@ -283,65 +284,73 @@ const SavedFilterModalView = ({
|
|
|
283
284
|
"&.Mui-focused fieldset": { borderColor: primary },
|
|
284
285
|
},
|
|
285
286
|
}}
|
|
286
|
-
onChange={(e) =>
|
|
287
|
+
onChange={(e) => {
|
|
288
|
+
const val = e.target.value;
|
|
289
|
+
|
|
290
|
+
// block more than 200 chars
|
|
291
|
+
if (val.length > 200) return;
|
|
292
|
+
|
|
287
293
|
setFilterMaster((prev) => {
|
|
288
294
|
if (!prev) return prev;
|
|
289
295
|
return {
|
|
290
296
|
...prev,
|
|
291
297
|
saved_filters: {
|
|
292
298
|
...(prev.saved_filters ?? {}),
|
|
293
|
-
description:
|
|
299
|
+
description: val,
|
|
294
300
|
},
|
|
295
301
|
};
|
|
296
|
-
})
|
|
297
|
-
}
|
|
302
|
+
});
|
|
303
|
+
}}
|
|
298
304
|
/>
|
|
305
|
+
|
|
299
306
|
<Typography sx={{ mb: 1, fontSize: 12, color: "#888" }}>
|
|
300
|
-
(Max.
|
|
307
|
+
(Max. 200 Characters)
|
|
301
308
|
</Typography>
|
|
302
309
|
{/* Sharing Controls */}
|
|
303
|
-
{shouldShowSharingControls &&
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
<Checkbox
|
|
315
|
-
size="small"
|
|
316
|
-
checked={shareWithTeam}
|
|
317
|
-
onChange={handleShareToggle}
|
|
318
|
-
sx={{
|
|
319
|
-
color: "black",
|
|
320
|
-
"&.Mui-checked": { color: "black" },
|
|
321
|
-
}}
|
|
322
|
-
/>
|
|
323
|
-
}
|
|
324
|
-
label="Share with team member."
|
|
325
|
-
/>
|
|
326
|
-
|
|
327
|
-
{shareWithTeam && (
|
|
310
|
+
{shouldShowSharingControls &&
|
|
311
|
+
(showCheckboxes || isshow) &&
|
|
312
|
+
!disableShareFilter && (
|
|
313
|
+
<Box
|
|
314
|
+
sx={{
|
|
315
|
+
display: "flex",
|
|
316
|
+
flexDirection: "column",
|
|
317
|
+
gap: 0.5,
|
|
318
|
+
"& .MuiFormControlLabel-label": { fontSize: "14px" },
|
|
319
|
+
}}
|
|
320
|
+
>
|
|
328
321
|
<FormControlLabel
|
|
329
322
|
control={
|
|
330
323
|
<Checkbox
|
|
331
324
|
size="small"
|
|
332
|
-
checked={
|
|
333
|
-
onChange={
|
|
325
|
+
checked={shareWithTeam}
|
|
326
|
+
onChange={handleShareToggle}
|
|
334
327
|
sx={{
|
|
335
328
|
color: "black",
|
|
336
329
|
"&.Mui-checked": { color: "black" },
|
|
337
330
|
}}
|
|
338
331
|
/>
|
|
339
332
|
}
|
|
340
|
-
label="
|
|
333
|
+
label="Share with team member."
|
|
341
334
|
/>
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
335
|
+
|
|
336
|
+
{shareWithTeam && (
|
|
337
|
+
<FormControlLabel
|
|
338
|
+
control={
|
|
339
|
+
<Checkbox
|
|
340
|
+
size="small"
|
|
341
|
+
checked={allowTeamEdit}
|
|
342
|
+
onChange={handleAllowEditToggle}
|
|
343
|
+
sx={{
|
|
344
|
+
color: "black",
|
|
345
|
+
"&.Mui-checked": { color: "black" },
|
|
346
|
+
}}
|
|
347
|
+
/>
|
|
348
|
+
}
|
|
349
|
+
label="Allow editing to Team member"
|
|
350
|
+
/>
|
|
351
|
+
)}
|
|
352
|
+
</Box>
|
|
353
|
+
)}
|
|
345
354
|
{/* prefields */}
|
|
346
355
|
{showPrefields && !isshow && (
|
|
347
356
|
<Box
|
|
@@ -54,6 +54,7 @@ export function TableFilter({
|
|
|
54
54
|
showTabs: true,
|
|
55
55
|
tabOptions: {
|
|
56
56
|
isSingleFilter: false,
|
|
57
|
+
disableShareFilter: false,
|
|
57
58
|
isSingleEntity: false,
|
|
58
59
|
showFilter: "main",
|
|
59
60
|
mainFilter: {
|
|
@@ -644,6 +645,9 @@ export function TableFilter({
|
|
|
644
645
|
setFilterMaster={tableStates.setFilterMaster}
|
|
645
646
|
hasSavedFilters={hasSavedFilterRecords}
|
|
646
647
|
columnsData={columnsData}
|
|
648
|
+
disableShareFilter={
|
|
649
|
+
filterComponentOptions?.tabOptions?.disableShareFilter
|
|
650
|
+
}
|
|
647
651
|
/>
|
|
648
652
|
</Box>
|
|
649
653
|
);
|