@vuetify/nightly 4.0.0-dev-20230419.0 → 4.0.0-dev-20230421.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -2
- package/dist/json/attributes.json +172 -108
- package/dist/json/importMap.json +34 -34
- package/dist/json/tags.json +16 -0
- package/dist/json/web-types.json +522 -220
- package/dist/vuetify-labs.css +293 -130
- package/dist/vuetify-labs.d.ts +620 -171
- package/dist/vuetify-labs.esm.js +867 -186
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +867 -185
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +166 -3
- package/dist/vuetify.d.ts +577 -160
- package/dist/vuetify.esm.js +809 -138
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +809 -137
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +802 -736
- package/dist/vuetify.min.js.map +1 -1
- package/lib/adapters/date-adapter.mjs +2 -0
- package/lib/adapters/date-adapter.mjs.map +1 -0
- package/lib/adapters/vuetify.mjs +399 -0
- package/lib/adapters/vuetify.mjs.map +1 -0
- package/lib/blueprints/index.d.ts +34 -0
- package/lib/blueprints/md1.d.ts +34 -0
- package/lib/blueprints/md2.d.ts +34 -0
- package/lib/blueprints/md3.d.ts +34 -0
- package/lib/components/VAppBar/VAppBar.mjs +62 -10
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +26 -0
- package/lib/components/VAutocomplete/VAutocomplete.css +9 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +50 -6
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +10 -0
- package/lib/components/VAutocomplete/index.d.ts +29 -17
- package/lib/components/VBtn/_mixins.scss +1 -1
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +21 -16
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +22 -1
- package/lib/components/VCombobox/VCombobox.css +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +6 -4
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +1 -1
- package/lib/components/VCombobox/index.d.ts +29 -17
- package/lib/components/VField/index.d.ts +6 -0
- package/lib/components/VFileInput/VFileInput.mjs +13 -17
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +68 -23
- package/lib/components/VInput/VInput.mjs +14 -7
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +22 -1
- package/lib/components/VOverlay/locationStrategies.mjs +9 -4
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +22 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +33 -22
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +39 -6
- package/lib/components/VSelect/VSelect.mjs +6 -0
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +32 -17
- package/lib/components/VSlider/VSlider.mjs +33 -15
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +39 -6
- package/lib/components/VSlider/slider.mjs +47 -24
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +5 -3
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +43 -1
- package/lib/components/VTextField/VTextField.mjs +4 -12
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +70 -22
- package/lib/components/VTextarea/VTextarea.mjs +4 -12
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +61 -22
- package/lib/components/VToolbar/VToolbar.css +3 -1
- package/lib/components/VToolbar/VToolbar.sass +3 -1
- package/lib/components/VValidation/index.d.ts +10 -1
- package/lib/components/index.d.ts +525 -150
- package/lib/composables/date.mjs +39 -0
- package/lib/composables/date.mjs.map +1 -0
- package/lib/composables/focus.mjs +3 -2
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/index.mjs +1 -0
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/items.mjs +7 -2
- package/lib/composables/items.mjs.map +1 -1
- package/lib/composables/scroll.mjs +3 -0
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +8 -3
- package/lib/framework.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.mjs +2 -2
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/index.d.ts +52 -10
- package/lib/labs/VDataTable/VDataTable.mjs +2 -2
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +52 -44
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +2 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +0 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +2 -1
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +44 -11
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +1 -0
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
- package/lib/labs/components.d.ts +53 -20
- package/lib/styles/main.css +152 -0
- package/lib/styles/settings/_utilities.scss +11 -1
- package/lib/util/helpers.mjs +4 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-adapter.mjs","names":[],"sources":["../../src/adapters/date-adapter.ts"],"sourcesContent":["export interface DateAdapter<Date> {\n date (value?: any): Date | null\n format (date: Date, formatString: string): string\n\n startOfMonth (date: Date): Date\n endOfMonth (date: Date): Date\n startOfYear (date: Date): Date\n endOfYear (date: Date): Date\n\n isAfter (date: Date, comparing: Date): boolean\n isEqual (date: Date, comparing: Date): boolean\n isSameDay (date: Date, comparing: Date): boolean\n isSameMonth (date: Date, comparing: Date): boolean\n isValid (date: any): boolean\n isWithinRange (date: Date, range: [Date, Date]): boolean\n\n addDays (date: Date, amount: number): Date\n addMonths (date: Date, amount: number): Date\n\n getYear (date: Date): number\n setYear (date: Date, year: number): Date\n getDiff (date: Date, comparing: Date | string, unit?: string): number\n getWeek (date: Date): number\n getWeekArray (date: Date): (Date | null)[][]\n getWeekdays (): string[]\n getMonth (date: Date): number\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
// Utilities
|
|
2
|
+
import { createRange } from "../util/index.mjs"; // Types
|
|
3
|
+
function getWeekArray(date) {
|
|
4
|
+
let currentWeek = [];
|
|
5
|
+
const weeks = [];
|
|
6
|
+
const firstDayOfMonth = startOfMonth(date);
|
|
7
|
+
const lastDayOfMonth = endOfMonth(date);
|
|
8
|
+
for (let i = 0; i < firstDayOfMonth.getDay(); i++) {
|
|
9
|
+
currentWeek.push(null);
|
|
10
|
+
}
|
|
11
|
+
for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
|
|
12
|
+
const day = new Date(date.getFullYear(), date.getMonth(), i);
|
|
13
|
+
|
|
14
|
+
// Add the day to the current week
|
|
15
|
+
currentWeek.push(day);
|
|
16
|
+
|
|
17
|
+
// If the current week has 7 days, add it to the weeks array and start a new week
|
|
18
|
+
if (currentWeek.length === 7) {
|
|
19
|
+
weeks.push(currentWeek);
|
|
20
|
+
currentWeek = [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
for (let i = currentWeek.length; i < 7; i++) {
|
|
24
|
+
currentWeek.push(null);
|
|
25
|
+
}
|
|
26
|
+
weeks.push(currentWeek);
|
|
27
|
+
return weeks;
|
|
28
|
+
}
|
|
29
|
+
function startOfMonth(date) {
|
|
30
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
31
|
+
}
|
|
32
|
+
function endOfMonth(date) {
|
|
33
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
34
|
+
}
|
|
35
|
+
function date(value) {
|
|
36
|
+
if (value == null) return null;
|
|
37
|
+
if (value instanceof Date) return value;
|
|
38
|
+
if (typeof value === 'string') {
|
|
39
|
+
const parsed = Date.parse(value);
|
|
40
|
+
if (!isNaN(parsed)) return new Date(parsed);
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const firstDay = {
|
|
45
|
+
'001': 1,
|
|
46
|
+
AD: 1,
|
|
47
|
+
AE: 6,
|
|
48
|
+
AF: 6,
|
|
49
|
+
AG: 0,
|
|
50
|
+
AI: 1,
|
|
51
|
+
AL: 1,
|
|
52
|
+
AM: 1,
|
|
53
|
+
AN: 1,
|
|
54
|
+
AR: 1,
|
|
55
|
+
AS: 0,
|
|
56
|
+
AT: 1,
|
|
57
|
+
AU: 0,
|
|
58
|
+
AX: 1,
|
|
59
|
+
AZ: 1,
|
|
60
|
+
BA: 1,
|
|
61
|
+
BD: 0,
|
|
62
|
+
BE: 1,
|
|
63
|
+
BG: 1,
|
|
64
|
+
BH: 6,
|
|
65
|
+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|
|
125
|
+
KZ: 1,
|
|
126
|
+
LA: 0,
|
|
127
|
+
LB: 1,
|
|
128
|
+
LI: 1,
|
|
129
|
+
LK: 1,
|
|
130
|
+
LT: 1,
|
|
131
|
+
LU: 1,
|
|
132
|
+
LV: 1,
|
|
133
|
+
LY: 6,
|
|
134
|
+
MC: 1,
|
|
135
|
+
MD: 1,
|
|
136
|
+
ME: 1,
|
|
137
|
+
MH: 0,
|
|
138
|
+
MK: 1,
|
|
139
|
+
MM: 0,
|
|
140
|
+
MN: 1,
|
|
141
|
+
MO: 0,
|
|
142
|
+
MQ: 1,
|
|
143
|
+
MT: 0,
|
|
144
|
+
MV: 5,
|
|
145
|
+
MX: 0,
|
|
146
|
+
MY: 1,
|
|
147
|
+
MZ: 0,
|
|
148
|
+
NI: 0,
|
|
149
|
+
NL: 1,
|
|
150
|
+
NO: 1,
|
|
151
|
+
NP: 0,
|
|
152
|
+
NZ: 1,
|
|
153
|
+
OM: 6,
|
|
154
|
+
PA: 0,
|
|
155
|
+
PE: 0,
|
|
156
|
+
PH: 0,
|
|
157
|
+
PK: 0,
|
|
158
|
+
PL: 1,
|
|
159
|
+
PR: 0,
|
|
160
|
+
PT: 0,
|
|
161
|
+
PY: 0,
|
|
162
|
+
QA: 6,
|
|
163
|
+
RE: 1,
|
|
164
|
+
RO: 1,
|
|
165
|
+
RS: 1,
|
|
166
|
+
RU: 1,
|
|
167
|
+
SA: 0,
|
|
168
|
+
SD: 6,
|
|
169
|
+
SE: 1,
|
|
170
|
+
SG: 0,
|
|
171
|
+
SI: 1,
|
|
172
|
+
SK: 1,
|
|
173
|
+
SM: 1,
|
|
174
|
+
SV: 0,
|
|
175
|
+
SY: 6,
|
|
176
|
+
TH: 0,
|
|
177
|
+
TJ: 1,
|
|
178
|
+
TM: 1,
|
|
179
|
+
TR: 1,
|
|
180
|
+
TT: 0,
|
|
181
|
+
TW: 0,
|
|
182
|
+
UA: 1,
|
|
183
|
+
UM: 0,
|
|
184
|
+
US: 0,
|
|
185
|
+
UY: 1,
|
|
186
|
+
UZ: 1,
|
|
187
|
+
VA: 1,
|
|
188
|
+
VE: 0,
|
|
189
|
+
VI: 0,
|
|
190
|
+
VN: 1,
|
|
191
|
+
WS: 0,
|
|
192
|
+
XK: 1,
|
|
193
|
+
YE: 0,
|
|
194
|
+
ZA: 0,
|
|
195
|
+
ZW: 0
|
|
196
|
+
};
|
|
197
|
+
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
|
198
|
+
function getWeekdays(locale) {
|
|
199
|
+
const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
|
|
200
|
+
return createRange(7).map(i => {
|
|
201
|
+
const weekday = new Date(sundayJanuarySecond2000);
|
|
202
|
+
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
|
203
|
+
return new Intl.DateTimeFormat(locale, {
|
|
204
|
+
weekday: 'long'
|
|
205
|
+
}).format(weekday);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function format(value, formatString, locale) {
|
|
209
|
+
const date = new Date(value);
|
|
210
|
+
let options = {};
|
|
211
|
+
switch (formatString) {
|
|
212
|
+
case 'fullDateWithWeekday':
|
|
213
|
+
options = {
|
|
214
|
+
weekday: 'long',
|
|
215
|
+
day: 'numeric',
|
|
216
|
+
month: 'long',
|
|
217
|
+
year: 'numeric'
|
|
218
|
+
};
|
|
219
|
+
break;
|
|
220
|
+
case 'normalDateWithWeekday':
|
|
221
|
+
options = {
|
|
222
|
+
weekday: 'short',
|
|
223
|
+
day: 'numeric',
|
|
224
|
+
month: 'short',
|
|
225
|
+
year: 'numeric'
|
|
226
|
+
};
|
|
227
|
+
break;
|
|
228
|
+
case 'keyboardDate':
|
|
229
|
+
options = {};
|
|
230
|
+
break;
|
|
231
|
+
case 'monthAndDate':
|
|
232
|
+
options = {
|
|
233
|
+
month: 'long',
|
|
234
|
+
day: 'numeric'
|
|
235
|
+
};
|
|
236
|
+
break;
|
|
237
|
+
case 'monthAndYear':
|
|
238
|
+
options = {
|
|
239
|
+
month: 'long',
|
|
240
|
+
year: 'numeric'
|
|
241
|
+
};
|
|
242
|
+
break;
|
|
243
|
+
default:
|
|
244
|
+
options = {
|
|
245
|
+
timeZone: 'UTC',
|
|
246
|
+
timeZoneName: 'short'
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
250
|
+
}
|
|
251
|
+
function addDays(date, amount) {
|
|
252
|
+
const d = new Date(date);
|
|
253
|
+
d.setDate(d.getDate() + amount);
|
|
254
|
+
return d;
|
|
255
|
+
}
|
|
256
|
+
function addMonths(date, amount) {
|
|
257
|
+
const d = new Date(date);
|
|
258
|
+
d.setMonth(d.getMonth() + amount);
|
|
259
|
+
return d;
|
|
260
|
+
}
|
|
261
|
+
function getYear(date) {
|
|
262
|
+
return date.getFullYear();
|
|
263
|
+
}
|
|
264
|
+
function getMonth(date) {
|
|
265
|
+
return date.getMonth();
|
|
266
|
+
}
|
|
267
|
+
function startOfYear(date) {
|
|
268
|
+
return new Date(date.getFullYear(), 0, 1);
|
|
269
|
+
}
|
|
270
|
+
function endOfYear(date) {
|
|
271
|
+
return new Date(date.getFullYear(), 11, 31);
|
|
272
|
+
}
|
|
273
|
+
function getMondayOfFirstWeekOfYear(year) {
|
|
274
|
+
return new Date(year, 0, 1);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
|
|
278
|
+
export function getWeek(date) {
|
|
279
|
+
let year = date.getFullYear();
|
|
280
|
+
let d1w1 = getMondayOfFirstWeekOfYear(year);
|
|
281
|
+
if (date < d1w1) {
|
|
282
|
+
year = year - 1;
|
|
283
|
+
d1w1 = getMondayOfFirstWeekOfYear(year);
|
|
284
|
+
} else {
|
|
285
|
+
const tv = getMondayOfFirstWeekOfYear(year + 1);
|
|
286
|
+
if (date >= tv) {
|
|
287
|
+
year = year + 1;
|
|
288
|
+
d1w1 = tv;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const diffTime = Math.abs(date.getTime() - d1w1.getTime());
|
|
292
|
+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
293
|
+
return Math.floor(diffDays / 7) + 1;
|
|
294
|
+
}
|
|
295
|
+
function isWithinRange(date, range) {
|
|
296
|
+
return isAfter(date, range[0]) && isBefore(date, range[1]);
|
|
297
|
+
}
|
|
298
|
+
function isValid(date) {
|
|
299
|
+
const d = new Date(date);
|
|
300
|
+
return d instanceof Date && !isNaN(d.getTime());
|
|
301
|
+
}
|
|
302
|
+
function isAfter(date, comparing) {
|
|
303
|
+
return date.getTime() > comparing.getTime();
|
|
304
|
+
}
|
|
305
|
+
function isBefore(date, comparing) {
|
|
306
|
+
return date.getTime() < comparing.getTime();
|
|
307
|
+
}
|
|
308
|
+
function isEqual(date, comparing) {
|
|
309
|
+
return date.getTime() === comparing.getTime();
|
|
310
|
+
}
|
|
311
|
+
function isSameDay(date, comparing) {
|
|
312
|
+
return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
|
313
|
+
}
|
|
314
|
+
function isSameMonth(date, comparing) {
|
|
315
|
+
return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
|
316
|
+
}
|
|
317
|
+
function getDiff(date, comparing, unit) {
|
|
318
|
+
const d = new Date(date);
|
|
319
|
+
const c = new Date(comparing);
|
|
320
|
+
if (unit === 'month') {
|
|
321
|
+
return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
|
|
322
|
+
}
|
|
323
|
+
return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
|
|
324
|
+
}
|
|
325
|
+
function setYear(date, year) {
|
|
326
|
+
const d = new Date(date);
|
|
327
|
+
d.setFullYear(year);
|
|
328
|
+
return d;
|
|
329
|
+
}
|
|
330
|
+
export default class VuetifyDateAdapter {
|
|
331
|
+
constructor() {
|
|
332
|
+
let locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';
|
|
333
|
+
this.locale = locale;
|
|
334
|
+
}
|
|
335
|
+
date(value) {
|
|
336
|
+
return date(value);
|
|
337
|
+
}
|
|
338
|
+
addDays(date, amount) {
|
|
339
|
+
return addDays(date, amount);
|
|
340
|
+
}
|
|
341
|
+
addMonths(date, amount) {
|
|
342
|
+
return addMonths(date, amount);
|
|
343
|
+
}
|
|
344
|
+
getWeekArray(date) {
|
|
345
|
+
return getWeekArray(date);
|
|
346
|
+
}
|
|
347
|
+
startOfMonth(date) {
|
|
348
|
+
return startOfMonth(date);
|
|
349
|
+
}
|
|
350
|
+
endOfMonth(date) {
|
|
351
|
+
return endOfMonth(date);
|
|
352
|
+
}
|
|
353
|
+
format(date, formatString) {
|
|
354
|
+
return format(date, formatString, this.locale);
|
|
355
|
+
}
|
|
356
|
+
isEqual(date, comparing) {
|
|
357
|
+
return isEqual(date, comparing);
|
|
358
|
+
}
|
|
359
|
+
isValid(date) {
|
|
360
|
+
return isValid(date);
|
|
361
|
+
}
|
|
362
|
+
isWithinRange(date, range) {
|
|
363
|
+
return isWithinRange(date, range);
|
|
364
|
+
}
|
|
365
|
+
isAfter(date, comparing) {
|
|
366
|
+
return isAfter(date, comparing);
|
|
367
|
+
}
|
|
368
|
+
isSameDay(date, comparing) {
|
|
369
|
+
return isSameDay(date, comparing);
|
|
370
|
+
}
|
|
371
|
+
isSameMonth(date, comparing) {
|
|
372
|
+
return isSameMonth(date, comparing);
|
|
373
|
+
}
|
|
374
|
+
setYear(date, year) {
|
|
375
|
+
return setYear(date, year);
|
|
376
|
+
}
|
|
377
|
+
getDiff(date, comparing, unit) {
|
|
378
|
+
return getDiff(date, comparing, unit);
|
|
379
|
+
}
|
|
380
|
+
getWeek(date) {
|
|
381
|
+
return getWeek(date);
|
|
382
|
+
}
|
|
383
|
+
getWeekdays() {
|
|
384
|
+
return getWeekdays(this.locale);
|
|
385
|
+
}
|
|
386
|
+
getYear(date) {
|
|
387
|
+
return getYear(date);
|
|
388
|
+
}
|
|
389
|
+
getMonth(date) {
|
|
390
|
+
return getMonth(date);
|
|
391
|
+
}
|
|
392
|
+
startOfYear(date) {
|
|
393
|
+
return startOfYear(date);
|
|
394
|
+
}
|
|
395
|
+
endOfYear(date) {
|
|
396
|
+
return endOfYear(date);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
//# sourceMappingURL=vuetify.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vuetify.mjs","names":["createRange","getWeekArray","date","currentWeek","weeks","firstDayOfMonth","startOfMonth","lastDayOfMonth","endOfMonth","i","getDay","push","getDate","day","Date","getFullYear","getMonth","length","value","parsed","parse","isNaN","firstDay","AD","AE","AF","AG","AI","AL","AM","AN","AR","AS","AT","AU","AX","AZ","BA","BD","BE","BG","BH","BM","BN","BR","BS","BT","BW","BY","BZ","CA","CH","CL","CM","CN","CO","CR","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","ES","ET","FI","FJ","FO","FR","GB","GE","GF","GP","GR","GT","GU","HK","HN","HR","HU","ID","IE","IL","IN","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KR","KW","KZ","LA","LB","LI","LK","LT","LU","LV","LY","MC","MD","ME","MH","MK","MM","MN","MO","MQ","MT","MV","MX","MY","MZ","NI","NL","NO","NP","NZ","OM","PA","PE","PH","PK","PL","PR","PT","PY","QA","RE","RO","RS","RU","SA","SD","SE","SG","SI","SK","SM","SV","SY","TH","TJ","TM","TR","TT","TW","UA","UM","US","UY","UZ","VA","VE","VI","VN","WS","XK","YE","ZA","ZW","sundayJanuarySecond2000","getWeekdays","locale","daysFromSunday","slice","toUpperCase","map","weekday","setDate","Intl","DateTimeFormat","format","formatString","options","month","year","timeZone","timeZoneName","addDays","amount","d","addMonths","setMonth","getYear","startOfYear","endOfYear","getMondayOfFirstWeekOfYear","getWeek","d1w1","tv","diffTime","Math","abs","getTime","diffDays","ceil","floor","isWithinRange","range","isAfter","isBefore","isValid","comparing","isEqual","isSameDay","isSameMonth","getDiff","unit","c","setYear","setFullYear","VuetifyDateAdapter","constructor","arguments","undefined"],"sources":["../../src/adapters/vuetify.ts"],"sourcesContent":["// Utilities\nimport { createRange } from '@/util'\n\n// Types\nimport type { DateAdapter } from './date-adapter'\n\nfunction getWeekArray (date: Date) {\n let currentWeek = []\n const weeks = []\n const firstDayOfMonth = startOfMonth(date)\n const lastDayOfMonth = endOfMonth(date)\n\n for (let i = 0; i < firstDayOfMonth.getDay(); i++) {\n currentWeek.push(null)\n }\n\n for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {\n const day = new Date(date.getFullYear(), date.getMonth(), i)\n\n // Add the day to the current week\n currentWeek.push(day)\n\n // If the current week has 7 days, add it to the weeks array and start a new week\n if (currentWeek.length === 7) {\n weeks.push(currentWeek)\n currentWeek = []\n }\n }\n\n for (let i = currentWeek.length; i < 7; i++) {\n currentWeek.push(null)\n }\n\n weeks.push(currentWeek)\n\n return weeks\n}\n\nfunction startOfMonth (date: Date) {\n return new Date(date.getFullYear(), date.getMonth(), 1)\n}\n\nfunction endOfMonth (date: Date) {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0)\n}\n\nfunction date (value?: any): Date | null {\n if (value == null) return null\n\n if (value instanceof Date) return value\n\n if (typeof value === 'string') {\n const parsed = Date.parse(value)\n\n if (!isNaN(parsed)) return new Date(parsed)\n }\n\n return null\n}\n\nconst firstDay: Record<string, number> = {\n '001': 1,\n AD: 1,\n AE: 6,\n AF: 6,\n AG: 0,\n AI: 1,\n AL: 1,\n AM: 1,\n AN: 1,\n AR: 1,\n AS: 0,\n AT: 1,\n AU: 0,\n AX: 1,\n AZ: 1,\n BA: 1,\n BD: 0,\n BE: 1,\n BG: 1,\n BH: 6,\n BM: 1,\n BN: 1,\n BR: 0,\n BS: 0,\n BT: 0,\n BW: 0,\n BY: 1,\n BZ: 0,\n CA: 0,\n CH: 1,\n CL: 1,\n CM: 1,\n CN: 0,\n CO: 0,\n CR: 1,\n CY: 1,\n CZ: 1,\n DE: 1,\n DJ: 6,\n DK: 1,\n DM: 0,\n DO: 0,\n DZ: 6,\n EC: 1,\n EE: 1,\n EG: 6,\n ES: 1,\n ET: 0,\n FI: 1,\n FJ: 1,\n FO: 1,\n FR: 1,\n GB: 1,\n 'GB-alt-variant': 0,\n GE: 1,\n GF: 1,\n GP: 1,\n GR: 1,\n GT: 0,\n GU: 0,\n HK: 0,\n HN: 0,\n HR: 1,\n HU: 1,\n ID: 0,\n IE: 1,\n IL: 0,\n IN: 0,\n IQ: 6,\n IR: 6,\n IS: 1,\n IT: 1,\n JM: 0,\n JO: 6,\n JP: 0,\n KE: 0,\n KG: 1,\n KH: 0,\n KR: 0,\n KW: 6,\n KZ: 1,\n LA: 0,\n LB: 1,\n LI: 1,\n LK: 1,\n LT: 1,\n LU: 1,\n LV: 1,\n LY: 6,\n MC: 1,\n MD: 1,\n ME: 1,\n MH: 0,\n MK: 1,\n MM: 0,\n MN: 1,\n MO: 0,\n MQ: 1,\n MT: 0,\n MV: 5,\n MX: 0,\n MY: 1,\n MZ: 0,\n NI: 0,\n NL: 1,\n NO: 1,\n NP: 0,\n NZ: 1,\n OM: 6,\n PA: 0,\n PE: 0,\n PH: 0,\n PK: 0,\n PL: 1,\n PR: 0,\n PT: 0,\n PY: 0,\n QA: 6,\n RE: 1,\n RO: 1,\n RS: 1,\n RU: 1,\n SA: 0,\n SD: 6,\n SE: 1,\n SG: 0,\n SI: 1,\n SK: 1,\n SM: 1,\n SV: 0,\n SY: 6,\n TH: 0,\n TJ: 1,\n TM: 1,\n TR: 1,\n TT: 0,\n TW: 0,\n UA: 1,\n UM: 0,\n US: 0,\n UY: 1,\n UZ: 1,\n VA: 1,\n VE: 0,\n VI: 0,\n VN: 1,\n WS: 0,\n XK: 1,\n YE: 0,\n ZA: 0,\n ZW: 0,\n}\n\nconst sundayJanuarySecond2000 = new Date(2000, 0, 2)\n\nfunction getWeekdays (locale: string) {\n const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()]\n\n return createRange(7).map(i => {\n const weekday = new Date(sundayJanuarySecond2000)\n weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i)\n return new Intl.DateTimeFormat(locale, { weekday: 'long' }).format(weekday)\n })\n}\n\nfunction format (value: Date, formatString: string, locale: string): string {\n const date = new Date(value)\n\n let options: Intl.DateTimeFormatOptions = {}\n switch (formatString) {\n case 'fullDateWithWeekday':\n options = { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' }\n break\n case 'normalDateWithWeekday':\n options = { weekday: 'short', day: 'numeric', month: 'short', year: 'numeric' }\n break\n case 'keyboardDate':\n options = {}\n break\n case 'monthAndDate':\n options = { month: 'long', day: 'numeric' }\n break\n case 'monthAndYear':\n options = { month: 'long', year: 'numeric' }\n break\n default:\n options = { timeZone: 'UTC', timeZoneName: 'short' }\n }\n\n return new Intl.DateTimeFormat(locale, options).format(date)\n}\n\nfunction addDays (date: Date, amount: number) {\n const d = new Date(date)\n d.setDate(d.getDate() + amount)\n return d\n}\n\nfunction addMonths (date: Date, amount: number) {\n const d = new Date(date)\n d.setMonth(d.getMonth() + amount)\n return d\n}\n\nfunction getYear (date: Date) {\n return date.getFullYear()\n}\n\nfunction getMonth (date: Date) {\n return date.getMonth()\n}\n\nfunction startOfYear (date: Date) {\n return new Date(date.getFullYear(), 0, 1)\n}\nfunction endOfYear (date: Date) {\n return new Date(date.getFullYear(), 11, 31)\n}\n\nfunction getMondayOfFirstWeekOfYear (year: number) {\n return new Date(year, 0, 1)\n}\n\n// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024\nexport function getWeek (date: Date) {\n let year = date.getFullYear()\n let d1w1 = getMondayOfFirstWeekOfYear(year)\n\n if (date < d1w1) {\n year = year - 1\n d1w1 = getMondayOfFirstWeekOfYear(year)\n } else {\n const tv = getMondayOfFirstWeekOfYear(year + 1)\n if (date >= tv) {\n year = year + 1\n d1w1 = tv\n }\n }\n\n const diffTime = Math.abs(date.getTime() - d1w1.getTime())\n const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))\n\n return Math.floor(diffDays / 7) + 1\n}\n\nfunction isWithinRange (date: Date, range: [Date, Date]) {\n return isAfter(date, range[0]) && isBefore(date, range[1])\n}\n\nfunction isValid (date: any) {\n const d = new Date(date)\n\n return d instanceof Date && !isNaN(d.getTime())\n}\n\nfunction isAfter (date: Date, comparing: Date) {\n return date.getTime() > comparing.getTime()\n}\n\nfunction isBefore (date: Date, comparing: Date) {\n return date.getTime() < comparing.getTime()\n}\n\nfunction isEqual (date: Date, comparing: Date) {\n return date.getTime() === comparing.getTime()\n}\n\nfunction isSameDay (date: Date, comparing: Date) {\n return date.getDate() === comparing.getDate() &&\n date.getMonth() === comparing.getMonth() &&\n date.getFullYear() === comparing.getFullYear()\n}\n\nfunction isSameMonth (date: Date, comparing: Date) {\n return date.getMonth() === comparing.getMonth() &&\n date.getFullYear() === comparing.getFullYear()\n}\n\nfunction getDiff (date: Date, comparing: Date | string, unit?: string) {\n const d = new Date(date)\n const c = new Date(comparing)\n\n if (unit === 'month') {\n return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12\n }\n\n return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24))\n}\n\nfunction setYear (date: Date, year: number) {\n const d = new Date(date)\n d.setFullYear(year)\n return d\n}\n\nexport default class VuetifyDateAdapter implements DateAdapter<Date> {\n constructor (public locale: string = 'en') {}\n\n date (value?: any) {\n return date(value)\n }\n\n addDays (date: Date, amount: number) {\n return addDays(date, amount)\n }\n\n addMonths (date: Date, amount: number) {\n return addMonths(date, amount)\n }\n\n getWeekArray (date: Date) {\n return getWeekArray(date)\n }\n\n startOfMonth (date: Date) {\n return startOfMonth(date)\n }\n\n endOfMonth (date: Date) {\n return endOfMonth(date)\n }\n\n format (date: Date, formatString: string) {\n return format(date, formatString, this.locale)\n }\n\n isEqual (date: Date, comparing: Date) {\n return isEqual(date, comparing)\n }\n\n isValid (date: any) {\n return isValid(date)\n }\n\n isWithinRange (date: Date, range: [Date, Date]) {\n return isWithinRange(date, range)\n }\n\n isAfter (date: Date, comparing: Date) {\n return isAfter(date, comparing)\n }\n\n isSameDay (date: Date, comparing: Date) {\n return isSameDay(date, comparing)\n }\n\n isSameMonth (date: Date, comparing: Date) {\n return isSameMonth(date, comparing)\n }\n\n setYear (date: Date, year: number) {\n return setYear(date, year)\n }\n\n getDiff (date: Date, comparing: Date | string, unit?: string) {\n return getDiff(date, comparing, unit)\n }\n\n getWeek (date: Date) {\n return getWeek(date)\n }\n\n getWeekdays () {\n return getWeekdays(this.locale)\n }\n\n getYear (date: Date) {\n return getYear(date)\n }\n\n getMonth (date: Date) {\n return getMonth(date)\n }\n\n startOfYear (date: Date) {\n return startOfYear(date)\n }\n\n endOfYear (date: Date) {\n return endOfYear(date)\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,WAAW,6BAEpB;AAGA,SAASC,YAAYA,CAAEC,IAAU,EAAE;EACjC,IAAIC,WAAW,GAAG,EAAE;EACpB,MAAMC,KAAK,GAAG,EAAE;EAChB,MAAMC,eAAe,GAAGC,YAAY,CAACJ,IAAI,CAAC;EAC1C,MAAMK,cAAc,GAAGC,UAAU,CAACN,IAAI,CAAC;EAEvC,KAAK,IAAIO,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,eAAe,CAACK,MAAM,EAAE,EAAED,CAAC,EAAE,EAAE;IACjDN,WAAW,CAACQ,IAAI,CAAC,IAAI,CAAC;EACxB;EAEA,KAAK,IAAIF,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIF,cAAc,CAACK,OAAO,EAAE,EAAEH,CAAC,EAAE,EAAE;IAClD,MAAMI,GAAG,GAAG,IAAIC,IAAI,CAACZ,IAAI,CAACa,WAAW,EAAE,EAAEb,IAAI,CAACc,QAAQ,EAAE,EAAEP,CAAC,C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AEAmM,SAASA,CAAEnM,IAAU,EAAE;IACrB,OAAOmM,SAAS,CAACnM,IAAI,CAAC;EACxB;AACF"}
|
|
@@ -83,6 +83,39 @@ type DefaultsInstance = undefined | {
|
|
|
83
83
|
};
|
|
84
84
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
85
85
|
|
|
86
|
+
interface DateAdapter<Date> {
|
|
87
|
+
date(value?: any): Date | null;
|
|
88
|
+
format(date: Date, formatString: string): string;
|
|
89
|
+
startOfMonth(date: Date): Date;
|
|
90
|
+
endOfMonth(date: Date): Date;
|
|
91
|
+
startOfYear(date: Date): Date;
|
|
92
|
+
endOfYear(date: Date): Date;
|
|
93
|
+
isAfter(date: Date, comparing: Date): boolean;
|
|
94
|
+
isEqual(date: Date, comparing: Date): boolean;
|
|
95
|
+
isSameDay(date: Date, comparing: Date): boolean;
|
|
96
|
+
isSameMonth(date: Date, comparing: Date): boolean;
|
|
97
|
+
isValid(date: any): boolean;
|
|
98
|
+
isWithinRange(date: Date, range: [Date, Date]): boolean;
|
|
99
|
+
addDays(date: Date, amount: number): Date;
|
|
100
|
+
addMonths(date: Date, amount: number): Date;
|
|
101
|
+
getYear(date: Date): number;
|
|
102
|
+
setYear(date: Date, year: number): Date;
|
|
103
|
+
getDiff(date: Date, comparing: Date | string, unit?: string): number;
|
|
104
|
+
getWeek(date: Date): number;
|
|
105
|
+
getWeekArray(date: Date): (Date | null)[][];
|
|
106
|
+
getWeekdays(): string[];
|
|
107
|
+
getMonth(date: Date): number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface DateInstance extends DateAdapter<Date> {
|
|
111
|
+
locale: string;
|
|
112
|
+
}
|
|
113
|
+
type DateOptions = {
|
|
114
|
+
adapter: {
|
|
115
|
+
new (locale: string): DateInstance;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
86
119
|
type IconValue = string | JSXComponent;
|
|
87
120
|
declare const IconValue: PropType<IconValue>;
|
|
88
121
|
interface IconAliases {
|
|
@@ -141,6 +174,7 @@ interface VuetifyOptions {
|
|
|
141
174
|
aliases?: Record<string, any>;
|
|
142
175
|
blueprint?: Blueprint;
|
|
143
176
|
components?: Record<string, any>;
|
|
177
|
+
date?: DateOptions;
|
|
144
178
|
directives?: Record<string, any>;
|
|
145
179
|
defaults?: DefaultsOptions;
|
|
146
180
|
display?: DisplayOptions;
|
package/lib/blueprints/md1.d.ts
CHANGED
|
@@ -83,6 +83,39 @@ type DefaultsInstance = undefined | {
|
|
|
83
83
|
};
|
|
84
84
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
85
85
|
|
|
86
|
+
interface DateAdapter<Date> {
|
|
87
|
+
date(value?: any): Date | null;
|
|
88
|
+
format(date: Date, formatString: string): string;
|
|
89
|
+
startOfMonth(date: Date): Date;
|
|
90
|
+
endOfMonth(date: Date): Date;
|
|
91
|
+
startOfYear(date: Date): Date;
|
|
92
|
+
endOfYear(date: Date): Date;
|
|
93
|
+
isAfter(date: Date, comparing: Date): boolean;
|
|
94
|
+
isEqual(date: Date, comparing: Date): boolean;
|
|
95
|
+
isSameDay(date: Date, comparing: Date): boolean;
|
|
96
|
+
isSameMonth(date: Date, comparing: Date): boolean;
|
|
97
|
+
isValid(date: any): boolean;
|
|
98
|
+
isWithinRange(date: Date, range: [Date, Date]): boolean;
|
|
99
|
+
addDays(date: Date, amount: number): Date;
|
|
100
|
+
addMonths(date: Date, amount: number): Date;
|
|
101
|
+
getYear(date: Date): number;
|
|
102
|
+
setYear(date: Date, year: number): Date;
|
|
103
|
+
getDiff(date: Date, comparing: Date | string, unit?: string): number;
|
|
104
|
+
getWeek(date: Date): number;
|
|
105
|
+
getWeekArray(date: Date): (Date | null)[][];
|
|
106
|
+
getWeekdays(): string[];
|
|
107
|
+
getMonth(date: Date): number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface DateInstance extends DateAdapter<Date> {
|
|
111
|
+
locale: string;
|
|
112
|
+
}
|
|
113
|
+
type DateOptions = {
|
|
114
|
+
adapter: {
|
|
115
|
+
new (locale: string): DateInstance;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
86
119
|
type IconValue = string | JSXComponent;
|
|
87
120
|
declare const IconValue: PropType<IconValue>;
|
|
88
121
|
interface IconAliases {
|
|
@@ -141,6 +174,7 @@ interface VuetifyOptions {
|
|
|
141
174
|
aliases?: Record<string, any>;
|
|
142
175
|
blueprint?: Blueprint;
|
|
143
176
|
components?: Record<string, any>;
|
|
177
|
+
date?: DateOptions;
|
|
144
178
|
directives?: Record<string, any>;
|
|
145
179
|
defaults?: DefaultsOptions;
|
|
146
180
|
display?: DisplayOptions;
|
package/lib/blueprints/md2.d.ts
CHANGED
|
@@ -83,6 +83,39 @@ type DefaultsInstance = undefined | {
|
|
|
83
83
|
};
|
|
84
84
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
85
85
|
|
|
86
|
+
interface DateAdapter<Date> {
|
|
87
|
+
date(value?: any): Date | null;
|
|
88
|
+
format(date: Date, formatString: string): string;
|
|
89
|
+
startOfMonth(date: Date): Date;
|
|
90
|
+
endOfMonth(date: Date): Date;
|
|
91
|
+
startOfYear(date: Date): Date;
|
|
92
|
+
endOfYear(date: Date): Date;
|
|
93
|
+
isAfter(date: Date, comparing: Date): boolean;
|
|
94
|
+
isEqual(date: Date, comparing: Date): boolean;
|
|
95
|
+
isSameDay(date: Date, comparing: Date): boolean;
|
|
96
|
+
isSameMonth(date: Date, comparing: Date): boolean;
|
|
97
|
+
isValid(date: any): boolean;
|
|
98
|
+
isWithinRange(date: Date, range: [Date, Date]): boolean;
|
|
99
|
+
addDays(date: Date, amount: number): Date;
|
|
100
|
+
addMonths(date: Date, amount: number): Date;
|
|
101
|
+
getYear(date: Date): number;
|
|
102
|
+
setYear(date: Date, year: number): Date;
|
|
103
|
+
getDiff(date: Date, comparing: Date | string, unit?: string): number;
|
|
104
|
+
getWeek(date: Date): number;
|
|
105
|
+
getWeekArray(date: Date): (Date | null)[][];
|
|
106
|
+
getWeekdays(): string[];
|
|
107
|
+
getMonth(date: Date): number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface DateInstance extends DateAdapter<Date> {
|
|
111
|
+
locale: string;
|
|
112
|
+
}
|
|
113
|
+
type DateOptions = {
|
|
114
|
+
adapter: {
|
|
115
|
+
new (locale: string): DateInstance;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
86
119
|
type IconValue = string | JSXComponent;
|
|
87
120
|
declare const IconValue: PropType<IconValue>;
|
|
88
121
|
interface IconAliases {
|
|
@@ -141,6 +174,7 @@ interface VuetifyOptions {
|
|
|
141
174
|
aliases?: Record<string, any>;
|
|
142
175
|
blueprint?: Blueprint;
|
|
143
176
|
components?: Record<string, any>;
|
|
177
|
+
date?: DateOptions;
|
|
144
178
|
directives?: Record<string, any>;
|
|
145
179
|
defaults?: DefaultsOptions;
|
|
146
180
|
display?: DisplayOptions;
|
package/lib/blueprints/md3.d.ts
CHANGED
|
@@ -83,6 +83,39 @@ type DefaultsInstance = undefined | {
|
|
|
83
83
|
};
|
|
84
84
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
85
85
|
|
|
86
|
+
interface DateAdapter<Date> {
|
|
87
|
+
date(value?: any): Date | null;
|
|
88
|
+
format(date: Date, formatString: string): string;
|
|
89
|
+
startOfMonth(date: Date): Date;
|
|
90
|
+
endOfMonth(date: Date): Date;
|
|
91
|
+
startOfYear(date: Date): Date;
|
|
92
|
+
endOfYear(date: Date): Date;
|
|
93
|
+
isAfter(date: Date, comparing: Date): boolean;
|
|
94
|
+
isEqual(date: Date, comparing: Date): boolean;
|
|
95
|
+
isSameDay(date: Date, comparing: Date): boolean;
|
|
96
|
+
isSameMonth(date: Date, comparing: Date): boolean;
|
|
97
|
+
isValid(date: any): boolean;
|
|
98
|
+
isWithinRange(date: Date, range: [Date, Date]): boolean;
|
|
99
|
+
addDays(date: Date, amount: number): Date;
|
|
100
|
+
addMonths(date: Date, amount: number): Date;
|
|
101
|
+
getYear(date: Date): number;
|
|
102
|
+
setYear(date: Date, year: number): Date;
|
|
103
|
+
getDiff(date: Date, comparing: Date | string, unit?: string): number;
|
|
104
|
+
getWeek(date: Date): number;
|
|
105
|
+
getWeekArray(date: Date): (Date | null)[][];
|
|
106
|
+
getWeekdays(): string[];
|
|
107
|
+
getMonth(date: Date): number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface DateInstance extends DateAdapter<Date> {
|
|
111
|
+
locale: string;
|
|
112
|
+
}
|
|
113
|
+
type DateOptions = {
|
|
114
|
+
adapter: {
|
|
115
|
+
new (locale: string): DateInstance;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
|
|
86
119
|
type IconValue = string | JSXComponent;
|
|
87
120
|
declare const IconValue: PropType<IconValue>;
|
|
88
121
|
interface IconAliases {
|
|
@@ -141,6 +174,7 @@ interface VuetifyOptions {
|
|
|
141
174
|
aliases?: Record<string, any>;
|
|
142
175
|
blueprint?: Blueprint;
|
|
143
176
|
components?: Record<string, any>;
|
|
177
|
+
date?: DateOptions;
|
|
144
178
|
directives?: Record<string, any>;
|
|
145
179
|
defaults?: DefaultsOptions;
|
|
146
180
|
display?: DisplayOptions;
|