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
cetincakiroglu committed Oct 25, 2023
2 parents 255fa42 + 21c5fa8 commit 29bd828
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/components/galleria/galleria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ export class GalleriaItemSlot {
tabindex="0"
(click)="onIndicatorClick(index)"
(mouseenter)="onIndicatorMouseEnter(index)"
(keydown)="onIndicatorKeyDown(event, index)"
(keydown)="onIndicatorKeyDown($event, index)"
[ngClass]="{ 'p-galleria-indicator': true, 'p-highlight': isIndicatorItemActive(index) }"
[attr.aria-label]="ariaPageLabel(index + 1)"
[attr.aria-selected]="activeIndex === index"
Expand Down
7 changes: 6 additions & 1 deletion src/app/components/image/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { FocusTrapModule } from 'primeng/focustrap';
selector: 'p-image',
template: `
<span [ngClass]="containerClass()" [class]="styleClass" [ngStyle]="style">
<img [attr.src]="src" [attr.srcset]="srcSet" [attr.sizes]="sizes" [attr.alt]="alt" [attr.width]="width" [attr.height]="height" [ngStyle]="imageStyle" [class]="imageClass" (error)="imageError($event)" />
<img [attr.src]="src" [attr.srcset]="srcSet" [attr.sizes]="sizes" [attr.alt]="alt" [attr.width]="width" [attr.height]="height" [attr.loading]="loading" [ngStyle]="imageStyle" [class]="imageClass" (error)="imageError($event)" />
<button type="button" class="p-image-preview-indicator" (click)="onImageClick()" #previewButton [ngStyle]="{ height: height + 'px', width: width + 'px' }" style="border: 'none';">
<ng-container *ngIf="indicatorTemplate; else defaultTemplate">
<ng-container *ngTemplateOutlet="indicatorTemplate"></ng-container>
Expand Down Expand Up @@ -144,6 +144,11 @@ export class Image implements AfterContentInit {
* @group Props
*/
@Input() height: string | undefined;
/**
* Attribute of the image element.
* @group Props
*/
@Input() loading: 'lazy' | 'eager' | undefined;
/**
* Target element to attach the dialog, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
* @group Props
Expand Down
6 changes: 6 additions & 0 deletions src/app/components/overlaypanel/overlaypanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ContentChildren,
ElementRef,
EventEmitter,
HostListener,
Inject,
Input,
NgModule,
Expand Down Expand Up @@ -422,6 +423,11 @@ export class OverlayPanel implements AfterContentInit, OnDestroy {
this.hide();
event.preventDefault();
}

@HostListener('document:keydown.escape', ['$event'])
onEscapeKeydown(event: KeyboardEvent) {
this.hide()
}

onWindowResize() {
if (this.overlayVisible && !DomHandler.isTouchDevice()) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tabview/tabview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export class TabPanel implements AfterContentInit, OnDestroy {
</a>
</li>
</ng-template>
<li #inkbar class="p-tabview-ink-bar" [attr.data-pc-section]="'inkbar'"></li>
<li #inkbar class="p-tabview-ink-bar" role="presentation" aria-hidden="true" [attr.data-pc-section]="'inkbar'"></li>
</ul>
</div>
<button
Expand Down
2 changes: 2 additions & 0 deletions src/app/showcase/layout/doc/codeeditor/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ import { CheckboxModule } from 'primeng/checkbox';
import { ChipModule } from 'primeng/chip';
import { ChipsModule } from 'primeng/chips';
import { ConfirmDialogModule } from 'primeng/confirmdialog';
import { ConfirmPopupModule } from 'primeng/confirmpopup';
import { ColorPickerModule } from 'primeng/colorpicker';
import { ContextMenuModule } from 'primeng/contextmenu';
import { DataViewModule } from 'primeng/dataview';
Expand Down Expand Up @@ -590,6 +591,7 @@ ${serviceImports}
ChipModule,
ColorPickerModule,
ConfirmDialogModule,
ConfirmPopupModule,
ContextMenuModule,
VirtualScrollerModule,
DataViewModule,
Expand Down

1 comment on commit 29bd828

@vercel
Copy link

@vercel vercel bot commented on 29bd828 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.