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/TimeField/TimeField.d.ts
generated
vendored
Normal file
17
node_modules/@mui/x-date-pickers/TimeField/TimeField.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import * as React from 'react';
|
||||
import { TimeFieldProps } from "./TimeField.types.js";
|
||||
type TimeFieldComponent = (<TEnableAccessibleFieldDOMStructure extends boolean = true>(props: TimeFieldProps<TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
||||
propTypes?: any;
|
||||
};
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [TimeField](http://mui.com/x/react-date-pickers/time-field/)
|
||||
* - [Fields](https://mui.com/x/react-date-pickers/fields/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [TimeField API](https://mui.com/x/api/date-pickers/time-field/)
|
||||
*/
|
||||
declare const TimeField: TimeFieldComponent;
|
||||
export { TimeField };
|
||||
335
node_modules/@mui/x-date-pickers/TimeField/TimeField.js
generated
vendored
Normal file
335
node_modules/@mui/x-date-pickers/TimeField/TimeField.js
generated
vendored
Normal file
|
|
@ -0,0 +1,335 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.TimeField = void 0;
|
||||
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _styles = require("@mui/material/styles");
|
||||
var _refType = _interopRequireDefault(require("@mui/utils/refType"));
|
||||
var _useTimeField = require("./useTimeField");
|
||||
var _PickerFieldUI = require("../internals/components/PickerFieldUI");
|
||||
var _icons = require("../icons");
|
||||
var _jsxRuntime = require("react/jsx-runtime");
|
||||
const _excluded = ["slots", "slotProps", "InputProps", "inputProps"];
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [TimeField](http://mui.com/x/react-date-pickers/time-field/)
|
||||
* - [Fields](https://mui.com/x/react-date-pickers/fields/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [TimeField API](https://mui.com/x/api/date-pickers/time-field/)
|
||||
*/
|
||||
const TimeField = exports.TimeField = /*#__PURE__*/React.forwardRef(function TimeField(inProps, inRef) {
|
||||
const themeProps = (0, _styles.useThemeProps)({
|
||||
props: inProps,
|
||||
name: 'MuiTimeField'
|
||||
});
|
||||
const {
|
||||
slots,
|
||||
slotProps
|
||||
} = themeProps,
|
||||
other = (0, _objectWithoutPropertiesLoose2.default)(themeProps, _excluded);
|
||||
const textFieldProps = (0, _PickerFieldUI.useFieldTextFieldProps)({
|
||||
slotProps,
|
||||
ref: inRef,
|
||||
externalForwardedProps: other
|
||||
});
|
||||
const fieldResponse = (0, _useTimeField.useTimeField)(textFieldProps);
|
||||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PickerFieldUI.PickerFieldUI, {
|
||||
slots: slots,
|
||||
slotProps: slotProps,
|
||||
fieldResponse: fieldResponse,
|
||||
defaultOpenPickerIcon: _icons.ClockIcon
|
||||
});
|
||||
});
|
||||
if (process.env.NODE_ENV !== "production") TimeField.displayName = "TimeField";
|
||||
process.env.NODE_ENV !== "production" ? TimeField.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.default.bool,
|
||||
/**
|
||||
* If `true`, the `input` element is focused during the first mount.
|
||||
* @default false
|
||||
*/
|
||||
autoFocus: _propTypes.default.bool,
|
||||
className: _propTypes.default.string,
|
||||
/**
|
||||
* If `true`, a clear button will be shown in the field allowing value clearing.
|
||||
* @default false
|
||||
*/
|
||||
clearable: _propTypes.default.bool,
|
||||
/**
|
||||
* The position at which the clear button is placed.
|
||||
* If the field is not clearable, the button is not rendered.
|
||||
* @default 'end'
|
||||
*/
|
||||
clearButtonPosition: _propTypes.default.oneOf(['end', 'start']),
|
||||
/**
|
||||
* The color of the component.
|
||||
* It supports both default and custom theme colors, which can be added as shown in the
|
||||
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
||||
* @default 'primary'
|
||||
*/
|
||||
color: _propTypes.default.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
||||
component: _propTypes.default.elementType,
|
||||
/**
|
||||
* The default value. Use when the component is not controlled.
|
||||
*/
|
||||
defaultValue: _propTypes.default.object,
|
||||
/**
|
||||
* If `true`, the component is disabled.
|
||||
* When disabled, the value cannot be changed and no interaction is possible.
|
||||
* @default false
|
||||
*/
|
||||
disabled: _propTypes.default.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.default.bool,
|
||||
/**
|
||||
* Do not ignore date part when validating min/max time.
|
||||
* @default false
|
||||
*/
|
||||
disableIgnoringDatePartForTimeValidation: _propTypes.default.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.default.bool,
|
||||
/**
|
||||
* @default true
|
||||
*/
|
||||
enableAccessibleFieldDOMStructure: _propTypes.default.bool,
|
||||
/**
|
||||
* If `true`, the component is displayed in focused state.
|
||||
*/
|
||||
focused: _propTypes.default.bool,
|
||||
/**
|
||||
* Format of the date when rendered in the input(s).
|
||||
*/
|
||||
format: _propTypes.default.string,
|
||||
/**
|
||||
* Density of the format when rendered in the input.
|
||||
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
||||
* @default "dense"
|
||||
*/
|
||||
formatDensity: _propTypes.default.oneOf(['dense', 'spacious']),
|
||||
/**
|
||||
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
||||
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
FormHelperTextProps: _propTypes.default.object,
|
||||
/**
|
||||
* If `true`, the input will take up the full width of its container.
|
||||
* @default false
|
||||
*/
|
||||
fullWidth: _propTypes.default.bool,
|
||||
/**
|
||||
* The helper text content.
|
||||
*/
|
||||
helperText: _propTypes.default.node,
|
||||
/**
|
||||
* If `true`, the label is hidden.
|
||||
* This is used to increase density for a `FilledInput`.
|
||||
* Be sure to add `aria-label` to the `input` element.
|
||||
* @default false
|
||||
*/
|
||||
hiddenLabel: _propTypes.default.bool,
|
||||
/**
|
||||
* The id of the `input` element.
|
||||
* Use this prop to make `label` and `helperText` accessible for screen readers.
|
||||
*/
|
||||
id: _propTypes.default.string,
|
||||
/**
|
||||
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
||||
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
||||
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputLabelProps: _propTypes.default.object,
|
||||
/**
|
||||
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
|
||||
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
inputProps: _propTypes.default.object,
|
||||
/**
|
||||
* Props applied to the Input element.
|
||||
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
||||
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
||||
* component depending on the `variant` prop value.
|
||||
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
||||
*/
|
||||
InputProps: _propTypes.default.object,
|
||||
/**
|
||||
* Pass a ref to the `input` element.
|
||||
*/
|
||||
inputRef: _refType.default,
|
||||
/**
|
||||
* The label content.
|
||||
*/
|
||||
label: _propTypes.default.node,
|
||||
/**
|
||||
* If `dense` or `normal`, will adjust vertical spacing of this and contained components.
|
||||
* @default 'none'
|
||||
*/
|
||||
margin: _propTypes.default.oneOf(['dense', 'none', 'normal']),
|
||||
/**
|
||||
* Maximal selectable time.
|
||||
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
||||
*/
|
||||
maxTime: _propTypes.default.object,
|
||||
/**
|
||||
* Minimal selectable time.
|
||||
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
||||
*/
|
||||
minTime: _propTypes.default.object,
|
||||
/**
|
||||
* Step over minutes.
|
||||
* @default 1
|
||||
*/
|
||||
minutesStep: _propTypes.default.number,
|
||||
/**
|
||||
* Name attribute of the `input` element.
|
||||
*/
|
||||
name: _propTypes.default.string,
|
||||
onBlur: _propTypes.default.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.default.func,
|
||||
/**
|
||||
* Callback fired when the clear button is clicked.
|
||||
*/
|
||||
onClear: _propTypes.default.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.default.func,
|
||||
onFocus: _propTypes.default.func,
|
||||
/**
|
||||
* Callback fired when the selected sections change.
|
||||
* @param {FieldSelectedSections} newValue The new selected sections.
|
||||
*/
|
||||
onSelectedSectionsChange: _propTypes.default.func,
|
||||
/**
|
||||
* The position at which the opening button is placed.
|
||||
* If there is no Picker to open, the button is not rendered
|
||||
* @default 'end'
|
||||
*/
|
||||
openPickerButtonPosition: _propTypes.default.oneOf(['end', 'start']),
|
||||
/**
|
||||
* 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.default.bool,
|
||||
/**
|
||||
* The date used to generate a part of the new value that is not present in the format when both `value` and `defaultValue` are empty.
|
||||
* For example, on time fields it will be used to determine the date to set.
|
||||
* @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.
|
||||
*/
|
||||
referenceDate: _propTypes.default.object,
|
||||
/**
|
||||
* If `true`, the label is displayed as required and the `input` element is required.
|
||||
* @default false
|
||||
*/
|
||||
required: _propTypes.default.bool,
|
||||
/**
|
||||
* The currently selected sections.
|
||||
* This prop accepts four formats:
|
||||
* 1. If a number is provided, the section at this index will be selected.
|
||||
* 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
||||
* 3. If `"all"` is provided, all the sections will be selected.
|
||||
* 4. If `null` is provided, no section will be selected.
|
||||
* If not provided, the selected sections will be handled internally.
|
||||
*/
|
||||
selectedSections: _propTypes.default.oneOfType([_propTypes.default.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), _propTypes.default.number]),
|
||||
/**
|
||||
* 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.default.func,
|
||||
/**
|
||||
* If `true`, the format will respect the leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
|
||||
* If `false`, the format will always add leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
|
||||
*
|
||||
* Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (for example "DD"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.
|
||||
*
|
||||
* Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.
|
||||
* If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\u200e/g, '')`.
|
||||
*
|
||||
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
||||
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
shouldRespectLeadingZeros: _propTypes.default.bool,
|
||||
/**
|
||||
* The size of the component.
|
||||
* @default 'medium'
|
||||
*/
|
||||
size: _propTypes.default.oneOf(['medium', 'small']),
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: _propTypes.default.object,
|
||||
/**
|
||||
* Overridable component slots.
|
||||
* @default {}
|
||||
*/
|
||||
slots: _propTypes.default.object,
|
||||
style: _propTypes.default.object,
|
||||
/**
|
||||
* The system prop that allows defining system overrides as well as additional CSS styles.
|
||||
*/
|
||||
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.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.default.string,
|
||||
/**
|
||||
* The ref object used to imperatively interact with the field.
|
||||
*/
|
||||
unstableFieldRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
||||
/**
|
||||
* The selected value.
|
||||
* Used when the component is controlled.
|
||||
*/
|
||||
value: _propTypes.default.object,
|
||||
/**
|
||||
* The variant to use.
|
||||
* @default 'outlined'
|
||||
*/
|
||||
variant: _propTypes.default.oneOf(['filled', 'outlined', 'standard'])
|
||||
} : void 0;
|
||||
22
node_modules/@mui/x-date-pickers/TimeField/TimeField.types.d.ts
generated
vendored
Normal file
22
node_modules/@mui/x-date-pickers/TimeField/TimeField.types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { MakeOptional } from '@mui/x-internals/types';
|
||||
import { UseFieldInternalProps } from "../internals/hooks/useField/index.js";
|
||||
import { TimeValidationError, BuiltInFieldTextFieldProps } from "../models/index.js";
|
||||
import { ExportedValidateTimeProps } from "../validation/validateTime.js";
|
||||
import { AmPmProps } from "../internals/models/props/time.js";
|
||||
import { PickerValue } from "../internals/models/index.js";
|
||||
import { ExportedPickerFieldUIProps, PickerFieldUISlotProps, PickerFieldUISlots } from "../internals/components/PickerFieldUI.js";
|
||||
export interface UseTimeFieldProps<TEnableAccessibleFieldDOMStructure extends boolean> extends MakeOptional<UseFieldInternalProps<PickerValue, TEnableAccessibleFieldDOMStructure, TimeValidationError>, 'format'>, ExportedValidateTimeProps, ExportedPickerFieldUIProps, AmPmProps {}
|
||||
export type TimeFieldProps<TEnableAccessibleFieldDOMStructure extends boolean = true> = UseTimeFieldProps<TEnableAccessibleFieldDOMStructure> & Omit<BuiltInFieldTextFieldProps<TEnableAccessibleFieldDOMStructure>, keyof UseTimeFieldProps<TEnableAccessibleFieldDOMStructure>> & {
|
||||
/**
|
||||
* Overridable component slots.
|
||||
* @default {}
|
||||
*/
|
||||
slots?: TimeFieldSlots;
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps?: TimeFieldSlotProps;
|
||||
};
|
||||
export interface TimeFieldSlots extends PickerFieldUISlots {}
|
||||
export interface TimeFieldSlotProps extends PickerFieldUISlotProps {}
|
||||
5
node_modules/@mui/x-date-pickers/TimeField/TimeField.types.js
generated
vendored
Normal file
5
node_modules/@mui/x-date-pickers/TimeField/TimeField.types.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
3
node_modules/@mui/x-date-pickers/TimeField/index.d.ts
generated
vendored
Normal file
3
node_modules/@mui/x-date-pickers/TimeField/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export { TimeField } from "./TimeField.js";
|
||||
export { useTimeField as unstable_useTimeField } from "./useTimeField.js";
|
||||
export type { UseTimeFieldProps, TimeFieldProps } from "./TimeField.types.js";
|
||||
19
node_modules/@mui/x-date-pickers/TimeField/index.js
generated
vendored
Normal file
19
node_modules/@mui/x-date-pickers/TimeField/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "TimeField", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _TimeField.TimeField;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "unstable_useTimeField", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _useTimeField.useTimeField;
|
||||
}
|
||||
});
|
||||
var _TimeField = require("./TimeField");
|
||||
var _useTimeField = require("./useTimeField");
|
||||
2
node_modules/@mui/x-date-pickers/TimeField/useTimeField.d.ts
generated
vendored
Normal file
2
node_modules/@mui/x-date-pickers/TimeField/useTimeField.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import { UseTimeFieldProps } from "./TimeField.types.js";
|
||||
export declare const useTimeField: <TEnableAccessibleFieldDOMStructure extends boolean, TProps extends UseTimeFieldProps<TEnableAccessibleFieldDOMStructure>>(props: TProps) => import("../internals/index.js").UseFieldReturnValue<TEnableAccessibleFieldDOMStructure, TProps>;
|
||||
17
node_modules/@mui/x-date-pickers/TimeField/useTimeField.js
generated
vendored
Normal file
17
node_modules/@mui/x-date-pickers/TimeField/useTimeField.js
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.useTimeField = void 0;
|
||||
var _useField = require("../internals/hooks/useField");
|
||||
var _managers = require("../managers");
|
||||
const useTimeField = props => {
|
||||
const manager = (0, _managers.useTimeManager)(props);
|
||||
return (0, _useField.useField)({
|
||||
manager,
|
||||
props
|
||||
});
|
||||
};
|
||||
exports.useTimeField = useTimeField;
|
||||
Loading…
Add table
Add a link
Reference in a new issue