diff --git a/CHANGELOG.md b/CHANGELOG.md index 219b5730b..e73dd47cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [3.48.1](https://github.com/primefaces/primevue/tree/3.48.1) (2024-02-07) + +[Full Changelog](https://github.com/primefaces/primevue/compare/3.48.0...3.48.1) + +**Fixed bugs:** + +- Fix PrimeVuePTOptions.global.css (missing parenthesis) [\#5232](https://github.com/primefaces/primevue/issues/5232) +- Overwritten styles defect [\#5231](https://github.com/primefaces/primevue/issues/5231) +- Steps: Aura extension defect [\#5230](https://github.com/primefaces/primevue/issues/5230) +- Remove missed inputProps from InputSwitch [\#5227](https://github.com/primefaces/primevue/issues/5227) +- The scrollToIndex method on VirtualScroller does not scroll to the correct index when triggered twice. [\#5223](https://github.com/primefaces/primevue/issues/5223) +- Splitter: Fix keyboard repeat behavior [\#5219](https://github.com/primefaces/primevue/issues/5219) +- Dropdown / MultiSelect : Incorrect alignment on filtering [\#5215](https://github.com/primefaces/primevue/issues/5215) + ## [3.48.0](https://github.com/primefaces/primevue/tree/3.48.0) (2024-02-05) [Full Changelog](https://github.com/primefaces/primevue/compare/3.47.2...3.48.0) diff --git a/components/lib/basecomponent/BaseComponent.vue b/components/lib/basecomponent/BaseComponent.vue index d31ac48c3..f9b7b78f3 100644 --- a/components/lib/basecomponent/BaseComponent.vue +++ b/components/lib/basecomponent/BaseComponent.vue @@ -162,11 +162,17 @@ export default { const searchOut = /./g.test(key) && !!params[key.split('.')[0]]; const { mergeSections = true, mergeProps: useMergeProps = false } = this._getPropValue('ptOptions') || this.$config?.ptOptions || {}; const global = searchInDefaultPT ? (searchOut ? this._useGlobalPT(this._getPTClassValue, key, params) : this._useDefaultPT(this._getPTClassValue, key, params)) : undefined; - const self = searchOut ? undefined : this._usePT(this._getPT(obj, this.$name), this._getPTClassValue, key, { ...params, global: global || {} }); + const self = searchOut ? undefined : this._getPTSelf(obj, this._getPTClassValue, key, { ...params, global: global || {} }); const datasets = this._getPTDatasets(key); return mergeSections || (!mergeSections && self) ? (useMergeProps ? this._mergeProps(useMergeProps, global, self, datasets) : { ...global, ...self, ...datasets }) : { ...self, ...datasets }; }, + _getPTSelf(obj = {}, ...args) { + return mergeProps( + this._usePT(this._getPT(obj, this.$name), ...args), // Exp; key?.startsWith('pt:')) + .reduce((result, [key, value]) => { + const [, ...rest] = key.split(':'); + + rest?.reduce((currentObj, nestedKey, index, array) => { + !currentObj[nestedKey] && (currentObj[nestedKey] = index === array.length - 1 ? value : {}); + + return currentObj[nestedKey]; + }, result); + + return result; + }, {}); + }, + $_attrsNoPT() { + // $attrs without `pt:*` + return Object.entries(this.$attrs || {}) + .filter(([key]) => !key?.startsWith('pt:')) + .reduce((acc, [key, value]) => (acc[key] = value) && acc, {}); } } }; diff --git a/components/lib/config/PrimeVue.d.ts b/components/lib/config/PrimeVue.d.ts index 0838a0b33..178295e11 100644 --- a/components/lib/config/PrimeVue.d.ts +++ b/components/lib/config/PrimeVue.d.ts @@ -222,7 +222,7 @@ export interface PrimeVuePTOptions { animate?: AnimateOnScrollDirectivePassThroughOptions; }; global?: { - css?: (options: any) => string | string | undefined; + css?: ((options: any) => string | undefined) | string | undefined; }; } diff --git a/components/lib/dialog/Dialog.vue b/components/lib/dialog/Dialog.vue index 52437121c..9fb5c133f 100755 --- a/components/lib/dialog/Dialog.vue +++ b/components/lib/dialog/Dialog.vue @@ -301,7 +301,7 @@ export default { this.lastPageY = event.pageY; this.container.style.margin = '0'; - document.body.setAttribute('data-p-unselectable-text'); + document.body.setAttribute('data-p-unselectable-text', ''); !this.isUnstyled && DomHandler.addClass(document.body, 'p-unselectable-text'); } }, diff --git a/components/lib/dropdown/Dropdown.vue b/components/lib/dropdown/Dropdown.vue index 6097da89e..a56b3c21e 100755 --- a/components/lib/dropdown/Dropdown.vue +++ b/components/lib/dropdown/Dropdown.vue @@ -81,6 +81,7 @@ type="text" :value="filterValue" @vue:mounted="onFilterUpdated" + @vue:updated="onFilterUpdated" :class="cx('filterInput')" :placeholder="filterPlaceholder" role="searchbox" diff --git a/components/lib/floatlabel/FloatLabel.d.ts b/components/lib/floatlabel/FloatLabel.d.ts index 4fad3a484..e0cbb71a8 100644 --- a/components/lib/floatlabel/FloatLabel.d.ts +++ b/components/lib/floatlabel/FloatLabel.d.ts @@ -56,10 +56,6 @@ export interface FloatLabelPassThroughOptions { * @see {@link BaseComponent.ComponentHooks} */ hooks?: ComponentHooks; - /** - * Used to control Vue Transition API. - */ - transition?: FloatLabelPassThroughTransitionType; } /** diff --git a/components/lib/inputswitch/InputSwitch.d.ts b/components/lib/inputswitch/InputSwitch.d.ts index 8f0a2643c..b0f1b64fc 100755 --- a/components/lib/inputswitch/InputSwitch.d.ts +++ b/components/lib/inputswitch/InputSwitch.d.ts @@ -7,7 +7,6 @@ * @module inputswitch * */ -import { InputHTMLAttributes } from 'vue'; import { ComponentHooks } from '../basecomponent'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -136,10 +135,6 @@ export interface InputSwitchProps { * Inline style of the input field. */ inputStyle?: object | undefined; - /** - * Used to pass all properties of the HTMLInputElement to the focusable input element inside the component. - */ - inputProps?: InputHTMLAttributes | undefined; /** * Establishes relationships between the component and label(s) where its value should be one or more element IDs. */ diff --git a/components/lib/multiselect/MultiSelect.vue b/components/lib/multiselect/MultiSelect.vue index 7cde82e21..6ff7b7eda 100755 --- a/components/lib/multiselect/MultiSelect.vue +++ b/components/lib/multiselect/MultiSelect.vue @@ -90,6 +90,7 @@ type="text" :value="filterValue" @vue:mounted="onFilterUpdated" + @vue:updated="onFilterUpdated" :class="cx('filterInput')" :placeholder="filterPlaceholder" role="searchbox" diff --git a/components/lib/panel/Panel.vue b/components/lib/panel/Panel.vue index ea5c99723..1e831fc09 100755 --- a/components/lib/panel/Panel.vue +++ b/components/lib/panel/Panel.vue @@ -1,5 +1,5 @@