@vuetify/nightly 3.8.7-master.2025-05-27 → 3.8.7-master.2025-05-31
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 +13 -3
- package/dist/json/attributes.json +2816 -2792
- package/dist/json/importMap-labs.json +26 -26
- package/dist/json/importMap.json +156 -156
- package/dist/json/tags.json +6 -0
- package/dist/json/web-types.json +5254 -5200
- package/dist/vuetify-labs.cjs +85 -24
- package/dist/vuetify-labs.css +3367 -3367
- package/dist/vuetify-labs.d.ts +89 -55
- package/dist/vuetify-labs.esm.js +85 -24
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +85 -24
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +83 -18
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3390 -3390
- package/dist/vuetify.d.ts +79 -55
- package/dist/vuetify.esm.js +83 -18
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +83 -18
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +25 -16
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.d.ts +20 -0
- package/lib/components/VDatePicker/VDatePicker.js +39 -2
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js +1 -8
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonths.d.ts +10 -0
- package/lib/components/VDatePicker/VDatePickerMonths.js +12 -2
- package/lib/components/VDatePicker/VDatePickerMonths.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.d.ts +10 -0
- package/lib/components/VDatePicker/VDatePickerYears.js +14 -2
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/composables/date/date.d.ts +4 -0
- package/lib/composables/date/date.js +14 -1
- package/lib/composables/date/date.js.map +1 -1
- package/lib/entry-bundler.d.ts +3 -0
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +59 -55
- package/lib/framework.js +1 -1
- package/lib/labs/VDateInput/VDateInput.d.ts +20 -0
- package/lib/labs/VDateInput/VDateInput.js +3 -7
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/lib/labs/entry-bundler.d.ts +3 -0
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VDatePickerYears.js","names":["VBtn","useDate","useProxiedModel","computed","nextTick","onMounted","watchEffect","convertToUnit","createRange","genericComponent","propsFactory","templateRef","useRender","makeVDatePickerYearsProps","color","String","height","Number","min","max","modelValue","VDatePickerYears","name","props","emits","year","setup","_ref","emit","slots","adapter","model","years","getYear","date","startOfYear","setYear","map","i","text","format","value","yearRef","el","scrollIntoView","block","_createElementVNode","_normalizeStyle","btnProps","ref","undefined","active","rounded","variant","onClick","_createVNode","_mergeProps"],"sources":["../../../src/components/VDatePicker/VDatePickerYears.tsx"],"sourcesContent":["// Styles\nimport './VDatePickerYears.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, watchEffect } from 'vue'\nimport { convertToUnit, createRange, genericComponent, propsFactory, templateRef, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport type VDatePickerYearsSlots = {\n year: {\n year: {\n text: string\n value: number\n }\n i: number\n props: {\n active: boolean\n color?: string\n rounded: boolean\n text: string\n variant: 'flat' | 'text'\n onClick: () => void\n }\n }\n}\n\nexport const makeVDatePickerYearsProps = propsFactory({\n color: String,\n height: [String, Number],\n min: null as any as PropType<unknown>,\n max: null as any as PropType<unknown>,\n modelValue: Number,\n}, 'VDatePickerYears')\n\nexport const VDatePickerYears = genericComponent<VDatePickerYearsSlots>()({\n name: 'VDatePickerYears',\n\n props: makeVDatePickerYearsProps(),\n\n emits: {\n 'update:modelValue': (year: number) => true,\n },\n\n setup (props, { emit, slots }) {\n const adapter = useDate()\n const model = useProxiedModel(props, 'modelValue')\n const years = computed(() => {\n const year = adapter.getYear(adapter.date())\n\n let min = year - 100\n let max = year + 52\n\n if (props.min) {\n min = adapter.getYear(adapter.date(props.min))\n }\n\n if (props.max) {\n max = adapter.getYear(adapter.date(props.max))\n }\n\n let date = adapter.startOfYear(adapter.date())\n\n date = adapter.setYear(date, min)\n\n return createRange(max - min + 1, min).map(i => {\n const text = adapter.format(date, 'year')\n date = adapter.setYear(date, adapter.getYear(date) + 1)\n\n return {\n text,\n value: i,\n }\n })\n })\n\n watchEffect(() => {\n model.value = model.value ?? adapter.getYear(adapter.date())\n })\n\n const yearRef = templateRef()\n\n onMounted(async () => {\n await nextTick()\n yearRef.el?.scrollIntoView({ block: 'center' })\n })\n\n useRender(() => (\n <div\n class=\"v-date-picker-years\"\n style={{\n height: convertToUnit(props.height),\n }}\n >\n <div class=\"v-date-picker-years__content\">\n { years.value.map((year, i) => {\n const btnProps = {\n ref: model.value === year.value ? yearRef : undefined,\n active: model.value === year.value,\n color: model.value === year.value ? props.color : undefined,\n rounded: true,\n text: year.text,\n variant: model.value === year.value ? 'flat' : 'text',\n onClick: () => {\n if (model.value === year.value) {\n emit('update:modelValue', model.value)\n return\n }\n model.value = year.value\n },\n } as const\n\n return slots.year?.({\n year,\n i,\n props: btnProps,\n }) ?? (\n <VBtn\n key=\"month\"\n { ...btnProps }\n />\n )\n })}\n </div>\n </div>\n ))\n\n return {}\n },\n})\n\nexport type VDatePickerYears = InstanceType<typeof VDatePickerYears>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI,4BAEb;AAAA,SACSC,OAAO;AAAA,SACPC,eAAe,6CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACvDC,aAAa,EAAEC,WAAW,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,WAAW,EAAEC,SAAS,+BAE3F;AAGA;AAmBA,OAAO,MAAMC,yBAAyB,GAAGH,YAAY,CAAC;EACpDI,KAAK,EAAEC,MAAM;EACbC,MAAM,EAAE,CAACD,MAAM,EAAEE,MAAM,CAAC;EACxBC,GAAG,EAAE,IAAgC;EACrCC,GAAG,EAAE,IAAgC;EACrCC,UAAU,EAAEH;
|
1
|
+
{"version":3,"file":"VDatePickerYears.js","names":["VBtn","useDate","useProxiedModel","computed","nextTick","onMounted","watchEffect","convertToUnit","createRange","genericComponent","propsFactory","templateRef","useRender","makeVDatePickerYearsProps","color","String","height","Number","min","max","modelValue","allowedYears","Array","Function","VDatePickerYears","name","props","emits","year","setup","_ref","emit","slots","adapter","model","years","getYear","date","startOfYear","setYear","map","i","text","format","value","isDisabled","isYearAllowed","yearRef","el","scrollIntoView","block","isArray","length","includes","_createElementVNode","_normalizeStyle","btnProps","ref","undefined","active","rounded","disabled","variant","onClick","_createVNode","_mergeProps"],"sources":["../../../src/components/VDatePicker/VDatePickerYears.tsx"],"sourcesContent":["// Styles\nimport './VDatePickerYears.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, watchEffect } from 'vue'\nimport { convertToUnit, createRange, genericComponent, propsFactory, templateRef, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport type VDatePickerYearsSlots = {\n year: {\n year: {\n text: string\n value: number\n }\n i: number\n props: {\n active: boolean\n color?: string\n rounded: boolean\n text: string\n variant: 'flat' | 'text'\n onClick: () => void\n }\n }\n}\n\nexport const makeVDatePickerYearsProps = propsFactory({\n color: String,\n height: [String, Number],\n min: null as any as PropType<unknown>,\n max: null as any as PropType<unknown>,\n modelValue: Number,\n allowedYears: [Array, Function] as PropType<number[] | ((date: number) => boolean)>,\n}, 'VDatePickerYears')\n\nexport const VDatePickerYears = genericComponent<VDatePickerYearsSlots>()({\n name: 'VDatePickerYears',\n\n props: makeVDatePickerYearsProps(),\n\n emits: {\n 'update:modelValue': (year: number) => true,\n },\n\n setup (props, { emit, slots }) {\n const adapter = useDate()\n const model = useProxiedModel(props, 'modelValue')\n const years = computed(() => {\n const year = adapter.getYear(adapter.date())\n\n let min = year - 100\n let max = year + 52\n\n if (props.min) {\n min = adapter.getYear(adapter.date(props.min))\n }\n\n if (props.max) {\n max = adapter.getYear(adapter.date(props.max))\n }\n\n let date = adapter.startOfYear(adapter.date())\n\n date = adapter.setYear(date, min)\n\n return createRange(max - min + 1, min).map(i => {\n const text = adapter.format(date, 'year')\n date = adapter.setYear(date, adapter.getYear(date) + 1)\n\n return {\n text,\n value: i,\n isDisabled: !isYearAllowed(i),\n }\n })\n })\n\n watchEffect(() => {\n model.value = model.value ?? adapter.getYear(adapter.date())\n })\n\n const yearRef = templateRef()\n\n onMounted(async () => {\n await nextTick()\n yearRef.el?.scrollIntoView({ block: 'center' })\n })\n\n function isYearAllowed (year: number) {\n if (Array.isArray(props.allowedYears) && props.allowedYears.length) {\n return props.allowedYears.includes(year)\n }\n\n if (typeof props.allowedYears === 'function') {\n return props.allowedYears(year)\n }\n\n return true\n }\n\n useRender(() => (\n <div\n class=\"v-date-picker-years\"\n style={{\n height: convertToUnit(props.height),\n }}\n >\n <div class=\"v-date-picker-years__content\">\n { years.value.map((year, i) => {\n const btnProps = {\n ref: model.value === year.value ? yearRef : undefined,\n active: model.value === year.value,\n color: model.value === year.value ? props.color : undefined,\n rounded: true,\n text: year.text,\n disabled: year.isDisabled,\n variant: model.value === year.value ? 'flat' : 'text',\n onClick: () => {\n if (model.value === year.value) {\n emit('update:modelValue', model.value)\n return\n }\n model.value = year.value\n },\n } as const\n\n return slots.year?.({\n year,\n i,\n props: btnProps,\n }) ?? (\n <VBtn\n key=\"month\"\n { ...btnProps }\n />\n )\n })}\n </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AAI,CAACgB,KAAK,EAAE;YAC9Bb,IAAI,CAAC,mBAAmB,EAAEG,KAAK,CAACU,KAAK,CAAC;YACtC;UACF;UACAV,KAAK,CAACU,KAAK,GAAGhB,IAAI,CAACgB,KAAK;QAC1B;MACF,CAAU;MAEV,OAAOZ,KAAK,CAACJ,IAAI,GAAG;QAClBA,IAAI;QACJa,CAAC;QACDf,KAAK,EAAE8B;MACT,CAAC,CAAC,IAAAQ,YAAA,CAAAhE,IAAA,EAAAiE,WAAA;QAAA;MAAA,GAGOT,QAAQ,QAEhB;IACH,CAAC,CAAC,IAGP,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -3,6 +3,7 @@ import type { DateAdapter } from './DateAdapter.js';
|
|
3
3
|
import type { LocaleInstance } from "../locale.js";
|
4
4
|
export interface DateInstance extends DateModule.InternalAdapter {
|
5
5
|
locale?: any;
|
6
|
+
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
6
7
|
}
|
7
8
|
/** Supports module augmentation to specify date adapter types */
|
8
9
|
export declare namespace DateModule {
|
@@ -26,6 +27,7 @@ export declare function createDate(options: DateOptions | undefined, locale: Loc
|
|
26
27
|
options: InternalDateOptions;
|
27
28
|
instance: {
|
28
29
|
locale?: any;
|
30
|
+
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
29
31
|
date: (value?: any) => unknown;
|
30
32
|
format: (date: unknown, formatString: string) => string;
|
31
33
|
toJsDate: (value: unknown) => Date;
|
@@ -69,6 +71,8 @@ export declare function createDate(options: DateOptions | undefined, locale: Loc
|
|
69
71
|
setHours: (date: unknown, hours: number) => unknown;
|
70
72
|
getMinutes: (date: unknown) => number;
|
71
73
|
setMinutes: (date: unknown, minutes: number) => unknown;
|
74
|
+
} & {
|
75
|
+
createDateRange(start: unknown, stop?: unknown): unknown[];
|
72
76
|
};
|
73
77
|
};
|
74
78
|
export declare function useDate(): DateInstance;
|
@@ -70,7 +70,20 @@ function createInstance(options, locale) {
|
|
70
70
|
watch(locale.current, value => {
|
71
71
|
instance.locale = options.locale[value] ?? value ?? instance.locale;
|
72
72
|
});
|
73
|
-
return instance
|
73
|
+
return Object.assign(instance, {
|
74
|
+
createDateRange(start, stop) {
|
75
|
+
const diff = instance.getDiff(stop ?? start, start, 'days');
|
76
|
+
const datesInRange = [start];
|
77
|
+
for (let i = 1; i < diff; i++) {
|
78
|
+
const nextDate = instance.addDays(start, i);
|
79
|
+
datesInRange.push(nextDate);
|
80
|
+
}
|
81
|
+
if (stop) {
|
82
|
+
datesInRange.push(instance.endOfDay(stop));
|
83
|
+
}
|
84
|
+
return datesInRange;
|
85
|
+
}
|
86
|
+
});
|
74
87
|
}
|
75
88
|
export function useDate() {
|
76
89
|
const options = inject(DateOptionsSymbol);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"date.js","names":["useLocale","inject","reactive","watch","mergeDeep","VuetifyDateAdapter","DateModule","DateOptionsSymbol","Symbol","for","DateAdapterSymbol","createDate","options","locale","_options","adapter","af","bg","ca","ckb","cs","de","el","en","et","fa","fi","hr","hu","he","id","it","ja","ko","lv","lt","nl","no","pl","pt","ro","ru","sk","sl","srCyrl","srLatn","sv","th","tr","az","uk","vi","zhHans","zhHant","instance","createInstance","current","value","formats","useDate","Error"],"sources":["../../../src/composables/date/date.ts"],"sourcesContent":["// Composables\nimport { useLocale } from '@/composables/locale'\n\n// Utilities\nimport { inject, reactive, watch } from 'vue'\nimport { mergeDeep } from '@/util'\n\n// Types\nimport type { InjectionKey } from 'vue'\nimport type { DateAdapter } from './DateAdapter'\nimport type { LocaleInstance } from '@/composables/locale'\n\n// Adapters\nimport { VuetifyDateAdapter } from './adapters/vuetify'\n\nexport interface DateInstance extends DateModule.InternalAdapter {\n locale?: any\n}\n\n/** Supports module augmentation to specify date adapter types */\nexport namespace DateModule {\n interface Adapter {}\n\n export type InternalAdapter = {} extends Adapter ? DateAdapter : Adapter\n}\n\nexport type InternalDateOptions = {\n adapter: (new (options: { locale: any, formats?: any }) => DateInstance) | DateInstance\n formats?: Record<string, any>\n locale: Record<string, any>\n}\n\nexport type DateOptions = Partial<InternalDateOptions>\n\nexport const DateOptionsSymbol: InjectionKey<InternalDateOptions> = Symbol.for('vuetify:date-options')\nexport const DateAdapterSymbol: InjectionKey<DateInstance> = Symbol.for('vuetify:date-adapter')\n\nexport function createDate (options: DateOptions | undefined, locale: LocaleInstance) {\n const _options = mergeDeep({\n adapter: VuetifyDateAdapter,\n locale: {\n af: 'af-ZA',\n // ar: '', # not the same value for all variants\n bg: 'bg-BG',\n ca: 'ca-ES',\n ckb: '',\n cs: 'cs-CZ',\n de: 'de-DE',\n el: 'el-GR',\n en: 'en-US',\n // es: '', # not the same value for all variants\n et: 'et-EE',\n fa: 'fa-IR',\n fi: 'fi-FI',\n // fr: '', #not the same value for all variants\n hr: 'hr-HR',\n hu: 'hu-HU',\n he: 'he-IL',\n id: 'id-ID',\n it: 'it-IT',\n ja: 'ja-JP',\n ko: 'ko-KR',\n lv: 'lv-LV',\n lt: 'lt-LT',\n nl: 'nl-NL',\n no: 'no-NO',\n pl: 'pl-PL',\n pt: 'pt-PT',\n ro: 'ro-RO',\n ru: 'ru-RU',\n sk: 'sk-SK',\n sl: 'sl-SI',\n srCyrl: 'sr-SP',\n srLatn: 'sr-SP',\n sv: 'sv-SE',\n th: 'th-TH',\n tr: 'tr-TR',\n az: 'az-AZ',\n uk: 'uk-UA',\n vi: 'vi-VN',\n zhHans: 'zh-CN',\n zhHant: 'zh-TW',\n },\n }, options) as InternalDateOptions\n\n return {\n options: _options,\n instance: createInstance(_options, locale),\n }\n}\n\nfunction createInstance (options: InternalDateOptions, locale: LocaleInstance) {\n const instance = reactive(\n typeof options.adapter === 'function'\n // eslint-disable-next-line new-cap\n ? new options.adapter({\n locale: options.locale[locale.current.value] ?? locale.current.value,\n formats: options.formats,\n })\n : options.adapter\n )\n\n watch(locale.current, value => {\n instance.locale = options.locale[value] ?? value ?? instance.locale\n })\n\n return instance\n}\n\nexport function useDate (): DateInstance {\n const options = inject(DateOptionsSymbol)\n\n if (!options) throw new Error('[Vuetify] Could not find injected date options')\n\n const locale = useLocale()\n\n return createInstance(options, locale)\n}\n"],"mappings":"AAAA;AAAA,SACSA,SAAS,wBAElB;AACA,SAASC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACpCC,SAAS,+BAElB;AAKA;AAAA,SACSC,kBAAkB;
|
1
|
+
{"version":3,"file":"date.js","names":["useLocale","inject","reactive","watch","mergeDeep","VuetifyDateAdapter","DateModule","DateOptionsSymbol","Symbol","for","DateAdapterSymbol","createDate","options","locale","_options","adapter","af","bg","ca","ckb","cs","de","el","en","et","fa","fi","hr","hu","he","id","it","ja","ko","lv","lt","nl","no","pl","pt","ro","ru","sk","sl","srCyrl","srLatn","sv","th","tr","az","uk","vi","zhHans","zhHant","instance","createInstance","current","value","formats","Object","assign","createDateRange","start","stop","diff","getDiff","datesInRange","i","nextDate","addDays","push","endOfDay","useDate","Error"],"sources":["../../../src/composables/date/date.ts"],"sourcesContent":["// Composables\nimport { useLocale } from '@/composables/locale'\n\n// Utilities\nimport { inject, reactive, watch } from 'vue'\nimport { mergeDeep } from '@/util'\n\n// Types\nimport type { InjectionKey } from 'vue'\nimport type { DateAdapter } from './DateAdapter'\nimport type { LocaleInstance } from '@/composables/locale'\n\n// Adapters\nimport { VuetifyDateAdapter } from './adapters/vuetify'\n\nexport interface DateInstance extends DateModule.InternalAdapter {\n locale?: any\n createDateRange: (start: unknown, stop?: unknown) => unknown[]\n}\n\n/** Supports module augmentation to specify date adapter types */\nexport namespace DateModule {\n interface Adapter {}\n\n export type InternalAdapter = {} extends Adapter ? DateAdapter : Adapter\n}\n\nexport type InternalDateOptions = {\n adapter: (new (options: { locale: any, formats?: any }) => DateInstance) | DateInstance\n formats?: Record<string, any>\n locale: Record<string, any>\n}\n\nexport type DateOptions = Partial<InternalDateOptions>\n\nexport const DateOptionsSymbol: InjectionKey<InternalDateOptions> = Symbol.for('vuetify:date-options')\nexport const DateAdapterSymbol: InjectionKey<DateInstance> = Symbol.for('vuetify:date-adapter')\n\nexport function createDate (options: DateOptions | undefined, locale: LocaleInstance) {\n const _options = mergeDeep({\n adapter: VuetifyDateAdapter,\n locale: {\n af: 'af-ZA',\n // ar: '', # not the same value for all variants\n bg: 'bg-BG',\n ca: 'ca-ES',\n ckb: '',\n cs: 'cs-CZ',\n de: 'de-DE',\n el: 'el-GR',\n en: 'en-US',\n // es: '', # not the same value for all variants\n et: 'et-EE',\n fa: 'fa-IR',\n fi: 'fi-FI',\n // fr: '', #not the same value for all variants\n hr: 'hr-HR',\n hu: 'hu-HU',\n he: 'he-IL',\n id: 'id-ID',\n it: 'it-IT',\n ja: 'ja-JP',\n ko: 'ko-KR',\n lv: 'lv-LV',\n lt: 'lt-LT',\n nl: 'nl-NL',\n no: 'no-NO',\n pl: 'pl-PL',\n pt: 'pt-PT',\n ro: 'ro-RO',\n ru: 'ru-RU',\n sk: 'sk-SK',\n sl: 'sl-SI',\n srCyrl: 'sr-SP',\n srLatn: 'sr-SP',\n sv: 'sv-SE',\n th: 'th-TH',\n tr: 'tr-TR',\n az: 'az-AZ',\n uk: 'uk-UA',\n vi: 'vi-VN',\n zhHans: 'zh-CN',\n zhHant: 'zh-TW',\n },\n }, options) as InternalDateOptions\n\n return {\n options: _options,\n instance: createInstance(_options, locale),\n }\n}\n\nfunction createInstance (options: InternalDateOptions, locale: LocaleInstance) {\n const instance = reactive(\n typeof options.adapter === 'function'\n // eslint-disable-next-line new-cap\n ? new options.adapter({\n locale: options.locale[locale.current.value] ?? locale.current.value,\n formats: options.formats,\n })\n : options.adapter\n )\n\n watch(locale.current, value => {\n instance.locale = options.locale[value] ?? value ?? instance.locale\n })\n\n return Object.assign(instance, {\n createDateRange (start: unknown, stop?: unknown) {\n const diff = instance.getDiff(stop ?? start, start, 'days')\n const datesInRange = [start]\n\n for (let i = 1; i < diff; i++) {\n const nextDate = instance.addDays(start, i)\n datesInRange.push(nextDate)\n }\n\n if (stop) {\n datesInRange.push(instance.endOfDay(stop))\n }\n\n return datesInRange\n },\n })\n}\n\nexport function useDate (): DateInstance {\n const options = inject(DateOptionsSymbol)\n\n if (!options) throw new Error('[Vuetify] Could not find injected date options')\n\n const locale = useLocale()\n\n return createInstance(options, locale)\n}\n"],"mappings":"AAAA;AAAA,SACSA,SAAS,wBAElB;AACA,SAASC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACpCC,SAAS,+BAElB;AAKA;AAAA,SACSC,kBAAkB;AAO3B;AAAA,WACiBC,UAAU;AAc3B,OAAO,MAAMC,iBAAoD,GAAGC,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AACtG,OAAO,MAAMC,iBAA6C,GAAGF,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AAE/F,OAAO,SAASE,UAAUA,CAAEC,OAAgC,EAAEC,MAAsB,EAAE;EACpF,MAAMC,QAAQ,GAAGV,SAAS,CAAC;IACzBW,OAAO,EAAEV,kBAAkB;IAC3BQ,MAAM,EAAE;MACNG,EAAE,EAAE,OAAO;MACX;MACAC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,GAAG,EAAE,EAAE;MACPC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACX;MACAC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACX;MACAC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO;MACXC,EAAE,EAAE,OAAO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GAAGV,QAAQ,CAACW,OAAO,CAACF,IAAI,IAAID,KAAK,EAAEA,KAAK,EAAE,MAAM,CAAC;MAC3D,MAAMI,YAAY,GAAG,CAACJ,KAAK,CAAC;MAE5B,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGH,IAAI,EAAEG,CAAC,EAAE,EAAE;QAC7B,MAAMC,QAAQ,GAAGd,QAAQ,CAACe,OAAO,CAACP,KAAK,EAAEK,CAAC,CAAC;QAC3CD,YAAY,CAACI,IAAI,CAACF,QAAQ,CAAC;MAC7B;MAEA,IAAIL,IAAI,EAAE;QACRG,YAAY,CAACI,IAAI,CAAChB,QAAQ,CAACiB,QAAQ,CAACR,IAAI,CAAC,CAAC;MAC5C;MAEA,OAAOG,YAAY;IACrB;EACF,CAAC,CAAC;AACJ;AAEA,OAAO,SAASM,OAAOA,CAAA,EAAkB;EACvC,MAAM5D,OAAO,GAAGX,MAAM,CAACM,iBAAiB,CAAC;EAEzC,IAAI,CAACK,OAAO,EAAE,MAAM,IAAI6D,KAAK,CAAC,gDAAgD,CAAC;EAE/E,MAAM5D,MAAM,GAAGb,SAAS,CAAC,CAAC;EAE1B,OAAOuD,cAAc,CAAC3C,OAAO,EAAEC,MAAM,CAAC;AACxC","ignoreList":[]}
|
package/lib/entry-bundler.d.ts
CHANGED
@@ -28,6 +28,7 @@ export declare const createVuetify: {
|
|
28
28
|
options: import("./composables/date/date.js").InternalDateOptions;
|
29
29
|
instance: {
|
30
30
|
locale?: any;
|
31
|
+
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
31
32
|
date: (value?: any) => unknown;
|
32
33
|
format: (date: unknown, formatString: string) => string;
|
33
34
|
toJsDate: (value: unknown) => Date;
|
@@ -71,6 +72,8 @@ export declare const createVuetify: {
|
|
71
72
|
setHours: (date: unknown, hours: number) => unknown;
|
72
73
|
getMinutes: (date: unknown) => number;
|
73
74
|
setMinutes: (date: unknown, minutes: number) => unknown;
|
75
|
+
} & {
|
76
|
+
createDateRange(start: unknown, stop?: unknown): unknown[];
|
74
77
|
};
|
75
78
|
};
|
76
79
|
goTo: import("./types.js").GoToInstance;
|
package/lib/entry-bundler.js
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.8.7-master.2025-05-
|
19
|
+
export const version = "3.8.7-master.2025-05-31";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
@@ -100,6 +100,7 @@ interface DateAdapter<T = unknown> {
|
|
100
100
|
|
101
101
|
interface DateInstance extends DateModule.InternalAdapter {
|
102
102
|
locale?: any;
|
103
|
+
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
103
104
|
}
|
104
105
|
/** Supports module augmentation to specify date adapter types */
|
105
106
|
declare namespace DateModule {
|
@@ -2449,6 +2450,7 @@ declare function createVuetify(vuetify?: VuetifyOptions): {
|
|
2449
2450
|
options: InternalDateOptions;
|
2450
2451
|
instance: {
|
2451
2452
|
locale?: any;
|
2453
|
+
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
2452
2454
|
date: (value?: any) => unknown;
|
2453
2455
|
format: (date: unknown, formatString: string) => string;
|
2454
2456
|
toJsDate: (value: unknown) => Date;
|
@@ -2492,6 +2494,8 @@ declare function createVuetify(vuetify?: VuetifyOptions): {
|
|
2492
2494
|
setHours: (date: unknown, hours: number) => unknown;
|
2493
2495
|
getMinutes: (date: unknown) => number;
|
2494
2496
|
setMinutes: (date: unknown, minutes: number) => unknown;
|
2497
|
+
} & {
|
2498
|
+
createDateRange(start: unknown, stop?: unknown): unknown[];
|
2495
2499
|
};
|
2496
2500
|
};
|
2497
2501
|
goTo: GoToInstance;
|
@@ -2539,80 +2543,76 @@ declare module 'vue' {
|
|
2539
2543
|
$children?: VNodeChild
|
2540
2544
|
}
|
2541
2545
|
export interface GlobalComponents {
|
2542
|
-
|
2543
|
-
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2544
|
-
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2545
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2546
|
+
VApp: typeof import('vuetify/components')['VApp']
|
2546
2547
|
VAlert: typeof import('vuetify/components')['VAlert']
|
2547
2548
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2548
|
-
VApp: typeof import('vuetify/components')['VApp']
|
2549
2549
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2550
|
-
|
2551
|
-
|
2550
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2551
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2552
2552
|
VBanner: typeof import('vuetify/components')['VBanner']
|
2553
2553
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2554
2554
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2555
|
-
|
2556
|
-
|
2557
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2558
|
-
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2555
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
2556
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
2559
2557
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
2560
2558
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
2561
2559
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
2562
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2563
2560
|
VCard: typeof import('vuetify/components')['VCard']
|
2564
2561
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
2565
2562
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
2566
2563
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
2567
2564
|
VCardText: typeof import('vuetify/components')['VCardText']
|
2568
2565
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
2566
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2569
2567
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2570
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2571
|
-
VChip: typeof import('vuetify/components')['VChip']
|
2572
2568
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2573
2569
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2574
|
-
|
2570
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2571
|
+
VChip: typeof import('vuetify/components')['VChip']
|
2572
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2573
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2575
2574
|
VCode: typeof import('vuetify/components')['VCode']
|
2576
|
-
|
2577
|
-
|
2578
|
-
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
2579
|
-
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
2580
|
-
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2581
|
-
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2582
|
-
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2583
|
-
VDivider: typeof import('vuetify/components')['VDivider']
|
2575
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2576
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2584
2577
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2585
|
-
VDialog: typeof import('vuetify/components')['VDialog']
|
2586
2578
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
2587
2579
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
2588
2580
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
2589
2581
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
2590
2582
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2591
2583
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2584
|
+
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2585
|
+
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2586
|
+
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
2587
|
+
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
2588
|
+
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2589
|
+
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2590
|
+
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2592
2591
|
VCounter: typeof import('vuetify/components')['VCounter']
|
2592
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
2593
2593
|
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2594
|
-
|
2594
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
2595
2595
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
2596
2596
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2597
2597
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2598
2598
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2599
|
+
VFab: typeof import('vuetify/components')['VFab']
|
2599
2600
|
VField: typeof import('vuetify/components')['VField']
|
2600
2601
|
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2601
|
-
VFooter: typeof import('vuetify/components')['VFooter']
|
2602
|
-
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2603
|
-
VItem: typeof import('vuetify/components')['VItem']
|
2604
2602
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2605
2603
|
VIcon: typeof import('vuetify/components')['VIcon']
|
2606
2604
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
2607
2605
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
2608
2606
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
2609
2607
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
2610
|
-
|
2608
|
+
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2609
|
+
VItem: typeof import('vuetify/components')['VItem']
|
2610
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2611
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
2611
2612
|
VInput: typeof import('vuetify/components')['VInput']
|
2613
|
+
VImg: typeof import('vuetify/components')['VImg']
|
2612
2614
|
VKbd: typeof import('vuetify/components')['VKbd']
|
2613
|
-
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2614
2615
|
VLabel: typeof import('vuetify/components')['VLabel']
|
2615
|
-
VMain: typeof import('vuetify/components')['VMain']
|
2616
2616
|
VList: typeof import('vuetify/components')['VList']
|
2617
2617
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
2618
2618
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -2623,28 +2623,28 @@ declare module 'vue' {
|
|
2623
2623
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
2624
2624
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
2625
2625
|
VMenu: typeof import('vuetify/components')['VMenu']
|
2626
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2627
2626
|
VMessages: typeof import('vuetify/components')['VMessages']
|
2628
|
-
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2629
2627
|
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2630
|
-
|
2628
|
+
VMain: typeof import('vuetify/components')['VMain']
|
2629
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2631
2630
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2631
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2632
2632
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
2633
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2633
2634
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2634
2635
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2635
|
-
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2636
2636
|
VRating: typeof import('vuetify/components')['VRating']
|
2637
|
-
VSelect: typeof import('vuetify/components')['VSelect']
|
2638
2637
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
2639
|
-
|
2638
|
+
VPagination: typeof import('vuetify/components')['VPagination']
|
2640
2639
|
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2641
2640
|
VSlider: typeof import('vuetify/components')['VSlider']
|
2641
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
2642
2642
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
2643
2643
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2644
|
-
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2645
2644
|
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2645
|
+
VSelect: typeof import('vuetify/components')['VSelect']
|
2646
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2646
2647
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2647
|
-
VTable: typeof import('vuetify/components')['VTable']
|
2648
2648
|
VStepper: typeof import('vuetify/components')['VStepper']
|
2649
2649
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
2650
2650
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
@@ -2655,32 +2655,36 @@ declare module 'vue' {
|
|
2655
2655
|
VTabs: typeof import('vuetify/components')['VTabs']
|
2656
2656
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
2657
2657
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
2658
|
-
|
2659
|
-
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2658
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2660
2659
|
VTextField: typeof import('vuetify/components')['VTextField']
|
2660
|
+
VTable: typeof import('vuetify/components')['VTable']
|
2661
2661
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2662
|
-
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2663
|
-
VWindow: typeof import('vuetify/components')['VWindow']
|
2664
|
-
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2665
2662
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2666
2663
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2667
2664
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2665
|
+
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2666
|
+
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2667
|
+
VWindow: typeof import('vuetify/components')['VWindow']
|
2668
|
+
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2669
|
+
VAppBar: typeof import('vuetify/components')['VAppBar']
|
2670
|
+
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2671
|
+
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2668
2672
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2669
|
-
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2670
2673
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
2674
|
+
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2671
2675
|
VForm: typeof import('vuetify/components')['VForm']
|
2672
2676
|
VContainer: typeof import('vuetify/components')['VContainer']
|
2673
2677
|
VCol: typeof import('vuetify/components')['VCol']
|
2674
2678
|
VRow: typeof import('vuetify/components')['VRow']
|
2675
2679
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
2676
2680
|
VHover: typeof import('vuetify/components')['VHover']
|
2677
|
-
VLazy: typeof import('vuetify/components')['VLazy']
|
2678
|
-
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2679
2681
|
VLayout: typeof import('vuetify/components')['VLayout']
|
2680
2682
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
2681
|
-
|
2683
|
+
VLazy: typeof import('vuetify/components')['VLazy']
|
2684
|
+
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2682
2685
|
VParallax: typeof import('vuetify/components')['VParallax']
|
2683
2686
|
VRadio: typeof import('vuetify/components')['VRadio']
|
2687
|
+
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
2684
2688
|
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2685
2689
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
2686
2690
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
@@ -2705,27 +2709,27 @@ declare module 'vue' {
|
|
2705
2709
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
2706
2710
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
2707
2711
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
2712
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2713
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2714
|
+
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2708
2715
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
2709
2716
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
2710
2717
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
2711
2718
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
2712
2719
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
2713
2720
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
2714
|
-
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2715
|
-
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2716
|
-
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2717
|
-
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2718
2721
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2719
2722
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2720
2723
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2721
2724
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2722
2725
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2723
|
-
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
2724
|
-
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
2725
|
-
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
2726
2726
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
2727
2727
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
2728
2728
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
2729
|
+
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
2730
|
+
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
2731
|
+
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
2732
|
+
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2729
2733
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
2730
2734
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2731
2735
|
}
|
package/lib/framework.js
CHANGED
@@ -55,6 +55,8 @@ export declare const makeVDateInputProps: <Defaults extends {
|
|
55
55
|
allowedDates?: unknown;
|
56
56
|
hideWeekdays?: unknown;
|
57
57
|
showWeek?: unknown;
|
58
|
+
allowedMonths?: unknown;
|
59
|
+
allowedYears?: unknown;
|
58
60
|
rounded?: unknown;
|
59
61
|
loading?: unknown;
|
60
62
|
appendInnerIcon?: unknown;
|
@@ -410,6 +412,14 @@ export declare const makeVDateInputProps: <Defaults extends {
|
|
410
412
|
type: PropType<unknown extends Defaults["showWeek"] ? boolean : boolean | Defaults["showWeek"]>;
|
411
413
|
default: unknown extends Defaults["showWeek"] ? boolean : boolean | Defaults["showWeek"];
|
412
414
|
};
|
415
|
+
allowedMonths: unknown extends Defaults["allowedMonths"] ? PropType<number[] | ((date: number) => boolean)> : {
|
416
|
+
type: PropType<unknown extends Defaults["allowedMonths"] ? number[] | ((date: number) => boolean) : number[] | ((date: number) => boolean) | Defaults["allowedMonths"]>;
|
417
|
+
default: unknown extends Defaults["allowedMonths"] ? number[] | ((date: number) => boolean) : NonNullable<number[] | ((date: number) => boolean)> | Defaults["allowedMonths"];
|
418
|
+
};
|
419
|
+
allowedYears: unknown extends Defaults["allowedYears"] ? PropType<number[] | ((date: number) => boolean)> : {
|
420
|
+
type: PropType<unknown extends Defaults["allowedYears"] ? number[] | ((date: number) => boolean) : number[] | ((date: number) => boolean) | Defaults["allowedYears"]>;
|
421
|
+
default: unknown extends Defaults["allowedYears"] ? number[] | ((date: number) => boolean) : NonNullable<number[] | ((date: number) => boolean)> | Defaults["allowedYears"];
|
422
|
+
};
|
413
423
|
rounded: unknown extends Defaults["rounded"] ? {
|
414
424
|
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
415
425
|
default: undefined;
|
@@ -908,6 +918,8 @@ export declare const VDateInput: {
|
|
908
918
|
modelModifiers?: Record<string, boolean> | undefined;
|
909
919
|
firstDayOfWeek?: string | number | undefined;
|
910
920
|
allowedDates?: unknown[] | ((date: unknown) => boolean) | undefined;
|
921
|
+
allowedMonths?: number[] | ((date: number) => boolean) | undefined;
|
922
|
+
allowedYears?: number[] | ((date: number) => boolean) | undefined;
|
911
923
|
inputFormat?: string | undefined;
|
912
924
|
displayFormat?: string | Function | undefined;
|
913
925
|
} & {
|
@@ -3105,6 +3117,8 @@ export declare const VDateInput: {
|
|
3105
3117
|
modelModifiers?: Record<string, boolean> | undefined;
|
3106
3118
|
firstDayOfWeek?: string | number | undefined;
|
3107
3119
|
allowedDates?: unknown[] | ((date: unknown) => boolean) | undefined;
|
3120
|
+
allowedMonths?: number[] | ((date: number) => boolean) | undefined;
|
3121
|
+
allowedYears?: number[] | ((date: number) => boolean) | undefined;
|
3108
3122
|
inputFormat?: string | undefined;
|
3109
3123
|
displayFormat?: string | Function | undefined;
|
3110
3124
|
} & {
|
@@ -5276,6 +5290,8 @@ export declare const VDateInput: {
|
|
5276
5290
|
modelModifiers?: Record<string, boolean> | undefined;
|
5277
5291
|
firstDayOfWeek?: string | number | undefined;
|
5278
5292
|
allowedDates?: unknown[] | ((date: unknown) => boolean) | undefined;
|
5293
|
+
allowedMonths?: number[] | ((date: number) => boolean) | undefined;
|
5294
|
+
allowedYears?: number[] | ((date: number) => boolean) | undefined;
|
5279
5295
|
inputFormat?: string | undefined;
|
5280
5296
|
displayFormat?: string | Function | undefined;
|
5281
5297
|
} & {
|
@@ -7460,6 +7476,8 @@ export declare const VDateInput: {
|
|
7460
7476
|
allowedDates: PropType<unknown[] | ((date: unknown) => boolean)>;
|
7461
7477
|
hideWeekdays: BooleanConstructor;
|
7462
7478
|
showWeek: BooleanConstructor;
|
7479
|
+
allowedMonths: PropType<number[] | ((date: number) => boolean)>;
|
7480
|
+
allowedYears: PropType<number[] | ((date: number) => boolean)>;
|
7463
7481
|
rounded: {
|
7464
7482
|
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
7465
7483
|
default: undefined;
|
@@ -7692,6 +7710,8 @@ export declare const VDateInput: {
|
|
7692
7710
|
allowedDates: PropType<unknown[] | ((date: unknown) => boolean)>;
|
7693
7711
|
hideWeekdays: BooleanConstructor;
|
7694
7712
|
showWeek: BooleanConstructor;
|
7713
|
+
allowedMonths: PropType<number[] | ((date: number) => boolean)>;
|
7714
|
+
allowedYears: PropType<number[] | ((date: number) => boolean)>;
|
7695
7715
|
rounded: {
|
7696
7716
|
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
7697
7717
|
default: undefined;
|
@@ -12,7 +12,7 @@ import { forwardRefs } from "../../composables/forwardRefs.js";
|
|
12
12
|
import { useLocale } from "../../composables/locale.js";
|
13
13
|
import { useProxiedModel } from "../../composables/proxiedModel.js"; // Utilities
|
14
14
|
import { computed, ref, shallowRef, watch } from 'vue';
|
15
|
-
import {
|
15
|
+
import { genericComponent, omit, propsFactory, useRender, wrapInArray } from "../../util/index.js"; // Types
|
16
16
|
// Types
|
17
17
|
export const makeVDateInputProps = propsFactory({
|
18
18
|
displayFormat: [Function, String],
|
@@ -175,18 +175,14 @@ export const VDateInput = genericComponent()({
|
|
175
175
|
const parts = value.trim().split(/\D+-\D+|[^\d\-/.]+/);
|
176
176
|
if (parts.every(isValid)) {
|
177
177
|
if (props.multiple === 'range') {
|
178
|
-
|
178
|
+
const [start, stop] = parts.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
|
179
|
+
model.value = adapter.createDateRange(start, stop);
|
179
180
|
} else {
|
180
181
|
model.value = parts.map(parseDate);
|
181
182
|
}
|
182
183
|
}
|
183
184
|
}
|
184
185
|
}
|
185
|
-
function getRange(inputDates) {
|
186
|
-
const [start, stop] = inputDates.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
|
187
|
-
const diff = adapter.getDiff(stop ?? start, start, 'days');
|
188
|
-
return [start, ...createRange(diff, 1).map(i => adapter.addDays(start, i))];
|
189
|
-
}
|
190
186
|
useRender(() => {
|
191
187
|
const confirmEditProps = VConfirmEdit.filterProps(props);
|
192
188
|
const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
|