Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/primefaces/primeng
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jan 8, 2024
2 parents cdc863c + 357d636 commit ec65185
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 41 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
2 changes: 1 addition & 1 deletion src/app/components/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",
"repository": {
"type": "git",
"url": "https://github.com/primefaces/primeng"
Expand Down
22 changes: 11 additions & 11 deletions src/app/components/scroller/scroller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,6 @@ export class Scroller implements OnInit, AfterContentInit, AfterViewChecked, OnD
return this._columns;
}

get isPageChanged() {
return this._step ? this.page !== this.getPageByFirst() : true;
}

constructor(@Inject(DOCUMENT) private document: Document, @Inject(PLATFORM_ID) private platformId: any, private renderer: Renderer2, private cd: ChangeDetectorRef, private zone: NgZone) {}

ngOnInit() {
Expand Down Expand Up @@ -653,8 +649,12 @@ export class Scroller implements OnInit, AfterContentInit, AfterViewChecked, OnD
return this.elementViewChild;
}

getPageByFirst() {
return Math.floor((this.first + this.d_numToleratedItems * 4) / (this._step || 1));
getPageByFirst(first?: any) {
return Math.floor(((first ?? this.first) + this.d_numToleratedItems * 4) / (this._step || 1));
}

isPageChanged(first?: any) {
return this._step ? this.page !== this.getPageByFirst(first ?? this.first) : true;
}

scrollTo(options: ScrollToOptions) {
Expand Down Expand Up @@ -977,10 +977,10 @@ export class Scroller implements OnInit, AfterContentInit, AfterViewChecked, OnD

this.handleEvents('onScrollIndexChange', newState);

if (this._lazy && this.isPageChanged) {
if (this._lazy && this.isPageChanged(first)) {
const lazyLoadState = {
first: this._step ? Math.min(this.getPageByFirst() * this._step, (<any[]>this.items).length - this._step) : first,
last: Math.min(this._step ? (this.getPageByFirst() + 1) * this._step : last, (<any[]>this.items).length)
first: this._step ? Math.min(this.getPageByFirst(first) * this._step, (<any[]>this.items).length - this._step) : first,
last: Math.min(this._step ? (this.getPageByFirst(first) + 1) * this._step : last, (<any[]>this.items).length)
};
const isLazyStateChanged = this.lazyLoadState.first !== lazyLoadState.first || this.lazyLoadState.last !== lazyLoadState.last;

Expand All @@ -993,14 +993,14 @@ export class Scroller implements OnInit, AfterContentInit, AfterViewChecked, OnD
onContainerScroll(event: Event) {
this.handleEvents('onScroll', { originalEvent: event });

if (this._delay && this.isPageChanged) {
if (this._delay && this.isPageChanged()) {
if (this.scrollTimeout) {
clearTimeout(this.scrollTimeout);
}

if (!this.d_loading && this.showLoader) {
const { isRangeChanged } = this.onScrollPositionChange(event);
const changed = isRangeChanged || (this._step ? this.isPageChanged : false);
const changed = isRangeChanged || (this._step ? this.isPageChanged() : false);

if (changed) {
this.d_loading = true;
Expand Down
29 changes: 12 additions & 17 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import { animate, AnimationEvent, style, transition, trigger } from '@angular/animations';
import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
import {
AfterContentChecked,
AfterContentInit,
AfterViewChecked,
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChildren,
Directive,
DoCheck,
ElementRef,
EventEmitter,
HostListener,
Expand All @@ -33,28 +30,29 @@ import {
ViewEncapsulation
} from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BlockableUI, FilterMatchMode, FilterMetadata, FilterOperator, FilterService, LazyLoadMeta, OverlayService, PrimeNGConfig, PrimeTemplate, SelectItem, SharedModule, SortMeta, TableState, TranslationKeys } from 'primeng/api';
import { BlockableUI, FilterMatchMode, FilterMetadata, FilterOperator, FilterService, LazyLoadMeta, OverlayService, PrimeNGConfig, PrimeTemplate, ScrollerOptions, SelectItem, SharedModule, SortMeta, TableState, TranslationKeys } from 'primeng/api';
import { ButtonModule } from 'primeng/button';
import { CalendarModule } from 'primeng/calendar';
import { ConnectedOverlayScrollHandler, DomHandler } from 'primeng/dom';
import { DropdownModule } from 'primeng/dropdown';
import { InputNumberModule } from 'primeng/inputnumber';
import { InputTextModule } from 'primeng/inputtext';
import { PaginatorModule } from 'primeng/paginator';
import { Scroller, ScrollerModule } from 'primeng/scroller';
import { ScrollerOptions } from 'primeng/api';
import { SelectButtonModule } from 'primeng/selectbutton';
import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils';
import { Subject, Subscription } from 'rxjs';
import { ArrowDownIcon } from 'primeng/icons/arrowdown';
import { ArrowUpIcon } from 'primeng/icons/arrowup';
import { CheckIcon } from 'primeng/icons/check';
import { FilterIcon } from 'primeng/icons/filter';
import { FilterSlashIcon } from 'primeng/icons/filterslash';
import { SortAltIcon } from 'primeng/icons/sortalt';
import { SortAmountDownIcon } from 'primeng/icons/sortamountdown';
import { SortAmountUpAltIcon } from 'primeng/icons/sortamountupalt';
import { SpinnerIcon } from 'primeng/icons/spinner';
import { InputNumberModule } from 'primeng/inputnumber';
import { InputTextModule } from 'primeng/inputtext';
import { PaginatorModule } from 'primeng/paginator';
import { Scroller, ScrollerModule } from 'primeng/scroller';
import { SelectButtonModule } from 'primeng/selectbutton';
import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';
import { Nullable, VoidListener } from 'primeng/ts-helpers';
import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils';
import { Subject, Subscription } from 'rxjs';
import {
ExportCSVOptions,
TableColResizeEvent,
Expand All @@ -74,9 +72,6 @@ import {
TableRowUnSelectEvent,
TableSelectAllChangeEvent
} from './table.interface';
import { Nullable, VoidListener } from 'primeng/ts-helpers';
import { FilterSlashIcon } from 'primeng/icons/filterslash';
import { platformBrowser } from '@angular/platform-browser';

@Injectable()
export class TableService {
Expand Down Expand Up @@ -3268,7 +3263,7 @@ export class FrozenColumn implements AfterViewInit {

set frozen(val: boolean) {
this._frozen = val;
this.updateStickyPosition();
Promise.resolve(null).then(() => this.updateStickyPosition());
}

@Input() alignFrozen: string = 'left';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/treetable/treetable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ export class TreeTable implements AfterContentInit, OnInit, OnDestroy, Blockable
this.totalRecords = this.filteredNodes ? this.filteredNodes.length : this.value ? this.value.length : 0;
}
}
this.cd.markForCheck()
this.cd.markForCheck();
}

this.first = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/data/versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"version": "v17.3.0",
"version": "v17.3.1",
"name": "v17",
"url": "https://primeng.org"
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/layout/doc/codeeditor/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface Props {
const app_dependencies = pkg ? pkg.devDependencies : {};

const PrimeNG = {
version: '17.3.0',
version: '17.3.1',
description:
'PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 370+ ready to use UI blocks to build spectacular applications in no time.'
};
Expand Down

0 comments on commit ec65185

Please sign in to comment.