1
0
Fork 0

Added Statistics calculation

Statistics now show calculated values
This commit is contained in:
Techognito 2025-09-04 17:30:00 +02:00
parent fe87374e47
commit fc0f69dacb
2147 changed files with 141321 additions and 39 deletions

View file

@ -0,0 +1,70 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["props", "steps"];
import * as React from 'react';
import clsx from 'clsx';
import { styled } from '@mui/material/styles';
import { usePicker } from "../usePicker/index.js";
import { PickerProvider } from "../../components/PickerProvider.js";
import { PickersLayout } from "../../../PickersLayout/index.js";
import { DIALOG_WIDTH } from "../../constants/dimensions.js";
import { mergeSx } from "../../utils/utils.js";
import { createNonRangePickerStepNavigation } from "../../utils/createNonRangePickerStepNavigation.js";
import { jsx as _jsx } from "react/jsx-runtime";
const PickerStaticLayout = styled(PickersLayout)(({
theme
}) => ({
overflow: 'hidden',
minWidth: DIALOG_WIDTH,
backgroundColor: (theme.vars || theme).palette.background.paper
}));
/**
* Hook managing all the single-date static pickers:
* - StaticDatePicker
* - StaticDateTimePicker
* - StaticTimePicker
*/
export const useStaticPicker = _ref => {
let {
props,
steps
} = _ref,
pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);
const {
localeText,
slots,
slotProps,
displayStaticWrapperAs,
autoFocus
} = props;
const getStepNavigation = createNonRangePickerStepNavigation({
steps
});
const {
providerProps,
renderCurrentView
} = usePicker(_extends({}, pickerParams, {
props,
variant: displayStaticWrapperAs,
autoFocusView: autoFocus ?? false,
viewContainerRole: null,
localeText,
getStepNavigation
}));
const Layout = slots?.layout ?? PickerStaticLayout;
const renderPicker = () => /*#__PURE__*/_jsx(PickerProvider, _extends({}, providerProps, {
children: /*#__PURE__*/_jsx(Layout, _extends({}, slotProps?.layout, {
slots: slots,
slotProps: slotProps,
sx: mergeSx(providerProps.contextValue.rootSx, slotProps?.layout?.sx),
className: clsx(providerProps.contextValue.rootClassName, slotProps?.layout?.className),
ref: providerProps.contextValue.rootRef,
children: renderCurrentView()
}))
}));
if (process.env.NODE_ENV !== "production") renderPicker.displayName = "renderPicker";
return {
renderPicker
};
};