1
0
Fork 0

Added Statistics calculation

Statistics now show calculated values
This commit is contained in:
Techognito 2025-09-04 17:30:00 +02:00
parent fe87374e47
commit fc0f69dacb
2147 changed files with 141321 additions and 39 deletions

View file

@ -0,0 +1,2 @@
export { renderTimeViewClock, renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from "./timeViewRenderers.js";
export type { TimeViewRendererProps } from "./timeViewRenderers.js";

View file

@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDigitalClockTimeView", {
enumerable: true,
get: function () {
return _timeViewRenderers.renderDigitalClockTimeView;
}
});
Object.defineProperty(exports, "renderMultiSectionDigitalClockTimeView", {
enumerable: true,
get: function () {
return _timeViewRenderers.renderMultiSectionDigitalClockTimeView;
}
});
Object.defineProperty(exports, "renderTimeViewClock", {
enumerable: true,
get: function () {
return _timeViewRenderers.renderTimeViewClock;
}
});
var _timeViewRenderers = require("./timeViewRenderers");

View file

@ -0,0 +1,103 @@
import * as React from 'react';
import { TimeClockProps } from "../TimeClock/index.js";
import { TimeView } from "../models/index.js";
import { DigitalClockProps } from "../DigitalClock/index.js";
import { BaseClockProps } from "../internals/models/props/time.js";
import { MultiSectionDigitalClockProps } from "../MultiSectionDigitalClock/index.js";
import { TimeViewWithMeridiem } from "../internals/models/index.js";
import type { TimePickerProps } from "../TimePicker/TimePicker.types.js";
export type TimeViewRendererProps<TView extends TimeViewWithMeridiem, TComponentProps extends BaseClockProps<TView>> = Omit<TComponentProps, 'views' | 'openTo' | 'view' | 'onViewChange'> & {
view: TView;
onViewChange?: (view: TView) => void;
views: readonly TView[];
};
export declare const renderTimeViewClock: ({
view,
onViewChange,
focusedView,
onFocusedViewChange,
views,
value,
defaultValue,
referenceDate,
onChange,
className,
classes,
disableFuture,
disablePast,
minTime,
maxTime,
shouldDisableTime,
minutesStep,
ampm,
ampmInClock,
slots,
slotProps,
readOnly,
disabled,
sx,
autoFocus,
showViewSwitcher,
disableIgnoringDatePartForTimeValidation,
timezone
}: TimeViewRendererProps<TimeView, TimeClockProps<TimeView>>) => React.JSX.Element;
export declare const renderDigitalClockTimeView: ({
view,
onViewChange,
focusedView,
onFocusedViewChange,
views,
value,
defaultValue,
referenceDate,
onChange,
className,
classes,
disableFuture,
disablePast,
minTime,
maxTime,
shouldDisableTime,
minutesStep,
ampm,
slots,
slotProps,
readOnly,
disabled,
sx,
autoFocus,
disableIgnoringDatePartForTimeValidation,
timeSteps,
skipDisabled,
timezone
}: TimeViewRendererProps<Extract<TimeView, "hours">, Omit<DigitalClockProps, "timeStep"> & Pick<TimePickerProps, "timeSteps">>) => React.JSX.Element;
export declare const renderMultiSectionDigitalClockTimeView: ({
view,
onViewChange,
focusedView,
onFocusedViewChange,
views,
value,
defaultValue,
referenceDate,
onChange,
className,
classes,
disableFuture,
disablePast,
minTime,
maxTime,
shouldDisableTime,
minutesStep,
ampm,
slots,
slotProps,
readOnly,
disabled,
sx,
autoFocus,
disableIgnoringDatePartForTimeValidation,
timeSteps,
skipDisabled,
timezone
}: TimeViewRendererProps<TimeViewWithMeridiem, MultiSectionDigitalClockProps>) => React.JSX.Element;

View file

@ -0,0 +1,196 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.renderTimeViewClock = exports.renderMultiSectionDigitalClockTimeView = exports.renderDigitalClockTimeView = void 0;
var React = _interopRequireWildcard(require("react"));
var _TimeClock = require("../TimeClock");
var _DigitalClock = require("../DigitalClock");
var _MultiSectionDigitalClock = require("../MultiSectionDigitalClock");
var _timeUtils = require("../internals/utils/time-utils");
var _jsxRuntime = require("react/jsx-runtime");
const renderTimeViewClock = ({
view,
onViewChange,
focusedView,
onFocusedViewChange,
views,
value,
defaultValue,
referenceDate,
onChange,
className,
classes,
disableFuture,
disablePast,
minTime,
maxTime,
shouldDisableTime,
minutesStep,
ampm,
ampmInClock,
slots,
slotProps,
readOnly,
disabled,
sx,
autoFocus,
showViewSwitcher,
disableIgnoringDatePartForTimeValidation,
timezone
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TimeClock.TimeClock, {
view: view,
onViewChange: onViewChange,
focusedView: focusedView && (0, _timeUtils.isTimeView)(focusedView) ? focusedView : null,
onFocusedViewChange: onFocusedViewChange,
views: views.filter(_timeUtils.isTimeView),
value: value,
defaultValue: defaultValue,
referenceDate: referenceDate,
onChange: onChange,
className: className,
classes: classes,
disableFuture: disableFuture,
disablePast: disablePast,
minTime: minTime,
maxTime: maxTime,
shouldDisableTime: shouldDisableTime,
minutesStep: minutesStep,
ampm: ampm,
ampmInClock: ampmInClock,
slots: slots,
slotProps: slotProps,
readOnly: readOnly,
disabled: disabled,
sx: sx,
autoFocus: autoFocus,
showViewSwitcher: showViewSwitcher,
disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
timezone: timezone
});
exports.renderTimeViewClock = renderTimeViewClock;
if (process.env.NODE_ENV !== "production") renderTimeViewClock.displayName = "renderTimeViewClock";
const renderDigitalClockTimeView = ({
view,
onViewChange,
focusedView,
onFocusedViewChange,
views,
value,
defaultValue,
referenceDate,
onChange,
className,
classes,
disableFuture,
disablePast,
minTime,
maxTime,
shouldDisableTime,
minutesStep,
ampm,
slots,
slotProps,
readOnly,
disabled,
sx,
autoFocus,
disableIgnoringDatePartForTimeValidation,
timeSteps,
skipDisabled,
timezone
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_DigitalClock.DigitalClock, {
view: view,
onViewChange: onViewChange,
focusedView: focusedView && (0, _timeUtils.isTimeView)(focusedView) ? focusedView : null,
onFocusedViewChange: onFocusedViewChange,
views: views.filter(_timeUtils.isTimeView),
value: value,
defaultValue: defaultValue,
referenceDate: referenceDate,
onChange: onChange,
className: className,
classes: classes,
disableFuture: disableFuture,
disablePast: disablePast,
minTime: minTime,
maxTime: maxTime,
shouldDisableTime: shouldDisableTime,
minutesStep: minutesStep,
ampm: ampm,
slots: slots,
slotProps: slotProps,
readOnly: readOnly,
disabled: disabled,
sx: sx,
autoFocus: autoFocus,
disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
timeStep: timeSteps?.minutes,
skipDisabled: skipDisabled,
timezone: timezone
});
exports.renderDigitalClockTimeView = renderDigitalClockTimeView;
if (process.env.NODE_ENV !== "production") renderDigitalClockTimeView.displayName = "renderDigitalClockTimeView";
const renderMultiSectionDigitalClockTimeView = ({
view,
onViewChange,
focusedView,
onFocusedViewChange,
views,
value,
defaultValue,
referenceDate,
onChange,
className,
classes,
disableFuture,
disablePast,
minTime,
maxTime,
shouldDisableTime,
minutesStep,
ampm,
slots,
slotProps,
readOnly,
disabled,
sx,
autoFocus,
disableIgnoringDatePartForTimeValidation,
timeSteps,
skipDisabled,
timezone
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_MultiSectionDigitalClock.MultiSectionDigitalClock, {
view: view,
onViewChange: onViewChange,
focusedView: focusedView && (0, _timeUtils.isInternalTimeView)(focusedView) ? focusedView : null,
onFocusedViewChange: onFocusedViewChange,
views: views.filter(_timeUtils.isTimeView),
value: value,
defaultValue: defaultValue,
referenceDate: referenceDate,
onChange: onChange,
className: className,
classes: classes,
disableFuture: disableFuture,
disablePast: disablePast,
minTime: minTime,
maxTime: maxTime,
shouldDisableTime: shouldDisableTime,
minutesStep: minutesStep,
ampm: ampm,
slots: slots,
slotProps: slotProps,
readOnly: readOnly,
disabled: disabled,
sx: sx,
autoFocus: autoFocus,
disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
timeSteps: timeSteps,
skipDisabled: skipDisabled,
timezone: timezone
});
exports.renderMultiSectionDigitalClockTimeView = renderMultiSectionDigitalClockTimeView;
if (process.env.NODE_ENV !== "production") renderMultiSectionDigitalClockTimeView.displayName = "renderMultiSectionDigitalClockTimeView";