Skip to content

Commit

Permalink
Merge branch 'master' into fix-type-optionlabel-autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
SoyDiego committed Jan 4, 2024
2 parents 519d446 + d091bed commit 2c6dd73
Show file tree
Hide file tree
Showing 157 changed files with 3,732 additions and 2,530 deletions.
27 changes: 22 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# 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)

Expand Down Expand Up @@ -338,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 @@ -352,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 @@ -365,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 @@ -379,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 @@ -418,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
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.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "primeng",
"version": "17.3.0",
"version": "17.3.1",
"license": "SEE LICENSE IN LICENSE.md",
"scripts": {
"ng": "ng",
Expand All @@ -22,7 +22,6 @@
"type": "git",
"url": "https://github.com/primefaces/primeng.git"
},
"type": "module",
"devDependencies": {
"@angular-devkit/build-angular": "^17.0.5",
"@angular-eslint/eslint-plugin": "17.1.1",
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
12 changes: 0 additions & 12 deletions src/app/components/checkbox/checkbox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,4 @@ describe('Checkbox', () => {

expect(iconEl.className).toContain('pi pi-new-check');
});

it('should call handleChange', () => {
fixture.detectChanges();

checkbox.binary = true;
const handleChangeSpy = spyOn(checkbox, 'handleChange').and.callThrough();
const input = fixture.nativeElement.querySelector('input');
input.dispatchEvent(new Event('change'));
fixture.detectChanges();

expect(handleChangeSpy).toHaveBeenCalled();
});
});
Loading

0 comments on commit 2c6dd73

Please sign in to comment.