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/internals/hooks/useStaticPicker/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/x-date-pickers/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";
|
||||
12
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/index.js
generated
vendored
Normal file
12
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "useStaticPicker", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _useStaticPicker.useStaticPicker;
|
||||
}
|
||||
});
|
||||
var _useStaticPicker = require("./useStaticPicker");
|
||||
16
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/useStaticPicker.d.ts
generated
vendored
Normal file
16
node_modules/@mui/x-date-pickers/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;
|
||||
};
|
||||
79
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/useStaticPicker.js
generated
vendored
Normal file
79
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/useStaticPicker.js
generated
vendored
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.useStaticPicker = void 0;
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
var _styles = require("@mui/material/styles");
|
||||
var _usePicker = require("../usePicker");
|
||||
var _PickerProvider = require("../../components/PickerProvider");
|
||||
var _PickersLayout = require("../../../PickersLayout");
|
||||
var _dimensions = require("../../constants/dimensions");
|
||||
var _utils = require("../../utils/utils");
|
||||
var _createNonRangePickerStepNavigation = require("../../utils/createNonRangePickerStepNavigation");
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const _excluded = ["props", "steps"];
|
||||
const PickerStaticLayout = (0, _styles.styled)(_PickersLayout.PickersLayout)(({
|
||||
theme
|
||||
}) => ({
|
||||
overflow: 'hidden',
|
||||
minWidth: _dimensions.DIALOG_WIDTH,
|
||||
backgroundColor: (theme.vars || theme).palette.background.paper
|
||||
}));
|
||||
|
||||
/**
|
||||
* Hook managing all the single-date static pickers:
|
||||
* - StaticDatePicker
|
||||
* - StaticDateTimePicker
|
||||
* - StaticTimePicker
|
||||
*/
|
||||
const useStaticPicker = _ref => {
|
||||
let {
|
||||
props,
|
||||
steps
|
||||
} = _ref,
|
||||
pickerParams = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
||||
const {
|
||||
localeText,
|
||||
slots,
|
||||
slotProps,
|
||||
displayStaticWrapperAs,
|
||||
autoFocus
|
||||
} = props;
|
||||
const getStepNavigation = (0, _createNonRangePickerStepNavigation.createNonRangePickerStepNavigation)({
|
||||
steps
|
||||
});
|
||||
const {
|
||||
providerProps,
|
||||
renderCurrentView
|
||||
} = (0, _usePicker.usePicker)((0, _extends2.default)({}, pickerParams, {
|
||||
props,
|
||||
variant: displayStaticWrapperAs,
|
||||
autoFocusView: autoFocus ?? false,
|
||||
viewContainerRole: null,
|
||||
localeText,
|
||||
getStepNavigation
|
||||
}));
|
||||
const Layout = slots?.layout ?? PickerStaticLayout;
|
||||
const renderPicker = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_PickerProvider.PickerProvider, (0, _extends2.default)({}, providerProps, {
|
||||
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Layout, (0, _extends2.default)({}, slotProps?.layout, {
|
||||
slots: slots,
|
||||
slotProps: slotProps,
|
||||
sx: (0, _utils.mergeSx)(providerProps.contextValue.rootSx, slotProps?.layout?.sx),
|
||||
className: (0, _clsx.default)(providerProps.contextValue.rootClassName, slotProps?.layout?.className),
|
||||
ref: providerProps.contextValue.rootRef,
|
||||
children: renderCurrentView()
|
||||
}))
|
||||
}));
|
||||
if (process.env.NODE_ENV !== "production") renderPicker.displayName = "renderPicker";
|
||||
return {
|
||||
renderPicker
|
||||
};
|
||||
};
|
||||
exports.useStaticPicker = useStaticPicker;
|
||||
46
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts
generated
vendored
Normal file
46
node_modules/@mui/x-date-pickers/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;
|
||||
}
|
||||
5
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/useStaticPicker.types.js
generated
vendored
Normal file
5
node_modules/@mui/x-date-pickers/internals/hooks/useStaticPicker/useStaticPicker.types.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue