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
2
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { useStaticPicker } from "./useStaticPicker.js";
|
||||
export type { UseStaticPickerSlots, UseStaticPickerSlotProps, StaticOnlyPickerProps } from "./useStaticPicker.types.js";
|
||||
1
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/index.js
generated
vendored
Normal file
1
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { useStaticPicker } from "./useStaticPicker.js";
|
||||
16
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.d.ts
generated
vendored
Normal file
16
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from 'react';
|
||||
import { UseStaticPickerParams, UseStaticPickerProps } from "./useStaticPicker.types.js";
|
||||
import { DateOrTimeViewWithMeridiem } from "../../models/index.js";
|
||||
/**
|
||||
* Hook managing all the single-date static pickers:
|
||||
* - StaticDatePicker
|
||||
* - StaticDateTimePicker
|
||||
* - StaticTimePicker
|
||||
*/
|
||||
export declare const useStaticPicker: <TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseStaticPickerProps<TView, any, TExternalProps>>({
|
||||
props,
|
||||
steps,
|
||||
...pickerParams
|
||||
}: UseStaticPickerParams<TView, TExternalProps>) => {
|
||||
renderPicker: () => React.JSX.Element;
|
||||
};
|
||||
70
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.js
generated
vendored
Normal file
70
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.js
generated
vendored
Normal 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
|
||||
};
|
||||
};
|
||||
46
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts
generated
vendored
Normal file
46
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps } from "../../../PickersLayout/PickersLayout.types.js";
|
||||
import { BasePickerProps } from "../../models/props/basePickerProps.js";
|
||||
import { UsePickerParameters, UsePickerProps } from "../usePicker/index.js";
|
||||
import { DateOrTimeViewWithMeridiem, PickerValue } from "../../models/index.js";
|
||||
import { PickerStep } from "../../utils/createNonRangePickerStepNavigation.js";
|
||||
export interface UseStaticPickerSlots extends ExportedPickersLayoutSlots<PickerValue> {}
|
||||
export interface UseStaticPickerSlotProps extends ExportedPickersLayoutSlotProps<PickerValue> {}
|
||||
export interface StaticOnlyPickerProps {
|
||||
/**
|
||||
* Force static wrapper inner components to be rendered in mobile or desktop mode.
|
||||
* @default "mobile"
|
||||
*/
|
||||
displayStaticWrapperAs: 'desktop' | 'mobile';
|
||||
/**
|
||||
* If `true`, the view is focused during the first mount.
|
||||
* @default false
|
||||
*/
|
||||
autoFocus?: boolean;
|
||||
/**
|
||||
* Callback fired when component requests to be closed.
|
||||
* Can be fired when selecting (by default on `desktop` mode) or clearing a value.
|
||||
* @deprecated Please avoid using as it will be removed in next major version.
|
||||
*/
|
||||
onClose?: () => void;
|
||||
}
|
||||
export interface UseStaticPickerProps<TView extends DateOrTimeViewWithMeridiem, TError, TExternalProps extends UsePickerProps<PickerValue, TView, TError, any>> extends BasePickerProps<PickerValue, TView, TError, TExternalProps>, StaticOnlyPickerProps {
|
||||
/**
|
||||
* Overridable component slots.
|
||||
* @default {}
|
||||
*/
|
||||
slots?: UseStaticPickerSlots;
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps?: UseStaticPickerSlotProps;
|
||||
}
|
||||
export interface UseStaticPickerParams<TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseStaticPickerProps<TView, any, TExternalProps>> extends Pick<UsePickerParameters<PickerValue, TView, TExternalProps>, 'valueManager' | 'valueType' | 'validator' | 'ref'> {
|
||||
props: TExternalProps;
|
||||
/**
|
||||
* Steps available for the picker.
|
||||
* This will be used to define the behavior of navigation actions.
|
||||
* If null, the picker will not have any step navigation.
|
||||
*/
|
||||
steps: PickerStep[] | null;
|
||||
}
|
||||
1
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.types.js
generated
vendored
Normal file
1
node_modules/@mui/x-date-pickers/esm/internals/hooks/useStaticPicker/useStaticPicker.types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
Loading…
Add table
Add a link
Reference in a new issue