@mui/x-date-pickers-pro 7.0.0-alpha.6 → 7.0.0-alpha.8
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/AdapterDateFnsV3/index.d.ts +1 -0
- package/AdapterDateFnsV3/index.js +1 -0
- package/AdapterDateFnsV3/package.json +6 -0
- package/CHANGELOG.md +357 -49
- package/DateRangeCalendar/DateRangeCalendar.types.d.ts +2 -1
- package/DateRangeCalendar/useDragRange.d.ts +1 -1
- package/DateRangePicker/DateRangePickerToolbar.d.ts +1 -1
- package/DateRangePicker/shared.d.ts +1 -2
- package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +1 -2
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +1 -2
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +1 -2
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +1 -1
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +1 -1
- package/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +3 -3
- package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +3 -3
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +1 -1
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +3 -3
- package/internals/hooks/useRangePosition.d.ts +1 -1
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +1 -1
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +2 -3
- package/internals/models/dateRange.d.ts +1 -2
- package/internals/models/dateTimeRange.d.ts +1 -2
- package/internals/models/index.d.ts +0 -1
- package/internals/models/index.js +0 -1
- package/internals/models/timeRange.d.ts +1 -2
- package/internals/utils/date-range-manager.d.ts +1 -1
- package/internals/utils/date-utils.d.ts +1 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/internals/utils/validation/validateDateRange.d.ts +2 -2
- package/internals/utils/validation/validateDateTimeRange.d.ts +1 -2
- package/internals/utils/validation/validateTimeRange.d.ts +1 -2
- package/internals/utils/valueManagers.d.ts +1 -2
- package/internals/utils/valueManagers.js +1 -1
- package/legacy/AdapterDateFnsV3/index.js +1 -0
- package/legacy/index.js +1 -1
- package/legacy/internals/models/index.js +0 -1
- package/legacy/internals/utils/releaseInfo.js +1 -1
- package/legacy/internals/utils/valueManagers.js +1 -1
- package/legacy/models/index.js +1 -0
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/modern/AdapterDateFnsV3/index.js +1 -0
- package/modern/index.js +1 -1
- package/modern/internals/models/index.js +0 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/modern/internals/utils/valueManagers.js +1 -1
- package/modern/models/index.js +1 -0
- package/node/AdapterDateFnsV3/index.js +12 -0
- package/node/index.js +1 -1
- package/node/internals/models/index.js +0 -11
- package/node/internals/utils/releaseInfo.js +1 -1
- package/node/internals/utils/valueManagers.js +1 -1
- package/node/models/index.js +11 -0
- package/package.json +8 -8
- /package/{internals → legacy}/models/range.js +0 -0
- /package/{internals/models → models}/range.d.ts +0 -0
- /package/{legacy/internals/models → models}/range.js +0 -0
- /package/modern/{internals/models → models}/range.js +0 -0
- /package/node/{internals/models → models}/range.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,230 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.0.0-alpha.8
|
|
7
|
+
|
|
8
|
+
_Jan 11, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- ⏰ Support date-fns v3 (#11659) @LukasTy
|
|
13
|
+
Pickers support both v2 and v3 of date-fns. For v3 use `AdapterDateFnsV3`.
|
|
14
|
+
```js
|
|
15
|
+
// with date-fns v2.x
|
|
16
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
17
|
+
import de from 'date-fns/locale/de';
|
|
18
|
+
```
|
|
19
|
+
```js
|
|
20
|
+
// with date-fns v3.x
|
|
21
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
|
22
|
+
import { de } from 'date-fns/locale/de';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The import path for locales has been changed:
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
-import { enUS } from '@mui/x-data-grid';
|
|
33
|
+
+import { enUS } from '@mui/x-data-grid/locales';
|
|
34
|
+
|
|
35
|
+
-import { enUS } from '@mui/x-data-grid-pro';
|
|
36
|
+
+import { enUS } from '@mui/x-data-grid-pro/locales';
|
|
37
|
+
|
|
38
|
+
-import { enUS } from '@mui/x-data-grid-premium';
|
|
39
|
+
+import { enUS } from '@mui/x-data-grid-premium/locales';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid@7.0.0-alpha.8`
|
|
43
|
+
|
|
44
|
+
- [DataGrid] Stop exporting locales from the package root (#11614) @cherniavskii
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
47
|
+
|
|
48
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.8`.
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.8` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.8`.
|
|
53
|
+
|
|
54
|
+
### Date Pickers
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.8`
|
|
57
|
+
|
|
58
|
+
- [pickers] Add `date-fns@3.x` adapter (#11462) @LukasTy
|
|
59
|
+
- [pickers] Avoid deeper than 2nd level imports (#11588) @LukasTy
|
|
60
|
+
- [pickers] Fix clearable behavior blocking focus return to `OpenPickerButton` (#11642) @noraleonte
|
|
61
|
+
- [pickers] Move `DateRange` to `@mui/x-date-pickers-pro/models` (#11611) @flaviendelangle
|
|
62
|
+
- [l10n] Add missing Danish (da-DK) locale export (#11640) @etlos
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.8`.
|
|
67
|
+
|
|
68
|
+
### Tree View / `@mui/x-tree-view@7.0.0-alpha.8`
|
|
69
|
+
|
|
70
|
+
- [tree view] Cleanup `onKeyDown` handler (#11481) @flaviendelangle
|
|
71
|
+
- [tree view] Define the parameters used by each plugin to avoid listing them in each component (#11473) @flaviendelangle
|
|
72
|
+
|
|
73
|
+
### Docs
|
|
74
|
+
|
|
75
|
+
- [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11628) @LukasTy
|
|
76
|
+
- [docs] Improve `git diff` format @oliviertassinari
|
|
77
|
+
- [docs] Push up the MUI X brand (#11533) @oliviertassinari
|
|
78
|
+
- [docs] Remove old data grid translation files (#11646) @cherniavskii
|
|
79
|
+
- [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
|
|
80
|
+
- [docs] Improve charts landing page (#11570) @oliviertassinari
|
|
81
|
+
|
|
82
|
+
### Core
|
|
83
|
+
|
|
84
|
+
- [core] Lock `jsdom` version (#11652) @cherniavskii
|
|
85
|
+
- [core] Remove PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD (#11608) @oliviertassinari
|
|
86
|
+
- [core] Simplify isSsr logic (#11606) @oliviertassinari
|
|
87
|
+
- [core] Sync playwright cache between MUI X and Material UI (#11607) @oliviertassinari
|
|
88
|
+
- [core] Use MUI X official name in errors (#11645) @oliviertassinari
|
|
89
|
+
|
|
90
|
+
## 7.0.0-alpha.7
|
|
91
|
+
|
|
92
|
+
_Jan 5, 2024_
|
|
93
|
+
|
|
94
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
95
|
+
|
|
96
|
+
- 🎁 New component to create a Tree View from a structured data source:
|
|
97
|
+
|
|
98
|
+
You can now directly pass your data to the `RichTreeView` component instead of manually converting it into JSX `TreeItem` components:
|
|
99
|
+
|
|
100
|
+
```tsx
|
|
101
|
+
const ITEMS = [
|
|
102
|
+
{
|
|
103
|
+
id: 'node-1',
|
|
104
|
+
label: 'Node 1',
|
|
105
|
+
children: [
|
|
106
|
+
{ id: 'node-1-1', label: Node 1.1' },
|
|
107
|
+
{ id: 'node-1-2', label: Node 1.2' },
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'node-2',
|
|
112
|
+
label: 'Node 2',
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
<RichTreeView
|
|
117
|
+
items={MUI_X_PRODUCTS}
|
|
118
|
+
defaultCollapseIcon={<ExpandMoreIcon />}
|
|
119
|
+
defaultExpandIcon={<ChevronRightIcon />}
|
|
120
|
+
/>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
- 🌍 Improve Czech (cs-CZ) locale on the Data Grid
|
|
124
|
+
- 🐞 Bugfixes
|
|
125
|
+
|
|
126
|
+
### Data Grid
|
|
127
|
+
|
|
128
|
+
#### `@mui/x-data-grid@7.0.0-alpha.7`
|
|
129
|
+
|
|
130
|
+
- [DataGrid] Don't evaluate `hasEval` when `disableEval` is set (#11516) @reihwald
|
|
131
|
+
- [DataGrid] follow warning message guideline for `autoPageSize` and `autoHeight` (#11585) @Sboonny
|
|
132
|
+
- [DataGrid] Replace `eval` with `new Function` (#11557) @oliviertassinari
|
|
133
|
+
- [DataGrid] Warn devs when `autoPageSize` is used with `autoHeight` (#11554) @Sboonny
|
|
134
|
+
- [l10n] Improve Czech (cs-CZ) locale (#11526) @fdebef
|
|
135
|
+
|
|
136
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
137
|
+
|
|
138
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.7`.
|
|
139
|
+
|
|
140
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.7` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
141
|
+
|
|
142
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.7`.
|
|
143
|
+
|
|
144
|
+
### Date Pickers
|
|
145
|
+
|
|
146
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.7`
|
|
147
|
+
|
|
148
|
+
- [pickers] Fix views management (#11419) @LukasTy
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
151
|
+
|
|
152
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.7`.
|
|
153
|
+
|
|
154
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.7`
|
|
155
|
+
|
|
156
|
+
- [charts] Add `arcLabelRadius` property (#11487) @alexfauquette
|
|
157
|
+
- [charts] Fix `null` in line chart using dataset (#11550) @alexfauquette
|
|
158
|
+
|
|
159
|
+
### Tree View
|
|
160
|
+
|
|
161
|
+
#### Breaking changes
|
|
162
|
+
|
|
163
|
+
- The expansion props have been renamed to better describe their behaviors:
|
|
164
|
+
|
|
165
|
+
| Old name | New name |
|
|
166
|
+
| :---------------- | :---------------------- |
|
|
167
|
+
| `onNodeToggle` | `onExpandedNodesChange` |
|
|
168
|
+
| `expanded` | `expandedNodes` |
|
|
169
|
+
| `defaultExpanded` | `defaultExpandedNodes` |
|
|
170
|
+
|
|
171
|
+
```diff
|
|
172
|
+
<TreeView
|
|
173
|
+
- onNodeToggle={handleExpansionChange}
|
|
174
|
+
+ onExpandedNodesChange={handleExpansionChange}
|
|
175
|
+
|
|
176
|
+
- expanded={expandedNodes}
|
|
177
|
+
+ expandedNodes={expandedNodes}
|
|
178
|
+
|
|
179
|
+
- defaultExpanded={defaultExpandedNodes}
|
|
180
|
+
+ defaultExpandedNodes={defaultExpandedNodes}
|
|
181
|
+
/>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
- The selection props have been renamed to better describe their behaviors:
|
|
185
|
+
|
|
186
|
+
| Old name | New name |
|
|
187
|
+
| :---------------- | :---------------------- |
|
|
188
|
+
| `onNodeSelect` | `onSelectedNodesChange` |
|
|
189
|
+
| `selected` | `selectedNodes` |
|
|
190
|
+
| `defaultSelected` | `defaultSelectedNodes` |
|
|
191
|
+
|
|
192
|
+
```diff
|
|
193
|
+
<TreeView
|
|
194
|
+
- onNodeSelect={handleSelectionChange}
|
|
195
|
+
+ onSelectedNodesChange={handleSelectionChange}
|
|
196
|
+
|
|
197
|
+
- selected={selectedNodes}
|
|
198
|
+
+ selectedNodes={selectedNodes}
|
|
199
|
+
|
|
200
|
+
- defaultSelected={defaultSelectedNodes}
|
|
201
|
+
+ defaultSelectedNodes={defaultSelectedNodes}
|
|
202
|
+
/>
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
#### `@mui/x-tree-view@7.0.0-alpha.7`
|
|
206
|
+
|
|
207
|
+
- [TreeView] Improve the expansion API (#11476) @flaviendelangle
|
|
208
|
+
- [TreeView] Improve the selection API (#11560) @flaviendelangle
|
|
209
|
+
- [TreeView] Introduce the `items` prop (#11059) @flaviendelangle
|
|
210
|
+
|
|
211
|
+
### Docs
|
|
212
|
+
|
|
213
|
+
- [docs] Add example for TreeView `onNodeExpansionToggle` prop (#11547) @flaviendelangle
|
|
214
|
+
- [docs] Clarify Pickers usage with Luxon (#11545) @LukasTy
|
|
215
|
+
- [docs] Complete transition to next branch (#11521) @oliviertassinari
|
|
216
|
+
- [docs] Fix 404 links in the docs @oliviertassinari
|
|
217
|
+
- [docs] Fix over page fetching @oliviertassinari
|
|
218
|
+
- [docs] Lint `next.config.js` (#11514) @oliviertassinari
|
|
219
|
+
|
|
220
|
+
### Core
|
|
221
|
+
|
|
222
|
+
- [core] Fix release changelog (#11496) @romgrk
|
|
223
|
+
- [core] Fix use of ::before & ::after (#11515) @oliviertassinari
|
|
224
|
+
- [core] Localize the issue template to MUI X (#11511) @oliviertassinari
|
|
225
|
+
- [core] Regen api files (#11542) @flaviendelangle
|
|
226
|
+
- [core] Remove issue emoji @oliviertassinari
|
|
227
|
+
- [core] Sync the release instructions with MUI Core @oliviertassinari
|
|
228
|
+
- [core] Yaml format match most common convention @oliviertassinari
|
|
229
|
+
|
|
6
230
|
## 7.0.0-alpha.6
|
|
7
231
|
|
|
8
232
|
_Dec 22, 2023_
|
|
@@ -65,7 +289,6 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.6`.
|
|
|
65
289
|
- [fields] Adjust `PickersInput` sizing styles (#11392) @noraleonte
|
|
66
290
|
- [fields] Fix section pasting (#11447) @LukasTy
|
|
67
291
|
- [pickers] Add `PickersTextField` `standard` and `filled` variants (#11250) @noraleonte
|
|
68
|
-
- [pickers] Add missing breaking changes to changelog (#11420) @MBilalShafi
|
|
69
292
|
- [pickers] Cleanup error messages in `PickersSectionList` (#11449) @flaviendelangle
|
|
70
293
|
- [pickers] Create new component `PickersSectionList` (#11352) @flaviendelangle
|
|
71
294
|
|
|
@@ -73,7 +296,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.6`.
|
|
|
73
296
|
|
|
74
297
|
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.6`.
|
|
75
298
|
|
|
76
|
-
### Charts / `@mui/x-charts@7.0.0-alpha.
|
|
299
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.5`
|
|
77
300
|
|
|
78
301
|
- [charts] Allow percentage values for pie chart center and radius (#11464) @alexfauquette
|
|
79
302
|
- [charts] Improve dataset typing (#11372) @alexfauquette
|
|
@@ -88,6 +311,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.6`.
|
|
|
88
311
|
|
|
89
312
|
### Core
|
|
90
313
|
|
|
314
|
+
- [core] Add missing breaking changes to changelog (#11420) @MBilalShafi
|
|
91
315
|
- [core] Cherry pick follow up (#11469) @LukasTy
|
|
92
316
|
- [core] Fix `cherry-pick` action (#11446) @LukasTy
|
|
93
317
|
- [core] Fix security regressions in cherry-pick-next-to-master.yml (#11482) @MBilalShafi
|
|
@@ -134,10 +358,10 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
|
134
358
|
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
|
|
135
359
|
|
|
136
360
|
```diff
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
+
|
|
361
|
+
-DateCalendarSlotsComponent
|
|
362
|
+
-DateCalendarSlotsComponentsProps
|
|
363
|
+
+DateCalendarSlots
|
|
364
|
+
+DateCalendarSlotProps
|
|
141
365
|
```
|
|
142
366
|
|
|
143
367
|
- Move `inputRef` inside the props passed to the field hooks
|
|
@@ -145,26 +369,26 @@ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsP
|
|
|
145
369
|
The field hooks now only receive the props instead of an object containing both the props and the `inputRef`.
|
|
146
370
|
|
|
147
371
|
```diff
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
+
|
|
372
|
+
-const { inputRef, ...otherProps } = props
|
|
373
|
+
-const fieldResponse = useDateField({ props: otherProps, inputRef });
|
|
374
|
+
+const fieldResponse = useDateField(props);
|
|
151
375
|
```
|
|
152
376
|
|
|
153
377
|
If you are using a multi input range field hook, the same applies to `startInputRef` and `endInputRef` params
|
|
154
378
|
|
|
155
379
|
```diff
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
+
|
|
166
|
-
+
|
|
167
|
-
|
|
380
|
+
-const { inputRef: startInputRef, ...otherStartTextFieldProps } = startTextFieldProps
|
|
381
|
+
-const { inputRef: endInputRef, ...otherEndTextFieldProps } = endTextFieldProps
|
|
382
|
+
|
|
383
|
+
const fieldResponse = useMultiInputDateRangeField({
|
|
384
|
+
sharedProps,
|
|
385
|
+
- startTextFieldProps: otherStartTextFieldProps,
|
|
386
|
+
- endTextFieldProps: otherEndTextFieldProps,
|
|
387
|
+
- startInputRef
|
|
388
|
+
- endInputRef,
|
|
389
|
+
+ startTextFieldProps,
|
|
390
|
+
+ endTextFieldProps
|
|
391
|
+
});
|
|
168
392
|
```
|
|
169
393
|
|
|
170
394
|
- Rename the ref returned by the field hooks to `inputRef`
|
|
@@ -173,26 +397,26 @@ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsP
|
|
|
173
397
|
This ref was previously named `ref` and has been renamed `inputRef` for extra clarity.
|
|
174
398
|
|
|
175
399
|
```diff
|
|
176
|
-
|
|
400
|
+
const fieldResponse = useDateField(props);
|
|
177
401
|
|
|
178
|
-
-
|
|
179
|
-
+
|
|
402
|
+
-return <input ref={fieldResponse.ref} />
|
|
403
|
+
+return <input ref={fieldResponse.inputRef} />
|
|
180
404
|
```
|
|
181
405
|
|
|
182
406
|
If you are using a multi input range field hook, the same applies to the ref in the `startDate` and `endDate` objects
|
|
183
407
|
|
|
184
408
|
```diff
|
|
185
|
-
|
|
409
|
+
const fieldResponse = useDateField(props);
|
|
186
410
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
+
|
|
191
|
-
|
|
192
|
-
-
|
|
193
|
-
+
|
|
194
|
-
|
|
195
|
-
|
|
411
|
+
return (
|
|
412
|
+
<div>
|
|
413
|
+
- <input ref={fieldResponse.startDate.ref} />
|
|
414
|
+
+ <input ref={fieldResponse.startDate.inputRef} />
|
|
415
|
+
<span>–</span>
|
|
416
|
+
- <input ref={fieldResponse.endDate.ref} />
|
|
417
|
+
+ <input ref={fieldResponse.endDate.inputRef} />
|
|
418
|
+
</div>
|
|
419
|
+
)
|
|
196
420
|
```
|
|
197
421
|
|
|
198
422
|
- Restructure the API of `useClearableField`
|
|
@@ -202,23 +426,23 @@ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsP
|
|
|
202
426
|
You should now be able to directly pass the returned value from your field hook (e.g: `useDateField`) to `useClearableField`
|
|
203
427
|
|
|
204
428
|
```diff
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
-
|
|
429
|
+
const fieldResponse = useDateField(props);
|
|
430
|
+
|
|
431
|
+
-const { InputProps, onClear, clearable, slots, slotProps, ...otherFieldProps } = fieldResponse
|
|
432
|
+
-const { InputProps: ProcessedInputProps, fieldProps: processedFieldProps } = useClearableField({
|
|
433
|
+
- fieldProps: otherFieldProps,
|
|
434
|
+
- InputProps,
|
|
435
|
+
- clearable,
|
|
436
|
+
- onClear,
|
|
437
|
+
- slots,
|
|
438
|
+
- slotProps,
|
|
439
|
+
-});
|
|
216
440
|
-
|
|
217
|
-
-
|
|
441
|
+
- return <MyCustomTextField {...processedFieldProps} InputProps={ProcessedInputProps} />
|
|
218
442
|
|
|
219
|
-
+
|
|
443
|
+
+const processedFieldProps = useClearableField(fieldResponse);
|
|
220
444
|
+
|
|
221
|
-
+
|
|
445
|
+
+return <MyCustomTextField {...processedFieldProps} />
|
|
222
446
|
```
|
|
223
447
|
|
|
224
448
|
#### `@mui/x-date-pickers@7.0.0-alpha.5`
|
|
@@ -1200,6 +1424,90 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
1200
1424
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
1201
1425
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
1202
1426
|
|
|
1427
|
+
## 6.19.0
|
|
1428
|
+
|
|
1429
|
+
_Jan 11, 2024_
|
|
1430
|
+
|
|
1431
|
+
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
|
|
1432
|
+
|
|
1433
|
+
- ⏰ Support date-fns v3 (#11659) @LukasTy
|
|
1434
|
+
Pickers support both v2 and v3 of date-fns. For v3 use `AdapterDateFnsV3`.
|
|
1435
|
+
```js
|
|
1436
|
+
// with date-fns v2.x
|
|
1437
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
1438
|
+
import de from 'date-fns/locale/de';
|
|
1439
|
+
```
|
|
1440
|
+
```js
|
|
1441
|
+
// with date-fns v3.x
|
|
1442
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
|
1443
|
+
import { de } from 'date-fns/locale/de';
|
|
1444
|
+
```
|
|
1445
|
+
|
|
1446
|
+
### Date Pickers
|
|
1447
|
+
|
|
1448
|
+
#### `@mui/x-date-pickers@6.19.0`
|
|
1449
|
+
|
|
1450
|
+
- [pickers] Add date-fns@3.x adapter (#11659) @LukasTy
|
|
1451
|
+
- [pickers] Fix clearable behavior blocking focus return to `OpenPickerButton` (#11643) @noraleonte
|
|
1452
|
+
- [l10n] Add missing Danish (da-DK) locale export (#11641) @etlos
|
|
1453
|
+
|
|
1454
|
+
#### `@mui/x-date-pickers-pro@6.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1455
|
+
|
|
1456
|
+
Same changes as in `@mui/x-date-pickers@6.19.0`.
|
|
1457
|
+
|
|
1458
|
+
### Docs
|
|
1459
|
+
|
|
1460
|
+
- [docs] Add missing component @oliviertassinari
|
|
1461
|
+
- [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11637) @LukasTy
|
|
1462
|
+
- [docs] Push up the MUI X brand (#11533) @oliviertassinari
|
|
1463
|
+
- [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
|
|
1464
|
+
- [docs] Add demo to the charts overview page (#11586) @danilo-leal
|
|
1465
|
+
- [docs] Fix 404 links in the docs @oliviertassinari
|
|
1466
|
+
- [docs] Improve landing page (#11570) @oliviertassinari
|
|
1467
|
+
- [docs] Give a general revision to the docs (#11249) @danilo-leal
|
|
1468
|
+
|
|
1469
|
+
## 6.18.7
|
|
1470
|
+
|
|
1471
|
+
_Jan 5, 2024_
|
|
1472
|
+
|
|
1473
|
+
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
1474
|
+
|
|
1475
|
+
- 🌍 Improve Czech (cs-CZ) locale on Data Grid (#11429) @wensiet
|
|
1476
|
+
- 🐞 Bugfixes
|
|
1477
|
+
|
|
1478
|
+
### Data Grid
|
|
1479
|
+
|
|
1480
|
+
#### `@mui/x-data-grid@6.18.7`
|
|
1481
|
+
|
|
1482
|
+
- [DataGrid] Don't evaluate `hasEval` when `disableEval` is set (#11553) @reihwald
|
|
1483
|
+
- [l10n] Update Czech (cs-CZ) locale (#11498) @fdebef
|
|
1484
|
+
|
|
1485
|
+
#### `@mui/x-data-grid-pro@6.18.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1486
|
+
|
|
1487
|
+
Same changes as in `@mui/x-data-grid@6.18.7`.
|
|
1488
|
+
|
|
1489
|
+
#### `@mui/x-data-grid-premium@6.18.7` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1490
|
+
|
|
1491
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.7`.
|
|
1492
|
+
|
|
1493
|
+
### Date Pickers
|
|
1494
|
+
|
|
1495
|
+
#### `@mui/x-date-pickers@6.18.7`
|
|
1496
|
+
|
|
1497
|
+
- [pickers] Fix views management (@LukasTy) (#11572)
|
|
1498
|
+
|
|
1499
|
+
#### `@mui/x-date-pickers-pro@6.18.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1500
|
+
|
|
1501
|
+
Same changes as in `@mui/x-date-pickers@6.18.7`.
|
|
1502
|
+
|
|
1503
|
+
### Charts / `@mui/x-charts@6.18.7`
|
|
1504
|
+
|
|
1505
|
+
- [charts] Fix `null` in line chart using dataset (@alexfauquette) (#11561)
|
|
1506
|
+
|
|
1507
|
+
### Docs
|
|
1508
|
+
|
|
1509
|
+
- [docs] Clarify Pickers usage with Luxon (#11566) @LukasTy
|
|
1510
|
+
|
|
1203
1511
|
## 6.18.6
|
|
1204
1512
|
|
|
1205
1513
|
_Dec 22, 2023_
|
|
@@ -1234,7 +1542,7 @@ Same changes as in `@mui/x-data-grid-pro@6.18.6`.
|
|
|
1234
1542
|
|
|
1235
1543
|
Same changes as in `@mui/x-date-pickers@6.18.6`.
|
|
1236
1544
|
|
|
1237
|
-
### Charts / `@mui/x-charts@6.18.
|
|
1545
|
+
### Charts / `@mui/x-charts@6.18.4`
|
|
1238
1546
|
|
|
1239
1547
|
- [charts] Allow percentage values for pie chart center and radius (#11464) @alexfauquette
|
|
1240
1548
|
- [charts] Make error message more explicit (#11457) @alexfauquette
|
|
@@ -5,7 +5,8 @@ import { Theme } from '@mui/material/styles';
|
|
|
5
5
|
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
6
6
|
import { PickersCalendarHeader, PickersCalendarHeaderProps, PickersCalendarHeaderSlots, PickersCalendarHeaderSlotProps } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
7
7
|
import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, PickersArrowSwitcherSlots, PickersArrowSwitcherSlotProps, PickerSelectionState, DayCalendarProps, ExportedUseViewsOptions } from '@mui/x-date-pickers/internals';
|
|
8
|
-
import {
|
|
8
|
+
import { DayRangeValidationProps } from '../internals/models';
|
|
9
|
+
import { DateRange } from '../models';
|
|
9
10
|
import { DateRangeCalendarClasses } from './dateRangeCalendarClasses';
|
|
10
11
|
import { DateRangePickerDay, DateRangePickerDayProps } from '../DateRangePickerDay';
|
|
11
12
|
import { UseRangePositionProps } from '../internals/hooks/useRangePosition';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MuiPickersAdapter, PickersTimezone } from '@mui/x-date-pickers/models';
|
|
3
3
|
import { DateRangePosition } from './DateRangeCalendar.types';
|
|
4
|
-
import { DateRange } from '../
|
|
4
|
+
import { DateRange } from '../models';
|
|
5
5
|
interface UseDragRangeParams<TDate> {
|
|
6
6
|
disableDragEditing?: boolean;
|
|
7
7
|
utils: MuiPickersAdapter<TDate>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseToolbarProps, ExportedBaseToolbarProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { DateRange } from '../
|
|
3
|
+
import { DateRange } from '../models';
|
|
4
4
|
import { UseRangePositionResponse } from '../internals/hooks/useRangePosition';
|
|
5
5
|
import { DateRangePickerToolbarClasses } from './dateRangePickerToolbarClasses';
|
|
6
6
|
export interface DateRangePickerToolbarProps<TDate> extends Omit<BaseToolbarProps<DateRange<TDate>, 'day'>, 'views' | 'view' | 'onViewChange' | 'onChange' | 'isLandscape'>, Pick<UseRangePositionResponse, 'rangePosition' | 'onRangePositionChange'> {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { LocalizedComponent } from '@mui/x-date-pickers/locales';
|
|
3
3
|
import { DefaultizedProps, BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup } from '@mui/x-date-pickers/internals';
|
|
4
|
-
import { DateRangeValidationError } from '../models';
|
|
5
|
-
import { DateRange } from '../internals/models';
|
|
4
|
+
import { DateRangeValidationError, DateRange } from '../models';
|
|
6
5
|
import { DateRangeCalendarSlots, DateRangeCalendarSlotProps, ExportedDateRangeCalendarProps } from '../DateRangeCalendar';
|
|
7
6
|
import { DateRangePickerToolbarProps, ExportedDateRangePickerToolbarProps } from './DateRangePickerToolbar';
|
|
8
7
|
import { DateRangeViewRendererProps } from '../dateRangeViewRenderers';
|
|
@@ -5,10 +5,9 @@ import Stack, { StackProps } from '@mui/material/Stack';
|
|
|
5
5
|
import TextField from '@mui/material/TextField';
|
|
6
6
|
import { FieldRef } from '@mui/x-date-pickers/models';
|
|
7
7
|
import { UseDateRangeFieldProps } from '../internals/models/dateRange';
|
|
8
|
-
import { RangePosition } from '../internals/models/range';
|
|
9
8
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
10
9
|
import { RangeFieldSection } from '../internals/models/fields';
|
|
11
|
-
import { MultiInputRangeFieldClasses } from '../models';
|
|
10
|
+
import { MultiInputRangeFieldClasses, RangePosition } from '../models';
|
|
12
11
|
export type UseMultiInputDateRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
12
|
export interface UseMultiInputDateRangeFieldProps<TDate> extends Omit<UseDateRangeFieldProps<TDate>, 'unstableFieldRef' | 'clearable' | 'onClear'> {
|
|
14
13
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -5,10 +5,9 @@ import Typography from '@mui/material/Typography';
|
|
|
5
5
|
import Stack, { StackProps } from '@mui/material/Stack';
|
|
6
6
|
import TextField from '@mui/material/TextField';
|
|
7
7
|
import { UseDateTimeRangeFieldDefaultizedProps, UseDateTimeRangeFieldProps } from '../internals/models/dateTimeRange';
|
|
8
|
-
import { RangePosition } from '../internals/models/range';
|
|
9
8
|
import { RangeFieldSection } from '../internals/models/fields';
|
|
10
9
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
11
|
-
import { MultiInputRangeFieldClasses } from '../models';
|
|
10
|
+
import { MultiInputRangeFieldClasses, RangePosition } from '../models';
|
|
12
11
|
export type UseMultiInputDateTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputDateTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
12
|
export interface UseMultiInputDateTimeRangeFieldProps<TDate> extends Omit<UseDateTimeRangeFieldProps<TDate>, 'unstableFieldRef' | 'clearable' | 'onClear'> {
|
|
14
13
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -5,10 +5,9 @@ import Stack, { StackProps } from '@mui/material/Stack';
|
|
|
5
5
|
import TextField from '@mui/material/TextField';
|
|
6
6
|
import { FieldRef } from '@mui/x-date-pickers/models';
|
|
7
7
|
import { UseTimeRangeFieldDefaultizedProps, UseTimeRangeFieldProps } from '../internals/models/timeRange';
|
|
8
|
-
import { RangePosition } from '../internals/models/range';
|
|
9
8
|
import { UseMultiInputRangeFieldParams } from '../internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types';
|
|
10
9
|
import { RangeFieldSection } from '../internals/models/fields';
|
|
11
|
-
import { MultiInputRangeFieldClasses } from '../models';
|
|
10
|
+
import { MultiInputRangeFieldClasses, RangePosition } from '../models';
|
|
12
11
|
export type UseMultiInputTimeRangeFieldParams<TDate, TTextFieldSlotProps extends {}> = UseMultiInputRangeFieldParams<UseMultiInputTimeRangeFieldProps<TDate>, TTextFieldSlotProps>;
|
|
13
12
|
export interface UseMultiInputTimeRangeFieldProps<TDate> extends Omit<UseTimeRangeFieldProps<TDate>, 'unstableFieldRef' | 'clearable' | 'onClear'> {
|
|
14
13
|
unstableStartFieldRef?: React.Ref<FieldRef<RangeFieldSection>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import TextField from '@mui/material/TextField';
|
|
4
|
-
import { FieldsTextFieldProps } from '@mui/x-date-pickers/internals
|
|
4
|
+
import { FieldsTextFieldProps } from '@mui/x-date-pickers/internals';
|
|
5
5
|
import { UseClearableFieldSlots, UseClearableFieldSlotProps } from '@mui/x-date-pickers/hooks';
|
|
6
6
|
import { UseDateTimeRangeFieldDefaultizedProps, UseDateTimeRangeFieldProps } from '../internals/models';
|
|
7
7
|
export interface UseSingleInputDateTimeRangeFieldProps<TDate> extends UseDateTimeRangeFieldProps<TDate> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SlotComponentProps } from '@mui/base/utils';
|
|
3
3
|
import TextField from '@mui/material/TextField';
|
|
4
|
-
import { FieldsTextFieldProps } from '@mui/x-date-pickers/internals
|
|
4
|
+
import { FieldsTextFieldProps } from '@mui/x-date-pickers/internals';
|
|
5
5
|
import { UseClearableFieldSlots, UseClearableFieldSlotProps } from '@mui/x-date-pickers/hooks';
|
|
6
6
|
import { UseTimeRangeFieldDefaultizedProps, UseTimeRangeFieldProps } from '../internals/models';
|
|
7
7
|
export interface UseSingleInputTimeRangeFieldProps<TDate> extends UseTimeRangeFieldProps<TDate> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals
|
|
2
|
+
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { DateRangeCalendarProps } from '../DateRangeCalendar';
|
|
4
4
|
export interface DateRangeViewRendererProps<TDate, TView extends DateOrTimeViewWithMeridiem> extends DateRangeCalendarProps<TDate> {
|
|
5
5
|
view: TView;
|
package/index.d.ts
CHANGED
|
@@ -14,6 +14,5 @@ export * from './DesktopDateRangePicker';
|
|
|
14
14
|
export * from './MobileDateRangePicker';
|
|
15
15
|
export * from './StaticDateRangePicker';
|
|
16
16
|
export * from './dateRangeViewRenderers';
|
|
17
|
-
export type { DateRange, RangePosition } from './internals/models/range';
|
|
18
17
|
export type { UseDateRangeFieldProps } from './internals/models/dateRange';
|
|
19
18
|
export * from './models';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals
|
|
2
|
+
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { UseDesktopRangePickerParams, UseDesktopRangePickerProps } from './useDesktopRangePicker.types';
|
|
4
4
|
export declare const useDesktopRangePicker: <TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseDesktopRangePickerProps<TDate, TView, any, TExternalProps>>({ props, ...pickerParams }: UseDesktopRangePickerParams<TDate, TView, TExternalProps>) => {
|
|
5
5
|
renderPicker: () => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UsePickerParams, BasePickerProps, PickersPopperSlots, PickersPopperSlotProps, ExportedBaseToolbarProps, UsePickerViewsProps, BaseNonStaticPickerProps, UsePickerValueNonStaticProps, UsePickerViewsNonStaticProps } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
1
|
+
import { UsePickerParams, BasePickerProps, PickersPopperSlots, PickersPopperSlotProps, ExportedBaseToolbarProps, UsePickerViewsProps, BaseNonStaticPickerProps, UsePickerValueNonStaticProps, UsePickerViewsNonStaticProps, DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
3
2
|
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps } from '@mui/x-date-pickers/PickersLayout';
|
|
4
|
-
import {
|
|
3
|
+
import { RangeFieldSection, BaseRangeNonStaticPickerProps } from '../../models';
|
|
4
|
+
import { DateRange } from '../../../models';
|
|
5
5
|
import { UseRangePositionProps, UseRangePositionResponse } from '../useRangePosition';
|
|
6
6
|
import { RangePickerFieldSlots, RangePickerFieldSlotProps } from '../useEnrichedRangePickerFieldProps';
|
|
7
7
|
export interface UseDesktopRangePickerSlots<TDate, TView extends DateOrTimeViewWithMeridiem> extends PickersPopperSlots, ExportedPickersLayoutSlots<DateRange<TDate>, TDate, TView>, RangePickerFieldSlots {
|
|
@@ -5,10 +5,10 @@ import TextField, { TextFieldProps } from '@mui/material/TextField';
|
|
|
5
5
|
import { SlotComponentProps } from '@mui/base/utils';
|
|
6
6
|
import { BaseSingleInputFieldProps } from '@mui/x-date-pickers/models';
|
|
7
7
|
import { UseClearableFieldSlots, UseClearableFieldSlotProps } from '@mui/x-date-pickers/hooks';
|
|
8
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals/models';
|
|
9
8
|
import { PickersInputLocaleText } from '@mui/x-date-pickers/locales';
|
|
10
|
-
import { BaseFieldProps, UsePickerResponse, WrapperVariant, UsePickerProps } from '@mui/x-date-pickers/internals';
|
|
11
|
-
import { BaseMultiInputFieldProps,
|
|
9
|
+
import { BaseFieldProps, UsePickerResponse, WrapperVariant, UsePickerProps, DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
10
|
+
import { BaseMultiInputFieldProps, RangeFieldSection, UseDateRangeFieldProps } from '../models';
|
|
11
|
+
import { DateRange, RangePosition } from '../../models';
|
|
12
12
|
import { UseRangePositionResponse } from './useRangePosition';
|
|
13
13
|
export interface RangePickerFieldSlots extends UseClearableFieldSlots {
|
|
14
14
|
field: React.ElementType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals
|
|
2
|
+
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { UseMobileRangePickerParams, UseMobileRangePickerProps } from './useMobileRangePicker.types';
|
|
4
4
|
export declare const useMobileRangePicker: <TDate, TView extends DateOrTimeViewWithMeridiem, TExternalProps extends UseMobileRangePickerProps<TDate, TView, any, TExternalProps>>({ props, ...pickerParams }: UseMobileRangePickerParams<TDate, TView, TExternalProps>) => {
|
|
5
5
|
renderPicker: () => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UsePickerParams, BasePickerProps, PickersModalDialogSlots, PickersModalDialogSlotProps, ExportedBaseToolbarProps, UsePickerViewsProps, BaseNonStaticPickerProps, UsePickerValueNonStaticProps, UsePickerViewsNonStaticProps } from '@mui/x-date-pickers/internals';
|
|
1
|
+
import { UsePickerParams, BasePickerProps, PickersModalDialogSlots, PickersModalDialogSlotProps, ExportedBaseToolbarProps, UsePickerViewsProps, BaseNonStaticPickerProps, UsePickerValueNonStaticProps, UsePickerViewsNonStaticProps, DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps } from '@mui/x-date-pickers/PickersLayout';
|
|
3
|
-
import {
|
|
4
|
-
import { DateRange
|
|
3
|
+
import { RangeFieldSection, BaseRangeNonStaticPickerProps } from '../../models';
|
|
4
|
+
import { DateRange } from '../../../models';
|
|
5
5
|
import { UseRangePositionProps, UseRangePositionResponse } from '../useRangePosition';
|
|
6
6
|
import { RangePickerFieldSlots, RangePickerFieldSlotProps } from '../useEnrichedRangePickerFieldProps';
|
|
7
7
|
export interface UseMobileRangePickerSlots<TDate, TView extends DateOrTimeViewWithMeridiem> extends PickersModalDialogSlots, ExportedPickersLayoutSlots<DateRange<TDate>, TDate, TView>, RangePickerFieldSlots {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FieldRef } from '@mui/x-date-pickers/models';
|
|
3
|
-
import { RangePosition } from '
|
|
3
|
+
import { RangePosition } from '../../models';
|
|
4
4
|
import { RangeFieldSection } from '../models/fields';
|
|
5
5
|
export interface UseRangePositionProps {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals
|
|
2
|
+
import { DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { UseStaticRangePickerParams, UseStaticRangePickerProps } from './useStaticRangePicker.types';
|
|
4
4
|
/**
|
|
5
5
|
* Hook managing all the range static pickers:
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BasePickerProps, UsePickerParams, ExportedBaseToolbarProps, StaticOnlyPickerProps } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { BasePickerProps, UsePickerParams, ExportedBaseToolbarProps, StaticOnlyPickerProps, DateOrTimeViewWithMeridiem } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { ExportedPickersLayoutSlots, ExportedPickersLayoutSlotProps } from '@mui/x-date-pickers/PickersLayout';
|
|
4
|
-
import {
|
|
5
|
-
import { DateRange } from '../../models/range';
|
|
4
|
+
import { DateRange } from '../../../models';
|
|
6
5
|
import { UseRangePositionProps } from '../useRangePosition';
|
|
7
6
|
import { RangeFieldSection } from '../../models/fields';
|
|
8
7
|
export interface UseStaticRangePickerSlots<TDate, TView extends DateOrTimeViewWithMeridiem> extends ExportedPickersLayoutSlots<DateRange<TDate>, TDate, TView> {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseDateValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DateRange } from '
|
|
3
|
-
import type { DateRangeValidationError } from '../../models';
|
|
2
|
+
import type { DateRangeValidationError, DateRange } from '../../models';
|
|
4
3
|
import { RangeFieldSection } from './fields';
|
|
5
4
|
/**
|
|
6
5
|
* Props used to validate a day value in range pickers.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BaseDateValidationProps, TimeValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps, DateTimeValidationProps } from '@mui/x-date-pickers/internals';
|
|
2
2
|
import { BaseRangeProps, DayRangeValidationProps } from './dateRange';
|
|
3
|
-
import { DateRange } from '
|
|
4
|
-
import { DateTimeRangeValidationError } from '../../models';
|
|
3
|
+
import { DateTimeRangeValidationError, DateRange } from '../../models';
|
|
5
4
|
import { RangeFieldSection } from './fields';
|
|
6
5
|
export interface UseDateTimeRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, DateTimeRangeValidationError>, 'format'>, DayRangeValidationProps<TDate>, TimeValidationProps<TDate>, BaseDateValidationProps<TDate>, DateTimeValidationProps<TDate>, BaseRangeProps {
|
|
7
6
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseTimeValidationProps, TimeValidationProps, DefaultizedProps, MakeOptional, UseFieldInternalProps } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DateRange } from '
|
|
3
|
-
import { TimeRangeValidationError } from '../../models';
|
|
2
|
+
import { TimeRangeValidationError, DateRange } from '../../models';
|
|
4
3
|
import { BaseRangeProps } from './dateRange';
|
|
5
4
|
import { RangeFieldSection } from './fields';
|
|
6
5
|
export interface UseTimeRangeFieldProps<TDate> extends MakeOptional<UseFieldInternalProps<DateRange<TDate>, TDate, RangeFieldSection, TimeRangeValidationError>, 'format'>, TimeValidationProps<TDate>, BaseTimeValidationProps, BaseRangeProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MuiPickersAdapter } from '@mui/x-date-pickers/models';
|
|
2
|
-
import { DateRange, RangePosition } from '
|
|
2
|
+
import { DateRange, RangePosition } from '../../models';
|
|
3
3
|
interface CalculateRangeChangeOptions<TDate> {
|
|
4
4
|
utils: MuiPickersAdapter<TDate>;
|
|
5
5
|
range: DateRange<TDate>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MuiPickersAdapter } from '@mui/x-date-pickers/models';
|
|
2
|
-
import { DateRange, NonEmptyDateRange } from '
|
|
2
|
+
import { DateRange, NonEmptyDateRange } from '../../models';
|
|
3
3
|
export declare const isRangeValid: <TDate>(utils: MuiPickersAdapter<TDate, any>, range: DateRange<TDate> | null) => range is NonEmptyDateRange<TDate>;
|
|
4
4
|
export declare const isWithinRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
5
5
|
export declare const isStartOfRange: <TDate>(utils: MuiPickersAdapter<TDate, any>, day: TDate, range: DateRange<TDate> | null) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcwNDkyNzYwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
2
|
import { Validator, BaseDateValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import {
|
|
4
|
-
import { DateRangeValidationError } from '../../../models';
|
|
3
|
+
import { DayRangeValidationProps } from '../../models';
|
|
4
|
+
import { DateRangeValidationError, DateRange } from '../../../models';
|
|
5
5
|
export interface DateRangeComponentValidationProps<TDate> extends DayRangeValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
6
6
|
}
|
|
7
7
|
export declare const validateDateRange: Validator<DateRange<any>, any, DateRangeValidationError, DateRangeComponentValidationProps<any>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
2
|
import { Validator, BaseDateValidationProps, TimeValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { DayRangeValidationProps } from '../../models/dateRange';
|
|
4
|
-
import { DateRange } from '
|
|
5
|
-
import { DateTimeRangeValidationError } from '../../../models';
|
|
4
|
+
import { DateTimeRangeValidationError, DateRange } from '../../../models';
|
|
6
5
|
export interface DateTimeRangeComponentValidationProps<TDate> extends DayRangeValidationProps<TDate>, TimeValidationProps<TDate>, Required<BaseDateValidationProps<TDate>>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
7
6
|
}
|
|
8
7
|
export declare const validateDateTimeRange: Validator<DateRange<any>, any, DateTimeRangeValidationError, DateTimeRangeComponentValidationProps<any>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
2
2
|
import { Validator, BaseTimeValidationProps, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
-
import { DateRange } from '
|
|
4
|
-
import { TimeRangeValidationError } from '../../../models';
|
|
3
|
+
import { TimeRangeValidationError, DateRange } from '../../../models';
|
|
5
4
|
export interface TimeRangeComponentValidationProps extends Required<BaseTimeValidationProps>, DefaultizedProps<TimezoneProps, 'timezone'> {
|
|
6
5
|
}
|
|
7
6
|
export declare const validateTimeRange: Validator<DateRange<any>, any, TimeRangeValidationError, TimeRangeComponentValidationProps>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PickerValueManager, FieldValueManager } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import { DateRange } from '
|
|
3
|
-
import type { DateRangeValidationError, DateTimeRangeValidationError, TimeRangeValidationError } from '../../models';
|
|
2
|
+
import type { DateRangeValidationError, DateTimeRangeValidationError, TimeRangeValidationError, DateRange } from '../../models';
|
|
4
3
|
import { RangeFieldSection } from '../models/fields';
|
|
5
4
|
export type RangePickerValueManager<TValue = [any, any], TDate = any, TError extends DateRangeValidationError | TimeRangeValidationError | DateTimeRangeValidationError = any> = PickerValueManager<TValue, TDate, TError>;
|
|
6
5
|
export declare const rangeValueManager: RangePickerValueManager;
|
|
@@ -29,7 +29,7 @@ export const rangeValueManager = {
|
|
|
29
29
|
const timezoneStart = value[0] == null || !utils.isValid(value[0]) ? null : utils.getTimezone(value[0]);
|
|
30
30
|
const timezoneEnd = value[1] == null || !utils.isValid(value[1]) ? null : utils.getTimezone(value[1]);
|
|
31
31
|
if (timezoneStart != null && timezoneEnd != null && timezoneStart !== timezoneEnd) {
|
|
32
|
-
throw new Error('MUI: The timezone of the start and the end date should be the same');
|
|
32
|
+
throw new Error('MUI X: The timezone of the start and the end date should be the same.');
|
|
33
33
|
}
|
|
34
34
|
return timezoneStart != null ? timezoneStart : timezoneEnd;
|
|
35
35
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTcwNDkyNzYwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -41,7 +41,7 @@ export var rangeValueManager = {
|
|
|
41
41
|
var timezoneStart = value[0] == null || !utils.isValid(value[0]) ? null : utils.getTimezone(value[0]);
|
|
42
42
|
var timezoneEnd = value[1] == null || !utils.isValid(value[1]) ? null : utils.getTimezone(value[1]);
|
|
43
43
|
if (timezoneStart != null && timezoneEnd != null && timezoneStart !== timezoneEnd) {
|
|
44
|
-
throw new Error('MUI: The timezone of the start and the end date should be the same');
|
|
44
|
+
throw new Error('MUI X: The timezone of the start and the end date should be the same.');
|
|
45
45
|
}
|
|
46
46
|
return timezoneStart != null ? timezoneStart : timezoneEnd;
|
|
47
47
|
},
|
package/legacy/models/index.js
CHANGED
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcwNDkyNzYwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -29,7 +29,7 @@ export const rangeValueManager = {
|
|
|
29
29
|
const timezoneStart = value[0] == null || !utils.isValid(value[0]) ? null : utils.getTimezone(value[0]);
|
|
30
30
|
const timezoneEnd = value[1] == null || !utils.isValid(value[1]) ? null : utils.getTimezone(value[1]);
|
|
31
31
|
if (timezoneStart != null && timezoneEnd != null && timezoneStart !== timezoneEnd) {
|
|
32
|
-
throw new Error('MUI: The timezone of the start and the end date should be the same');
|
|
32
|
+
throw new Error('MUI X: The timezone of the start and the end date should be the same.');
|
|
33
33
|
}
|
|
34
34
|
return timezoneStart ?? timezoneEnd;
|
|
35
35
|
},
|
package/modern/models/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "AdapterDateFns", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _AdapterDateFnsV.AdapterDateFns;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _AdapterDateFnsV = require("@mui/x-date-pickers/AdapterDateFnsV3");
|
package/node/index.js
CHANGED
|
@@ -14,17 +14,6 @@ Object.keys(_dateRange).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var _range = require("./range");
|
|
18
|
-
Object.keys(_range).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _range[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _range[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
17
|
var _dateTimeRange = require("./dateTimeRange");
|
|
29
18
|
Object.keys(_dateTimeRange).forEach(function (key) {
|
|
30
19
|
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 = "
|
|
9
|
+
const releaseInfo = "MTcwNDkyNzYwMDAwMA==";
|
|
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
|
|
@@ -36,7 +36,7 @@ const rangeValueManager = exports.rangeValueManager = {
|
|
|
36
36
|
const timezoneStart = value[0] == null || !utils.isValid(value[0]) ? null : utils.getTimezone(value[0]);
|
|
37
37
|
const timezoneEnd = value[1] == null || !utils.isValid(value[1]) ? null : utils.getTimezone(value[1]);
|
|
38
38
|
if (timezoneStart != null && timezoneEnd != null && timezoneStart !== timezoneEnd) {
|
|
39
|
-
throw new Error('MUI: The timezone of the start and the end date should be the same');
|
|
39
|
+
throw new Error('MUI X: The timezone of the start and the end date should be the same.');
|
|
40
40
|
}
|
|
41
41
|
return timezoneStart ?? timezoneEnd;
|
|
42
42
|
},
|
package/node/models/index.js
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _range = require("./range");
|
|
7
|
+
Object.keys(_range).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _range[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _range[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
6
17
|
var _validation = require("./validation");
|
|
7
18
|
Object.keys(_validation).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-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.8",
|
|
4
4
|
"description": "The commercial edition of the date picker components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"directory": "packages/x-date-pickers-pro"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/runtime": "^7.23.
|
|
35
|
-
"@mui/base": "^5.0.0-beta.
|
|
36
|
-
"@mui/system": "^5.15.
|
|
37
|
-
"@mui/utils": "^5.15.
|
|
38
|
-
"@mui/x-date-pickers": "7.0.0-alpha.
|
|
39
|
-
"@mui/x-license-pro": "7.0.0-alpha.
|
|
34
|
+
"@babel/runtime": "^7.23.7",
|
|
35
|
+
"@mui/base": "^5.0.0-beta.29",
|
|
36
|
+
"@mui/system": "^5.15.2",
|
|
37
|
+
"@mui/utils": "^5.15.2",
|
|
38
|
+
"@mui/x-date-pickers": "7.0.0-alpha.8",
|
|
39
|
+
"@mui/x-license-pro": "7.0.0-alpha.8",
|
|
40
40
|
"clsx": "^2.0.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"react-transition-group": "^4.4.5"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@emotion/react": "^11.9.0",
|
|
46
46
|
"@emotion/styled": "^11.8.1",
|
|
47
47
|
"@mui/material": "^5.8.6",
|
|
48
|
-
"date-fns": "^2.25.0",
|
|
48
|
+
"date-fns": "^2.25.0 || ^3.2.0",
|
|
49
49
|
"date-fns-jalali": "^2.13.0-0",
|
|
50
50
|
"dayjs": "^1.10.7",
|
|
51
51
|
"luxon": "^3.0.2",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|