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
17
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.d.ts
generated
vendored
Normal file
17
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import * as React from 'react';
|
||||
import { StaticTimePickerProps } from "./StaticTimePicker.types.js";
|
||||
type StaticTimePickerComponent = ((props: StaticTimePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
||||
propTypes?: any;
|
||||
};
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
|
||||
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [StaticTimePicker API](https://mui.com/x/api/date-pickers/static-time-picker/)
|
||||
*/
|
||||
declare const StaticTimePicker: StaticTimePickerComponent;
|
||||
export { StaticTimePicker };
|
||||
249
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.js
generated
vendored
Normal file
249
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.js
generated
vendored
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
'use client';
|
||||
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useTimePickerDefaultizedProps } from "../TimePicker/shared.js";
|
||||
import { renderTimeViewClock } from "../timeViewRenderers/index.js";
|
||||
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
||||
import { useStaticPicker } from "../internals/hooks/useStaticPicker/index.js";
|
||||
import { validateTime } from "../validation/index.js";
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
|
||||
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [StaticTimePicker API](https://mui.com/x/api/date-pickers/static-time-picker/)
|
||||
*/
|
||||
const StaticTimePicker = /*#__PURE__*/React.forwardRef(function StaticTimePicker(inProps, ref) {
|
||||
const defaultizedProps = useTimePickerDefaultizedProps(inProps, 'MuiStaticTimePicker');
|
||||
const displayStaticWrapperAs = defaultizedProps.displayStaticWrapperAs ?? 'mobile';
|
||||
const ampmInClock = defaultizedProps.ampmInClock ?? displayStaticWrapperAs === 'desktop';
|
||||
const viewRenderers = _extends({
|
||||
hours: renderTimeViewClock,
|
||||
minutes: renderTimeViewClock,
|
||||
seconds: renderTimeViewClock
|
||||
}, defaultizedProps.viewRenderers);
|
||||
|
||||
// Props with the default values specific to the static variant
|
||||
const props = _extends({}, defaultizedProps, {
|
||||
viewRenderers,
|
||||
displayStaticWrapperAs,
|
||||
ampmInClock,
|
||||
slotProps: _extends({}, defaultizedProps.slotProps, {
|
||||
toolbar: _extends({
|
||||
hidden: displayStaticWrapperAs === 'desktop',
|
||||
ampmInClock
|
||||
}, defaultizedProps.slotProps?.toolbar)
|
||||
})
|
||||
});
|
||||
const {
|
||||
renderPicker
|
||||
} = useStaticPicker({
|
||||
ref,
|
||||
props,
|
||||
valueManager: singleItemValueManager,
|
||||
valueType: 'time',
|
||||
validator: validateTime,
|
||||
steps: null
|
||||
});
|
||||
return renderPicker();
|
||||
});
|
||||
if (process.env.NODE_ENV !== "production") StaticTimePicker.displayName = "StaticTimePicker";
|
||||
StaticTimePicker.propTypes = {
|
||||
// ----------------------------- Warning --------------------------------
|
||||
// | These PropTypes are generated from the TypeScript type definitions |
|
||||
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* 12h/24h view for hour selection clock.
|
||||
* @default adapter.is12HourCycleInCurrentLocale()
|
||||
*/
|
||||
ampm: PropTypes.bool,
|
||||
/**
|
||||
* Display ampm controls under the clock (instead of in the toolbar).
|
||||
* @default true on desktop, false on mobile
|
||||
*/
|
||||
ampmInClock: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, the main element is focused during the first mount.
|
||||
* This main element is:
|
||||
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
||||
* - the `input` element if there is a field rendered.
|
||||
*/
|
||||
autoFocus: PropTypes.bool,
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The default value.
|
||||
* Used when the component is not controlled.
|
||||
*/
|
||||
defaultValue: PropTypes.object,
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* When disabled, the value cannot be changed and no interaction is possible.
|
||||
* @default false
|
||||
*/
|
||||
disabled: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
||||
* @default false
|
||||
*/
|
||||
disableFuture: PropTypes.bool,
|
||||
/**
|
||||
* Do not ignore date part when validating min/max time.
|
||||
* @default false
|
||||
*/
|
||||
disableIgnoringDatePartForTimeValidation: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
||||
* @default false
|
||||
*/
|
||||
disablePast: PropTypes.bool,
|
||||
/**
|
||||
* Force static wrapper inner components to be rendered in mobile or desktop mode.
|
||||
* @default "mobile"
|
||||
*/
|
||||
displayStaticWrapperAs: PropTypes.oneOf(['desktop', 'mobile']),
|
||||
/**
|
||||
* Locale for components texts.
|
||||
* Allows overriding texts coming from `LocalizationProvider` and `theme`.
|
||||
*/
|
||||
localeText: PropTypes.object,
|
||||
/**
|
||||
* Maximal selectable time.
|
||||
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
||||
*/
|
||||
maxTime: PropTypes.object,
|
||||
/**
|
||||
* Minimal selectable time.
|
||||
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
||||
*/
|
||||
minTime: PropTypes.object,
|
||||
/**
|
||||
* Step over minutes.
|
||||
* @default 1
|
||||
*/
|
||||
minutesStep: PropTypes.number,
|
||||
/**
|
||||
* Callback fired when the value is accepted.
|
||||
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
||||
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
||||
* @param {TValue} value The value that was just accepted.
|
||||
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
||||
*/
|
||||
onAccept: PropTypes.func,
|
||||
/**
|
||||
* Callback fired when the value changes.
|
||||
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
||||
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
||||
* @param {TValue} value The new value.
|
||||
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
||||
*/
|
||||
onChange: PropTypes.func,
|
||||
/**
|
||||
* 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: PropTypes.func,
|
||||
/**
|
||||
* Callback fired when the error associated with the current value changes.
|
||||
* When a validation error is detected, the `error` parameter contains a non-null value.
|
||||
* This can be used to render an appropriate form error.
|
||||
* @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
|
||||
* @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
|
||||
* @param {TError} error The reason why the current value is not valid.
|
||||
* @param {TValue} value The value associated with the error.
|
||||
*/
|
||||
onError: PropTypes.func,
|
||||
/**
|
||||
* Callback fired on view change.
|
||||
* @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.
|
||||
* @param {TView} view The new view.
|
||||
*/
|
||||
onViewChange: PropTypes.func,
|
||||
/**
|
||||
* The default visible view.
|
||||
* Used when the component view is not controlled.
|
||||
* Must be a valid option from `views` list.
|
||||
*/
|
||||
openTo: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
|
||||
/**
|
||||
* Force rendering in particular orientation.
|
||||
*/
|
||||
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
||||
/**
|
||||
* If `true`, the component is read-only.
|
||||
* When read-only, the value cannot be changed but the user can interact with the interface.
|
||||
* @default false
|
||||
*/
|
||||
readOnly: PropTypes.bool,
|
||||
/**
|
||||
* If `true`, disable heavy animations.
|
||||
* @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13
|
||||
*/
|
||||
reduceAnimations: PropTypes.bool,
|
||||
/**
|
||||
* The date used to generate the new value when both `value` and `defaultValue` are empty.
|
||||
* @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
|
||||
*/
|
||||
referenceDate: PropTypes.object,
|
||||
/**
|
||||
* Disable specific time.
|
||||
* @param {PickerValidDate} value The value to check.
|
||||
* @param {TimeView} view The clock type of the timeValue.
|
||||
* @returns {boolean} If `true` the time will be disabled.
|
||||
*/
|
||||
shouldDisableTime: PropTypes.func,
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: PropTypes.object,
|
||||
/**
|
||||
* Overridable component slots.
|
||||
* @default {}
|
||||
*/
|
||||
slots: PropTypes.object,
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
||||
/**
|
||||
* Choose which timezone to use for the value.
|
||||
* Example: "default", "system", "UTC", "America/New_York".
|
||||
* If you pass values from other timezones to some props, they will be converted to this timezone before being used.
|
||||
* @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
|
||||
* @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
|
||||
*/
|
||||
timezone: PropTypes.string,
|
||||
/**
|
||||
* The selected value.
|
||||
* Used when the component is controlled.
|
||||
*/
|
||||
value: PropTypes.object,
|
||||
/**
|
||||
* The visible view.
|
||||
* Used when the component view is controlled.
|
||||
* Must be a valid option from `views` list.
|
||||
*/
|
||||
view: PropTypes.oneOf(['hours', 'minutes', 'seconds']),
|
||||
/**
|
||||
* Define custom view renderers for each section.
|
||||
* If `null`, the section will only have field editing.
|
||||
* If `undefined`, internally defined view will be used.
|
||||
*/
|
||||
viewRenderers: PropTypes.shape({
|
||||
hours: PropTypes.func,
|
||||
minutes: PropTypes.func,
|
||||
seconds: PropTypes.func
|
||||
}),
|
||||
/**
|
||||
* Available views.
|
||||
*/
|
||||
views: PropTypes.arrayOf(PropTypes.oneOf(['hours', 'minutes', 'seconds']).isRequired)
|
||||
};
|
||||
export { StaticTimePicker };
|
||||
18
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.types.d.ts
generated
vendored
Normal file
18
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { MakeOptional } from '@mui/x-internals/types';
|
||||
import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } from "../TimePicker/shared.js";
|
||||
import { StaticOnlyPickerProps, UseStaticPickerSlots, UseStaticPickerSlotProps } from "../internals/hooks/useStaticPicker/index.js";
|
||||
import { TimeView } from "../models/index.js";
|
||||
export interface StaticTimePickerSlots extends BaseTimePickerSlots, UseStaticPickerSlots {}
|
||||
export interface StaticTimePickerSlotProps extends BaseTimePickerSlotProps, UseStaticPickerSlotProps {}
|
||||
export interface StaticTimePickerProps extends BaseTimePickerProps<TimeView>, MakeOptional<StaticOnlyPickerProps, 'displayStaticWrapperAs'> {
|
||||
/**
|
||||
* Overridable component slots.
|
||||
* @default {}
|
||||
*/
|
||||
slots?: StaticTimePickerSlots;
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps?: StaticTimePickerSlotProps;
|
||||
}
|
||||
1
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.types.js
generated
vendored
Normal file
1
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/StaticTimePicker.types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
2
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { StaticTimePicker } from "./StaticTimePicker.js";
|
||||
export type { StaticTimePickerProps, StaticTimePickerSlots, StaticTimePickerSlotProps } from "./StaticTimePicker.types.js";
|
||||
1
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/index.js
generated
vendored
Normal file
1
node_modules/@mui/x-date-pickers/esm/StaticTimePicker/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { StaticTimePicker } from "./StaticTimePicker.js";
|
||||
Loading…
Add table
Add a link
Reference in a new issue