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/StaticDatePicker/StaticDatePicker.d.ts
generated
vendored
Normal file
17
node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import * as React from 'react';
|
||||
import { StaticDatePickerProps } from "./StaticDatePicker.types.js";
|
||||
type StaticDatePickerComponent = ((props: StaticDatePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
||||
propTypes?: any;
|
||||
};
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
|
||||
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [StaticDatePicker API](https://mui.com/x/api/date-pickers/static-date-picker/)
|
||||
*/
|
||||
declare const StaticDatePicker: StaticDatePickerComponent;
|
||||
export { StaticDatePicker };
|
||||
317
node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.js
generated
vendored
Normal file
317
node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.js
generated
vendored
Normal file
|
|
@ -0,0 +1,317 @@
|
|||
"use strict";
|
||||
'use client';
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.StaticDatePicker = void 0;
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
var _shared = require("../DatePicker/shared");
|
||||
var _dateViewRenderers = require("../dateViewRenderers");
|
||||
var _useStaticPicker = require("../internals/hooks/useStaticPicker");
|
||||
var _validation = require("../validation");
|
||||
var _valueManagers = require("../internals/utils/valueManagers");
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
|
||||
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [StaticDatePicker API](https://mui.com/x/api/date-pickers/static-date-picker/)
|
||||
*/
|
||||
const StaticDatePicker = exports.StaticDatePicker = /*#__PURE__*/React.forwardRef(function StaticDatePicker(inProps, ref) {
|
||||
const defaultizedProps = (0, _shared.useDatePickerDefaultizedProps)(inProps, 'MuiStaticDatePicker');
|
||||
const displayStaticWrapperAs = defaultizedProps.displayStaticWrapperAs ?? 'mobile';
|
||||
const viewRenderers = (0, _extends2.default)({
|
||||
day: _dateViewRenderers.renderDateViewCalendar,
|
||||
month: _dateViewRenderers.renderDateViewCalendar,
|
||||
year: _dateViewRenderers.renderDateViewCalendar
|
||||
}, defaultizedProps.viewRenderers);
|
||||
|
||||
// Props with the default values specific to the static variant
|
||||
const props = (0, _extends2.default)({}, defaultizedProps, {
|
||||
viewRenderers,
|
||||
displayStaticWrapperAs,
|
||||
yearsPerRow: defaultizedProps.yearsPerRow ?? (displayStaticWrapperAs === 'mobile' ? 3 : 4),
|
||||
slotProps: (0, _extends2.default)({}, defaultizedProps.slotProps, {
|
||||
toolbar: (0, _extends2.default)({
|
||||
hidden: displayStaticWrapperAs === 'desktop'
|
||||
}, defaultizedProps.slotProps?.toolbar)
|
||||
})
|
||||
});
|
||||
const {
|
||||
renderPicker
|
||||
} = (0, _useStaticPicker.useStaticPicker)({
|
||||
ref,
|
||||
props,
|
||||
valueManager: _valueManagers.singleItemValueManager,
|
||||
valueType: 'date',
|
||||
validator: _validation.validateDate,
|
||||
steps: null
|
||||
});
|
||||
return renderPicker();
|
||||
});
|
||||
if (process.env.NODE_ENV !== "production") StaticDatePicker.displayName = "StaticDatePicker";
|
||||
StaticDatePicker.propTypes = {
|
||||
// ----------------------------- Warning --------------------------------
|
||||
// | These PropTypes are generated from the TypeScript type definitions |
|
||||
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* 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.default.bool,
|
||||
className: _propTypes.default.string,
|
||||
/**
|
||||
* Formats the day of week displayed in the calendar header.
|
||||
* @param {PickerValidDate} date The date of the day of week provided by the adapter.
|
||||
* @returns {string} The name to display.
|
||||
* @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
||||
*/
|
||||
dayOfWeekFormatter: _propTypes.default.func,
|
||||
/**
|
||||
* The default value.
|
||||
* Used 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,
|
||||
/**
|
||||
* If `true`, today's date is rendering without highlighting with circle.
|
||||
* @default false
|
||||
*/
|
||||
disableHighlightToday: _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,
|
||||
/**
|
||||
* Force static wrapper inner components to be rendered in mobile or desktop mode.
|
||||
* @default "mobile"
|
||||
*/
|
||||
displayStaticWrapperAs: _propTypes.default.oneOf(['desktop', 'mobile']),
|
||||
/**
|
||||
* If `true`, the week number will be display in the calendar.
|
||||
*/
|
||||
displayWeekNumber: _propTypes.default.bool,
|
||||
/**
|
||||
* The day view will show as many weeks as needed after the end of the current month to match this value.
|
||||
* Put it to 6 to have a fixed number of weeks in Gregorian calendars
|
||||
*/
|
||||
fixedWeekNumber: _propTypes.default.number,
|
||||
/**
|
||||
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
||||
* Can be used to preload information and show it in calendar.
|
||||
* @default false
|
||||
*/
|
||||
loading: _propTypes.default.bool,
|
||||
/**
|
||||
* Locale for components texts.
|
||||
* Allows overriding texts coming from `LocalizationProvider` and `theme`.
|
||||
*/
|
||||
localeText: _propTypes.default.object,
|
||||
/**
|
||||
* Maximal selectable date.
|
||||
* @default 2099-12-31
|
||||
*/
|
||||
maxDate: _propTypes.default.object,
|
||||
/**
|
||||
* Minimal selectable date.
|
||||
* @default 1900-01-01
|
||||
*/
|
||||
minDate: _propTypes.default.object,
|
||||
/**
|
||||
* Months rendered per row.
|
||||
* @default 3
|
||||
*/
|
||||
monthsPerRow: _propTypes.default.oneOf([3, 4]),
|
||||
/**
|
||||
* 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.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 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.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,
|
||||
/**
|
||||
* Callback fired on month change.
|
||||
* @param {PickerValidDate} month The new month.
|
||||
*/
|
||||
onMonthChange: _propTypes.default.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.default.func,
|
||||
/**
|
||||
* Callback fired on year change.
|
||||
* @param {PickerValidDate} year The new year.
|
||||
*/
|
||||
onYearChange: _propTypes.default.func,
|
||||
/**
|
||||
* The default visible view.
|
||||
* Used when the component view is not controlled.
|
||||
* Must be a valid option from `views` list.
|
||||
*/
|
||||
openTo: _propTypes.default.oneOf(['day', 'month', 'year']),
|
||||
/**
|
||||
* Force rendering in particular orientation.
|
||||
*/
|
||||
orientation: _propTypes.default.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.default.bool,
|
||||
/**
|
||||
* If `true`, disable heavy animations.
|
||||
* @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13
|
||||
*/
|
||||
reduceAnimations: _propTypes.default.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.default.object,
|
||||
/**
|
||||
* Component displaying when passed `loading` true.
|
||||
* @returns {React.ReactNode} The node to render when loading.
|
||||
* @default () => <span>...</span>
|
||||
*/
|
||||
renderLoading: _propTypes.default.func,
|
||||
/**
|
||||
* Disable specific date.
|
||||
*
|
||||
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
||||
*
|
||||
* @param {PickerValidDate} day The date to test.
|
||||
* @returns {boolean} If `true` the date will be disabled.
|
||||
*/
|
||||
shouldDisableDate: _propTypes.default.func,
|
||||
/**
|
||||
* Disable specific month.
|
||||
* @param {PickerValidDate} month The month to test.
|
||||
* @returns {boolean} If `true`, the month will be disabled.
|
||||
*/
|
||||
shouldDisableMonth: _propTypes.default.func,
|
||||
/**
|
||||
* Disable specific year.
|
||||
* @param {PickerValidDate} year The year to test.
|
||||
* @returns {boolean} If `true`, the year will be disabled.
|
||||
*/
|
||||
shouldDisableYear: _propTypes.default.func,
|
||||
/**
|
||||
* If `true`, days outside the current month are rendered:
|
||||
*
|
||||
* - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
|
||||
*
|
||||
* - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
|
||||
*
|
||||
* - ignored if `calendars` equals more than `1` on range pickers.
|
||||
* @default false
|
||||
*/
|
||||
showDaysOutsideCurrentMonth: _propTypes.default.bool,
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps: _propTypes.default.object,
|
||||
/**
|
||||
* Overridable component slots.
|
||||
* @default {}
|
||||
*/
|
||||
slots: _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 selected value.
|
||||
* Used when the component is controlled.
|
||||
*/
|
||||
value: _propTypes.default.object,
|
||||
/**
|
||||
* The visible view.
|
||||
* Used when the component view is controlled.
|
||||
* Must be a valid option from `views` list.
|
||||
*/
|
||||
view: _propTypes.default.oneOf(['day', 'month', 'year']),
|
||||
/**
|
||||
* 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.default.shape({
|
||||
day: _propTypes.default.func,
|
||||
month: _propTypes.default.func,
|
||||
year: _propTypes.default.func
|
||||
}),
|
||||
/**
|
||||
* Available views.
|
||||
*/
|
||||
views: _propTypes.default.arrayOf(_propTypes.default.oneOf(['day', 'month', 'year']).isRequired),
|
||||
/**
|
||||
* Years are displayed in ascending (chronological) order by default.
|
||||
* If `desc`, years are displayed in descending order.
|
||||
* @default 'asc'
|
||||
*/
|
||||
yearsOrder: _propTypes.default.oneOf(['asc', 'desc']),
|
||||
/**
|
||||
* Years rendered per row.
|
||||
* @default `4` when `displayStaticWrapperAs === 'desktop'`, `3` otherwise.
|
||||
*/
|
||||
yearsPerRow: _propTypes.default.oneOf([3, 4])
|
||||
};
|
||||
22
node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.types.d.ts
generated
vendored
Normal file
22
node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { MakeOptional } from '@mui/x-internals/types';
|
||||
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from "../DatePicker/shared.js";
|
||||
import { StaticOnlyPickerProps, UseStaticPickerSlots, UseStaticPickerSlotProps } from "../internals/hooks/useStaticPicker/index.js";
|
||||
export interface StaticDatePickerSlots extends BaseDatePickerSlots, UseStaticPickerSlots {}
|
||||
export interface StaticDatePickerSlotProps extends BaseDatePickerSlotProps, UseStaticPickerSlotProps {}
|
||||
export interface StaticDatePickerProps extends BaseDatePickerProps, MakeOptional<StaticOnlyPickerProps, 'displayStaticWrapperAs'> {
|
||||
/**
|
||||
* Overridable component slots.
|
||||
* @default {}
|
||||
*/
|
||||
slots?: StaticDatePickerSlots;
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
* @default {}
|
||||
*/
|
||||
slotProps?: StaticDatePickerSlotProps;
|
||||
/**
|
||||
* Years rendered per row.
|
||||
* @default `4` when `displayStaticWrapperAs === 'desktop'`, `3` otherwise.
|
||||
*/
|
||||
yearsPerRow?: 3 | 4;
|
||||
}
|
||||
5
node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.types.js
generated
vendored
Normal file
5
node_modules/@mui/x-date-pickers/StaticDatePicker/StaticDatePicker.types.js
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
2
node_modules/@mui/x-date-pickers/StaticDatePicker/index.d.ts
generated
vendored
Normal file
2
node_modules/@mui/x-date-pickers/StaticDatePicker/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { StaticDatePicker } from "./StaticDatePicker.js";
|
||||
export type { StaticDatePickerProps, StaticDatePickerSlots, StaticDatePickerSlotProps } from "./StaticDatePicker.types.js";
|
||||
12
node_modules/@mui/x-date-pickers/StaticDatePicker/index.js
generated
vendored
Normal file
12
node_modules/@mui/x-date-pickers/StaticDatePicker/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "StaticDatePicker", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _StaticDatePicker.StaticDatePicker;
|
||||
}
|
||||
});
|
||||
var _StaticDatePicker = require("./StaticDatePicker");
|
||||
Loading…
Add table
Add a link
Reference in a new issue