Skip to content

Commit

Permalink
Merge branch 'primefaces:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkTheFirstFlame authored Apr 26, 2024
2 parents 72078c0 + a8131a0 commit e40262c
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 19 deletions.
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 src/app/components/divider/divider.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions src/app/components/fileupload/fileupload.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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]
})
Expand Down
8 changes: 8 additions & 0 deletions src/app/components/speeddial/speeddial.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/app/components/speeddial/speeddial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import { asapScheduler } from 'rxjs';
</ng-container>
<ng-container *ngIf="!itemTemplate">
<a
*ngIf="_visible && isClickableRouterLink(item); else elseBlock"
*ngIf="isClickableRouterLink(item); else elseBlock"
pRipple
[routerLink]="item.routerLink"
[queryParams]="item.queryParams"
Expand All @@ -117,7 +117,6 @@ import { asapScheduler } from 'rxjs';
</a>
<ng-template #elseBlock>
<a
*ngIf="_visible"
[attr.href]="item.url || null"
class="p-speeddial-action"
role="menuitem"
Expand Down Expand Up @@ -499,7 +498,7 @@ export class SpeedDial implements AfterViewInit, AfterContentInit, OnDestroy {

onEnterKey(event: any) {
const items = DomHandler.find(this.container.nativeElement, '[data-pc-section="menuitem"]');
const itemIndex = [...items].findIndex((item) => item.id === this.focusedOptionIndex);
const itemIndex = [...items].findIndex((item) => item.id === this.focusedOptionIndex());

this.onItemClick(event, this.model[itemIndex]);
this.onBlur(event);
Expand Down
54 changes: 45 additions & 9 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
}
Expand All @@ -2493,8 +2497,11 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
DomHandler.addClass(this.containerViewChild?.nativeElement, 'p-unselectable-text');
(<ElementRef>this.resizeHelperViewChild).nativeElement.style.height = this.containerViewChild?.nativeElement.offsetHeight + 'px';
(<ElementRef>this.resizeHelperViewChild).nativeElement.style.top = 0 + 'px';
(<ElementRef>this.resizeHelperViewChild).nativeElement.style.left = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft + 'px';

if (event.type == 'touchmove') {
(<ElementRef>this.resizeHelperViewChild).nativeElement.style.left = event.changedTouches[0].clientX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft + 'px';
} else {
(<ElementRef>this.resizeHelperViewChild).nativeElement.style.left = event.pageX - containerLeft + this.containerViewChild?.nativeElement.scrollLeft + 'px';
}
(<ElementRef>this.resizeHelperViewChild).nativeElement.style.display = 'block';
}

Expand Down Expand Up @@ -3915,6 +3922,12 @@ export class ResizableColumn implements AfterViewInit, OnDestroy {

resizerMouseDownListener: VoidListener;

resizerTouchStartListener: VoidListener;

resizerTouchMoveListener: VoidListener;

resizerTouchEndListener: VoidListener;

documentMouseMoveListener: VoidListener;

documentMouseUpListener: VoidListener;
Expand All @@ -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));
});
}
}
Expand All @@ -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));
});
}

Expand All @@ -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);
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/doc/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -6021,7 +6021,7 @@
"name": "style",
"optional": false,
"readonly": false,
"type": "Object",
"type": null,
"description": "Inline style of the element."
},
{
Expand Down Expand Up @@ -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."
},
{
Expand Down

0 comments on commit e40262c

Please sign in to comment.