Added Statistics calculation
Statistics now show calculated values
This commit is contained in:
parent
fe87374e47
commit
fc0f69dacb
2147 changed files with 141321 additions and 39 deletions
28
node_modules/@mui/x-date-pickers/esm/internals/utils/views.js
generated
vendored
Normal file
28
node_modules/@mui/x-date-pickers/esm/internals/utils/views.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
export const areViewsEqual = (views, expectedViews) => {
|
||||
if (views.length !== expectedViews.length) {
|
||||
return false;
|
||||
}
|
||||
return expectedViews.every(expectedView => views.includes(expectedView));
|
||||
};
|
||||
export const applyDefaultViewProps = ({
|
||||
openTo,
|
||||
defaultOpenTo,
|
||||
views,
|
||||
defaultViews
|
||||
}) => {
|
||||
const viewsWithDefault = views ?? defaultViews;
|
||||
let openToWithDefault;
|
||||
if (openTo != null) {
|
||||
openToWithDefault = openTo;
|
||||
} else if (viewsWithDefault.includes(defaultOpenTo)) {
|
||||
openToWithDefault = defaultOpenTo;
|
||||
} else if (viewsWithDefault.length > 0) {
|
||||
openToWithDefault = viewsWithDefault[0];
|
||||
} else {
|
||||
throw new Error('MUI X: The `views` prop must contain at least one view.');
|
||||
}
|
||||
return {
|
||||
views: viewsWithDefault,
|
||||
openTo: openToWithDefault
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue