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
20
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.d.ts
generated
vendored
Normal file
20
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import * as React from 'react';
|
||||
import type { PickersSectionListProps } from "./PickersSectionList.types.js";
|
||||
export declare const PickersSectionListRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | keyof React.ClassAttributes<HTMLDivElement>>, {}>;
|
||||
export declare const PickersSectionListSection: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
||||
export declare const PickersSectionListSectionSeparator: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
||||
export declare const PickersSectionListSectionContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
||||
type PickersSectionListComponent = ((props: PickersSectionListProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
||||
propTypes?: any;
|
||||
};
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [Custom field](https://mui.com/x/react-date-pickers/custom-field/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [PickersSectionList API](https://mui.com/x/api/date-pickers/pickers-section-list/)
|
||||
*/
|
||||
declare const PickersSectionList: PickersSectionListComponent;
|
||||
export { PickersSectionList };
|
||||
249
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.js
generated
vendored
Normal file
249
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.js
generated
vendored
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
'use client';
|
||||
|
||||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
const _excluded = ["slots", "slotProps", "elements", "sectionListRef", "classes"];
|
||||
import * as React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import useSlotProps from '@mui/utils/useSlotProps';
|
||||
import composeClasses from '@mui/utils/composeClasses';
|
||||
import useForkRef from '@mui/utils/useForkRef';
|
||||
import { styled, useThemeProps } from '@mui/material/styles';
|
||||
import { getPickersSectionListUtilityClass, pickersSectionListClasses } from "./pickersSectionListClasses.js";
|
||||
import { usePickerPrivateContext } from "../internals/hooks/usePickerPrivateContext.js";
|
||||
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
||||
export const PickersSectionListRoot = styled('div', {
|
||||
name: 'MuiPickersSectionList',
|
||||
slot: 'Root'
|
||||
})({
|
||||
direction: 'ltr /*! @noflip */',
|
||||
outline: 'none'
|
||||
});
|
||||
export const PickersSectionListSection = styled('span', {
|
||||
name: 'MuiPickersSectionList',
|
||||
slot: 'Section'
|
||||
})({});
|
||||
export const PickersSectionListSectionSeparator = styled('span', {
|
||||
name: 'MuiPickersSectionList',
|
||||
slot: 'SectionSeparator'
|
||||
})({
|
||||
whiteSpace: 'pre'
|
||||
});
|
||||
export const PickersSectionListSectionContent = styled('span', {
|
||||
name: 'MuiPickersSectionList',
|
||||
slot: 'SectionContent'
|
||||
})({
|
||||
outline: 'none'
|
||||
});
|
||||
const useUtilityClasses = classes => {
|
||||
const slots = {
|
||||
root: ['root'],
|
||||
section: ['section'],
|
||||
sectionContent: ['sectionContent']
|
||||
};
|
||||
return composeClasses(slots, getPickersSectionListUtilityClass, classes);
|
||||
};
|
||||
function PickersSection(props) {
|
||||
const {
|
||||
slots,
|
||||
slotProps,
|
||||
element,
|
||||
classes
|
||||
} = props;
|
||||
const {
|
||||
ownerState
|
||||
} = usePickerPrivateContext();
|
||||
const Section = slots?.section ?? PickersSectionListSection;
|
||||
const sectionProps = useSlotProps({
|
||||
elementType: Section,
|
||||
externalSlotProps: slotProps?.section,
|
||||
externalForwardedProps: element.container,
|
||||
className: classes.section,
|
||||
ownerState
|
||||
});
|
||||
const SectionContent = slots?.sectionContent ?? PickersSectionListSectionContent;
|
||||
const sectionContentProps = useSlotProps({
|
||||
elementType: SectionContent,
|
||||
externalSlotProps: slotProps?.sectionContent,
|
||||
externalForwardedProps: element.content,
|
||||
additionalProps: {
|
||||
suppressContentEditableWarning: true
|
||||
},
|
||||
className: classes.sectionContent,
|
||||
ownerState
|
||||
});
|
||||
const SectionSeparator = slots?.sectionSeparator ?? PickersSectionListSectionSeparator;
|
||||
const sectionSeparatorBeforeProps = useSlotProps({
|
||||
elementType: SectionSeparator,
|
||||
externalSlotProps: slotProps?.sectionSeparator,
|
||||
externalForwardedProps: element.before,
|
||||
ownerState: _extends({}, ownerState, {
|
||||
separatorPosition: 'before'
|
||||
})
|
||||
});
|
||||
const sectionSeparatorAfterProps = useSlotProps({
|
||||
elementType: SectionSeparator,
|
||||
externalSlotProps: slotProps?.sectionSeparator,
|
||||
externalForwardedProps: element.after,
|
||||
ownerState: _extends({}, ownerState, {
|
||||
separatorPosition: 'after'
|
||||
})
|
||||
});
|
||||
return /*#__PURE__*/_jsxs(Section, _extends({}, sectionProps, {
|
||||
children: [/*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorBeforeProps)), /*#__PURE__*/_jsx(SectionContent, _extends({}, sectionContentProps)), /*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorAfterProps))]
|
||||
}));
|
||||
}
|
||||
process.env.NODE_ENV !== "production" ? PickersSection.propTypes = {
|
||||
// ----------------------------- Warning --------------------------------
|
||||
// | These PropTypes are generated from the TypeScript type definitions |
|
||||
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
||||
// ----------------------------------------------------------------------
|
||||
classes: PropTypes.object.isRequired,
|
||||
element: PropTypes.shape({
|
||||
after: PropTypes.object.isRequired,
|
||||
before: PropTypes.object.isRequired,
|
||||
container: PropTypes.object.isRequired,
|
||||
content: PropTypes.object.isRequired
|
||||
}).isRequired,
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
*/
|
||||
slotProps: PropTypes.object,
|
||||
/**
|
||||
* Overridable component slots.
|
||||
*/
|
||||
slots: PropTypes.object
|
||||
} : void 0;
|
||||
/**
|
||||
* Demos:
|
||||
*
|
||||
* - [Custom field](https://mui.com/x/react-date-pickers/custom-field/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [PickersSectionList API](https://mui.com/x/api/date-pickers/pickers-section-list/)
|
||||
*/
|
||||
const PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(inProps, ref) {
|
||||
const props = useThemeProps({
|
||||
props: inProps,
|
||||
name: 'MuiPickersSectionList'
|
||||
});
|
||||
const {
|
||||
slots,
|
||||
slotProps,
|
||||
elements,
|
||||
sectionListRef,
|
||||
classes: classesProp
|
||||
} = props,
|
||||
other = _objectWithoutPropertiesLoose(props, _excluded);
|
||||
const classes = useUtilityClasses(classesProp);
|
||||
const {
|
||||
ownerState
|
||||
} = usePickerPrivateContext();
|
||||
const rootRef = React.useRef(null);
|
||||
const handleRootRef = useForkRef(ref, rootRef);
|
||||
const getRoot = methodName => {
|
||||
if (!rootRef.current) {
|
||||
throw new Error(`MUI X: Cannot call sectionListRef.${methodName} before the mount of the component.`);
|
||||
}
|
||||
return rootRef.current;
|
||||
};
|
||||
React.useImperativeHandle(sectionListRef, () => ({
|
||||
getRoot() {
|
||||
return getRoot('getRoot');
|
||||
},
|
||||
getSectionContainer(index) {
|
||||
const root = getRoot('getSectionContainer');
|
||||
return root.querySelector(`.${pickersSectionListClasses.section}[data-sectionindex="${index}"]`);
|
||||
},
|
||||
getSectionContent(index) {
|
||||
const root = getRoot('getSectionContent');
|
||||
return root.querySelector(`.${pickersSectionListClasses.section}[data-sectionindex="${index}"] .${pickersSectionListClasses.sectionContent}`);
|
||||
},
|
||||
getSectionIndexFromDOMElement(element) {
|
||||
const root = getRoot('getSectionIndexFromDOMElement');
|
||||
if (element == null || !root.contains(element)) {
|
||||
return null;
|
||||
}
|
||||
let sectionContainer = null;
|
||||
if (element.classList.contains(pickersSectionListClasses.section)) {
|
||||
sectionContainer = element;
|
||||
} else if (element.classList.contains(pickersSectionListClasses.sectionContent)) {
|
||||
sectionContainer = element.parentElement;
|
||||
}
|
||||
if (sectionContainer == null) {
|
||||
return null;
|
||||
}
|
||||
return Number(sectionContainer.dataset.sectionindex);
|
||||
}
|
||||
}));
|
||||
const Root = slots?.root ?? PickersSectionListRoot;
|
||||
const rootProps = useSlotProps({
|
||||
elementType: Root,
|
||||
externalSlotProps: slotProps?.root,
|
||||
externalForwardedProps: other,
|
||||
additionalProps: {
|
||||
ref: handleRootRef,
|
||||
suppressContentEditableWarning: true
|
||||
},
|
||||
className: classes.root,
|
||||
ownerState
|
||||
});
|
||||
return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {
|
||||
children: rootProps.contentEditable ? elements.map(({
|
||||
content,
|
||||
before,
|
||||
after
|
||||
}) => `${before.children}${content.children}${after.children}`).join('') : /*#__PURE__*/_jsx(React.Fragment, {
|
||||
children: elements.map((element, elementIndex) => /*#__PURE__*/_jsx(PickersSection, {
|
||||
slots: slots,
|
||||
slotProps: slotProps,
|
||||
element: element,
|
||||
classes: classes
|
||||
}, elementIndex))
|
||||
})
|
||||
}));
|
||||
});
|
||||
if (process.env.NODE_ENV !== "production") PickersSectionList.displayName = "PickersSectionList";
|
||||
process.env.NODE_ENV !== "production" ? PickersSectionList.propTypes = {
|
||||
// ----------------------------- Warning --------------------------------
|
||||
// | These PropTypes are generated from the TypeScript type definitions |
|
||||
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
||||
// ----------------------------------------------------------------------
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object,
|
||||
/**
|
||||
* If true, the whole element is editable.
|
||||
* Useful when all the sections are selected.
|
||||
*/
|
||||
contentEditable: PropTypes.bool.isRequired,
|
||||
/**
|
||||
* The elements to render.
|
||||
* Each element contains the prop to edit a section of the value.
|
||||
*/
|
||||
elements: PropTypes.arrayOf(PropTypes.shape({
|
||||
after: PropTypes.object.isRequired,
|
||||
before: PropTypes.object.isRequired,
|
||||
container: PropTypes.object.isRequired,
|
||||
content: PropTypes.object.isRequired
|
||||
})).isRequired,
|
||||
sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
||||
current: PropTypes.shape({
|
||||
getRoot: PropTypes.func.isRequired,
|
||||
getSectionContainer: PropTypes.func.isRequired,
|
||||
getSectionContent: PropTypes.func.isRequired,
|
||||
getSectionIndexFromDOMElement: PropTypes.func.isRequired
|
||||
})
|
||||
})]),
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
*/
|
||||
slotProps: PropTypes.object,
|
||||
/**
|
||||
* Overridable component slots.
|
||||
*/
|
||||
slots: PropTypes.object
|
||||
} : void 0;
|
||||
export { PickersSectionList };
|
||||
61
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.types.d.ts
generated
vendored
Normal file
61
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
import * as React from 'react';
|
||||
import { SlotComponentProps } from '@mui/utils/types';
|
||||
import { PickersSectionListClasses } from "./pickersSectionListClasses.js";
|
||||
import { PickerOwnerState } from "../models/index.js";
|
||||
import type { UseFieldDOMGetters } from "../internals/hooks/useField/useField.types.js";
|
||||
export interface PickersSectionListSlots {
|
||||
root: React.ElementType;
|
||||
section: React.ElementType;
|
||||
sectionSeparator: React.ElementType;
|
||||
sectionContent: React.ElementType;
|
||||
}
|
||||
export interface PickerSectionSeparatorOwnerState extends PickerOwnerState {
|
||||
/**
|
||||
* The position of the separator.
|
||||
* `before` if the separator is rendered before the section content.
|
||||
* `after` if the separator is rendered after the section content.
|
||||
*/
|
||||
separatorPosition: 'before' | 'after';
|
||||
}
|
||||
export interface PickersSectionListSlotProps {
|
||||
root?: SlotComponentProps<'div', {}, PickerOwnerState>;
|
||||
section?: SlotComponentProps<'span', {}, PickerOwnerState>;
|
||||
sectionSeparator?: SlotComponentProps<'span', {}, PickerSectionSeparatorOwnerState>;
|
||||
sectionContent?: SlotComponentProps<'span', {}, PickerOwnerState>;
|
||||
}
|
||||
export interface PickersSectionElement {
|
||||
container: React.HTMLAttributes<HTMLSpanElement>;
|
||||
content: React.HTMLAttributes<HTMLSpanElement> & {
|
||||
'data-range-position': string | undefined;
|
||||
};
|
||||
before: React.HTMLAttributes<HTMLSpanElement>;
|
||||
after: React.HTMLAttributes<HTMLSpanElement>;
|
||||
}
|
||||
export interface PickersSectionListRef extends Omit<UseFieldDOMGetters, 'isReady'> {}
|
||||
export interface ExportedPickersSectionListProps extends Pick<React.HTMLAttributes<HTMLDivElement>, 'tabIndex'> {
|
||||
/**
|
||||
* The elements to render.
|
||||
* Each element contains the prop to edit a section of the value.
|
||||
*/
|
||||
elements: PickersSectionElement[];
|
||||
sectionListRef: React.Ref<PickersSectionListRef>;
|
||||
/**
|
||||
* If true, the whole element is editable.
|
||||
* Useful when all the sections are selected.
|
||||
*/
|
||||
contentEditable: boolean;
|
||||
}
|
||||
export interface PickersSectionListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'contentEditable'>, ExportedPickersSectionListProps {
|
||||
/**
|
||||
* Overridable component slots.
|
||||
*/
|
||||
slots?: PickersSectionListSlots;
|
||||
/**
|
||||
* The props used for each component slot.
|
||||
*/
|
||||
slotProps?: PickersSectionListSlotProps;
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
*/
|
||||
classes?: Partial<PickersSectionListClasses>;
|
||||
}
|
||||
1
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.types.js
generated
vendored
Normal file
1
node_modules/@mui/x-date-pickers/esm/PickersSectionList/PickersSectionList.types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
4
node_modules/@mui/x-date-pickers/esm/PickersSectionList/index.d.ts
generated
vendored
Normal file
4
node_modules/@mui/x-date-pickers/esm/PickersSectionList/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export { PickersSectionList as Unstable_PickersSectionList, PickersSectionListRoot as Unstable_PickersSectionListRoot, PickersSectionListSection as Unstable_PickersSectionListSection, PickersSectionListSectionSeparator as Unstable_PickersSectionListSectionSeparator, PickersSectionListSectionContent as Unstable_PickersSectionListSectionContent } from "./PickersSectionList.js";
|
||||
export type { PickersSectionListProps, PickersSectionElement, PickersSectionListRef, PickersSectionListSlots, PickersSectionListSlotProps, ExportedPickersSectionListProps } from "./PickersSectionList.types.js";
|
||||
export { getPickersSectionListUtilityClass, pickersSectionListClasses } from "./pickersSectionListClasses.js";
|
||||
export type { PickersSectionListClasses, PickersSectionListClassKey } from "./pickersSectionListClasses.js";
|
||||
2
node_modules/@mui/x-date-pickers/esm/PickersSectionList/index.js
generated
vendored
Normal file
2
node_modules/@mui/x-date-pickers/esm/PickersSectionList/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export { PickersSectionList as Unstable_PickersSectionList, PickersSectionListRoot as Unstable_PickersSectionListRoot, PickersSectionListSection as Unstable_PickersSectionListSection, PickersSectionListSectionSeparator as Unstable_PickersSectionListSectionSeparator, PickersSectionListSectionContent as Unstable_PickersSectionListSectionContent } from "./PickersSectionList.js";
|
||||
export { getPickersSectionListUtilityClass, pickersSectionListClasses } from "./pickersSectionListClasses.js";
|
||||
11
node_modules/@mui/x-date-pickers/esm/PickersSectionList/pickersSectionListClasses.d.ts
generated
vendored
Normal file
11
node_modules/@mui/x-date-pickers/esm/PickersSectionList/pickersSectionListClasses.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export interface PickersSectionListClasses {
|
||||
/** Styles applied to the root element. */
|
||||
root: string;
|
||||
/** Styles applied to the container of a section. */
|
||||
section: string;
|
||||
/** Styles applied to the content of a section. */
|
||||
sectionContent: string;
|
||||
}
|
||||
export type PickersSectionListClassKey = keyof PickersSectionListClasses;
|
||||
export declare function getPickersSectionListUtilityClass(slot: string): string;
|
||||
export declare const pickersSectionListClasses: Record<keyof PickersSectionListClasses, string>;
|
||||
6
node_modules/@mui/x-date-pickers/esm/PickersSectionList/pickersSectionListClasses.js
generated
vendored
Normal file
6
node_modules/@mui/x-date-pickers/esm/PickersSectionList/pickersSectionListClasses.js
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
||||
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
||||
export function getPickersSectionListUtilityClass(slot) {
|
||||
return generateUtilityClass('MuiPickersSectionList', slot);
|
||||
}
|
||||
export const pickersSectionListClasses = generateUtilityClasses('MuiPickersSectionList', ['root', 'section', 'sectionContent']);
|
||||
Loading…
Add table
Add a link
Reference in a new issue