@mui/x-date-pickers 8.0.0-beta.0 → 8.0.0-beta.2

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.
Files changed (237) hide show
  1. package/CHANGELOG.md +171 -0
  2. package/DateCalendar/DateCalendar.js +4 -8
  3. package/DateCalendar/DayCalendar.d.ts +3 -7
  4. package/DateCalendar/DayCalendar.js +18 -10
  5. package/DateCalendar/index.d.ts +0 -1
  6. package/DateField/useDateField.d.ts +1 -1
  7. package/DateField/useDateField.js +2 -16
  8. package/DatePicker/DatePicker.js +1 -0
  9. package/DatePicker/shared.js +3 -9
  10. package/DateTimeField/useDateTimeField.d.ts +1 -1
  11. package/DateTimeField/useDateTimeField.js +2 -16
  12. package/DateTimePicker/DateTimePicker.js +1 -0
  13. package/DateTimePicker/shared.js +3 -13
  14. package/DesktopDatePicker/DesktopDatePicker.js +1 -0
  15. package/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -0
  16. package/DesktopTimePicker/DesktopTimePicker.js +1 -0
  17. package/MobileDatePicker/MobileDatePicker.js +1 -0
  18. package/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
  19. package/MobileTimePicker/MobileTimePicker.js +1 -0
  20. package/MonthCalendar/MonthCalendar.js +4 -9
  21. package/PickersDay/PickersDay.d.ts +1 -72
  22. package/PickersDay/PickersDay.js +30 -28
  23. package/PickersDay/PickersDay.types.d.ts +114 -0
  24. package/PickersDay/PickersDay.types.js +5 -0
  25. package/PickersDay/index.d.ts +1 -1
  26. package/PickersDay/usePickerDayOwnerState.d.ts +14 -0
  27. package/PickersDay/usePickerDayOwnerState.js +40 -0
  28. package/PickersSectionList/PickersSectionList.d.ts +1 -1
  29. package/PickersSectionList/PickersSectionList.types.d.ts +2 -6
  30. package/TimeField/useTimeField.d.ts +1 -1
  31. package/TimeField/useTimeField.js +2 -16
  32. package/TimePicker/TimePicker.js +1 -0
  33. package/TimePicker/shared.js +3 -3
  34. package/YearCalendar/YearCalendar.js +4 -10
  35. package/esm/DateCalendar/DateCalendar.js +6 -10
  36. package/esm/DateCalendar/DayCalendar.d.ts +3 -7
  37. package/esm/DateCalendar/DayCalendar.js +18 -10
  38. package/esm/DateCalendar/index.d.ts +0 -1
  39. package/esm/DateField/useDateField.d.ts +1 -1
  40. package/esm/DateField/useDateField.js +3 -17
  41. package/esm/DatePicker/DatePicker.js +1 -0
  42. package/esm/DatePicker/shared.js +3 -9
  43. package/esm/DateTimeField/useDateTimeField.d.ts +1 -1
  44. package/esm/DateTimeField/useDateTimeField.js +3 -17
  45. package/esm/DateTimePicker/DateTimePicker.js +1 -0
  46. package/esm/DateTimePicker/shared.js +4 -14
  47. package/esm/DesktopDatePicker/DesktopDatePicker.js +1 -0
  48. package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -0
  49. package/esm/DesktopTimePicker/DesktopTimePicker.js +1 -0
  50. package/esm/MobileDatePicker/MobileDatePicker.js +1 -0
  51. package/esm/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
  52. package/esm/MobileTimePicker/MobileTimePicker.js +1 -0
  53. package/esm/MonthCalendar/MonthCalendar.js +6 -11
  54. package/esm/PickersDay/PickersDay.d.ts +1 -72
  55. package/esm/PickersDay/PickersDay.js +30 -28
  56. package/esm/PickersDay/PickersDay.types.d.ts +114 -0
  57. package/esm/PickersDay/PickersDay.types.js +1 -0
  58. package/esm/PickersDay/index.d.ts +1 -1
  59. package/esm/PickersDay/usePickerDayOwnerState.d.ts +14 -0
  60. package/esm/PickersDay/usePickerDayOwnerState.js +32 -0
  61. package/esm/PickersSectionList/PickersSectionList.d.ts +1 -1
  62. package/esm/PickersSectionList/PickersSectionList.types.d.ts +2 -6
  63. package/esm/TimeField/useTimeField.d.ts +1 -1
  64. package/esm/TimeField/useTimeField.js +3 -17
  65. package/esm/TimePicker/TimePicker.js +1 -0
  66. package/esm/TimePicker/shared.js +3 -3
  67. package/esm/YearCalendar/YearCalendar.js +5 -11
  68. package/esm/hooks/useSplitFieldProps.d.ts +1 -1
  69. package/esm/index.js +1 -1
  70. package/esm/internals/components/PickerFieldUI.d.ts +5 -5
  71. package/esm/internals/hooks/useField/buildSectionsFromFormat.d.ts +2 -2
  72. package/esm/internals/hooks/useField/buildSectionsFromFormat.js +9 -9
  73. package/esm/internals/hooks/useField/index.d.ts +1 -1
  74. package/esm/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
  75. package/esm/internals/hooks/useField/syncSelectionToDOM.js +50 -0
  76. package/esm/internals/hooks/useField/useField.d.ts +2 -4
  77. package/esm/internals/hooks/useField/useField.js +5 -229
  78. package/esm/internals/hooks/useField/useField.types.d.ts +55 -68
  79. package/esm/internals/hooks/useField/useField.utils.d.ts +3 -8
  80. package/esm/internals/hooks/useField/useField.utils.js +7 -149
  81. package/esm/internals/hooks/useField/useFieldCharacterEditing.d.ts +19 -26
  82. package/esm/internals/hooks/useField/useFieldCharacterEditing.js +42 -60
  83. package/esm/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
  84. package/esm/internals/hooks/useField/useFieldHiddenInputProps.js +31 -0
  85. package/esm/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
  86. package/esm/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +16 -0
  87. package/esm/internals/hooks/useField/useFieldRootHandleKeyDown.js +205 -0
  88. package/esm/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
  89. package/esm/internals/hooks/useField/useFieldRootProps.js +150 -0
  90. package/esm/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
  91. package/esm/internals/hooks/useField/useFieldSectionContainerProps.js +29 -0
  92. package/esm/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
  93. package/esm/internals/hooks/useField/useFieldSectionContentProps.js +226 -0
  94. package/esm/internals/hooks/useField/useFieldState.d.ts +23 -13
  95. package/esm/internals/hooks/useField/useFieldState.js +103 -30
  96. package/esm/internals/hooks/useField/useFieldV6TextField.d.ts +3 -3
  97. package/esm/internals/hooks/useField/useFieldV6TextField.js +202 -135
  98. package/esm/internals/hooks/useField/useFieldV7TextField.d.ts +3 -2
  99. package/esm/internals/hooks/useField/useFieldV7TextField.js +200 -367
  100. package/esm/internals/hooks/usePicker/usePicker.types.d.ts +1 -0
  101. package/esm/internals/index.d.ts +6 -5
  102. package/esm/internals/index.js +4 -3
  103. package/esm/locales/deDE.js +2 -3
  104. package/esm/managers/useDateManager.d.ts +4 -13
  105. package/esm/managers/useDateManager.js +21 -31
  106. package/esm/managers/useDateTimeManager.d.ts +4 -13
  107. package/esm/managers/useDateTimeManager.js +26 -36
  108. package/esm/managers/useTimeManager.d.ts +4 -13
  109. package/esm/managers/useTimeManager.js +17 -27
  110. package/esm/models/fields.d.ts +2 -2
  111. package/esm/models/manager.d.ts +6 -10
  112. package/esm/validation/validateDate.js +3 -4
  113. package/hooks/useSplitFieldProps.d.ts +1 -1
  114. package/index.js +1 -1
  115. package/internals/components/PickerFieldUI.d.ts +5 -5
  116. package/internals/hooks/useField/buildSectionsFromFormat.d.ts +2 -2
  117. package/internals/hooks/useField/buildSectionsFromFormat.js +9 -9
  118. package/internals/hooks/useField/index.d.ts +1 -1
  119. package/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
  120. package/internals/hooks/useField/syncSelectionToDOM.js +56 -0
  121. package/internals/hooks/useField/useField.d.ts +2 -4
  122. package/internals/hooks/useField/useField.js +5 -231
  123. package/internals/hooks/useField/useField.types.d.ts +55 -68
  124. package/internals/hooks/useField/useField.utils.d.ts +3 -8
  125. package/internals/hooks/useField/useField.utils.js +9 -154
  126. package/internals/hooks/useField/useFieldCharacterEditing.d.ts +19 -26
  127. package/internals/hooks/useField/useFieldCharacterEditing.js +41 -59
  128. package/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
  129. package/internals/hooks/useField/useFieldHiddenInputProps.js +39 -0
  130. package/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
  131. package/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +16 -0
  132. package/internals/hooks/useField/useFieldRootHandleKeyDown.js +211 -0
  133. package/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
  134. package/internals/hooks/useField/useFieldRootProps.js +156 -0
  135. package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
  136. package/internals/hooks/useField/useFieldSectionContainerProps.js +37 -0
  137. package/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
  138. package/internals/hooks/useField/useFieldSectionContentProps.js +234 -0
  139. package/internals/hooks/useField/useFieldState.d.ts +23 -13
  140. package/internals/hooks/useField/useFieldState.js +102 -29
  141. package/internals/hooks/useField/useFieldV6TextField.d.ts +3 -3
  142. package/internals/hooks/useField/useFieldV6TextField.js +202 -135
  143. package/internals/hooks/useField/useFieldV7TextField.d.ts +3 -2
  144. package/internals/hooks/useField/useFieldV7TextField.js +200 -367
  145. package/internals/hooks/usePicker/usePicker.types.d.ts +1 -0
  146. package/internals/index.d.ts +6 -5
  147. package/internals/index.js +25 -18
  148. package/locales/deDE.js +2 -3
  149. package/managers/useDateManager.d.ts +4 -13
  150. package/managers/useDateManager.js +21 -31
  151. package/managers/useDateTimeManager.d.ts +4 -13
  152. package/managers/useDateTimeManager.js +26 -36
  153. package/managers/useTimeManager.d.ts +4 -13
  154. package/managers/useTimeManager.js +18 -28
  155. package/models/fields.d.ts +2 -2
  156. package/models/manager.d.ts +6 -10
  157. package/modern/DateCalendar/DateCalendar.js +6 -10
  158. package/modern/DateCalendar/DayCalendar.d.ts +3 -7
  159. package/modern/DateCalendar/DayCalendar.js +18 -10
  160. package/modern/DateCalendar/index.d.ts +0 -1
  161. package/modern/DateField/useDateField.d.ts +1 -1
  162. package/modern/DateField/useDateField.js +3 -17
  163. package/modern/DatePicker/DatePicker.js +1 -0
  164. package/modern/DatePicker/shared.js +3 -9
  165. package/modern/DateTimeField/useDateTimeField.d.ts +1 -1
  166. package/modern/DateTimeField/useDateTimeField.js +3 -17
  167. package/modern/DateTimePicker/DateTimePicker.js +1 -0
  168. package/modern/DateTimePicker/shared.js +4 -14
  169. package/modern/DesktopDatePicker/DesktopDatePicker.js +1 -0
  170. package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +1 -0
  171. package/modern/DesktopTimePicker/DesktopTimePicker.js +1 -0
  172. package/modern/MobileDatePicker/MobileDatePicker.js +1 -0
  173. package/modern/MobileDateTimePicker/MobileDateTimePicker.js +1 -0
  174. package/modern/MobileTimePicker/MobileTimePicker.js +1 -0
  175. package/modern/MonthCalendar/MonthCalendar.js +6 -11
  176. package/modern/PickersDay/PickersDay.d.ts +1 -72
  177. package/modern/PickersDay/PickersDay.js +30 -28
  178. package/modern/PickersDay/PickersDay.types.d.ts +114 -0
  179. package/modern/PickersDay/PickersDay.types.js +1 -0
  180. package/modern/PickersDay/index.d.ts +1 -1
  181. package/modern/PickersDay/usePickerDayOwnerState.d.ts +14 -0
  182. package/modern/PickersDay/usePickerDayOwnerState.js +32 -0
  183. package/modern/PickersSectionList/PickersSectionList.d.ts +1 -1
  184. package/modern/PickersSectionList/PickersSectionList.types.d.ts +2 -6
  185. package/modern/TimeField/useTimeField.d.ts +1 -1
  186. package/modern/TimeField/useTimeField.js +3 -17
  187. package/modern/TimePicker/TimePicker.js +1 -0
  188. package/modern/TimePicker/shared.js +3 -3
  189. package/modern/YearCalendar/YearCalendar.js +5 -11
  190. package/modern/hooks/useSplitFieldProps.d.ts +1 -1
  191. package/modern/index.js +1 -1
  192. package/modern/internals/components/PickerFieldUI.d.ts +5 -5
  193. package/modern/internals/hooks/useField/buildSectionsFromFormat.d.ts +2 -2
  194. package/modern/internals/hooks/useField/buildSectionsFromFormat.js +9 -9
  195. package/modern/internals/hooks/useField/index.d.ts +1 -1
  196. package/modern/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
  197. package/modern/internals/hooks/useField/syncSelectionToDOM.js +50 -0
  198. package/modern/internals/hooks/useField/useField.d.ts +2 -4
  199. package/modern/internals/hooks/useField/useField.js +5 -229
  200. package/modern/internals/hooks/useField/useField.types.d.ts +55 -68
  201. package/modern/internals/hooks/useField/useField.utils.d.ts +3 -8
  202. package/modern/internals/hooks/useField/useField.utils.js +7 -149
  203. package/modern/internals/hooks/useField/useFieldCharacterEditing.d.ts +19 -26
  204. package/modern/internals/hooks/useField/useFieldCharacterEditing.js +42 -60
  205. package/modern/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
  206. package/modern/internals/hooks/useField/useFieldHiddenInputProps.js +31 -0
  207. package/modern/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
  208. package/modern/internals/hooks/useField/useFieldRootHandleKeyDown.d.ts +16 -0
  209. package/modern/internals/hooks/useField/useFieldRootHandleKeyDown.js +205 -0
  210. package/modern/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
  211. package/modern/internals/hooks/useField/useFieldRootProps.js +150 -0
  212. package/modern/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
  213. package/modern/internals/hooks/useField/useFieldSectionContainerProps.js +29 -0
  214. package/modern/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
  215. package/modern/internals/hooks/useField/useFieldSectionContentProps.js +226 -0
  216. package/modern/internals/hooks/useField/useFieldState.d.ts +23 -13
  217. package/modern/internals/hooks/useField/useFieldState.js +103 -30
  218. package/modern/internals/hooks/useField/useFieldV6TextField.d.ts +3 -3
  219. package/modern/internals/hooks/useField/useFieldV6TextField.js +202 -135
  220. package/modern/internals/hooks/useField/useFieldV7TextField.d.ts +3 -2
  221. package/modern/internals/hooks/useField/useFieldV7TextField.js +200 -367
  222. package/modern/internals/hooks/usePicker/usePicker.types.d.ts +1 -0
  223. package/modern/internals/index.d.ts +6 -5
  224. package/modern/internals/index.js +4 -3
  225. package/modern/locales/deDE.js +2 -3
  226. package/modern/managers/useDateManager.d.ts +4 -13
  227. package/modern/managers/useDateManager.js +21 -31
  228. package/modern/managers/useDateTimeManager.d.ts +4 -13
  229. package/modern/managers/useDateTimeManager.js +26 -36
  230. package/modern/managers/useTimeManager.d.ts +4 -13
  231. package/modern/managers/useTimeManager.js +17 -27
  232. package/modern/models/fields.d.ts +2 -2
  233. package/modern/models/manager.d.ts +6 -10
  234. package/modern/validation/validateDate.js +3 -4
  235. package/package.json +2 -2
  236. package/tsconfig.build.tsbuildinfo +1 -1
  237. package/validation/validateDate.js +3 -4
@@ -1,309 +1,177 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import * as React from 'react';
2
3
  import useForkRef from '@mui/utils/useForkRef';
3
4
  import useEventCallback from '@mui/utils/useEventCallback';
4
5
  import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
5
- import useId from '@mui/utils/useId';
6
- import { getSectionValueNow, getSectionValueText, parseSelectedSections } from "./useField.utils.js";
6
+ import { parseSelectedSections } from "./useField.utils.js";
7
7
  import { getActiveElement } from "../../utils/utils.js";
8
- import { usePickerTranslations } from "../../../hooks/usePickerTranslations.js";
9
- import { useUtils } from "../useUtils.js";
10
- export const useFieldV7TextField = params => {
8
+ import { useSplitFieldProps } from "../../../hooks/index.js";
9
+ import { useFieldCharacterEditing } from "./useFieldCharacterEditing.js";
10
+ import { useFieldState } from "./useFieldState.js";
11
+ import { useFieldInternalPropsWithDefaults } from "./useFieldInternalPropsWithDefaults.js";
12
+ import { syncSelectionToDOM } from "./syncSelectionToDOM.js";
13
+ import { useFieldRootProps } from "./useFieldRootProps.js";
14
+ import { useFieldHiddenInputProps } from "./useFieldHiddenInputProps.js";
15
+ import { useFieldSectionContainerProps } from "./useFieldSectionContainerProps.js";
16
+ import { useFieldSectionContentProps } from "./useFieldSectionContentProps.js";
17
+ export const useFieldV7TextField = parameters => {
11
18
  const {
12
- internalProps: {
13
- disabled,
14
- readOnly = false,
15
- autoFocus = false,
16
- focused: focusedProp
17
- },
18
- forwardedProps: {
19
- sectionListRef: inSectionListRef,
20
- onBlur,
21
- onClick,
22
- onFocus,
23
- onInput,
24
- onPaste
25
- },
26
- fieldValueManager,
27
- applyCharacterEditing,
28
- resetCharacterQuery,
29
- setSelectedSections,
19
+ props,
20
+ manager,
21
+ skipContextFieldRefAssignment,
22
+ manager: {
23
+ valueType,
24
+ internal_useOpenPickerButtonAriaLabel: useOpenPickerButtonAriaLabel
25
+ }
26
+ } = parameters;
27
+ const {
28
+ internalProps,
29
+ forwardedProps
30
+ } = useSplitFieldProps(props, valueType);
31
+ const internalPropsWithDefaults = useFieldInternalPropsWithDefaults({
32
+ manager,
33
+ internalProps,
34
+ skipContextFieldRefAssignment
35
+ });
36
+ const {
37
+ sectionListRef: sectionListRefProp,
38
+ onBlur,
39
+ onClick,
40
+ onFocus,
41
+ onInput,
42
+ onPaste,
43
+ onKeyDown,
44
+ onClear,
45
+ clearable
46
+ } = forwardedProps;
47
+ const {
48
+ disabled = false,
49
+ readOnly = false,
50
+ autoFocus = false,
51
+ focused: focusedProp,
52
+ unstableFieldRef
53
+ } = internalPropsWithDefaults;
54
+ const sectionListRef = React.useRef(null);
55
+ const handleSectionListRef = useForkRef(sectionListRefProp, sectionListRef);
56
+ const domGetters = React.useMemo(() => ({
57
+ isReady: () => sectionListRef.current != null,
58
+ getRoot: () => sectionListRef.current.getRoot(),
59
+ getSectionContainer: sectionIndex => sectionListRef.current.getSectionContainer(sectionIndex),
60
+ getSectionContent: sectionIndex => sectionListRef.current.getSectionContent(sectionIndex),
61
+ getSectionIndexFromDOMElement: element => sectionListRef.current.getSectionIndexFromDOMElement(element)
62
+ }), [sectionListRef]);
63
+ const stateResponse = useFieldState({
64
+ manager,
65
+ internalPropsWithDefaults,
66
+ forwardedProps
67
+ });
68
+ const {
69
+ // States and derived states
70
+ areAllSectionsEmpty,
71
+ error,
30
72
  parsedSelectedSections,
73
+ sectionOrder,
31
74
  state,
32
- clearActiveSection,
75
+ value,
76
+ // Methods to update the states
33
77
  clearValue,
34
- updateSectionValue,
35
- updateValueFromValueStr,
36
- sectionOrder,
37
- areAllSectionsEmpty,
38
- sectionsValueBoundaries
39
- } = params;
40
- const sectionListRef = React.useRef(null);
41
- const handleSectionListRef = useForkRef(inSectionListRef, sectionListRef);
42
- const translations = usePickerTranslations();
43
- const utils = useUtils();
44
- const id = useId();
45
- const [focused, setFocused] = React.useState(false);
46
- const interactions = React.useMemo(() => ({
47
- syncSelectionToDOM: () => {
48
- if (!sectionListRef.current) {
49
- return;
50
- }
51
- const selection = document.getSelection();
52
- if (!selection) {
53
- return;
54
- }
55
- if (parsedSelectedSections == null) {
56
- // If the selection contains an element inside the field, we reset it.
57
- if (selection.rangeCount > 0 && sectionListRef.current.getRoot().contains(selection.getRangeAt(0).startContainer)) {
58
- selection.removeAllRanges();
59
- }
60
- if (focused) {
61
- sectionListRef.current.getRoot().blur();
62
- }
63
- return;
64
- }
65
-
66
- // On multi input range pickers we want to update selection range only for the active input
67
- if (!sectionListRef.current.getRoot().contains(getActiveElement(document))) {
68
- return;
69
- }
70
- const range = new window.Range();
71
- let target;
72
- if (parsedSelectedSections === 'all') {
73
- target = sectionListRef.current.getRoot();
74
- } else {
75
- const section = state.sections[parsedSelectedSections];
76
- if (section.type === 'empty') {
77
- target = sectionListRef.current.getSectionContainer(parsedSelectedSections);
78
- } else {
79
- target = sectionListRef.current.getSectionContent(parsedSelectedSections);
80
- }
81
- }
82
- range.selectNodeContents(target);
83
- target.focus();
84
- selection.removeAllRanges();
85
- selection.addRange(range);
86
- },
87
- getActiveSectionIndexFromDOM: () => {
88
- const activeElement = getActiveElement(document);
89
- if (!activeElement || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement)) {
90
- return null;
91
- }
92
- return sectionListRef.current.getSectionIndexFromDOMElement(activeElement);
93
- },
94
- focusField: (newSelectedSections = 0) => {
95
- if (!sectionListRef.current ||
96
- // if the field is already focused, we don't need to focus it again
97
- interactions.getActiveSectionIndexFromDOM() != null) {
98
- return;
99
- }
100
- const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);
101
- setFocused(true);
102
- sectionListRef.current.getSectionContent(newParsedSelectedSections).focus();
103
- },
104
- setSelectedSections: newSelectedSections => {
105
- if (!sectionListRef.current) {
106
- return;
107
- }
108
- const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);
109
- const newActiveSectionIndex = newParsedSelectedSections === 'all' ? 0 : newParsedSelectedSections;
110
- setFocused(newActiveSectionIndex !== null);
111
- setSelectedSections(newSelectedSections);
112
- },
113
- isFieldFocused: () => {
114
- const activeElement = getActiveElement(document);
115
- return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement);
116
- }
117
- }), [parsedSelectedSections, setSelectedSections, state.sections, focused]);
118
-
119
- /**
120
- * If a section content has been updated with a value we don't want to keep,
121
- * Then we need to imperatively revert it (we can't let React do it because the value did not change in his internal representation).
122
- */
123
- const revertDOMSectionChange = useEventCallback(sectionIndex => {
124
- if (!sectionListRef.current) {
125
- return;
126
- }
127
- const section = state.sections[sectionIndex];
128
- sectionListRef.current.getSectionContent(sectionIndex).innerHTML = section.value || section.placeholder;
129
- interactions.syncSelectionToDOM();
78
+ setSelectedSections
79
+ } = stateResponse;
80
+ const applyCharacterEditing = useFieldCharacterEditing({
81
+ stateResponse
130
82
  });
131
- const handleContainerClick = useEventCallback((event, ...args) => {
132
- // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.
133
- // We avoid this by checking if the call of `handleContainerClick` is actually intended, or a side effect.
134
- if (event.isDefaultPrevented() || !sectionListRef.current) {
83
+ const openPickerAriaLabel = useOpenPickerButtonAriaLabel(value);
84
+ const [focused, setFocused] = React.useState(false);
85
+ function focusField(newSelectedSections = 0) {
86
+ if (!sectionListRef.current ||
87
+ // if the field is already focused, we don't need to focus it again
88
+ getActiveSectionIndex(sectionListRef) != null) {
135
89
  return;
136
90
  }
91
+ const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);
137
92
  setFocused(true);
138
- onClick?.(event, ...args);
139
- if (parsedSelectedSections === 'all') {
140
- setTimeout(() => {
141
- const cursorPosition = document.getSelection().getRangeAt(0).startOffset;
142
- if (cursorPosition === 0) {
143
- setSelectedSections(sectionOrder.startIndex);
144
- return;
145
- }
146
- let sectionIndex = 0;
147
- let cursorOnStartOfSection = 0;
148
- while (cursorOnStartOfSection < cursorPosition && sectionIndex < state.sections.length) {
149
- const section = state.sections[sectionIndex];
150
- sectionIndex += 1;
151
- cursorOnStartOfSection += `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`.length;
152
- }
153
- setSelectedSections(sectionIndex - 1);
154
- });
155
- } else if (!focused) {
156
- setFocused(true);
157
- setSelectedSections(sectionOrder.startIndex);
158
- } else {
159
- const hasClickedOnASection = sectionListRef.current.getRoot().contains(event.target);
160
- if (!hasClickedOnASection) {
161
- setSelectedSections(sectionOrder.startIndex);
162
- }
163
- }
93
+ sectionListRef.current.getSectionContent(newParsedSelectedSections).focus();
94
+ }
95
+ const rootProps = useFieldRootProps({
96
+ manager,
97
+ internalPropsWithDefaults,
98
+ stateResponse,
99
+ applyCharacterEditing,
100
+ focused,
101
+ setFocused,
102
+ domGetters
164
103
  });
165
- const handleContainerInput = useEventCallback(event => {
166
- onInput?.(event);
167
- if (!sectionListRef.current || parsedSelectedSections !== 'all') {
168
- return;
169
- }
170
- const target = event.target;
171
- const keyPressed = target.textContent ?? '';
172
- sectionListRef.current.getRoot().innerHTML = state.sections.map(section => `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`).join('');
173
- interactions.syncSelectionToDOM();
174
- if (keyPressed.length === 0 || keyPressed.charCodeAt(0) === 10) {
175
- resetCharacterQuery();
176
- clearValue();
177
- setSelectedSections('all');
178
- } else if (keyPressed.length > 1) {
179
- updateValueFromValueStr(keyPressed);
180
- } else {
181
- if (parsedSelectedSections === 'all') {
182
- setSelectedSections(0);
183
- }
184
- applyCharacterEditing({
185
- keyPressed,
186
- sectionIndex: 0
187
- });
188
- }
104
+ const hiddenInputProps = useFieldHiddenInputProps({
105
+ manager,
106
+ stateResponse
189
107
  });
190
- const handleContainerPaste = useEventCallback(event => {
191
- onPaste?.(event);
192
- if (readOnly || parsedSelectedSections !== 'all') {
193
- event.preventDefault();
194
- return;
195
- }
196
- const pastedValue = event.clipboardData.getData('text');
197
- event.preventDefault();
198
- resetCharacterQuery();
199
- updateValueFromValueStr(pastedValue);
108
+ const createSectionContainerProps = useFieldSectionContainerProps({
109
+ stateResponse
200
110
  });
201
- const handleContainerFocus = useEventCallback(event => {
202
- onFocus?.(event);
203
- if (focused || !sectionListRef.current) {
204
- return;
205
- }
206
- const activeElement = getActiveElement(document);
207
- setFocused(true);
208
- const isFocusInsideASection = sectionListRef.current.getSectionIndexFromDOMElement(activeElement) != null;
209
- if (!isFocusInsideASection) {
210
- setSelectedSections(sectionOrder.startIndex);
211
- }
111
+ const createSectionContentProps = useFieldSectionContentProps({
112
+ manager,
113
+ stateResponse,
114
+ applyCharacterEditing,
115
+ internalPropsWithDefaults,
116
+ domGetters,
117
+ focused
212
118
  });
213
- const handleContainerBlur = useEventCallback(event => {
119
+ const handleRootKeyDown = useEventCallback(event => {
120
+ onKeyDown?.(event);
121
+ rootProps.onKeyDown(event);
122
+ });
123
+ const handleRootBlur = useEventCallback(event => {
214
124
  onBlur?.(event);
215
- setTimeout(() => {
216
- if (!sectionListRef.current) {
217
- return;
218
- }
219
- const activeElement = getActiveElement(document);
220
- const shouldBlur = !sectionListRef.current.getRoot().contains(activeElement);
221
- if (shouldBlur) {
222
- setFocused(false);
223
- setSelectedSections(null);
224
- }
225
- });
125
+ rootProps.onBlur(event);
226
126
  });
227
- const getInputContainerClickHandler = useEventCallback(sectionIndex => event => {
228
- // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.
229
- // We avoid this by checking if the call to this function is actually intended, or a side effect.
230
- if (event.isDefaultPrevented()) {
231
- return;
232
- }
233
- setSelectedSections(sectionIndex);
127
+ const handleRootFocus = useEventCallback(event => {
128
+ onFocus?.(event);
129
+ rootProps.onFocus(event);
234
130
  });
235
- const handleInputContentMouseUp = useEventCallback(event => {
236
- // Without this, the browser will remove the selected when clicking inside an already-selected section.
237
- event.preventDefault();
131
+ const handleRootClick = useEventCallback(event => {
132
+ onClick?.(event);
133
+ rootProps.onClick(event);
238
134
  });
239
- const getInputContentFocusHandler = useEventCallback(sectionIndex => () => {
240
- setSelectedSections(sectionIndex);
135
+ const handleRootPaste = useEventCallback(event => {
136
+ onPaste?.(event);
137
+ rootProps.onPaste(event);
241
138
  });
242
- const handleInputContentPaste = useEventCallback(event => {
243
- // prevent default to avoid the input `onInput` handler being called
244
- event.preventDefault();
245
- if (readOnly || disabled || typeof parsedSelectedSections !== 'number') {
246
- return;
247
- }
248
- const activeSection = state.sections[parsedSelectedSections];
249
- const pastedValue = event.clipboardData.getData('text');
250
- const lettersOnly = /^[a-zA-Z]+$/.test(pastedValue);
251
- const digitsOnly = /^[0-9]+$/.test(pastedValue);
252
- const digitsAndLetterOnly = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(pastedValue);
253
- const isValidPastedValue = activeSection.contentType === 'letter' && lettersOnly || activeSection.contentType === 'digit' && digitsOnly || activeSection.contentType === 'digit-with-letter' && digitsAndLetterOnly;
254
- if (isValidPastedValue) {
255
- resetCharacterQuery();
256
- updateSectionValue({
257
- section: activeSection,
258
- newSectionValue: pastedValue,
259
- shouldGoToNextSection: true
260
- });
261
- }
262
- // If the pasted value corresponds to a single section, but not the expected type, we skip the modification
263
- else if (!lettersOnly && !digitsOnly) {
264
- resetCharacterQuery();
265
- updateValueFromValueStr(pastedValue);
266
- }
139
+ const handleRootInput = useEventCallback(event => {
140
+ onInput?.(event);
141
+ rootProps.onInput(event);
267
142
  });
268
- const handleInputContentDragOver = useEventCallback(event => {
143
+ const handleClear = useEventCallback((event, ...args) => {
269
144
  event.preventDefault();
270
- event.dataTransfer.dropEffect = 'none';
271
- });
272
- const handleInputContentInput = useEventCallback(event => {
273
- if (!sectionListRef.current) {
274
- return;
275
- }
276
- const target = event.target;
277
- const keyPressed = target.textContent ?? '';
278
- const sectionIndex = sectionListRef.current.getSectionIndexFromDOMElement(target);
279
- const section = state.sections[sectionIndex];
280
- if (readOnly || !sectionListRef.current) {
281
- revertDOMSectionChange(sectionIndex);
282
- return;
145
+ onClear?.(event, ...args);
146
+ clearValue();
147
+ if (!isFieldFocused(sectionListRef)) {
148
+ // setSelectedSections is called internally
149
+ focusField(0);
150
+ } else {
151
+ setSelectedSections(sectionOrder.startIndex);
283
152
  }
284
- if (keyPressed.length === 0) {
285
- if (section.value === '') {
286
- revertDOMSectionChange(sectionIndex);
287
- return;
288
- }
289
- const inputType = event.nativeEvent.inputType;
290
- if (inputType === 'insertParagraph' || inputType === 'insertLineBreak') {
291
- revertDOMSectionChange(sectionIndex);
292
- return;
153
+ });
154
+ const elements = React.useMemo(() => {
155
+ return state.sections.map((section, sectionIndex) => ({
156
+ container: createSectionContainerProps(sectionIndex),
157
+ content: createSectionContentProps(section, sectionIndex),
158
+ before: {
159
+ children: section.startSeparator
160
+ },
161
+ after: {
162
+ children: section.endSeparator
293
163
  }
294
- resetCharacterQuery();
295
- revertDOMSectionChange(sectionIndex);
296
- clearActiveSection();
297
- return;
164
+ }));
165
+ }, [state.sections, createSectionContainerProps, createSectionContentProps]);
166
+ React.useEffect(() => {
167
+ if (sectionListRef.current == null) {
168
+ throw new Error(['MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`', 'You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.', '', 'If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your Picker or Field component:', '', '<DatePicker slots={{ textField: MyCustomTextField }} />', '', 'Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element'].join('\n'));
298
169
  }
299
- applyCharacterEditing({
300
- keyPressed,
301
- sectionIndex
302
- });
170
+ if (autoFocus && sectionListRef.current) {
171
+ sectionListRef.current.getSectionContent(sectionOrder.startIndex).focus();
172
+ }
173
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
303
174
 
304
- // The DOM value needs to remain the one React is expecting.
305
- revertDOMSectionChange(sectionIndex);
306
- });
307
175
  useEnhancedEffect(() => {
308
176
  if (!focused || !sectionListRef.current) {
309
177
  return;
@@ -317,94 +185,59 @@ export const useFieldV7TextField = params => {
317
185
  }
318
186
  }
319
187
  }, [parsedSelectedSections, focused]);
320
- const sectionBoundaries = React.useMemo(() => {
321
- return state.sections.reduce((acc, next) => {
322
- acc[next.type] = sectionsValueBoundaries[next.type]({
323
- currentDate: null,
324
- contentType: next.contentType,
325
- format: next.format
326
- });
327
- return acc;
328
- }, {});
329
- }, [sectionsValueBoundaries, state.sections]);
330
- const isContainerEditable = parsedSelectedSections === 'all';
331
- const elements = React.useMemo(() => {
332
- return state.sections.map((section, index) => {
333
- const isEditable = !isContainerEditable && !disabled && !readOnly;
334
- return {
335
- container: {
336
- 'data-sectionindex': index,
337
- onClick: getInputContainerClickHandler(index)
338
- },
339
- content: {
340
- tabIndex: isContainerEditable || index > 0 ? -1 : 0,
341
- contentEditable: !isContainerEditable && !disabled && !readOnly,
342
- role: 'spinbutton',
343
- id: `${id}-${section.type}`,
344
- 'aria-labelledby': `${id}-${section.type}`,
345
- 'aria-readonly': readOnly,
346
- 'aria-valuenow': getSectionValueNow(section, utils),
347
- 'aria-valuemin': sectionBoundaries[section.type].minimum,
348
- 'aria-valuemax': sectionBoundaries[section.type].maximum,
349
- 'aria-valuetext': section.value ? getSectionValueText(section, utils) : translations.empty,
350
- 'aria-label': translations[section.type],
351
- 'aria-disabled': disabled,
352
- spellCheck: isEditable ? false : undefined,
353
- autoCapitalize: isEditable ? 'off' : undefined,
354
- autoCorrect: isEditable ? 'off' : undefined,
355
- [parseInt(React.version, 10) >= 17 ? 'enterKeyHint' : 'enterkeyhint']: isEditable ? 'next' : undefined,
356
- children: section.value || section.placeholder,
357
- onInput: handleInputContentInput,
358
- onPaste: handleInputContentPaste,
359
- onFocus: getInputContentFocusHandler(index),
360
- onDragOver: handleInputContentDragOver,
361
- onMouseUp: handleInputContentMouseUp,
362
- inputMode: section.contentType === 'letter' ? 'text' : 'numeric'
363
- },
364
- before: {
365
- children: section.startSeparator
366
- },
367
- after: {
368
- children: section.endSeparator
369
- }
370
- };
188
+ useEnhancedEffect(() => {
189
+ syncSelectionToDOM({
190
+ focused,
191
+ domGetters,
192
+ stateResponse
371
193
  });
372
- }, [state.sections, getInputContentFocusHandler, handleInputContentPaste, handleInputContentDragOver, handleInputContentInput, getInputContainerClickHandler, handleInputContentMouseUp, disabled, readOnly, isContainerEditable, translations, utils, sectionBoundaries, id]);
373
- const handleValueStrChange = useEventCallback(event => {
374
- updateValueFromValueStr(event.target.value);
375
194
  });
376
- const valueStr = React.useMemo(() => areAllSectionsEmpty ? '' : fieldValueManager.getV7HiddenInputValueFromSections(state.sections), [areAllSectionsEmpty, state.sections, fieldValueManager]);
377
- React.useEffect(() => {
378
- if (sectionListRef.current == null) {
379
- throw new Error(['MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`', 'You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.', '', 'If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your Picker or Field component:', '', '<DatePicker slots={{ textField: MyCustomTextField }} />', '', 'Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element'].join('\n'));
380
- }
381
- if (autoFocus && sectionListRef.current) {
382
- sectionListRef.current.getSectionContent(sectionOrder.startIndex).focus();
383
- }
384
- }, []); // eslint-disable-line react-hooks/exhaustive-deps
385
-
386
- return {
387
- interactions,
388
- returnedValue: {
389
- // Forwarded
390
- autoFocus,
391
- readOnly,
392
- focused: focusedProp ?? focused,
393
- sectionListRef: handleSectionListRef,
394
- onBlur: handleContainerBlur,
395
- onClick: handleContainerClick,
396
- onFocus: handleContainerFocus,
397
- onInput: handleContainerInput,
398
- onPaste: handleContainerPaste,
399
- // Additional
400
- enableAccessibleFieldDOMStructure: true,
401
- elements,
402
- // TODO v7: Try to set to undefined when there is a section selected.
403
- tabIndex: parsedSelectedSections === 0 ? -1 : 0,
404
- contentEditable: isContainerEditable,
405
- value: valueStr,
406
- onChange: handleValueStrChange,
407
- areAllSectionsEmpty
408
- }
409
- };
410
- };
195
+ React.useImperativeHandle(unstableFieldRef, () => ({
196
+ getSections: () => state.sections,
197
+ getActiveSectionIndex: () => getActiveSectionIndex(sectionListRef),
198
+ setSelectedSections: newSelectedSections => {
199
+ if (!sectionListRef.current) {
200
+ return;
201
+ }
202
+ const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);
203
+ const newActiveSectionIndex = newParsedSelectedSections === 'all' ? 0 : newParsedSelectedSections;
204
+ setFocused(newActiveSectionIndex !== null);
205
+ setSelectedSections(newSelectedSections);
206
+ },
207
+ focusField,
208
+ isFieldFocused: () => isFieldFocused(sectionListRef)
209
+ }));
210
+ return _extends({}, forwardedProps, rootProps, {
211
+ onBlur: handleRootBlur,
212
+ onClick: handleRootClick,
213
+ onFocus: handleRootFocus,
214
+ onInput: handleRootInput,
215
+ onPaste: handleRootPaste,
216
+ onKeyDown: handleRootKeyDown,
217
+ onClear: handleClear
218
+ }, hiddenInputProps, {
219
+ error,
220
+ clearable: Boolean(clearable && !areAllSectionsEmpty && !readOnly && !disabled),
221
+ focused: focusedProp ?? focused,
222
+ sectionListRef: handleSectionListRef,
223
+ // Additional
224
+ enableAccessibleFieldDOMStructure: true,
225
+ elements,
226
+ areAllSectionsEmpty,
227
+ disabled,
228
+ readOnly,
229
+ autoFocus,
230
+ openPickerAriaLabel
231
+ });
232
+ };
233
+ function getActiveSectionIndex(sectionListRef) {
234
+ const activeElement = getActiveElement(document);
235
+ if (!activeElement || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement)) {
236
+ return null;
237
+ }
238
+ return sectionListRef.current.getSectionIndexFromDOMElement(activeElement);
239
+ }
240
+ function isFieldFocused(sectionListRef) {
241
+ const activeElement = getActiveElement(document);
242
+ return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement);
243
+ }
@@ -89,6 +89,7 @@ export interface UsePickerNonStaticProps extends Omit<PickerFieldPrivateContextV
89
89
  format?: string;
90
90
  /**
91
91
  * If `true`, the button to open the Picker will not be rendered (it will only render the field).
92
+ * @deprecated Use the [field component](https://next.mui.com/x/react-date-pickers/fields/) instead.
92
93
  * @default false
93
94
  */
94
95
  disableOpenPicker?: boolean;
@@ -26,7 +26,7 @@ export { DAY_MARGIN, DIALOG_WIDTH, VIEW_HEIGHT, MULTI_SECTION_CLOCK_SECTION_WIDT
26
26
  export { useControlledValue } from "./hooks/useControlledValue.js";
27
27
  export type { DesktopOnlyPickerProps } from './hooks/useDesktopPicker';
28
28
  export { useField, useFieldInternalPropsWithDefaults, createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from "./hooks/useField/index.js";
29
- export type { UseFieldInternalProps, UseFieldParams, UseFieldResponse, FieldValueManager, FieldChangeHandler, FieldChangeHandlerContext } from './hooks/useField';
29
+ export type { UseFieldInternalProps, UseFieldParameters, UseFieldReturnValue, FieldValueManager, FieldChangeHandler, FieldChangeHandlerContext } from './hooks/useField';
30
30
  export { useFieldOwnerState } from "./hooks/useFieldOwnerState.js";
31
31
  export type { MobileOnlyPickerProps } from './hooks/useMobilePicker';
32
32
  export { useNullableFieldPrivateContext } from "./hooks/useNullableFieldPrivateContext.js";
@@ -42,7 +42,7 @@ export { useLocalizationContext, useDefaultDates, useUtils, useNow } from "./hoo
42
42
  export type { ExportedUseViewsOptions, UseViewsOptions } from './hooks/useViews';
43
43
  export { useViews } from "./hooks/useViews.js";
44
44
  export { usePreviousMonthDisabled, useNextMonthDisabled } from "./hooks/date-helpers-hooks.js";
45
- export type { PickerAnyManager, PickerManagerFieldInternalProps, PickerManagerEnableAccessibleFieldDOMStructure, PickerManagerError, PickerValueManager } from './models/manager';
45
+ export type { PickerAnyManager, PickerManagerFieldInternalProps, PickerManagerFieldInternalPropsWithDefaults, PickerManagerEnableAccessibleFieldDOMStructure, PickerManagerError, PickerValueManager } from './models/manager';
46
46
  export type { RangePosition } from './models/pickers';
47
47
  export type { BaseSingleInputFieldProps, FieldRangeSection } from './models/fields';
48
48
  export type { BasePickerProps, BasePickerInputProps } from './models/props/basePickerProps';
@@ -65,6 +65,7 @@ export type { DayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, Exported
65
65
  export type { ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
66
66
  export { useCalendarState } from "../DateCalendar/useCalendarState.js";
67
67
  export { DateTimePickerToolbarOverrideContext } from "../DateTimePicker/DateTimePickerToolbar.js";
68
- export { getDateFieldInternalPropsDefaults } from "../managers/useDateManager.js";
69
- export { getTimeFieldInternalPropsDefaults } from "../managers/useTimeManager.js";
70
- export { getDateTimeFieldInternalPropsDefaults } from "../managers/useDateTimeManager.js";
68
+ export { usePickerDayOwnerState } from "../PickersDay/usePickerDayOwnerState.js";
69
+ export { useApplyDefaultValuesToDateValidationProps } from "../managers/useDateManager.js";
70
+ export { useApplyDefaultValuesToTimeValidationProps } from "../managers/useTimeManager.js";
71
+ export { useApplyDefaultValuesToDateTimeValidationProps } from "../managers/useDateTimeManager.js";
@@ -33,6 +33,7 @@ export { applyDefaultViewProps } from "./utils/views.js";
33
33
  export { DayCalendar } from "../DateCalendar/DayCalendar.js";
34
34
  export { useCalendarState } from "../DateCalendar/useCalendarState.js";
35
35
  export { DateTimePickerToolbarOverrideContext } from "../DateTimePicker/DateTimePickerToolbar.js";
36
- export { getDateFieldInternalPropsDefaults } from "../managers/useDateManager.js";
37
- export { getTimeFieldInternalPropsDefaults } from "../managers/useTimeManager.js";
38
- export { getDateTimeFieldInternalPropsDefaults } from "../managers/useDateTimeManager.js";
36
+ export { usePickerDayOwnerState } from "../PickersDay/usePickerDayOwnerState.js";
37
+ export { useApplyDefaultValuesToDateValidationProps } from "../managers/useDateManager.js";
38
+ export { useApplyDefaultValuesToTimeValidationProps } from "../managers/useTimeManager.js";
39
+ export { useApplyDefaultValuesToDateTimeValidationProps } from "../managers/useDateTimeManager.js";