@mui/x-date-pickers 9.0.0-alpha.4 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AdapterDateFnsBase/AdapterDateFnsBase.mjs +1 -1
- package/AdapterDayjs/AdapterDayjs.mjs +1 -1
- package/AdapterLuxon/AdapterLuxon.mjs +1 -1
- package/AdapterMoment/AdapterMoment.mjs +1 -1
- package/AdapterMomentHijri/AdapterMomentHijri.mjs +1 -1
- package/AdapterMomentJalaali/AdapterMomentJalaali.mjs +1 -1
- package/CHANGELOG.md +374 -2
- package/DateCalendar/DateCalendar.js +1 -1
- package/DateCalendar/DateCalendar.mjs +1 -1
- package/DateCalendar/DayCalendar.d.mts +7 -7
- package/DateCalendar/DayCalendar.d.ts +7 -7
- package/DateCalendar/DayCalendar.js +23 -25
- package/DateCalendar/DayCalendar.mjs +23 -25
- package/DateField/DateField.d.mts +1 -1
- package/DateField/DateField.d.ts +1 -1
- package/DateField/DateField.js +22 -28
- package/DateField/DateField.mjs +22 -28
- package/DateField/DateField.types.d.mts +3 -3
- package/DateField/DateField.types.d.ts +3 -3
- package/DateField/useDateField.d.mts +1 -1
- package/DateField/useDateField.d.ts +1 -1
- package/DateField/useDateField.js +1 -1
- package/DateField/useDateField.mjs +1 -1
- package/DatePicker/DatePicker.d.mts +1 -1
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +1 -5
- package/DatePicker/DatePicker.mjs +1 -5
- package/DatePicker/DatePicker.types.d.mts +3 -3
- package/DatePicker/DatePicker.types.d.ts +3 -3
- package/DateTimeField/DateTimeField.d.mts +1 -1
- package/DateTimeField/DateTimeField.d.ts +1 -1
- package/DateTimeField/DateTimeField.js +22 -28
- package/DateTimeField/DateTimeField.mjs +22 -28
- package/DateTimeField/DateTimeField.types.d.mts +2 -2
- package/DateTimeField/DateTimeField.types.d.ts +2 -2
- package/DateTimeField/useDateTimeField.d.mts +1 -1
- package/DateTimeField/useDateTimeField.d.ts +1 -1
- package/DateTimeField/useDateTimeField.js +1 -1
- package/DateTimeField/useDateTimeField.mjs +1 -1
- package/DateTimePicker/DateTimePicker.d.mts +1 -1
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +1 -5
- package/DateTimePicker/DateTimePicker.mjs +1 -5
- package/DateTimePicker/DateTimePicker.types.d.mts +3 -3
- package/DateTimePicker/DateTimePicker.types.d.ts +3 -3
- package/DesktopDatePicker/DesktopDatePicker.d.mts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +1 -5
- package/DesktopDatePicker/DesktopDatePicker.mjs +1 -5
- package/DesktopDatePicker/DesktopDatePicker.types.d.mts +3 -3
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +3 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.mts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -5
- package/DesktopDateTimePicker/DesktopDateTimePicker.mjs +1 -5
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.mts +3 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +3 -3
- package/DesktopTimePicker/DesktopTimePicker.d.mts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.js +0 -4
- package/DesktopTimePicker/DesktopTimePicker.mjs +0 -4
- package/DesktopTimePicker/DesktopTimePicker.types.d.mts +3 -3
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +3 -3
- package/DigitalClock/DigitalClock.d.mts +1 -1
- package/DigitalClock/DigitalClock.d.ts +1 -1
- package/DigitalClock/DigitalClock.js +2 -2
- package/DigitalClock/DigitalClock.mjs +3 -3
- package/LocalizationProvider/LocalizationProvider.d.mts +0 -6
- package/LocalizationProvider/LocalizationProvider.d.ts +0 -6
- package/LocalizationProvider/LocalizationProvider.js +1 -10
- package/LocalizationProvider/LocalizationProvider.mjs +0 -9
- package/LocalizationProvider/index.d.mts +1 -1
- package/LocalizationProvider/index.d.ts +1 -1
- package/LocalizationProvider/index.js +0 -6
- package/LocalizationProvider/index.mjs +1 -1
- package/MobileDatePicker/MobileDatePicker.d.mts +1 -1
- package/MobileDatePicker/MobileDatePicker.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.js +1 -5
- package/MobileDatePicker/MobileDatePicker.mjs +1 -5
- package/MobileDatePicker/MobileDatePicker.types.d.mts +3 -3
- package/MobileDatePicker/MobileDatePicker.types.d.ts +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.d.mts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +1 -5
- package/MobileDateTimePicker/MobileDateTimePicker.mjs +1 -5
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.mts +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +3 -3
- package/MobileTimePicker/MobileTimePicker.d.mts +1 -1
- package/MobileTimePicker/MobileTimePicker.d.ts +1 -1
- package/MobileTimePicker/MobileTimePicker.js +0 -4
- package/MobileTimePicker/MobileTimePicker.mjs +0 -4
- package/MobileTimePicker/MobileTimePicker.types.d.mts +3 -3
- package/MobileTimePicker/MobileTimePicker.types.d.ts +3 -3
- package/MonthCalendar/MonthCalendarButton.js +2 -2
- package/MonthCalendar/MonthCalendarButton.mjs +3 -3
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.mjs +3 -3
- package/PickerDay/PickerDay.d.mts +14 -0
- package/PickerDay/PickerDay.d.ts +14 -0
- package/{PickerDay2/PickerDay2.js → PickerDay/PickerDay.js} +110 -45
- package/{PickerDay2/PickerDay2.mjs → PickerDay/PickerDay.mjs} +110 -45
- package/PickerDay/PickerDay.types.d.mts +137 -0
- package/PickerDay/PickerDay.types.d.ts +137 -0
- package/PickerDay/index.d.mts +4 -0
- package/PickerDay/index.d.ts +4 -0
- package/PickerDay/index.js +25 -0
- package/PickerDay/index.mjs +2 -0
- package/{PickerDay2/pickerDay2Classes.d.mts → PickerDay/pickerDayClasses.d.mts} +4 -4
- package/{PickerDay2/pickerDay2Classes.d.ts → PickerDay/pickerDayClasses.d.ts} +4 -4
- package/PickerDay/pickerDayClasses.js +14 -0
- package/PickerDay/pickerDayClasses.mjs +6 -0
- package/PickersTextField/PickersFilledInput/PickersFilledInput.js +37 -16
- package/PickersTextField/PickersFilledInput/PickersFilledInput.mjs +37 -16
- package/PickersTextField/PickersInput/PickersInput.js +35 -14
- package/PickersTextField/PickersInput/PickersInput.mjs +35 -14
- package/PickersTextField/PickersInputBase/PickersInputBase.js +38 -8
- package/PickersTextField/PickersInputBase/PickersInputBase.mjs +38 -8
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.mts +56 -13
- package/PickersTextField/PickersInputBase/PickersInputBase.types.d.ts +56 -13
- package/PickersTextField/PickersOutlinedInput/Outline.js +1 -1
- package/PickersTextField/PickersOutlinedInput/Outline.mjs +1 -1
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js +33 -11
- package/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.mjs +33 -11
- package/PickersTextField/PickersTextField.js +92 -39
- package/PickersTextField/PickersTextField.mjs +92 -39
- package/PickersTextField/PickersTextField.types.d.mts +56 -28
- package/PickersTextField/PickersTextField.types.d.ts +56 -28
- package/PickersTextField/index.d.mts +1 -1
- package/PickersTextField/index.d.ts +1 -1
- package/StaticDatePicker/StaticDatePicker.js +1 -1
- package/StaticDatePicker/StaticDatePicker.mjs +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.mjs +1 -1
- package/TimeField/TimeField.d.mts +1 -1
- package/TimeField/TimeField.d.ts +1 -1
- package/TimeField/TimeField.js +23 -29
- package/TimeField/TimeField.mjs +23 -29
- package/TimeField/TimeField.types.d.mts +2 -2
- package/TimeField/TimeField.types.d.ts +2 -2
- package/TimeField/useTimeField.d.mts +1 -1
- package/TimeField/useTimeField.d.ts +1 -1
- package/TimePicker/TimePicker.d.mts +1 -1
- package/TimePicker/TimePicker.d.ts +1 -1
- package/TimePicker/TimePicker.js +0 -4
- package/TimePicker/TimePicker.mjs +0 -4
- package/TimePicker/TimePicker.types.d.mts +3 -3
- package/TimePicker/TimePicker.types.d.ts +3 -3
- package/YearCalendar/YearCalendarButton.js +2 -2
- package/YearCalendar/YearCalendarButton.mjs +3 -3
- package/hooks/useParsedFormat.js +5 -7
- package/hooks/useParsedFormat.mjs +5 -7
- package/hooks/useSplitFieldProps.d.mts +1 -1
- package/hooks/useSplitFieldProps.d.ts +1 -1
- package/hooks/useSplitFieldProps.js +1 -1
- package/hooks/useSplitFieldProps.mjs +1 -1
- package/index.d.mts +1 -2
- package/index.d.ts +1 -2
- package/index.js +2 -14
- package/index.mjs +2 -3
- package/internals/components/PickerFieldUI.d.mts +11 -17
- package/internals/components/PickerFieldUI.d.ts +11 -17
- package/internals/components/PickerFieldUI.js +65 -114
- package/internals/components/PickerFieldUI.mjs +65 -114
- package/internals/components/PickerPopper/PickerPopper.js +3 -0
- package/internals/components/PickerPopper/PickerPopper.mjs +3 -0
- package/internals/components/PickersToolbar.js +3 -1
- package/internals/components/PickersToolbar.mjs +3 -1
- package/internals/demo/DemoContainer.js +6 -8
- package/internals/demo/DemoContainer.mjs +6 -8
- package/internals/hooks/PickerDay.types.d.mts +12 -0
- package/internals/hooks/PickerDay.types.d.ts +12 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.mts +2 -2
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +2 -2
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.mts +6 -6
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +6 -6
- package/internals/hooks/useField/buildSectionsFromFormat.d.mts +0 -1
- package/internals/hooks/useField/buildSectionsFromFormat.d.ts +0 -1
- package/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/internals/hooks/useField/buildSectionsFromFormat.mjs +1 -1
- package/internals/hooks/useField/index.d.mts +1 -1
- package/internals/hooks/useField/index.d.ts +1 -1
- package/internals/hooks/useField/index.js +2 -8
- package/internals/hooks/useField/index.mjs +1 -1
- package/internals/hooks/useField/useField.d.mts +2 -2
- package/internals/hooks/useField/useField.d.ts +2 -2
- package/internals/hooks/useField/useField.js +265 -8
- package/internals/hooks/useField/useField.mjs +264 -8
- package/internals/hooks/useField/useField.types.d.mts +11 -50
- package/internals/hooks/useField/useField.types.d.ts +11 -50
- package/internals/hooks/useField/useField.utils.d.mts +2 -3
- package/internals/hooks/useField/useField.utils.d.ts +2 -3
- package/internals/hooks/useField/useField.utils.js +8 -65
- package/internals/hooks/useField/useField.utils.mjs +6 -62
- package/internals/hooks/useField/useFieldHiddenInputProps.d.mts +2 -4
- package/internals/hooks/useField/useFieldHiddenInputProps.d.ts +2 -4
- package/internals/hooks/useField/useFieldHiddenInputProps.js +1 -3
- package/internals/hooks/useField/useFieldHiddenInputProps.mjs +1 -3
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +0 -1
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.mjs +0 -1
- package/internals/hooks/useField/useFieldRootProps.d.mts +5 -5
- package/internals/hooks/useField/useFieldRootProps.d.ts +5 -5
- package/internals/hooks/useField/useFieldRootProps.js +183 -11
- package/internals/hooks/useField/useFieldRootProps.mjs +183 -11
- package/internals/hooks/useField/useFieldSectionContainerProps.d.mts +3 -5
- package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +3 -5
- package/internals/hooks/useField/useFieldSectionContainerProps.js +2 -4
- package/internals/hooks/useField/useFieldSectionContainerProps.mjs +2 -4
- package/internals/hooks/useField/useFieldSectionContentProps.d.mts +6 -7
- package/internals/hooks/useField/useFieldSectionContentProps.d.ts +6 -7
- package/internals/hooks/useField/useFieldSectionContentProps.js +2 -4
- package/internals/hooks/useField/useFieldSectionContentProps.mjs +2 -4
- package/internals/hooks/useField/useFieldState.d.mts +4 -4
- package/internals/hooks/useField/useFieldState.d.ts +4 -4
- package/internals/hooks/useField/useFieldState.js +3 -6
- package/internals/hooks/useField/useFieldState.mjs +3 -6
- package/internals/hooks/useMobilePicker/useMobilePicker.d.mts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.mts +6 -6
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +6 -6
- package/internals/hooks/useNullableFieldPrivateContext.d.mts +1 -1
- package/internals/hooks/useNullableFieldPrivateContext.d.ts +1 -1
- package/internals/hooks/usePicker/usePicker.js +1 -3
- package/internals/hooks/usePicker/usePicker.mjs +1 -3
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.d.mts +2 -3
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.d.ts +2 -3
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.js +3 -5
- package/{PickersDay → internals/hooks}/usePickerDayOwnerState.mjs +3 -5
- package/internals/index.d.mts +4 -4
- package/internals/index.d.ts +4 -4
- package/internals/index.js +9 -9
- package/internals/index.mjs +3 -3
- package/internals/models/manager.d.mts +3 -5
- package/internals/models/manager.d.ts +3 -5
- package/internals/utils/valueManagers.js +1 -2
- package/internals/utils/valueManagers.mjs +2 -3
- package/managers/index.d.mts +2 -2
- package/managers/index.d.ts +2 -2
- package/managers/useDateManager.d.mts +3 -6
- package/managers/useDateManager.d.ts +3 -6
- package/managers/useDateManager.js +2 -6
- package/managers/useDateManager.mjs +2 -6
- package/managers/useDateTimeManager.d.mts +3 -6
- package/managers/useDateTimeManager.d.ts +3 -6
- package/managers/useDateTimeManager.js +2 -6
- package/managers/useDateTimeManager.mjs +2 -6
- package/managers/useTimeManager.d.mts +4 -6
- package/managers/useTimeManager.d.ts +4 -6
- package/managers/useTimeManager.js +1 -3
- package/managers/useTimeManager.mjs +1 -3
- package/models/fields.d.mts +3 -4
- package/models/fields.d.ts +3 -4
- package/models/manager.d.mts +2 -8
- package/models/manager.d.ts +2 -8
- package/package.json +55 -69
- package/themeAugmentation/components.d.mts +4 -8
- package/themeAugmentation/components.d.ts +4 -8
- package/themeAugmentation/overrides.d.mts +2 -4
- package/themeAugmentation/overrides.d.ts +2 -4
- package/themeAugmentation/props.d.mts +5 -7
- package/themeAugmentation/props.d.ts +5 -7
- package/PickerDay2/PickerDay2.d.mts +0 -7
- package/PickerDay2/PickerDay2.d.ts +0 -7
- package/PickerDay2/PickerDay2.types.d.mts +0 -18
- package/PickerDay2/PickerDay2.types.d.ts +0 -18
- package/PickerDay2/index.d.mts +0 -4
- package/PickerDay2/index.d.ts +0 -4
- package/PickerDay2/index.js +0 -25
- package/PickerDay2/index.mjs +0 -2
- package/PickerDay2/pickerDay2Classes.js +0 -14
- package/PickerDay2/pickerDay2Classes.mjs +0 -6
- package/PickersDay/PickersDay.d.mts +0 -15
- package/PickersDay/PickersDay.d.ts +0 -15
- package/PickersDay/PickersDay.js +0 -384
- package/PickersDay/PickersDay.mjs +0 -377
- package/PickersDay/PickersDay.types.d.mts +0 -114
- package/PickersDay/PickersDay.types.d.ts +0 -114
- package/PickersDay/index.d.mts +0 -4
- package/PickersDay/index.d.ts +0 -4
- package/PickersDay/index.js +0 -25
- package/PickersDay/index.mjs +0 -2
- package/PickersDay/pickersDayClasses.d.mts +0 -19
- package/PickersDay/pickersDayClasses.d.ts +0 -19
- package/PickersDay/pickersDayClasses.js +0 -14
- package/PickersDay/pickersDayClasses.mjs +0 -6
- package/internals/hooks/useField/useFieldRootHandleKeyDown.d.mts +0 -16
- package/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +0 -16
- package/internals/hooks/useField/useFieldRootHandleKeyDown.js +0 -211
- package/internals/hooks/useField/useFieldRootHandleKeyDown.mjs +0 -205
- package/internals/hooks/useField/useFieldV6TextField.d.mts +0 -26
- package/internals/hooks/useField/useFieldV6TextField.d.ts +0 -26
- package/internals/hooks/useField/useFieldV6TextField.js +0 -422
- package/internals/hooks/useField/useFieldV6TextField.mjs +0 -413
- package/internals/hooks/useField/useFieldV7TextField.d.mts +0 -3
- package/internals/hooks/useField/useFieldV7TextField.d.ts +0 -3
- package/internals/hooks/useField/useFieldV7TextField.js +0 -272
- package/internals/hooks/useField/useFieldV7TextField.mjs +0 -264
- /package/{PickerDay2/PickerDay2.types.js → PickerDay/PickerDay.types.js} +0 -0
- /package/{PickerDay2/PickerDay2.types.mjs → PickerDay/PickerDay.types.mjs} +0 -0
- /package/{PickersDay/PickersDay.types.js → internals/hooks/PickerDay.types.js} +0 -0
- /package/{PickersDay/PickersDay.types.mjs → internals/hooks/PickerDay.types.mjs} +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getPickersDayUtilityClass = getPickersDayUtilityClass;
|
|
8
|
-
exports.pickersDayClasses = void 0;
|
|
9
|
-
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
10
|
-
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
11
|
-
function getPickersDayUtilityClass(slot) {
|
|
12
|
-
return (0, _generateUtilityClass.default)('MuiPickersDay', slot);
|
|
13
|
-
}
|
|
14
|
-
const pickersDayClasses = exports.pickersDayClasses = (0, _generateUtilityClasses.default)('MuiPickersDay', ['root', 'dayWithMargin', 'dayOutsideMonth', 'hiddenDaySpacingFiller', 'today', 'selected', 'disabled']);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
-
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
-
export function getPickersDayUtilityClass(slot) {
|
|
4
|
-
return generateUtilityClass('MuiPickersDay', slot);
|
|
5
|
-
}
|
|
6
|
-
export const pickersDayClasses = generateUtilityClasses('MuiPickersDay', ['root', 'dayWithMargin', 'dayOutsideMonth', 'hiddenDaySpacingFiller', 'today', 'selected', 'disabled']);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PickerManager } from "../../../models/index.mjs";
|
|
2
|
-
import { PickerValidValue } from "../../models/index.mjs";
|
|
3
|
-
import { UseFieldStateReturnValue } from "./useFieldState.mjs";
|
|
4
|
-
import { UseFieldInternalProps } from "./useField.types.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Returns the `onKeyDown` handler to pass to the root element of the field.
|
|
7
|
-
*/
|
|
8
|
-
export declare function useFieldRootHandleKeyDown<TValue extends PickerValidValue>(parameters: UseFieldRootHandleKeyDownParameters<TValue>): (event: React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
9
|
-
interface UseFieldRootHandleKeyDownParameters<TValue extends PickerValidValue> {
|
|
10
|
-
manager: PickerManager<TValue, any, any, any, any>;
|
|
11
|
-
stateResponse: UseFieldStateReturnValue<TValue>;
|
|
12
|
-
internalPropsWithDefaults: UseFieldInternalProps<TValue, any, any> & {
|
|
13
|
-
minutesStep?: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PickerManager } from "../../../models/index.js";
|
|
2
|
-
import { PickerValidValue } from "../../models/index.js";
|
|
3
|
-
import { UseFieldStateReturnValue } from "./useFieldState.js";
|
|
4
|
-
import { UseFieldInternalProps } from "./useField.types.js";
|
|
5
|
-
/**
|
|
6
|
-
* Returns the `onKeyDown` handler to pass to the root element of the field.
|
|
7
|
-
*/
|
|
8
|
-
export declare function useFieldRootHandleKeyDown<TValue extends PickerValidValue>(parameters: UseFieldRootHandleKeyDownParameters<TValue>): (event: React.KeyboardEvent<HTMLSpanElement>) => void;
|
|
9
|
-
interface UseFieldRootHandleKeyDownParameters<TValue extends PickerValidValue> {
|
|
10
|
-
manager: PickerManager<TValue, any, any, any, any>;
|
|
11
|
-
stateResponse: UseFieldStateReturnValue<TValue>;
|
|
12
|
-
internalPropsWithDefaults: UseFieldInternalProps<TValue, any, any> & {
|
|
13
|
-
minutesStep?: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.useFieldRootHandleKeyDown = useFieldRootHandleKeyDown;
|
|
8
|
-
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
9
|
-
var _useField = require("./useField.utils");
|
|
10
|
-
var _usePickerAdapter = require("../../../hooks/usePickerAdapter");
|
|
11
|
-
/**
|
|
12
|
-
* Returns the `onKeyDown` handler to pass to the root element of the field.
|
|
13
|
-
*/
|
|
14
|
-
function useFieldRootHandleKeyDown(parameters) {
|
|
15
|
-
const adapter = (0, _usePickerAdapter.usePickerAdapter)();
|
|
16
|
-
const {
|
|
17
|
-
manager: {
|
|
18
|
-
internal_fieldValueManager: fieldValueManager
|
|
19
|
-
},
|
|
20
|
-
internalPropsWithDefaults: {
|
|
21
|
-
minutesStep,
|
|
22
|
-
disabled,
|
|
23
|
-
readOnly
|
|
24
|
-
},
|
|
25
|
-
stateResponse: {
|
|
26
|
-
// States and derived states
|
|
27
|
-
state,
|
|
28
|
-
value,
|
|
29
|
-
activeSectionIndex,
|
|
30
|
-
parsedSelectedSections,
|
|
31
|
-
sectionsValueBoundaries,
|
|
32
|
-
localizedDigits,
|
|
33
|
-
timezone,
|
|
34
|
-
sectionOrder,
|
|
35
|
-
// Methods to update the states
|
|
36
|
-
clearValue,
|
|
37
|
-
clearActiveSection,
|
|
38
|
-
setSelectedSections,
|
|
39
|
-
updateSectionValue
|
|
40
|
-
}
|
|
41
|
-
} = parameters;
|
|
42
|
-
return (0, _useEventCallback.default)(event => {
|
|
43
|
-
if (disabled) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// eslint-disable-next-line default-case
|
|
48
|
-
switch (true) {
|
|
49
|
-
// Select all
|
|
50
|
-
case (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'A' && !event.shiftKey && !event.altKey:
|
|
51
|
-
{
|
|
52
|
-
// prevent default to make sure that the next line "select all" while updating
|
|
53
|
-
// the internal state at the same time.
|
|
54
|
-
event.preventDefault();
|
|
55
|
-
setSelectedSections('all');
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Move selection to next section
|
|
60
|
-
case event.key === 'ArrowRight':
|
|
61
|
-
{
|
|
62
|
-
event.preventDefault();
|
|
63
|
-
if (parsedSelectedSections == null) {
|
|
64
|
-
setSelectedSections(sectionOrder.startIndex);
|
|
65
|
-
} else if (parsedSelectedSections === 'all') {
|
|
66
|
-
setSelectedSections(sectionOrder.endIndex);
|
|
67
|
-
} else {
|
|
68
|
-
const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].rightIndex;
|
|
69
|
-
if (nextSectionIndex !== null) {
|
|
70
|
-
setSelectedSections(nextSectionIndex);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Move selection to previous section
|
|
77
|
-
case event.key === 'ArrowLeft':
|
|
78
|
-
{
|
|
79
|
-
event.preventDefault();
|
|
80
|
-
if (parsedSelectedSections == null) {
|
|
81
|
-
setSelectedSections(sectionOrder.endIndex);
|
|
82
|
-
} else if (parsedSelectedSections === 'all') {
|
|
83
|
-
setSelectedSections(sectionOrder.startIndex);
|
|
84
|
-
} else {
|
|
85
|
-
const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].leftIndex;
|
|
86
|
-
if (nextSectionIndex !== null) {
|
|
87
|
-
setSelectedSections(nextSectionIndex);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Reset the value of the selected section
|
|
94
|
-
case event.key === 'Delete':
|
|
95
|
-
{
|
|
96
|
-
event.preventDefault();
|
|
97
|
-
if (readOnly) {
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
if (parsedSelectedSections == null || parsedSelectedSections === 'all') {
|
|
101
|
-
clearValue();
|
|
102
|
-
} else {
|
|
103
|
-
clearActiveSection();
|
|
104
|
-
}
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Increment / decrement the selected section value
|
|
109
|
-
case ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(event.key):
|
|
110
|
-
{
|
|
111
|
-
event.preventDefault();
|
|
112
|
-
if (readOnly || activeSectionIndex == null) {
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// if all sections are selected, mark the currently editing one as selected
|
|
117
|
-
if (parsedSelectedSections === 'all') {
|
|
118
|
-
setSelectedSections(activeSectionIndex);
|
|
119
|
-
}
|
|
120
|
-
const activeSection = state.sections[activeSectionIndex];
|
|
121
|
-
const newSectionValue = adjustSectionValue(adapter, timezone, activeSection, event.key, sectionsValueBoundaries, localizedDigits, fieldValueManager.getDateFromSection(value, activeSection), {
|
|
122
|
-
minutesStep
|
|
123
|
-
});
|
|
124
|
-
updateSectionValue({
|
|
125
|
-
section: activeSection,
|
|
126
|
-
newSectionValue,
|
|
127
|
-
shouldGoToNextSection: false
|
|
128
|
-
});
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function getDeltaFromKeyCode(keyCode) {
|
|
135
|
-
switch (keyCode) {
|
|
136
|
-
case 'ArrowUp':
|
|
137
|
-
return 1;
|
|
138
|
-
case 'ArrowDown':
|
|
139
|
-
return -1;
|
|
140
|
-
case 'PageUp':
|
|
141
|
-
return 5;
|
|
142
|
-
case 'PageDown':
|
|
143
|
-
return -5;
|
|
144
|
-
default:
|
|
145
|
-
return 0;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
function adjustSectionValue(adapter, timezone, section, keyCode, sectionsValueBoundaries, localizedDigits, activeDate, stepsAttributes) {
|
|
149
|
-
const delta = getDeltaFromKeyCode(keyCode);
|
|
150
|
-
const isStart = keyCode === 'Home';
|
|
151
|
-
const isEnd = keyCode === 'End';
|
|
152
|
-
const shouldSetAbsolute = section.value === '' || isStart || isEnd;
|
|
153
|
-
const adjustDigitSection = () => {
|
|
154
|
-
const sectionBoundaries = sectionsValueBoundaries[section.type]({
|
|
155
|
-
currentDate: activeDate,
|
|
156
|
-
format: section.format,
|
|
157
|
-
contentType: section.contentType
|
|
158
|
-
});
|
|
159
|
-
const getCleanValue = value => (0, _useField.cleanDigitSectionValue)(adapter, value, sectionBoundaries, localizedDigits, section);
|
|
160
|
-
const step = section.type === 'minutes' && stepsAttributes?.minutesStep ? stepsAttributes.minutesStep : 1;
|
|
161
|
-
let newSectionValueNumber;
|
|
162
|
-
if (shouldSetAbsolute) {
|
|
163
|
-
if (section.type === 'year' && !isEnd && !isStart) {
|
|
164
|
-
return adapter.formatByString(adapter.date(undefined, timezone), section.format);
|
|
165
|
-
}
|
|
166
|
-
if (delta > 0 || isStart) {
|
|
167
|
-
newSectionValueNumber = sectionBoundaries.minimum;
|
|
168
|
-
} else {
|
|
169
|
-
newSectionValueNumber = sectionBoundaries.maximum;
|
|
170
|
-
}
|
|
171
|
-
} else {
|
|
172
|
-
const currentSectionValue = parseInt((0, _useField.removeLocalizedDigits)(section.value, localizedDigits), 10);
|
|
173
|
-
newSectionValueNumber = currentSectionValue + delta * step;
|
|
174
|
-
}
|
|
175
|
-
if (newSectionValueNumber % step !== 0) {
|
|
176
|
-
if (delta < 0 || isStart) {
|
|
177
|
-
newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)
|
|
178
|
-
}
|
|
179
|
-
if (delta > 0 || isEnd) {
|
|
180
|
-
newSectionValueNumber -= newSectionValueNumber % step;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
if (newSectionValueNumber > sectionBoundaries.maximum) {
|
|
184
|
-
return getCleanValue(sectionBoundaries.minimum + (newSectionValueNumber - sectionBoundaries.maximum - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));
|
|
185
|
-
}
|
|
186
|
-
if (newSectionValueNumber < sectionBoundaries.minimum) {
|
|
187
|
-
return getCleanValue(sectionBoundaries.maximum - (sectionBoundaries.minimum - newSectionValueNumber - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));
|
|
188
|
-
}
|
|
189
|
-
return getCleanValue(newSectionValueNumber);
|
|
190
|
-
};
|
|
191
|
-
const adjustLetterSection = () => {
|
|
192
|
-
const options = (0, _useField.getLetterEditingOptions)(adapter, timezone, section.type, section.format);
|
|
193
|
-
if (options.length === 0) {
|
|
194
|
-
return section.value;
|
|
195
|
-
}
|
|
196
|
-
if (shouldSetAbsolute) {
|
|
197
|
-
if (delta > 0 || isStart) {
|
|
198
|
-
return options[0];
|
|
199
|
-
}
|
|
200
|
-
return options[options.length - 1];
|
|
201
|
-
}
|
|
202
|
-
const currentOptionIndex = options.indexOf(section.value);
|
|
203
|
-
const newOptionIndex = (currentOptionIndex + delta) % options.length;
|
|
204
|
-
const clampedIndex = (newOptionIndex + options.length) % options.length;
|
|
205
|
-
return options[clampedIndex];
|
|
206
|
-
};
|
|
207
|
-
if (section.contentType === 'digit' || section.contentType === 'digit-with-letter') {
|
|
208
|
-
return adjustDigitSection();
|
|
209
|
-
}
|
|
210
|
-
return adjustLetterSection();
|
|
211
|
-
}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import useEventCallback from '@mui/utils/useEventCallback';
|
|
2
|
-
import { cleanDigitSectionValue, getLetterEditingOptions, removeLocalizedDigits } from "./useField.utils.mjs";
|
|
3
|
-
import { usePickerAdapter } from "../../../hooks/usePickerAdapter.mjs";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Returns the `onKeyDown` handler to pass to the root element of the field.
|
|
7
|
-
*/
|
|
8
|
-
export function useFieldRootHandleKeyDown(parameters) {
|
|
9
|
-
const adapter = usePickerAdapter();
|
|
10
|
-
const {
|
|
11
|
-
manager: {
|
|
12
|
-
internal_fieldValueManager: fieldValueManager
|
|
13
|
-
},
|
|
14
|
-
internalPropsWithDefaults: {
|
|
15
|
-
minutesStep,
|
|
16
|
-
disabled,
|
|
17
|
-
readOnly
|
|
18
|
-
},
|
|
19
|
-
stateResponse: {
|
|
20
|
-
// States and derived states
|
|
21
|
-
state,
|
|
22
|
-
value,
|
|
23
|
-
activeSectionIndex,
|
|
24
|
-
parsedSelectedSections,
|
|
25
|
-
sectionsValueBoundaries,
|
|
26
|
-
localizedDigits,
|
|
27
|
-
timezone,
|
|
28
|
-
sectionOrder,
|
|
29
|
-
// Methods to update the states
|
|
30
|
-
clearValue,
|
|
31
|
-
clearActiveSection,
|
|
32
|
-
setSelectedSections,
|
|
33
|
-
updateSectionValue
|
|
34
|
-
}
|
|
35
|
-
} = parameters;
|
|
36
|
-
return useEventCallback(event => {
|
|
37
|
-
if (disabled) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// eslint-disable-next-line default-case
|
|
42
|
-
switch (true) {
|
|
43
|
-
// Select all
|
|
44
|
-
case (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'A' && !event.shiftKey && !event.altKey:
|
|
45
|
-
{
|
|
46
|
-
// prevent default to make sure that the next line "select all" while updating
|
|
47
|
-
// the internal state at the same time.
|
|
48
|
-
event.preventDefault();
|
|
49
|
-
setSelectedSections('all');
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Move selection to next section
|
|
54
|
-
case event.key === 'ArrowRight':
|
|
55
|
-
{
|
|
56
|
-
event.preventDefault();
|
|
57
|
-
if (parsedSelectedSections == null) {
|
|
58
|
-
setSelectedSections(sectionOrder.startIndex);
|
|
59
|
-
} else if (parsedSelectedSections === 'all') {
|
|
60
|
-
setSelectedSections(sectionOrder.endIndex);
|
|
61
|
-
} else {
|
|
62
|
-
const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].rightIndex;
|
|
63
|
-
if (nextSectionIndex !== null) {
|
|
64
|
-
setSelectedSections(nextSectionIndex);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Move selection to previous section
|
|
71
|
-
case event.key === 'ArrowLeft':
|
|
72
|
-
{
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
if (parsedSelectedSections == null) {
|
|
75
|
-
setSelectedSections(sectionOrder.endIndex);
|
|
76
|
-
} else if (parsedSelectedSections === 'all') {
|
|
77
|
-
setSelectedSections(sectionOrder.startIndex);
|
|
78
|
-
} else {
|
|
79
|
-
const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].leftIndex;
|
|
80
|
-
if (nextSectionIndex !== null) {
|
|
81
|
-
setSelectedSections(nextSectionIndex);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Reset the value of the selected section
|
|
88
|
-
case event.key === 'Delete':
|
|
89
|
-
{
|
|
90
|
-
event.preventDefault();
|
|
91
|
-
if (readOnly) {
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
if (parsedSelectedSections == null || parsedSelectedSections === 'all') {
|
|
95
|
-
clearValue();
|
|
96
|
-
} else {
|
|
97
|
-
clearActiveSection();
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Increment / decrement the selected section value
|
|
103
|
-
case ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(event.key):
|
|
104
|
-
{
|
|
105
|
-
event.preventDefault();
|
|
106
|
-
if (readOnly || activeSectionIndex == null) {
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// if all sections are selected, mark the currently editing one as selected
|
|
111
|
-
if (parsedSelectedSections === 'all') {
|
|
112
|
-
setSelectedSections(activeSectionIndex);
|
|
113
|
-
}
|
|
114
|
-
const activeSection = state.sections[activeSectionIndex];
|
|
115
|
-
const newSectionValue = adjustSectionValue(adapter, timezone, activeSection, event.key, sectionsValueBoundaries, localizedDigits, fieldValueManager.getDateFromSection(value, activeSection), {
|
|
116
|
-
minutesStep
|
|
117
|
-
});
|
|
118
|
-
updateSectionValue({
|
|
119
|
-
section: activeSection,
|
|
120
|
-
newSectionValue,
|
|
121
|
-
shouldGoToNextSection: false
|
|
122
|
-
});
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function getDeltaFromKeyCode(keyCode) {
|
|
129
|
-
switch (keyCode) {
|
|
130
|
-
case 'ArrowUp':
|
|
131
|
-
return 1;
|
|
132
|
-
case 'ArrowDown':
|
|
133
|
-
return -1;
|
|
134
|
-
case 'PageUp':
|
|
135
|
-
return 5;
|
|
136
|
-
case 'PageDown':
|
|
137
|
-
return -5;
|
|
138
|
-
default:
|
|
139
|
-
return 0;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function adjustSectionValue(adapter, timezone, section, keyCode, sectionsValueBoundaries, localizedDigits, activeDate, stepsAttributes) {
|
|
143
|
-
const delta = getDeltaFromKeyCode(keyCode);
|
|
144
|
-
const isStart = keyCode === 'Home';
|
|
145
|
-
const isEnd = keyCode === 'End';
|
|
146
|
-
const shouldSetAbsolute = section.value === '' || isStart || isEnd;
|
|
147
|
-
const adjustDigitSection = () => {
|
|
148
|
-
const sectionBoundaries = sectionsValueBoundaries[section.type]({
|
|
149
|
-
currentDate: activeDate,
|
|
150
|
-
format: section.format,
|
|
151
|
-
contentType: section.contentType
|
|
152
|
-
});
|
|
153
|
-
const getCleanValue = value => cleanDigitSectionValue(adapter, value, sectionBoundaries, localizedDigits, section);
|
|
154
|
-
const step = section.type === 'minutes' && stepsAttributes?.minutesStep ? stepsAttributes.minutesStep : 1;
|
|
155
|
-
let newSectionValueNumber;
|
|
156
|
-
if (shouldSetAbsolute) {
|
|
157
|
-
if (section.type === 'year' && !isEnd && !isStart) {
|
|
158
|
-
return adapter.formatByString(adapter.date(undefined, timezone), section.format);
|
|
159
|
-
}
|
|
160
|
-
if (delta > 0 || isStart) {
|
|
161
|
-
newSectionValueNumber = sectionBoundaries.minimum;
|
|
162
|
-
} else {
|
|
163
|
-
newSectionValueNumber = sectionBoundaries.maximum;
|
|
164
|
-
}
|
|
165
|
-
} else {
|
|
166
|
-
const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
|
|
167
|
-
newSectionValueNumber = currentSectionValue + delta * step;
|
|
168
|
-
}
|
|
169
|
-
if (newSectionValueNumber % step !== 0) {
|
|
170
|
-
if (delta < 0 || isStart) {
|
|
171
|
-
newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)
|
|
172
|
-
}
|
|
173
|
-
if (delta > 0 || isEnd) {
|
|
174
|
-
newSectionValueNumber -= newSectionValueNumber % step;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
if (newSectionValueNumber > sectionBoundaries.maximum) {
|
|
178
|
-
return getCleanValue(sectionBoundaries.minimum + (newSectionValueNumber - sectionBoundaries.maximum - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));
|
|
179
|
-
}
|
|
180
|
-
if (newSectionValueNumber < sectionBoundaries.minimum) {
|
|
181
|
-
return getCleanValue(sectionBoundaries.maximum - (sectionBoundaries.minimum - newSectionValueNumber - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));
|
|
182
|
-
}
|
|
183
|
-
return getCleanValue(newSectionValueNumber);
|
|
184
|
-
};
|
|
185
|
-
const adjustLetterSection = () => {
|
|
186
|
-
const options = getLetterEditingOptions(adapter, timezone, section.type, section.format);
|
|
187
|
-
if (options.length === 0) {
|
|
188
|
-
return section.value;
|
|
189
|
-
}
|
|
190
|
-
if (shouldSetAbsolute) {
|
|
191
|
-
if (delta > 0 || isStart) {
|
|
192
|
-
return options[0];
|
|
193
|
-
}
|
|
194
|
-
return options[options.length - 1];
|
|
195
|
-
}
|
|
196
|
-
const currentOptionIndex = options.indexOf(section.value);
|
|
197
|
-
const newOptionIndex = (currentOptionIndex + delta) % options.length;
|
|
198
|
-
const clampedIndex = (newOptionIndex + options.length) % options.length;
|
|
199
|
-
return options[clampedIndex];
|
|
200
|
-
};
|
|
201
|
-
if (section.contentType === 'digit' || section.contentType === 'digit-with-letter') {
|
|
202
|
-
return adjustDigitSection();
|
|
203
|
-
}
|
|
204
|
-
return adjustLetterSection();
|
|
205
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { UseFieldParameters, UseFieldProps, UseFieldReturnValue } from "./useField.types.mjs";
|
|
2
|
-
import { InferFieldSection } from "../../../models/index.mjs";
|
|
3
|
-
import { PickerValidValue } from "../../models/index.mjs";
|
|
4
|
-
export declare const addPositionPropertiesToSections: <TValue extends PickerValidValue>(sections: InferFieldSection<TValue>[], localizedDigits: string[], isRtl: boolean) => FieldSectionWithPositions<TValue>[];
|
|
5
|
-
export declare const useFieldV6TextField: <TValue extends PickerValidValue, TError, TValidationProps extends {}, TProps extends UseFieldProps<false>>(parameters: UseFieldParameters<TValue, false, TError, TValidationProps, TProps>) => UseFieldReturnValue<false, TProps>;
|
|
6
|
-
type FieldSectionWithPositions<TValue extends PickerValidValue> = InferFieldSection<TValue> & {
|
|
7
|
-
/**
|
|
8
|
-
* Start index of the section in the format
|
|
9
|
-
*/
|
|
10
|
-
start: number;
|
|
11
|
-
/**
|
|
12
|
-
* End index of the section in the format
|
|
13
|
-
*/
|
|
14
|
-
end: number;
|
|
15
|
-
/**
|
|
16
|
-
* Start index of the section value in the input.
|
|
17
|
-
* Takes into account invisible unicode characters such as \u2069 but does not include them
|
|
18
|
-
*/
|
|
19
|
-
startInInput: number;
|
|
20
|
-
/**
|
|
21
|
-
* End index of the section value in the input.
|
|
22
|
-
* Takes into account invisible unicode characters such as \u2069 but does not include them
|
|
23
|
-
*/
|
|
24
|
-
endInInput: number;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { UseFieldParameters, UseFieldProps, UseFieldReturnValue } from "./useField.types.js";
|
|
2
|
-
import { InferFieldSection } from "../../../models/index.js";
|
|
3
|
-
import { PickerValidValue } from "../../models/index.js";
|
|
4
|
-
export declare const addPositionPropertiesToSections: <TValue extends PickerValidValue>(sections: InferFieldSection<TValue>[], localizedDigits: string[], isRtl: boolean) => FieldSectionWithPositions<TValue>[];
|
|
5
|
-
export declare const useFieldV6TextField: <TValue extends PickerValidValue, TError, TValidationProps extends {}, TProps extends UseFieldProps<false>>(parameters: UseFieldParameters<TValue, false, TError, TValidationProps, TProps>) => UseFieldReturnValue<false, TProps>;
|
|
6
|
-
type FieldSectionWithPositions<TValue extends PickerValidValue> = InferFieldSection<TValue> & {
|
|
7
|
-
/**
|
|
8
|
-
* Start index of the section in the format
|
|
9
|
-
*/
|
|
10
|
-
start: number;
|
|
11
|
-
/**
|
|
12
|
-
* End index of the section in the format
|
|
13
|
-
*/
|
|
14
|
-
end: number;
|
|
15
|
-
/**
|
|
16
|
-
* Start index of the section value in the input.
|
|
17
|
-
* Takes into account invisible unicode characters such as \u2069 but does not include them
|
|
18
|
-
*/
|
|
19
|
-
startInInput: number;
|
|
20
|
-
/**
|
|
21
|
-
* End index of the section value in the input.
|
|
22
|
-
* Takes into account invisible unicode characters such as \u2069 but does not include them
|
|
23
|
-
*/
|
|
24
|
-
endInInput: number;
|
|
25
|
-
};
|
|
26
|
-
export {};
|