@mui/x-date-pickers 8.10.0 → 8.10.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.
@@ -100,198 +100,198 @@ class AdapterDateFns extends _AdapterDateFnsBase.AdapterDateFnsBase {
100
100
  formats,
101
101
  longFormatters: _index42.default
102
102
  });
103
- this.parse = (value, format) => {
104
- if (value === '') {
105
- return null;
106
- }
107
- return (0, _index27.default)(value, format, new Date(), {
108
- locale: this.locale
109
- });
110
- };
111
- this.isValid = value => {
112
- if (value == null) {
113
- return false;
114
- }
115
- return (0, _index26.default)(value);
116
- };
117
- this.format = (value, formatKey) => {
118
- return this.formatByString(value, this.formats[formatKey]);
119
- };
120
- this.formatByString = (value, formatString) => {
121
- return (0, _index1.default)(value, formatString, {
122
- locale: this.locale
123
- });
124
- };
125
- this.isEqual = (value, comparing) => {
126
- if (value === null && comparing === null) {
127
- return true;
128
- }
129
- if (value === null || comparing === null) {
130
- return false;
131
- }
132
- return (0, _index21.default)(value, comparing);
133
- };
134
- this.isSameYear = (value, comparing) => {
135
- return (0, _index23.default)(value, comparing);
136
- };
137
- this.isSameMonth = (value, comparing) => {
138
- return (0, _index24.default)(value, comparing);
139
- };
140
- this.isSameDay = (value, comparing) => {
141
- return (0, _index22.default)(value, comparing);
142
- };
143
- this.isSameHour = (value, comparing) => {
144
- return (0, _index25.default)(value, comparing);
145
- };
146
- this.isAfter = (value, comparing) => {
147
- return (0, _index19.default)(value, comparing);
148
- };
149
- this.isAfterYear = (value, comparing) => {
150
- return (0, _index19.default)(value, (0, _index0.default)(comparing));
151
- };
152
- this.isAfterDay = (value, comparing) => {
153
- return (0, _index19.default)(value, (0, _index8.default)(comparing));
154
- };
155
- this.isBefore = (value, comparing) => {
156
- return (0, _index20.default)(value, comparing);
157
- };
158
- this.isBeforeYear = (value, comparing) => {
159
- return (0, _index20.default)(value, this.startOfYear(comparing));
160
- };
161
- this.isBeforeDay = (value, comparing) => {
162
- return (0, _index20.default)(value, this.startOfDay(comparing));
163
- };
164
- this.isWithinRange = (value, [start, end]) => {
165
- return (0, _index40.default)(value, {
166
- start,
167
- end
168
- });
169
- };
170
- this.startOfYear = value => {
171
- return (0, _index39.default)(value);
172
- };
173
- this.startOfMonth = value => {
174
- return (0, _index36.default)(value);
175
- };
176
- this.startOfWeek = value => {
177
- return (0, _index38.default)(value, {
178
- locale: this.locale
179
- });
180
- };
181
- this.startOfDay = value => {
182
- return (0, _index35.default)(value);
183
- };
184
- this.endOfYear = value => {
185
- return (0, _index0.default)(value);
186
- };
187
- this.endOfMonth = value => {
188
- return (0, _index37.default)(value);
189
- };
190
- this.endOfWeek = value => {
191
- return (0, _index9.default)(value, {
192
- locale: this.locale
193
- });
194
- };
195
- this.endOfDay = value => {
196
- return (0, _index8.default)(value);
197
- };
198
- this.addYears = (value, amount) => {
199
- return (0, _index7.default)(value, amount);
200
- };
201
- this.addMonths = (value, amount) => {
202
- return (0, _index6.default)(value, amount);
203
- };
204
- this.addWeeks = (value, amount) => {
205
- return (0, _index5.default)(value, amount);
206
- };
207
- this.addDays = (value, amount) => {
208
- return (0, _index.default)(value, amount);
209
- };
210
- this.addHours = (value, amount) => {
211
- return (0, _index4.default)(value, amount);
212
- };
213
- this.addMinutes = (value, amount) => {
214
- return (0, _index3.default)(value, amount);
215
- };
216
- this.addSeconds = (value, amount) => {
217
- return (0, _index2.default)(value, amount);
218
- };
219
- this.getYear = value => {
220
- return (0, _index18.default)(value);
221
- };
222
- this.getMonth = value => {
223
- return (0, _index14.default)(value);
224
- };
225
- this.getDate = value => {
226
- return (0, _index10.default)(value);
227
- };
228
- this.getHours = value => {
229
- return (0, _index12.default)(value);
230
- };
231
- this.getMinutes = value => {
232
- return (0, _index13.default)(value);
233
- };
234
- this.getSeconds = value => {
235
- return (0, _index15.default)(value);
236
- };
237
- this.getMilliseconds = value => {
238
- return (0, _index16.default)(value);
239
- };
240
- this.setYear = (value, year) => {
241
- return (0, _index34.default)(value, year);
242
- };
243
- this.setMonth = (value, month) => {
244
- return (0, _index31.default)(value, month);
245
- };
246
- this.setDate = (value, date) => {
247
- return (0, _index28.default)(value, date);
248
- };
249
- this.setHours = (value, hours) => {
250
- return (0, _index29.default)(value, hours);
251
- };
252
- this.setMinutes = (value, minutes) => {
253
- return (0, _index30.default)(value, minutes);
254
- };
255
- this.setSeconds = (value, seconds) => {
256
- return (0, _index32.default)(value, seconds);
257
- };
258
- this.setMilliseconds = (value, milliseconds) => {
259
- return (0, _index33.default)(value, milliseconds);
260
- };
261
- this.getDaysInMonth = value => {
262
- return (0, _index11.default)(value);
263
- };
264
- this.getWeekArray = value => {
265
- const start = this.startOfWeek(this.startOfMonth(value));
266
- const end = this.endOfWeek(this.endOfMonth(value));
267
- let count = 0;
268
- let current = start;
269
- const nestedWeeks = [];
270
- while (this.isBefore(current, end)) {
271
- const weekNumber = Math.floor(count / 7);
272
- nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
273
- nestedWeeks[weekNumber].push(current);
274
- current = this.addDays(current, 1);
275
- count += 1;
276
- }
277
- return nestedWeeks;
278
- };
279
- this.getWeekNumber = value => {
280
- return (0, _index17.default)(value, {
281
- locale: this.locale
282
- });
283
- };
284
- this.getYearRange = ([start, end]) => {
285
- const startDate = this.startOfYear(start);
286
- const endDate = this.endOfYear(end);
287
- const years = [];
288
- let current = startDate;
289
- while (this.isBefore(current, endDate)) {
290
- years.push(current);
291
- current = this.addYears(current, 1);
292
- }
293
- return years;
294
- };
295
103
  }
104
+ parse = (value, format) => {
105
+ if (value === '') {
106
+ return null;
107
+ }
108
+ return (0, _index27.default)(value, format, new Date(), {
109
+ locale: this.locale
110
+ });
111
+ };
112
+ isValid = value => {
113
+ if (value == null) {
114
+ return false;
115
+ }
116
+ return (0, _index26.default)(value);
117
+ };
118
+ format = (value, formatKey) => {
119
+ return this.formatByString(value, this.formats[formatKey]);
120
+ };
121
+ formatByString = (value, formatString) => {
122
+ return (0, _index1.default)(value, formatString, {
123
+ locale: this.locale
124
+ });
125
+ };
126
+ isEqual = (value, comparing) => {
127
+ if (value === null && comparing === null) {
128
+ return true;
129
+ }
130
+ if (value === null || comparing === null) {
131
+ return false;
132
+ }
133
+ return (0, _index21.default)(value, comparing);
134
+ };
135
+ isSameYear = (value, comparing) => {
136
+ return (0, _index23.default)(value, comparing);
137
+ };
138
+ isSameMonth = (value, comparing) => {
139
+ return (0, _index24.default)(value, comparing);
140
+ };
141
+ isSameDay = (value, comparing) => {
142
+ return (0, _index22.default)(value, comparing);
143
+ };
144
+ isSameHour = (value, comparing) => {
145
+ return (0, _index25.default)(value, comparing);
146
+ };
147
+ isAfter = (value, comparing) => {
148
+ return (0, _index19.default)(value, comparing);
149
+ };
150
+ isAfterYear = (value, comparing) => {
151
+ return (0, _index19.default)(value, (0, _index0.default)(comparing));
152
+ };
153
+ isAfterDay = (value, comparing) => {
154
+ return (0, _index19.default)(value, (0, _index8.default)(comparing));
155
+ };
156
+ isBefore = (value, comparing) => {
157
+ return (0, _index20.default)(value, comparing);
158
+ };
159
+ isBeforeYear = (value, comparing) => {
160
+ return (0, _index20.default)(value, this.startOfYear(comparing));
161
+ };
162
+ isBeforeDay = (value, comparing) => {
163
+ return (0, _index20.default)(value, this.startOfDay(comparing));
164
+ };
165
+ isWithinRange = (value, [start, end]) => {
166
+ return (0, _index40.default)(value, {
167
+ start,
168
+ end
169
+ });
170
+ };
171
+ startOfYear = value => {
172
+ return (0, _index39.default)(value);
173
+ };
174
+ startOfMonth = value => {
175
+ return (0, _index36.default)(value);
176
+ };
177
+ startOfWeek = value => {
178
+ return (0, _index38.default)(value, {
179
+ locale: this.locale
180
+ });
181
+ };
182
+ startOfDay = value => {
183
+ return (0, _index35.default)(value);
184
+ };
185
+ endOfYear = value => {
186
+ return (0, _index0.default)(value);
187
+ };
188
+ endOfMonth = value => {
189
+ return (0, _index37.default)(value);
190
+ };
191
+ endOfWeek = value => {
192
+ return (0, _index9.default)(value, {
193
+ locale: this.locale
194
+ });
195
+ };
196
+ endOfDay = value => {
197
+ return (0, _index8.default)(value);
198
+ };
199
+ addYears = (value, amount) => {
200
+ return (0, _index7.default)(value, amount);
201
+ };
202
+ addMonths = (value, amount) => {
203
+ return (0, _index6.default)(value, amount);
204
+ };
205
+ addWeeks = (value, amount) => {
206
+ return (0, _index5.default)(value, amount);
207
+ };
208
+ addDays = (value, amount) => {
209
+ return (0, _index.default)(value, amount);
210
+ };
211
+ addHours = (value, amount) => {
212
+ return (0, _index4.default)(value, amount);
213
+ };
214
+ addMinutes = (value, amount) => {
215
+ return (0, _index3.default)(value, amount);
216
+ };
217
+ addSeconds = (value, amount) => {
218
+ return (0, _index2.default)(value, amount);
219
+ };
220
+ getYear = value => {
221
+ return (0, _index18.default)(value);
222
+ };
223
+ getMonth = value => {
224
+ return (0, _index14.default)(value);
225
+ };
226
+ getDate = value => {
227
+ return (0, _index10.default)(value);
228
+ };
229
+ getHours = value => {
230
+ return (0, _index12.default)(value);
231
+ };
232
+ getMinutes = value => {
233
+ return (0, _index13.default)(value);
234
+ };
235
+ getSeconds = value => {
236
+ return (0, _index15.default)(value);
237
+ };
238
+ getMilliseconds = value => {
239
+ return (0, _index16.default)(value);
240
+ };
241
+ setYear = (value, year) => {
242
+ return (0, _index34.default)(value, year);
243
+ };
244
+ setMonth = (value, month) => {
245
+ return (0, _index31.default)(value, month);
246
+ };
247
+ setDate = (value, date) => {
248
+ return (0, _index28.default)(value, date);
249
+ };
250
+ setHours = (value, hours) => {
251
+ return (0, _index29.default)(value, hours);
252
+ };
253
+ setMinutes = (value, minutes) => {
254
+ return (0, _index30.default)(value, minutes);
255
+ };
256
+ setSeconds = (value, seconds) => {
257
+ return (0, _index32.default)(value, seconds);
258
+ };
259
+ setMilliseconds = (value, milliseconds) => {
260
+ return (0, _index33.default)(value, milliseconds);
261
+ };
262
+ getDaysInMonth = value => {
263
+ return (0, _index11.default)(value);
264
+ };
265
+ getWeekArray = value => {
266
+ const start = this.startOfWeek(this.startOfMonth(value));
267
+ const end = this.endOfWeek(this.endOfMonth(value));
268
+ let count = 0;
269
+ let current = start;
270
+ const nestedWeeks = [];
271
+ while (this.isBefore(current, end)) {
272
+ const weekNumber = Math.floor(count / 7);
273
+ nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
274
+ nestedWeeks[weekNumber].push(current);
275
+ current = this.addDays(current, 1);
276
+ count += 1;
277
+ }
278
+ return nestedWeeks;
279
+ };
280
+ getWeekNumber = value => {
281
+ return (0, _index17.default)(value, {
282
+ locale: this.locale
283
+ });
284
+ };
285
+ getYearRange = ([start, end]) => {
286
+ const startDate = this.startOfYear(start);
287
+ const endDate = this.endOfYear(end);
288
+ const years = [];
289
+ let current = startDate;
290
+ while (this.isBefore(current, endDate)) {
291
+ years.push(current);
292
+ current = this.addYears(current, 1);
293
+ }
294
+ return years;
295
+ };
296
296
  }
297
297
  exports.AdapterDateFns = AdapterDateFns;