Skip to content

Commit

Permalink
Merge pull request #1 from primefaces/master
Browse files Browse the repository at this point in the history
[pull] master from primefaces:master
  • Loading branch information
Kisters-BS authored Jan 8, 2024
2 parents 3c3fd75 + ec65185 commit 0d102a3
Show file tree
Hide file tree
Showing 213 changed files with 4,469 additions and 2,793 deletions.
65 changes: 60 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
# Changelog
## [17.3.1](https://github.com/primefaces/primeng/tree/17.3.1) (2024-01-04)

[Full Changelog](https://github.com/primefaces/primeng/compare/17.3.0...17.3.1)

**Fixed bugs:**
- Table: Multiple selection with SHIFT/click does not work together with paginator and lazy loading [\#14140](https://github.com/primefaces/primeng/issues/14140)
- Toast | Close callback is not exposed in headless. [\#14483](https://github.com/primefaces/primeng/issues/14483)
- Exporting p-table with non exportable columns may lead in unecessary ending csvSeparator [\#14248](https://github.com/primefaces/primeng/issues/14248)
- Error loading dropdown menu after performing a filter on the field programmatically[\#14432](https://github.com/primefaces/primeng/issues/14432)
- Component: Tree checkbox disabled css not working [\#14251](https://github.com/primefaces/primeng/issues/14251)
- Dropdown | Component selects first option on tab press [\#14473](https://github.com/primefaces/primeng/issues/14473)
- Component: Sidebar. Cannot close sidebar programmatically [\#14450](https://github.com/primefaces/primeng/issues/14450)
- MegaMenu | Error: Cannot read properties of undefined [\#14476](https://github.com/primefaces/primeng/issues/14476)

## [17.3.0](https://github.com/primefaces/primeng/tree/17.3.0) (2023-12-28)

[Full Changelog](https://github.com/primefaces/primeng/compare/17.2.0...17.3.0)

**Breaking Changes:**
- Dropdown | Deprecate autoDisplayFirst property [\#14426](https://github.com/primefaces/primeng/issues/14426)

**Implemented New Features and Enhancements:**
- DynamicDialog: Need to turn off autofocus on first focusable element [\#13486](https://github.com/primefaces/primeng/issues/13486)
- Inconsistent filtering behavior in p-dropdown when options contain diacritics [\#10482](https://github.com/primefaces/primeng/issues/10482)

**Fixed bugs:**
- Component: ToggleButton [\#14443](https://github.com/primefaces/primeng/issues/14443)
- Tree removed css classes [\#14445](https://github.com/primefaces/primeng/issues/14445)
- Component: Sidebar [\#14254](https://github.com/primefaces/primeng/issues/14254)
- Overlay Panel: Interaction with components inside panel template cause panel to hide [\#14323](https://github.com/primefaces/primeng/issues/14323)
- Menu | itemClick requires double click in popup mode if items generated by function [\#13934](https://github.com/primefaces/primeng/issues/13934)
- Component: p-picklist [\#14420](https://github.com/primefaces/primeng/issues/14420)
- Component: Dropdown - If editable is true and optionValue is present, the selected option will not be shown [\#14427](https://github.com/primefaces/primeng/issues/14427)
- columnFilter: unwanted close on mouseup [\#14410](https://github.com/primefaces/primeng/issues/14410)
- p-paginator: not accessible [\#12684](https://github.com/primefaces/primeng/issues/12684)
- Tooltip arrow is broken [\#12579](https://github.com/primefaces/primeng/issues/12579)
- AutoComplete: (Multiple) Placeholder does not disappear after selecting item [\#14376](https://github.com/primefaces/primeng/issues/14376)
- Component: MenuItem's property visible wasn't working [\#14316](https://github.com/primefaces/primeng/issues/14316)
- TreeSelect: Trigger Button missing aria-label [\#14355](https://github.com/primefaces/primeng/issues/14355)
- p-menubar: ERROR TypeError: Cannot read properties of undefined (reading 'item') when clicking on disabled menu item [\#14434](https://github.com/primefaces/primeng/issues/14434)
- Table/Scroller: Scroller scrolls left when sorting columns [\#14421](https://github.com/primefaces/primeng/issues/14421)
- Multiselect: pTemplate="selectedItems" layout is empty on first render using Reactive forms [\#14424](https://github.com/primefaces/primeng/issues/14424)
- Menubar | submenuicon template does not work [\#14430](https://github.com/primefaces/primeng/issues/14430)

## [17.2.0](https://github.com/primefaces/primeng/tree/17.2.0) (2023-12-20)

[Full Changelog](https://github.com/primefaces/primeng/compare/17.1.0...17.2.0)
Expand Down Expand Up @@ -107,6 +151,11 @@
- TypeError: this.focusedItemInfo.mutate is not a function [\#14119](https://github.com/primefaces/primeng/issues/14119)
- Upgrade to Angular 17? [\#14063](https://github.com/primefaces/primeng/issues/14063)

## ![LTS](https://www.primefaces.org/wp-content/uploads/2020/01/lts-icon-24.png "PrimeNG LTS") [16.9.3-LTS](https://www.npmjs.com/package/primeng/v/16.9.3-lts) (2023-12-28)

**Fixed bugs:**
- LTS 14 & 16 - Update LicenseManager and fix the false version check [\#14449](https://github.com/primefaces/primeng/issues/14449)

## ![LTS](https://www.primefaces.org/wp-content/uploads/2020/01/lts-icon-24.png "PrimeNG LTS") [16.9.2-LTS](https://www.npmjs.com/package/primeng/v/16.9.2-lts) (2023-12-14)

**Fixed bugs:**
Expand Down Expand Up @@ -304,12 +353,18 @@
- p-dialog: ExpressionChangedAfterItHasBeenCheckedError with attr.aria-labelledby [\#13636](https://github.com/primefaces/primeng/issues/13636)
- Textarea: autoResize doesn't work when used inside a Dialog [\#9231](https://github.com/primefaces/primeng/issues/9231)

## [16.4.3](https://github.com/primefaces/primeng/tree/16.4.3) (2024-01-04)

[Full Changelog](https://github.com/primefaces/primeng/compare/16.4.2...16.4.3)

**Fixed bugs:**
- ContextMenu | Touch Device support[\#14375](https://github.com/primefaces/primeng/issues/14375)

## [16.4.2](https://github.com/primefaces/primeng/tree/16.4.2) (2023-11-10)

[Full Changelog](https://github.com/primefaces/primeng/compare/16.4.1...16.4.2)

**Fixed bugs:**

- TreeTable | Global filter to search tree-table is not returning all the relevant results [\#14082](https://github.com/primefaces/primeng/issues/14082)
- Dropdown | FocusTrap doesn't allow user to tab on next element [\#14083](https://github.com/primefaces/primeng/issues/14083)

Expand All @@ -318,7 +373,6 @@
[Full Changelog](https://github.com/primefaces/primeng/compare/16.4.0...16.4.1)

**Fixed bugs:**

- Menu Components | id property of menuItem API is ignored [\#13763](https://github.com/primefaces/primeng/issues/13763)
- ESLint Error [\#13764](https://github.com/primefaces/primeng/issues/13764)
- Table: Incorrect behavior when a column is both sortable and filterable, and user clicks on a certain part of the filter icon [\#13361](https://github.com/primefaces/primeng/issues/13361)
Expand All @@ -331,7 +385,6 @@
[Full Changelog](https://github.com/primefaces/primeng/compare/16.3.1...16.4.0)

**Implemented New Features and Enhancements:**

- Theme updates: change :focus to focus-visible [\#13740](https://github.com/primefaces/primeng/issues/13740)
- New @layer implementation [\#13737](https://github.com/primefaces/primeng/issues/13737)
- dynamic dialog module (same instances on top of each other) and update deprecated methods [\#13617](https://github.com/primefaces/primeng/issues/13617)
Expand All @@ -345,7 +398,6 @@
- Add GTAG Manager [\#13626](https://github.com/primefaces/primeng/issues/13626)

**Fixed bugs:**

- TreeSelect: Close Button icon not centred [\#13750](https://github.com/primefaces/primeng/issues/13750)
- PrimeNG 16.1.0 selecting a menu option causes panel to scroll [\#13390](https://github.com/primefaces/primeng/issues/13390)
- p-tabPanel does not detect changes when "headerStyle", "headerStyleClass" binding is changed [\#13746](https://github.com/primefaces/primeng/issues/13746)
Expand Down Expand Up @@ -384,7 +436,6 @@
[Full Changelog](https://github.com/primefaces/primeng/compare/16.3.0...16.3.1)

**Fixed bugs:**

- PrimeNG build is not working [\#13581](https://github.com/primefaces/primeng/issues/13581)

## [16.3.0](https://github.com/primefaces/primeng/tree/16.3.0) (2023-08-30)
Expand Down Expand Up @@ -936,6 +987,10 @@
- Sidebar: Footer Templating [\#12259](https://github.com/primefaces/primeng/issues/12259)
- Calendar: Day names don't update [\#12148](https://github.com/primefaces/primeng/issues/12148)

## ![LTS](https://www.primefaces.org/wp-content/uploads/2020/01/lts-icon-24.png "PrimeNG LTS") [14.2.17-LTS](https://www.npmjs.com/package/primeng/v/14.2.17-lts) (2023-12-28)
**Fixed bugs:**
- LTS 14 & 16 - Update LicenseManager and fix the false version check [\#14449](https://github.com/primefaces/primeng/issues/14449)

## ![LTS](https://www.primefaces.org/wp-content/uploads/2020/01/lts-icon-24.png "PrimeNG LTS") [14.2.16-LTS](https://www.npmjs.com/package/primeng/v/14.2.16-lts) (2023-11-17)
**Fixed bugs:**
- Fileupload component disables upload button [\#14046](https://github.com/primefaces/primeng/issues/14046)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "primeng",
"version": "17.2.0",
"version": "17.3.1",
"license": "SEE LICENSE IN LICENSE.md",
"scripts": {
"ng": "ng",
Expand Down
53 changes: 26 additions & 27 deletions src/app/components/autocomplete/autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const onKeydownSpy = spyOn(autocomplete, 'onKeydown').and.callThrough();
const onKeyupSpy = spyOn(autocomplete, 'onKeyup').and.callThrough();
const onKeydownSpy = spyOn(autocomplete, 'onKeyDown').and.callThrough();
const onKeyupSpy = spyOn(autocomplete, 'onKeyUp').and.callThrough();
const onInputSpy = spyOn(autocomplete, 'onInput').and.callThrough();
const handleSuggestionsChangeSpy = spyOn(autocomplete, 'handleSuggestionsChange').and.callThrough();
const filterBrandsSpy = spyOn(testComponent, 'filterBrands').and.callThrough();
Expand Down Expand Up @@ -353,7 +353,6 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
inputEl.nativeElement.value = 'vsa';
inputEl.nativeElement.dispatchEvent(new Event('keydown'));
inputEl.nativeElement.dispatchEvent(new Event('input'));
Expand All @@ -376,7 +375,7 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
inputEl.nativeElement.value = 'v';
inputEl.nativeElement.dispatchEvent(new Event('keydown'));
inputEl.nativeElement.dispatchEvent(new Event('input'));
Expand All @@ -389,7 +388,7 @@ describe('AutoComplete', () => {
fixture.detectChanges();

expect(autocomplete.value).toEqual('Volvo');
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(inputEl.nativeElement.value).toEqual(autocomplete.value);
expect(testComponent.brand).toEqual(autocomplete.value);
flush();
Expand Down Expand Up @@ -436,7 +435,7 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete2, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete2, 'onOptionSelect').and.callThrough();
inputEl.nativeElement.value = 'v';
inputEl.nativeElement.dispatchEvent(new Event('keydown'));
inputEl.nativeElement.dispatchEvent(new Event('input'));
Expand All @@ -448,7 +447,7 @@ describe('AutoComplete', () => {
firstItemEl.click();
fixture.detectChanges();
expect(autocomplete2.value.brand).toEqual('Volvo');
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(inputEl.nativeElement.value).toEqual(autocomplete2.value.brand);
expect(testComponent.car).toEqual(autocomplete2.value);
flush();
Expand Down Expand Up @@ -505,7 +504,7 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
inputEl.nativeElement.value = 'v';
inputEl.nativeElement.dispatchEvent(new Event('keydown'));
inputEl.nativeElement.dispatchEvent(new Event('input'));
Expand All @@ -519,7 +518,7 @@ describe('AutoComplete', () => {
fixture.detectChanges();
expect(autocomplete.value[0]).toEqual('Volvo');
expect(autocomplete.value.length).toEqual(1);
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(testComponent.brand).toEqual(autocomplete.value);
flush();
}));
Expand All @@ -533,7 +532,7 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
inputEl.nativeElement.value = 'v';
inputEl.nativeElement.dispatchEvent(new Event('keydown'));
inputEl.nativeElement.dispatchEvent(new Event('input'));
Expand All @@ -547,7 +546,7 @@ describe('AutoComplete', () => {

expect(autocomplete.value[0]).toEqual('Volvo');
expect(autocomplete.value.length).toEqual(1);
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(testComponent.brand).toEqual(autocomplete.value);
flush();
}));
Expand All @@ -561,7 +560,7 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
inputEl.nativeElement.value = 'v';
inputEl.nativeElement.dispatchEvent(new Event('keydown'));
inputEl.nativeElement.dispatchEvent(new Event('input'));
Expand All @@ -574,12 +573,12 @@ describe('AutoComplete', () => {
fixture.detectChanges();
expect(autocomplete.value[0]).toEqual('Volvo');
expect(autocomplete.value.length).toEqual(1);
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(testComponent.brand).toEqual(autocomplete.value);
let backspaceEvent = new Event('keydown');
Object.defineProperty(backspaceEvent, 'which', { value: 8 });
Object.defineProperty(backspaceEvent, 'preventDefault', { value: () => {} });
autocomplete.onKeydown(backspaceEvent);
autocomplete.onKeyDown(backspaceEvent);
fixture.detectChanges();

expect(autocomplete.value[0]).toEqual(undefined);
Expand All @@ -596,7 +595,7 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
inputEl.nativeElement.value = 'v';
inputEl.nativeElement.dispatchEvent(new Event('keydown'));
inputEl.nativeElement.dispatchEvent(new Event('input'));
Expand All @@ -609,7 +608,7 @@ describe('AutoComplete', () => {
fixture.detectChanges();
expect(autocomplete.value[0]).toEqual('Volvo');
expect(autocomplete.value.length).toEqual(1);
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(testComponent.brand).toEqual(autocomplete.value);
const iconEl = fixture.debugElement.query(By.css('.p-autocomplete-token-icon'));
iconEl.nativeElement.click();
Expand All @@ -628,22 +627,22 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
autocomplete.suggestions = ['Volvo', 'VW'];
autocomplete.overlayVisible = true;
let navigateEvent = new Event('keydown');
Object.defineProperty(navigateEvent, 'which', { value: 40 });
Object.defineProperty(navigateEvent, 'preventDefault', { value: () => {} });
autocomplete.onKeydown(navigateEvent);
autocomplete.onKeyDown(navigateEvent);

let event = new Event('keydown');
Object.defineProperty(event, 'which', { value: 13 });
Object.defineProperty(event, 'preventDefault', { value: () => {} });
autocomplete.onKeydown(event);
autocomplete.onKeyDown(event);
fixture.detectChanges();

expect(autocomplete.value).toEqual('Volvo');
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(testComponent.brand).toEqual(autocomplete.value);
});

Expand All @@ -655,22 +654,22 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
autocomplete.suggestions = ['Volvo', 'VW'];
autocomplete.overlayVisible = true;

let navigateEvent = new Event('keydown');
Object.defineProperty(navigateEvent, 'which', { value: 40 });
Object.defineProperty(navigateEvent, 'preventDefault', { value: () => {} });
autocomplete.onKeydown(navigateEvent);
autocomplete.onKeyDown(navigateEvent);

let event = new Event('keydown');
Object.defineProperty(event, 'which', { value: 9 });
Object.defineProperty(event, 'preventDefault', { value: () => {} });
autocomplete.onKeydown(event);
autocomplete.onKeyDown(event);
fixture.detectChanges();
expect(autocomplete.value).toEqual('Volvo');
expect(selectItemSpy).toHaveBeenCalled();
expect(onOptionSelectSpy).toHaveBeenCalled();
expect(testComponent.brand).toEqual(autocomplete.value);
});

Expand All @@ -682,19 +681,19 @@ describe('AutoComplete', () => {
inputEl.nativeElement.click();
fixture.detectChanges();

const selectItemSpy = spyOn(autocomplete, 'selectItem').and.callThrough();
const onOptionSelectSpy = spyOn(autocomplete, 'onOptionSelect').and.callThrough();
const hideSpy = spyOn(autocomplete, 'hide').and.callThrough();
autocomplete.suggestions = ['Volvo', 'VW'];
autocomplete.overlayVisible = true;
let event = new Event('keydown');
Object.defineProperty(event, 'which', { value: 27 });
Object.defineProperty(event, 'preventDefault', { value: () => {} });

autocomplete.onKeydown(event);
autocomplete.onKeyDown(event);
fixture.detectChanges();

expect(autocomplete.value).toEqual(null);
expect(selectItemSpy).not.toHaveBeenCalled();
expect(onOptionSelectSpy).not.toHaveBeenCalled();
expect(hideSpy).toHaveBeenCalled();
expect(autocomplete.overlayVisible).toEqual(false);
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const AUTOCOMPLETE_VALUE_ACCESSOR: any = {
[required]="required"
[attr.name]="name"
role="combobox"
[attr.placeholder]="placeholder"
[attr.placeholder]="!filled ? placeholder : null"
[attr.size]="size"
aria-autocomplete="list"
[maxlength]="maxlength"
Expand Down
Loading

0 comments on commit 0d102a3

Please sign in to comment.