grep-components 2.8.0 → 2.9.0-GREPF-2682.1
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.
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Dayjs } from 'dayjs';
|
|
3
2
|
import { DatePickerProps } from '@mui/x-date-pickers';
|
|
4
3
|
import { TextFieldProps } from '@mui/material';
|
|
5
4
|
import '../../utils/dateHelper';
|
|
6
5
|
import { ParseableDate } from '../../utils/dateHelper';
|
|
7
6
|
type InputProps = Pick<TextFieldProps, 'id' | 'variant' | 'label' | 'fullWidth' | 'placeholder' | 'helperText' | 'required' | 'onFocus' | 'margin' | 'sx'>;
|
|
8
|
-
export interface GrepDatePickerProps extends Omit<DatePickerProps
|
|
7
|
+
export interface GrepDatePickerProps extends Omit<DatePickerProps, 'value' | 'renderInput'>, InputProps {
|
|
9
8
|
value?: ParseableDate | null;
|
|
10
9
|
errorMessage?: string;
|
|
11
10
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { DateRangeValue } from '../../utils/dateHelper';
|
|
3
3
|
import { GrepDatePickerProps } from '../GrepDatePicker';
|
|
4
4
|
import { Dayjs } from 'dayjs';
|
|
5
|
-
import { GridSpacing } from '@mui/material/
|
|
5
|
+
import { GridSpacing } from '@mui/material/Grid';
|
|
6
6
|
type CommonProperties = Pick<GrepDatePickerProps, 'variant' | 'margin' | 'sx'>;
|
|
7
7
|
interface Props extends CommonProperties {
|
|
8
8
|
from: Omit<GrepDatePickerProps, 'onChange'>;
|
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import CircularProgress$1 from '@mui/material/CircularProgress';
|
|
|
41
41
|
import Info from '@mui/icons-material/Info';
|
|
42
42
|
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
43
43
|
import { LocalizationProvider, DesktopDatePicker } from '@mui/x-date-pickers';
|
|
44
|
-
import
|
|
44
|
+
import Grid from '@mui/material/Grid';
|
|
45
45
|
import ListItem$1 from '@mui/material/ListItem';
|
|
46
46
|
import Collapse$1 from '@mui/material/Collapse';
|
|
47
47
|
import ExpandLess from '@mui/icons-material/ExpandLess';
|
|
@@ -61,7 +61,6 @@ import { $isElementNode, ArtificialNode__DO_NOT_USE, $createLineBreakNode, $isRo
|
|
|
61
61
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
|
62
62
|
import FormatBold from '@mui/icons-material/FormatBold';
|
|
63
63
|
import FormatItalic from '@mui/icons-material/FormatItalic';
|
|
64
|
-
import { Menu as Menu$2 } from '@mui/icons-material';
|
|
65
64
|
import Dialog from '@mui/material/Dialog';
|
|
66
65
|
import DialogActions from '@mui/material/DialogActions';
|
|
67
66
|
import DialogContent from '@mui/material/DialogContent';
|
|
@@ -3230,10 +3229,10 @@ const GrepDateRange = ({ onChange, spacing = 3, style, fullWidth, from: fromProp
|
|
|
3230
3229
|
const [to, setTo] = useDate(toProperties.value);
|
|
3231
3230
|
const { minDate, maxDate, ...commonProperties } = properties;
|
|
3232
3231
|
useEffect(() => onChange(new DateRangeValue(from, to)), [String(from), String(to)]);
|
|
3233
|
-
return (React__default.createElement(
|
|
3234
|
-
React__default.createElement(
|
|
3232
|
+
return (React__default.createElement(Grid, { container: true, spacing: spacing, style: style },
|
|
3233
|
+
React__default.createElement(Grid, { size: { xs: 12, sm: fullWidth ? 12 : 6 } },
|
|
3235
3234
|
React__default.createElement(DatePicker, { id: String(fromProperties.label), fullWidth: true, minDate: minDate, ...commonProperties, ...fromProperties, value: from, maxDate: to?.subtract(1, 'day') || undefined, onChange: setFrom })),
|
|
3236
|
-
React__default.createElement(
|
|
3235
|
+
React__default.createElement(Grid, { size: { xs: 12, sm: fullWidth ? 12 : 6 } },
|
|
3237
3236
|
React__default.createElement(DatePicker, { id: String(toProperties.label), fullWidth: true, maxDate: maxDate, ...commonProperties, ...toProperties, value: to, minDate: from?.add(1, 'day') || undefined, onChange: setTo }))));
|
|
3238
3237
|
};
|
|
3239
3238
|
|
|
@@ -12251,7 +12250,7 @@ const MobileAppBar = ({ userMenuItems, menuItems, }) => {
|
|
|
12251
12250
|
React.createElement(AppBar$1, { position: "static", role: "navigation" },
|
|
12252
12251
|
React.createElement(Toolbar$1, { style: { minHeight: '50px' } },
|
|
12253
12252
|
React.createElement(IconButton$1, { size: "medium", edge: "start", color: "inherit", "aria-label": "menu", style: { marginRight: 2 }, onClick: handleClickNav },
|
|
12254
|
-
React.createElement(
|
|
12253
|
+
React.createElement(MenuIcon, { sx: { color: 'white' } })),
|
|
12255
12254
|
React.createElement(Menu$1, { id: "basic-menu", anchorEl: anchorElNav, open: openNav, onClose: handleCloseNav, MenuListProps: {
|
|
12256
12255
|
'aria-labelledby': 'basic-button',
|
|
12257
12256
|
} }, menuItems.map((page) => (React.createElement(MobileToolbarMenuItem, { key: page.name, to: page.redirectUrl || '' },
|