@mui/x-date-pickers-pro 7.0.0-beta.2 → 7.0.0-beta.5

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 (278) hide show
  1. package/CHANGELOG.md +429 -30
  2. package/DateRangeCalendar/DateRangeCalendar.js +3 -1
  3. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +3 -0
  4. package/DateRangePicker/DateRangePicker.d.ts +1 -1
  5. package/DateRangePicker/DateRangePicker.js +9 -9
  6. package/DateRangePicker/DateRangePicker.types.d.ts +3 -3
  7. package/DateRangePicker/DateRangePickerToolbar.d.ts +5 -2
  8. package/DateRangePicker/DateRangePickerToolbar.js +22 -2
  9. package/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -1
  10. package/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  11. package/DateTimeRangePicker/DateTimeRangePicker.types.d.ts +3 -3
  12. package/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  13. package/DateTimeRangePicker/DateTimeRangePickerToolbar.d.ts +3 -0
  14. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +45 -9
  15. package/DateTimeRangePicker/shared.js +8 -3
  16. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +1 -1
  17. package/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  18. package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +3 -3
  19. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.d.ts +1 -1
  20. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  21. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.d.ts +3 -3
  22. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +1 -1
  23. package/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  24. package/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +3 -3
  25. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.d.ts +1 -1
  26. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +11 -12
  27. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.d.ts +3 -3
  28. package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +1 -1
  29. package/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  30. package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +11 -14
  31. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +1 -1
  32. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  33. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +12 -16
  34. package/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +1 -1
  35. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  36. package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +12 -16
  37. package/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +2 -2
  38. package/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  39. package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +11 -14
  40. package/SingleInputDateRangeField/index.d.ts +1 -1
  41. package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +2 -3
  42. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -15
  43. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +2 -2
  44. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -10
  45. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +12 -15
  46. package/SingleInputDateTimeRangeField/index.d.ts +1 -1
  47. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +2 -3
  48. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -20
  49. package/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +2 -2
  50. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  51. package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +12 -15
  52. package/SingleInputTimeRangeField/index.d.ts +1 -1
  53. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +2 -3
  54. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -14
  55. package/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  56. package/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +1 -1
  57. package/index.d.ts +0 -1
  58. package/index.js +2 -1
  59. package/internals/hooks/models/useRangePicker.d.ts +5 -5
  60. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +1 -1
  61. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  62. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +5 -5
  63. package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +15 -15
  64. package/internals/hooks/useEnrichedRangePickerFieldProps.js +37 -40
  65. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +1 -1
  66. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  67. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +5 -5
  68. package/internals/hooks/useMultiInputFieldSelectedSections.d.ts +21 -0
  69. package/internals/hooks/useMultiInputFieldSelectedSections.js +43 -0
  70. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +1 -1
  71. package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  72. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +2 -3
  73. package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  74. package/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +4 -4
  75. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +2 -3
  76. package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  77. package/internals/hooks/useRangePosition.d.ts +2 -4
  78. package/internals/hooks/useRangePosition.js +3 -6
  79. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  80. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +1 -2
  81. package/internals/models/dateRange.d.ts +3 -15
  82. package/internals/models/dateTimeRange.d.ts +4 -6
  83. package/internals/models/index.d.ts +0 -1
  84. package/internals/models/index.js +0 -1
  85. package/internals/models/timeRange.d.ts +3 -6
  86. package/internals/utils/date-fields-utils.d.ts +1 -5
  87. package/internals/utils/releaseInfo.js +1 -1
  88. package/internals/utils/valueManagers.d.ts +1 -2
  89. package/internals/utils/valueManagers.js +11 -6
  90. package/models/fields.d.ts +69 -0
  91. package/models/index.d.ts +1 -0
  92. package/models/index.js +1 -0
  93. package/modern/DateRangeCalendar/DateRangeCalendar.js +3 -1
  94. package/modern/DateRangePicker/DateRangePicker.js +9 -9
  95. package/modern/DateRangePicker/DateRangePickerToolbar.js +22 -2
  96. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  97. package/modern/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  98. package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +45 -9
  99. package/modern/DateTimeRangePicker/shared.js +7 -2
  100. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  101. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  102. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  103. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +11 -12
  104. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  105. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  106. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  107. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  108. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -14
  109. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +12 -10
  110. package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -19
  111. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  112. package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -13
  113. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  114. package/modern/index.js +2 -1
  115. package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  116. package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +34 -37
  117. package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  118. package/modern/internals/hooks/useMultiInputFieldSelectedSections.js +40 -0
  119. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +17 -12
  120. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -30
  121. package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -24
  122. package/modern/internals/hooks/useRangePosition.js +3 -6
  123. package/modern/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  124. package/modern/internals/models/index.js +0 -1
  125. package/modern/internals/utils/releaseInfo.js +1 -1
  126. package/modern/internals/utils/valueManagers.js +11 -6
  127. package/modern/models/index.js +1 -0
  128. package/node/DateRangeCalendar/DateRangeCalendar.js +3 -1
  129. package/node/DateRangePicker/DateRangePicker.js +9 -9
  130. package/node/DateRangePicker/DateRangePickerToolbar.js +22 -2
  131. package/node/DateTimeRangePicker/DateTimeRangePicker.js +11 -12
  132. package/node/DateTimeRangePicker/DateTimeRangePickerTabs.js +7 -1
  133. package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +45 -9
  134. package/node/DateTimeRangePicker/shared.js +7 -2
  135. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +9 -9
  136. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +11 -12
  137. package/node/MobileDateRangePicker/MobileDateRangePicker.js +9 -9
  138. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +13 -14
  139. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +17 -19
  140. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +17 -19
  141. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +17 -19
  142. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +12 -10
  143. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +2 -16
  144. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +15 -13
  145. package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +2 -21
  146. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +11 -9
  147. package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +2 -15
  148. package/node/StaticDateRangePicker/StaticDateRangePicker.js +0 -1
  149. package/node/index.js +1 -1
  150. package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +16 -7
  151. package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +33 -36
  152. package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +18 -9
  153. package/node/internals/hooks/useMultiInputFieldSelectedSections.js +50 -0
  154. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +16 -11
  155. package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +23 -31
  156. package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +23 -25
  157. package/node/internals/hooks/useRangePosition.js +3 -8
  158. package/node/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +1 -0
  159. package/node/internals/models/index.js +0 -11
  160. package/node/internals/utils/releaseInfo.js +1 -1
  161. package/node/internals/utils/valueManagers.js +10 -5
  162. package/node/models/index.js +11 -0
  163. package/package.json +5 -5
  164. package/themeAugmentation/props.d.ts +15 -14
  165. package/internals/models/fields.d.ts +0 -49
  166. package/legacy/AdapterDateFns/index.js +0 -1
  167. package/legacy/AdapterDateFnsJalali/index.js +0 -1
  168. package/legacy/AdapterDateFnsV3/index.js +0 -1
  169. package/legacy/AdapterDayjs/index.js +0 -1
  170. package/legacy/AdapterLuxon/index.js +0 -1
  171. package/legacy/AdapterMoment/index.js +0 -1
  172. package/legacy/AdapterMomentHijri/index.js +0 -1
  173. package/legacy/AdapterMomentJalaali/index.js +0 -1
  174. package/legacy/DateRangeCalendar/DateRangeCalendar.js +0 -764
  175. package/legacy/DateRangeCalendar/DateRangeCalendar.types.js +0 -1
  176. package/legacy/DateRangeCalendar/dateRangeCalendarClasses.js +0 -5
  177. package/legacy/DateRangeCalendar/index.js +0 -2
  178. package/legacy/DateRangeCalendar/useDragRange.js +0 -258
  179. package/legacy/DateRangePicker/DateRangePicker.js +0 -334
  180. package/legacy/DateRangePicker/DateRangePicker.types.js +0 -1
  181. package/legacy/DateRangePicker/DateRangePickerToolbar.js +0 -127
  182. package/legacy/DateRangePicker/dateRangePickerToolbarClasses.js +0 -5
  183. package/legacy/DateRangePicker/index.js +0 -3
  184. package/legacy/DateRangePicker/shared.js +0 -33
  185. package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -366
  186. package/legacy/DateRangePickerDay/dateRangePickerDayClasses.js +0 -5
  187. package/legacy/DateRangePickerDay/index.js +0 -2
  188. package/legacy/DateTimeRangePicker/DateTimeRangePicker.js +0 -413
  189. package/legacy/DateTimeRangePicker/DateTimeRangePicker.types.js +0 -1
  190. package/legacy/DateTimeRangePicker/DateTimeRangePickerTabs.js +0 -191
  191. package/legacy/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +0 -57
  192. package/legacy/DateTimeRangePicker/DateTimeRangePickerToolbar.js +0 -184
  193. package/legacy/DateTimeRangePicker/dateTimeRangePickerTabsClasses.js +0 -6
  194. package/legacy/DateTimeRangePicker/dateTimeRangePickerToolbarClasses.js +0 -5
  195. package/legacy/DateTimeRangePicker/index.js +0 -5
  196. package/legacy/DateTimeRangePicker/shared.js +0 -54
  197. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -343
  198. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.types.js +0 -1
  199. package/legacy/DesktopDateRangePicker/index.js +0 -1
  200. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +0 -491
  201. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.types.js +0 -1
  202. package/legacy/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.js +0 -48
  203. package/legacy/DesktopDateTimeRangePicker/index.js +0 -1
  204. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -339
  205. package/legacy/MobileDateRangePicker/MobileDateRangePicker.types.js +0 -1
  206. package/legacy/MobileDateRangePicker/index.js +0 -1
  207. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +0 -484
  208. package/legacy/MobileDateTimeRangePicker/MobileDateTimeRangePicker.types.js +0 -1
  209. package/legacy/MobileDateTimeRangePicker/index.js +0 -1
  210. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +0 -316
  211. package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.types.js +0 -1
  212. package/legacy/MultiInputDateRangeField/index.js +0 -2
  213. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +0 -357
  214. package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.js +0 -1
  215. package/legacy/MultiInputDateTimeRangeField/index.js +0 -2
  216. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +0 -330
  217. package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.types.js +0 -1
  218. package/legacy/MultiInputTimeRangeField/index.js +0 -2
  219. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +0 -307
  220. package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.types.js +0 -1
  221. package/legacy/SingleInputDateRangeField/index.js +0 -2
  222. package/legacy/SingleInputDateRangeField/useSingleInputDateRangeField.js +0 -30
  223. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +0 -348
  224. package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.js +0 -1
  225. package/legacy/SingleInputDateTimeRangeField/index.js +0 -2
  226. package/legacy/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +0 -35
  227. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +0 -321
  228. package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.types.js +0 -1
  229. package/legacy/SingleInputTimeRangeField/index.js +0 -2
  230. package/legacy/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +0 -29
  231. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -276
  232. package/legacy/StaticDateRangePicker/StaticDateRangePicker.types.js +0 -1
  233. package/legacy/StaticDateRangePicker/index.js +0 -1
  234. package/legacy/dateRangeViewRenderers/dateRangeViewRenderers.js +0 -87
  235. package/legacy/dateRangeViewRenderers/index.js +0 -1
  236. package/legacy/index.js +0 -52
  237. package/legacy/internals/constants/dimensions.js +0 -5
  238. package/legacy/internals/hooks/models/index.js +0 -1
  239. package/legacy/internals/hooks/models/useRangePicker.js +0 -1
  240. package/legacy/internals/hooks/useDesktopRangePicker/index.js +0 -1
  241. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +0 -154
  242. package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.js +0 -1
  243. package/legacy/internals/hooks/useEnrichedRangePickerFieldProps.js +0 -258
  244. package/legacy/internals/hooks/useMobileRangePicker/index.js +0 -1
  245. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +0 -144
  246. package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.js +0 -1
  247. package/legacy/internals/hooks/useMultiInputRangeField/shared.js +0 -9
  248. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +0 -102
  249. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +0 -115
  250. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.js +0 -1
  251. package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +0 -109
  252. package/legacy/internals/hooks/useRangePosition.js +0 -39
  253. package/legacy/internals/hooks/useStaticRangePicker/index.js +0 -1
  254. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +0 -76
  255. package/legacy/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.js +0 -1
  256. package/legacy/internals/models/dateRange.js +0 -1
  257. package/legacy/internals/models/dateTimeRange.js +0 -1
  258. package/legacy/internals/models/index.js +0 -5
  259. package/legacy/internals/models/rangePickerProps.js +0 -1
  260. package/legacy/internals/models/timeRange.js +0 -1
  261. package/legacy/internals/utils/date-fields-utils.js +0 -26
  262. package/legacy/internals/utils/date-range-manager.js +0 -65
  263. package/legacy/internals/utils/date-utils.js +0 -12
  264. package/legacy/internals/utils/releaseInfo.js +0 -13
  265. package/legacy/internals/utils/validation/validateDateRange.js +0 -45
  266. package/legacy/internals/utils/validation/validateDateTimeRange.js +0 -45
  267. package/legacy/internals/utils/validation/validateTimeRange.js +0 -32
  268. package/legacy/internals/utils/valueManagers.js +0 -135
  269. package/legacy/locales/index.js +0 -1
  270. package/legacy/models/index.js +0 -3
  271. package/legacy/models/multiInputRangeFieldClasses.js +0 -1
  272. package/legacy/models/range.js +0 -1
  273. package/legacy/models/validation.js +0 -1
  274. package/legacy/themeAugmentation/index.js +0 -4
  275. package/modern/internals/models/fields.js +0 -1
  276. /package/{internals/models → models}/fields.js +0 -0
  277. /package/{legacy/internals → modern}/models/fields.js +0 -0
  278. /package/node/{internals/models → models}/fields.js +0 -0
@@ -5,13 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.useRangePosition = void 0;
8
- var React = _interopRequireWildcard(require("react"));
9
8
  var _useControlled = _interopRequireDefault(require("@mui/utils/useControlled"));
10
9
  var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- const useRangePosition = props => {
14
- const singleInputFieldRef = React.useRef();
10
+ const useRangePosition = (props, singleInputFieldRef) => {
15
11
  const [rangePosition, setRangePosition] = (0, _useControlled.default)({
16
12
  name: 'useRangePosition',
17
13
  state: 'rangePosition',
@@ -22,7 +18,7 @@ const useRangePosition = props => {
22
18
  // When using a single input field,
23
19
  // we want to select the 1st section of the edited date when updating the range position.
24
20
  const syncRangePositionWithSingleInputField = newRangePosition => {
25
- if (singleInputFieldRef.current == null) {
21
+ if (singleInputFieldRef?.current == null) {
26
22
  return;
27
23
  }
28
24
  const sections = singleInputFieldRef.current.getSections();
@@ -36,8 +32,7 @@ const useRangePosition = props => {
36
32
  });
37
33
  return {
38
34
  rangePosition,
39
- onRangePositionChange: handleRangePositionChange,
40
- singleInputFieldRef
35
+ onRangePositionChange: handleRangePositionChange
41
36
  };
42
37
  };
43
38
  exports.useRangePosition = useRangePosition;
@@ -55,6 +55,7 @@ const useStaticRangePicker = _ref => {
55
55
  } = (0, _internals.usePicker)((0, _extends2.default)({}, pickerParams, {
56
56
  props,
57
57
  autoFocusView: autoFocus ?? false,
58
+ fieldRef: undefined,
58
59
  additionalViewProps: {
59
60
  rangePosition,
60
61
  onRangePositionChange
@@ -36,17 +36,6 @@ Object.keys(_timeRange).forEach(function (key) {
36
36
  }
37
37
  });
38
38
  });
39
- var _fields = require("./fields");
40
- Object.keys(_fields).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _fields[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function () {
46
- return _fields[key];
47
- }
48
- });
49
- });
50
39
  var _rangePickerProps = require("./rangePickerProps");
51
40
  Object.keys(_rangePickerProps).forEach(function (key) {
52
41
  if (key === "default" || key === "__esModule") return;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTcwNzQyOTYwMDAwMA==";
9
+ const releaseInfo = "MTcwOTM1NTYwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat
@@ -57,7 +57,7 @@ const rangeFieldValueManager = exports.rangeFieldValueManager = {
57
57
  }
58
58
  return [prevReferenceValue[1], value[1]];
59
59
  },
60
- getSectionsFromValue: (utils, [start, end], fallbackSections, localizedDigits, isRTL, getSectionsFromDate) => {
60
+ getSectionsFromValue: (utils, [start, end], fallbackSections, getSectionsFromDate) => {
61
61
  const separatedFallbackSections = fallbackSections == null ? {
62
62
  startDate: null,
63
63
  endDate: null
@@ -72,7 +72,8 @@ const rangeFieldValueManager = exports.rangeFieldValueManager = {
72
72
  if (sectionIndex === sections.length - 1 && position === 'start') {
73
73
  return (0, _extends2.default)({}, section, {
74
74
  dateName: position,
75
- endSeparator: `${section.endSeparator}${isRTL ? '\u2069 \u2066' : ' – '}`
75
+ // TODO: Check if RTL still works
76
+ endSeparator: `${section.endSeparator} – `
76
77
  });
77
78
  }
78
79
  return (0, _extends2.default)({}, section, {
@@ -80,11 +81,15 @@ const rangeFieldValueManager = exports.rangeFieldValueManager = {
80
81
  });
81
82
  });
82
83
  };
83
- return (0, _internals.addPositionPropertiesToSections)([...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')], localizedDigits, isRTL);
84
+ return [...getSections(start, separatedFallbackSections.startDate, 'start'), ...getSections(end, separatedFallbackSections.endDate, 'end')];
84
85
  },
85
- getValueStrFromSections: (sections, localizedDigits, isRTL) => {
86
+ getV7HiddenInputValueFromSections: sections => {
86
87
  const dateRangeSections = (0, _dateFieldsUtils.splitDateRangeSections)(sections);
87
- return (0, _internals.createDateStrForInputFromSections)([...dateRangeSections.startDate, ...dateRangeSections.endDate], localizedDigits, isRTL);
88
+ return (0, _internals.createDateStrForV7HiddenInputFromSections)([...dateRangeSections.startDate, ...dateRangeSections.endDate]);
89
+ },
90
+ getV6InputValueFromSections: (sections, localizedDigits, isRTL) => {
91
+ const dateRangeSections = (0, _dateFieldsUtils.splitDateRangeSections)(sections);
92
+ return (0, _internals.createDateStrForV6InputFromSections)([...dateRangeSections.startDate, ...dateRangeSections.endDate], localizedDigits, isRTL);
88
93
  },
89
94
  parseValueStr: (valueStr, referenceValue, parseDate) => {
90
95
  // TODO: Improve because it would not work if the date format has `–` as a separator.
@@ -3,6 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _fields = require("./fields");
7
+ Object.keys(_fields).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _fields[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _fields[key];
14
+ }
15
+ });
16
+ });
6
17
  var _range = require("./range");
7
18
  Object.keys(_range).forEach(function (key) {
8
19
  if (key === "default" || key === "__esModule") return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers-pro",
3
- "version": "7.0.0-beta.2",
3
+ "version": "7.0.0-beta.5",
4
4
  "description": "The commercial edition of the date picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -32,10 +32,10 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.23.9",
35
- "@mui/base": "^5.0.0-beta.34",
36
- "@mui/system": "^5.15.7",
37
- "@mui/utils": "^5.15.7",
38
- "@mui/x-date-pickers": "7.0.0-beta.2",
35
+ "@mui/base": "^5.0.0-beta.36",
36
+ "@mui/system": "^5.15.9",
37
+ "@mui/utils": "^5.15.9",
38
+ "@mui/x-date-pickers": "7.0.0-beta.5",
39
39
  "@mui/x-license": "7.0.0-beta.2",
40
40
  "clsx": "^2.1.0",
41
41
  "prop-types": "^15.8.1",
@@ -3,7 +3,8 @@ import { DateRangePickerDayProps } from '../DateRangePickerDay';
3
3
  import { MultiInputDateRangeFieldProps } from '../MultiInputDateRangeField/MultiInputDateRangeField.types';
4
4
  import { SingleInputDateRangeFieldProps } from '../SingleInputDateRangeField/SingleInputDateRangeField.types';
5
5
  import { DateRangeCalendarProps } from '../DateRangeCalendar';
6
- import { DateRangePickerProps, DateRangePickerToolbarProps } from '../DateRangePicker';
6
+ import { DateRangePickerProps } from '../DateRangePicker';
7
+ import { ExportedDateRangePickerToolbarProps } from '../DateRangePicker/DateRangePickerToolbar';
7
8
  import { DesktopDateRangePickerProps } from '../DesktopDateRangePicker';
8
9
  import { MobileDateRangePickerProps } from '../MobileDateRangePicker';
9
10
  import { StaticDateRangePickerProps } from '../StaticDateRangePicker';
@@ -21,29 +22,29 @@ export interface PickersProComponentsPropsList {
21
22
  MuiDateRangeCalendar: DateRangeCalendarProps<PickerValidDate>;
22
23
  MuiDateRangePickerDay: DateRangePickerDayProps<PickerValidDate>;
23
24
  MuiDateTimeRangePickerTabs: ExportedDateTimeRangePickerTabsProps;
24
- MuiDateRangePickerToolbar: DateRangePickerToolbarProps<PickerValidDate>;
25
+ MuiDateRangePickerToolbar: ExportedDateRangePickerToolbarProps;
25
26
  MuiDateTimeRangePickerToolbar: ExportedDateTimeRangePickerToolbarProps;
26
27
 
27
28
  // Multi input range fields
28
- MuiMultiInputDateRangeField: MultiInputDateRangeFieldProps<PickerValidDate>;
29
- MuiMultiInputDateTimeRangeField: MultiInputDateTimeRangeFieldProps<PickerValidDate>;
30
- MuiMultiInputTimeRangeField: MultiInputTimeRangeFieldProps<PickerValidDate>;
29
+ MuiMultiInputDateRangeField: MultiInputDateRangeFieldProps<PickerValidDate, any>;
30
+ MuiMultiInputDateTimeRangeField: MultiInputDateTimeRangeFieldProps<PickerValidDate, any>;
31
+ MuiMultiInputTimeRangeField: MultiInputTimeRangeFieldProps<PickerValidDate, any>;
31
32
 
32
33
  // Single input range fields
33
- MuiSingleInputDateRangeField: SingleInputDateRangeFieldProps<PickerValidDate>;
34
- MuiSingleInputDateTimeRangeField: SingleInputDateTimeRangeFieldProps<PickerValidDate>;
35
- MuiSingleInputTimeRangeField: SingleInputTimeRangeFieldProps<PickerValidDate>;
34
+ MuiSingleInputDateRangeField: SingleInputDateRangeFieldProps<PickerValidDate, any>;
35
+ MuiSingleInputDateTimeRangeField: SingleInputDateTimeRangeFieldProps<PickerValidDate, any>;
36
+ MuiSingleInputTimeRangeField: SingleInputTimeRangeFieldProps<PickerValidDate, any>;
36
37
 
37
38
  // Date Range Pickers
38
- MuiDateRangePicker: DateRangePickerProps<PickerValidDate>;
39
- MuiDesktopDateRangePicker: DesktopDateRangePickerProps<PickerValidDate>;
40
- MuiMobileDateRangePicker: MobileDateRangePickerProps<PickerValidDate>;
39
+ MuiDateRangePicker: DateRangePickerProps<PickerValidDate, any>;
40
+ MuiDesktopDateRangePicker: DesktopDateRangePickerProps<PickerValidDate, any>;
41
+ MuiMobileDateRangePicker: MobileDateRangePickerProps<PickerValidDate, any>;
41
42
  MuiStaticDateRangePicker: StaticDateRangePickerProps<PickerValidDate>;
42
43
 
43
44
  // Date Time Range Pickers
44
- MuiDateTimeRangePicker: DateTimeRangePickerProps<PickerValidDate>;
45
- MuiDesktopDateTimeRangePicker: DesktopDateTimeRangePickerProps<PickerValidDate>;
46
- MuiMobileDateTimeRangePicker: MobileDateTimeRangePickerProps<PickerValidDate>;
45
+ MuiDateTimeRangePicker: DateTimeRangePickerProps<PickerValidDate, any>;
46
+ MuiDesktopDateTimeRangePicker: DesktopDateTimeRangePickerProps<PickerValidDate, any>;
47
+ MuiMobileDateTimeRangePicker: MobileDateTimeRangePickerProps<PickerValidDate, any>;
47
48
  }
48
49
 
49
50
  declare module '@mui/material/styles' {
@@ -1,49 +0,0 @@
1
- import * as React from 'react';
2
- import { SlotComponentProps } from '@mui/base/utils';
3
- import { BaseFieldProps, FieldsTextFieldProps } from '@mui/x-date-pickers/internals';
4
- import { FieldSection, FieldRef, PickerValidDate } from '@mui/x-date-pickers/models';
5
- export interface RangeFieldSection extends FieldSection {
6
- dateName: 'start' | 'end';
7
- }
8
- export type FieldType = 'single-input' | 'multi-input';
9
- /**
10
- * Props the `textField` slot of the multi input field can receive when used inside a picker.
11
- */
12
- export interface MultiInputFieldSlotTextFieldProps {
13
- inputRef?: React.Ref<HTMLInputElement>;
14
- disabled?: boolean;
15
- readOnly?: boolean;
16
- id?: string;
17
- label?: React.ReactNode;
18
- onKeyDown?: React.KeyboardEventHandler;
19
- onFocus?: React.FocusEventHandler;
20
- focused?: boolean;
21
- InputProps?: Partial<FieldsTextFieldProps['InputProps']>;
22
- }
23
- /**
24
- * Props the `root` slot of the multi input field can receive when used inside a picker.
25
- */
26
- export interface MultiInputFieldSlotRootProps {
27
- onBlur?: React.FocusEventHandler;
28
- }
29
- export interface MultiInputFieldRefs {
30
- unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
31
- unstableEndFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
32
- }
33
- /**
34
- * Props the multi input field can receive when used inside a picker.
35
- * Only contains what the MUI component are passing to the field, not what users can pass using the `props.slotProps.field`.
36
- */
37
- export interface BaseMultiInputFieldProps<TValue, TDate extends PickerValidDate, TSection extends FieldSection, TError> extends BaseFieldProps<TValue, TDate, TSection, TError>, MultiInputFieldRefs {
38
- slots?: {
39
- root?: React.ElementType;
40
- separator?: React.ElementType;
41
- textField?: React.ElementType;
42
- };
43
- slotProps?: {
44
- root?: SlotComponentProps<React.ElementType<MultiInputFieldSlotRootProps>, {}, Record<string, any>>;
45
- textField?: SlotComponentProps<React.ElementType<MultiInputFieldSlotTextFieldProps>, {}, {
46
- position?: 'start' | 'end';
47
- } & Record<string, any>>;
48
- };
49
- }
@@ -1 +0,0 @@
1
- export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
@@ -1 +0,0 @@
1
- export { AdapterDateFnsJalali } from '@mui/x-date-pickers/AdapterDateFnsJalali';
@@ -1 +0,0 @@
1
- export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
@@ -1 +0,0 @@
1
- export { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
@@ -1 +0,0 @@
1
- export { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon';
@@ -1 +0,0 @@
1
- export { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
@@ -1 +0,0 @@
1
- export { AdapterMomentHijri } from '@mui/x-date-pickers/AdapterMomentHijri';
@@ -1 +0,0 @@
1
- export { AdapterMomentJalaali } from '@mui/x-date-pickers/AdapterMomentJalaali';