From c209d0952862540c5c503e46c5114c6cefb2e243 Mon Sep 17 00:00:00 2001 From: Kael Date: Tue, 21 May 2024 21:57:07 +1000 Subject: [PATCH 1/7] fix(layout): find children inside suspense boundary fixes #19830 --- packages/vuetify/src/util/helpers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vuetify/src/util/helpers.ts b/packages/vuetify/src/util/helpers.ts index cfff79aa004..e9efebb2037 100644 --- a/packages/vuetify/src/util/helpers.ts +++ b/packages/vuetify/src/util/helpers.ts @@ -540,6 +540,8 @@ export function findChildrenWithProvide ( if (Array.isArray(vnode)) { return vnode.map(child => findChildrenWithProvide(key, child)).flat(1) + } else if (vnode.suspense) { + return findChildrenWithProvide(key, vnode.ssContent!) } else if (Array.isArray(vnode.children)) { return vnode.children.map(child => findChildrenWithProvide(key, child)).flat(1) } else if (vnode.component) { From ea567bbe0fd09641e8fc68762cca8aaa3e4aeef2 Mon Sep 17 00:00:00 2001 From: J-Sek Date: Tue, 21 May 2024 14:08:53 +0200 Subject: [PATCH 2/7] fix(VDivider): visiblity in container with dynamic height (#19828) fixes #19827 --- packages/vuetify/src/components/VDivider/VDivider.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vuetify/src/components/VDivider/VDivider.sass b/packages/vuetify/src/components/VDivider/VDivider.sass index e74bc95eea9..66fdbc2b36d 100644 --- a/packages/vuetify/src/components/VDivider/VDivider.sass +++ b/packages/vuetify/src/components/VDivider/VDivider.sass @@ -16,7 +16,7 @@ align-self: stretch border-width: $divider-vertical-border-width display: inline-flex - height: 100% + height: auto margin-left: $divider-vertical-margin-left max-height: 100% max-width: 0px From 905eb633d8550a96e01f5a399c8252bb62776b7c Mon Sep 17 00:00:00 2001 From: SonTT19 <49301480+SonTT19@users.noreply.github.com> Date: Tue, 21 May 2024 19:11:53 +0700 Subject: [PATCH 3/7] fix(VCalendar): use date adapter to create new date (#19823) fixes #19814 --- packages/vuetify/src/labs/VCalendar/VCalendar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vuetify/src/labs/VCalendar/VCalendar.tsx b/packages/vuetify/src/labs/VCalendar/VCalendar.tsx index 782c04ead72..d28f37919d6 100644 --- a/packages/vuetify/src/labs/VCalendar/VCalendar.tsx +++ b/packages/vuetify/src/labs/VCalendar/VCalendar.tsx @@ -71,7 +71,7 @@ export const VCalendar = genericComponent()({ } function onClickToday () { - model.value = [new Date()] + model.value = [adapter.date()] } const title = computed(() => { @@ -149,7 +149,7 @@ export const VCalendar = genericComponent()({ !props.hideWeekNumber ?
{ weekNumbers.value[wi] }
: '', week.map(day => ( adapter.isSameDay(day.date, e.start) || adapter.isSameDay(day.date, e.end)) } From 934228846a83468657429250f53e6601a4f9c4ad Mon Sep 17 00:00:00 2001 From: WebDevNerdStuff Date: Tue, 21 May 2024 05:15:20 -0700 Subject: [PATCH 4/7] fix(defaults): allow null component and global values (#19842) fixes #19783 --- packages/vuetify/src/composables/defaults.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vuetify/src/composables/defaults.ts b/packages/vuetify/src/composables/defaults.ts index 5f211f56870..701c61824b9 100644 --- a/packages/vuetify/src/composables/defaults.ts +++ b/packages/vuetify/src/composables/defaults.ts @@ -106,7 +106,9 @@ export function internalUseDefaults ( if (prop === 'class' || prop === 'style') { return [componentDefaults.value?.[prop], propValue].filter(v => v != null) } else if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) { - return componentDefaults.value?.[prop] ?? defaults.value?.global?.[prop] ?? propValue + return componentDefaults.value?.[prop] !== undefined ? componentDefaults.value?.[prop] + : defaults.value?.global?.[prop] !== undefined ? defaults.value?.global?.[prop] + : propValue } return propValue }, From 4a2de375b84851fe5cdf26d4f391f5028d0a2854 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Tue, 21 May 2024 08:18:47 -0400 Subject: [PATCH 5/7] fix(VDataTable): add missing disable-sort prop (#19820) resolves #19197 --- .../api-generator/src/locale/en/VDataTableHeader.json | 1 - .../api-generator/src/locale/en/VDataTableHeaders.json | 1 + .../api-generator/src/locale/en/VDataTableServer.json | 1 + .../api-generator/src/locale/en/VDataTableVirtual.json | 1 + .../src/components/VDataTable/VDataTableHeaders.tsx | 7 ++++--- .../src/components/VDataTable/composables/sort.ts | 9 ++++++--- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/api-generator/src/locale/en/VDataTableHeader.json b/packages/api-generator/src/locale/en/VDataTableHeader.json index 5f4ddba267f..9ac97c72528 100644 --- a/packages/api-generator/src/locale/en/VDataTableHeader.json +++ b/packages/api-generator/src/locale/en/VDataTableHeader.json @@ -1,6 +1,5 @@ { "props": { - "disableSort": "Toggles rendering of sort button.", "everyItem": "Indicates if all items in table are selected.", "headers": "Array of header items to display.", "mobile": "Renders mobile view of headers.", diff --git a/packages/api-generator/src/locale/en/VDataTableHeaders.json b/packages/api-generator/src/locale/en/VDataTableHeaders.json index 9670a86c82e..d00ed1ab290 100644 --- a/packages/api-generator/src/locale/en/VDataTableHeaders.json +++ b/packages/api-generator/src/locale/en/VDataTableHeaders.json @@ -1,5 +1,6 @@ { "props": { + "disableSort": "Toggles rendering of sort button.", "sortAscIcon": "Icon used for ascending sort button.", "sortDescIcon": "Icon used for descending sort button.", "sticky": "Sticks the header to the top of the table." diff --git a/packages/api-generator/src/locale/en/VDataTableServer.json b/packages/api-generator/src/locale/en/VDataTableServer.json index ce305f63a7b..56c3edfed52 100644 --- a/packages/api-generator/src/locale/en/VDataTableServer.json +++ b/packages/api-generator/src/locale/en/VDataTableServer.json @@ -12,6 +12,7 @@ "column.data-table-select": "Slot to replace the default `v-simple-checkbox` used when selecting rows.", "dataTableGroup": "Slot for custom rendering of a group.", "data-table-select": "Slot for custom rendering of a header cell with the select checkbox.", + "disableSort": "Disables sorting completely.", "expanded-row": "Slot for custom rendering of an expanded row.", "footer.prepend": "Adds content to the empty space in the footer.", "group-header": "Slot for custom rendering of a group header.", diff --git a/packages/api-generator/src/locale/en/VDataTableVirtual.json b/packages/api-generator/src/locale/en/VDataTableVirtual.json index 7428773c59f..56058592aa3 100644 --- a/packages/api-generator/src/locale/en/VDataTableVirtual.json +++ b/packages/api-generator/src/locale/en/VDataTableVirtual.json @@ -9,6 +9,7 @@ "column.data-table-select": "Slot to replace the default `v-simple-checkbox` used when selecting rows.", "data-table-group": "Slot for custom rendering of a group.", "data-table-select": "Slot for custom rendering of a header cell with the select checkbox.", + "disableSort": "Disables sorting completely.", "expanded-row": "Slot for custom rendering of an expanded row.", "group-header": "Slot for custom rendering of a group header.", "headers": "Slot to replace the default rendering of the `` element.", diff --git a/packages/vuetify/src/components/VDataTable/VDataTableHeaders.tsx b/packages/vuetify/src/components/VDataTable/VDataTableHeaders.tsx index d075842d788..0702a348976 100644 --- a/packages/vuetify/src/components/VDataTable/VDataTableHeaders.tsx +++ b/packages/vuetify/src/components/VDataTable/VDataTableHeaders.tsx @@ -60,6 +60,7 @@ export type VDataTableHeadersSlots = { export const makeVDataTableHeadersProps = propsFactory({ color: String, sticky: Boolean, + disableSort: Boolean, multiSort: Boolean, sortAscIcon: { type: IconValue, @@ -142,7 +143,7 @@ export const VDataTableHeaders = genericComponent()({ align={ column.align } class={[ { - 'v-data-table__th--sortable': column.sortable, + 'v-data-table__th--sortable': column.sortable && !props.disableSort, 'v-data-table__th--sorted': isSorted(column), 'v-data-table__th--fixed': column.fixed, }, @@ -192,7 +193,7 @@ export const VDataTableHeaders = genericComponent()({ return (
{ column.title } - { column.sortable && ( + { column.sortable && !props.disableSort && ( ()({ const headerProps = mergeProps(props.headerProps ?? {} ?? {}) const displayItems = computed(() => { - return columns.value.filter(column => column?.sortable) + return columns.value.filter(column => column?.sortable && !props.disableSort) }) const appendIcon = computed(() => { diff --git a/packages/vuetify/src/components/VDataTable/composables/sort.ts b/packages/vuetify/src/components/VDataTable/composables/sort.ts index 7c1b80e225c..0c9beba1c2f 100644 --- a/packages/vuetify/src/components/VDataTable/composables/sort.ts +++ b/packages/vuetify/src/components/VDataTable/composables/sort.ts @@ -95,8 +95,11 @@ export function useSort () { } // TODO: abstract into project composable -export function useSortedItems ( - props: { customKeySort: Record | undefined }, +export function useSortedItems ( + props: { + customKeySort: Record | undefined + disableSort?: Boolean + }, items: Ref, sortBy: Ref, options?: { @@ -107,7 +110,7 @@ export function useSortedItems ( ) { const locale = useLocale() const sortedItems = computed(() => { - if (!sortBy.value.length) return items.value + if (!sortBy.value.length || props.disableSort) return items.value return sortItems(items.value, sortBy.value, locale.current.value, { transform: options?.transform, From 17a056162267fb56e4f8f96e98c287253e95b904 Mon Sep 17 00:00:00 2001 From: Nisay Date: Tue, 21 May 2024 15:49:39 +0330 Subject: [PATCH 6/7] fix(locale): update missing persian translations (#19812) --- packages/vuetify/src/locale/fa.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/vuetify/src/locale/fa.ts b/packages/vuetify/src/locale/fa.ts index e1efd668b60..d80255e4351 100644 --- a/packages/vuetify/src/locale/fa.ts +++ b/packages/vuetify/src/locale/fa.ts @@ -1,10 +1,10 @@ export default { badge: 'نشان', - open: 'Open', + open: 'باز کردن', close: 'بستن', - dismiss: 'Dismiss', + dismiss: 'رد کردن', confirmEdit: { - ok: 'OK', + ok: 'تایید', cancel: 'لغو', }, dataIterator: { @@ -33,10 +33,10 @@ export default { pageText: '{0} تا {1} از {2}', }, dateRangeInput: { - divider: 'to', + divider: 'تا', }, datePicker: { - itemsSelected: '{0} selected', + itemsSelected: '{0} انتخاب‌شده', range: { title: 'انتخاب تاریخ‌ها', header: 'تاریخ‌ها را وارد کنید', @@ -57,13 +57,13 @@ export default { }, calendar: { moreEvents: '{بیشتر {0', - today: 'Today', + today: 'امروز', }, input: { - clear: 'Clear {0}', + clear: 'پاکسازی {0}', prependAction: '{0} prepended action', appendAction: '{0} appended action', - otp: 'Please enter OTP character {0}', + otp: 'لطفا کد را وارد کنید {0}', }, fileInput: { counter: '{0} پرونده', @@ -72,7 +72,7 @@ export default { timePicker: { am: 'قبل از ظهر', pm: 'بعد از ظهر', - title: 'Select Time', + title: 'انتخاب زمان', }, pagination: { ariaLabel: { @@ -91,7 +91,7 @@ export default { }, rating: { ariaLabel: { - item: 'Rating {0} of {1}', + item: 'امتیاز {0} از {1}', }, }, loading: 'در حال بارگذاری...', From 4b387b5ceb3baa35a604526c55dab3510167254b Mon Sep 17 00:00:00 2001 From: Kael Date: Tue, 21 May 2024 22:26:16 +1000 Subject: [PATCH 7/7] fix(VAutocomplete/VCombobox): prevent focus on menu icon --- packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx | 1 + packages/vuetify/src/components/VCombobox/VCombobox.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx index 8e2cc9ac41c..6491ece4401 100644 --- a/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx +++ b/packages/vuetify/src/components/VAutocomplete/VAutocomplete.tsx @@ -638,6 +638,7 @@ export const VAutocomplete = genericComponent ) : undefined } diff --git a/packages/vuetify/src/components/VCombobox/VCombobox.tsx b/packages/vuetify/src/components/VCombobox/VCombobox.tsx index 205450b5305..cd3225f795e 100644 --- a/packages/vuetify/src/components/VCombobox/VCombobox.tsx +++ b/packages/vuetify/src/components/VCombobox/VCombobox.tsx @@ -684,6 +684,7 @@ export const VCombobox = genericComponent ) : undefined }