diff --git a/package-lock.json b/package-lock.json index fd49c715bb6..a663dd4da82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "primeng", - "version": "17.13.0", + "version": "17.14.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "primeng", - "version": "17.13.0", + "version": "17.14.1", "license": "SEE LICENSE IN LICENSE.md", "devDependencies": { "@angular-devkit/build-angular": "^17.3.1", diff --git a/src/app/components/divider/divider.css b/src/app/components/divider/divider.css index 2738f847c0b..e64ed71bcc9 100644 --- a/src/app/components/divider/divider.css +++ b/src/app/components/divider/divider.css @@ -80,7 +80,7 @@ border-top-style: dotted; } - .p-divider-dotted.p-divider-horizontal:before { + .p-divider-dotted.p-divider-vertical:before { border-left-style: dotted; } } diff --git a/src/app/components/fileupload/fileupload.ts b/src/app/components/fileupload/fileupload.ts index ecc54ff1c5c..9485d7aa332 100755 --- a/src/app/components/fileupload/fileupload.ts +++ b/src/app/components/fileupload/fileupload.ts @@ -1,5 +1,5 @@ import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common'; -import { HttpClient, HttpClientModule, HttpEvent, HttpEventType, HttpHeaders } from '@angular/common/http'; +import { HttpClient, HttpEvent, HttpEventType, HttpHeaders } from '@angular/common/http'; import { AfterContentInit, AfterViewInit, @@ -932,7 +932,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe } @NgModule({ - imports: [CommonModule, HttpClientModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule, PlusIcon, UploadIcon, TimesIcon], + imports: [CommonModule, SharedModule, ButtonModule, ProgressBarModule, MessagesModule, RippleModule, PlusIcon, UploadIcon, TimesIcon], exports: [FileUpload, SharedModule, ButtonModule, ProgressBarModule, MessagesModule], declarations: [FileUpload] }) diff --git a/src/app/components/speeddial/speeddial.css b/src/app/components/speeddial/speeddial.css index f6f7dd57b38..c2fd94184a9 100755 --- a/src/app/components/speeddial/speeddial.css +++ b/src/app/components/speeddial/speeddial.css @@ -5,6 +5,14 @@ z-index: 1; } + .p-speeddial:not(.p-speeddial-opened) { + pointer-events: none; + } + + .p-speeddial:not(.p-speeddial-opened) .p-speeddial-button { + pointer-events: auto; + } + .p-speeddial-list { margin: 0; padding: 0; diff --git a/src/app/components/speeddial/speeddial.ts b/src/app/components/speeddial/speeddial.ts index c0445e208b9..4db568de217 100644 --- a/src/app/components/speeddial/speeddial.ts +++ b/src/app/components/speeddial/speeddial.ts @@ -92,7 +92,7 @@ import { asapScheduler } from 'rxjs'; item.id === this.focusedOptionIndex); + const itemIndex = [...items].findIndex((item) => item.id === this.focusedOptionIndex()); this.onItemClick(event, this.model[itemIndex]); this.onBlur(event); diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index d125813610d..92b17555df0 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -708,7 +708,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable * The breakpoint to define the maximum width boundary when using stack responsive layout. * @group Props */ - @Input() breakpoint: string = '640px'; + @Input() breakpoint: string = '960px'; /** * Locale to be used in paginator formatting. * @group Props @@ -2483,7 +2483,11 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable let containerLeft = DomHandler.getOffset(this.containerViewChild?.nativeElement).left; this.resizeColumnElement = event.target.parentElement; this.columnResizing = true; - this.lastResizerHelperX = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft; + if (event.type == 'touchstart') { + this.lastResizerHelperX = event.changedTouches[0].clientX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft; + } else { + this.lastResizerHelperX = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft; + } this.onColumnResize(event); event.preventDefault(); } @@ -2493,8 +2497,11 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable DomHandler.addClass(this.containerViewChild?.nativeElement, 'p-unselectable-text'); (this.resizeHelperViewChild).nativeElement.style.height = this.containerViewChild?.nativeElement.offsetHeight + 'px'; (this.resizeHelperViewChild).nativeElement.style.top = 0 + 'px'; - (this.resizeHelperViewChild).nativeElement.style.left = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft + 'px'; - + if (event.type == 'touchmove') { + (this.resizeHelperViewChild).nativeElement.style.left = event.changedTouches[0].clientX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft + 'px'; + } else { + (this.resizeHelperViewChild).nativeElement.style.left = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft + 'px'; + } (this.resizeHelperViewChild).nativeElement.style.display = 'block'; } @@ -3915,6 +3922,12 @@ export class ResizableColumn implements AfterViewInit, OnDestroy { resizerMouseDownListener: VoidListener; + resizerTouchStartListener: VoidListener; + + resizerTouchMoveListener: VoidListener; + + resizerTouchEndListener: VoidListener; + documentMouseMoveListener: VoidListener; documentMouseUpListener: VoidListener; @@ -3931,6 +3944,7 @@ export class ResizableColumn implements AfterViewInit, OnDestroy { this.zone.runOutsideAngular(() => { this.resizerMouseDownListener = this.renderer.listen(this.resizer, 'mousedown', this.onMouseDown.bind(this)); + this.resizerTouchStartListener = this.renderer.listen(this.resizer, 'touchstart', this.onTouchStart.bind(this)); }); } } @@ -3940,6 +3954,8 @@ export class ResizableColumn implements AfterViewInit, OnDestroy { this.zone.runOutsideAngular(() => { this.documentMouseMoveListener = this.renderer.listen(this.document, 'mousemove', this.onDocumentMouseMove.bind(this)); this.documentMouseUpListener = this.renderer.listen(this.document, 'mouseup', this.onDocumentMouseUp.bind(this)); + this.resizerTouchMoveListener = this.renderer.listen(this.resizer, 'touchmove', this.onTouchMove.bind(this)); + this.resizerTouchEndListener = this.renderer.listen(this.resizer, 'touchend', this.onTouchEnd.bind(this)); }); } @@ -3953,15 +3969,30 @@ export class ResizableColumn implements AfterViewInit, OnDestroy { this.documentMouseUpListener(); this.documentMouseUpListener = null; } + if (this.resizerTouchMoveListener) { + this.resizerTouchMoveListener(); + this.resizerTouchMoveListener = null; + } + + if (this.resizerTouchEndListener) { + this.resizerTouchEndListener(); + this.resizerTouchEndListener = null; + } } onMouseDown(event: MouseEvent) { - if (event.which === 1) { - this.dt.onColumnResizeBegin(event); - this.bindDocumentEvents(); - } + this.dt.onColumnResizeBegin(event); + this.bindDocumentEvents(); } + onTouchStart(event: TouchEvent) { + this.dt.onColumnResizeBegin(event); + this.bindDocumentEvents(); + } + + onTouchMove(event: TouchEvent) { + this.dt.onColumnResize(event); + } onDocumentMouseMove(event: MouseEvent) { this.dt.onColumnResize(event); } @@ -3971,6 +4002,11 @@ export class ResizableColumn implements AfterViewInit, OnDestroy { this.unbindDocumentEvents(); } + onTouchEnd(event: TouchEvent) { + this.dt.onColumnResizeEnd(); + this.unbindDocumentEvents(); + } + isEnabled() { return this.pResizableColumnDisabled !== true; } @@ -5207,7 +5243,7 @@ export class ColumnFilter implements AfterContentInit { * Enables currency input. * @group Props */ - @Input({transform: booleanAttribute}) currency: boolean | undefined; + @Input({ transform: booleanAttribute }) currency: boolean | undefined; /** * Defines the display of the currency input. * @group Props diff --git a/src/app/showcase/doc/apidoc/index.json b/src/app/showcase/doc/apidoc/index.json index e511b759265..f1506b4ddb3 100644 --- a/src/app/showcase/doc/apidoc/index.json +++ b/src/app/showcase/doc/apidoc/index.json @@ -6021,7 +6021,7 @@ "name": "style", "optional": false, "readonly": false, - "type": "Object", + "type": null, "description": "Inline style of the element." }, { @@ -23396,7 +23396,7 @@ "optional": false, "readonly": false, "type": "string", - "default": "640px", + "default": "960px", "description": "The breakpoint to define the maximum width boundary when using stack responsive layout." }, {