Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Sep 27, 2023
1 parent 27f68ad commit ee3d321
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
11 changes: 10 additions & 1 deletion src/app/components/breadcrumb/breadcrumb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ import { BreadcrumbItemClickEvent } from './breadcrumb.interface';
template: `
<nav [class]="styleClass" [ngStyle]="style" [ngClass]="'p-breadcrumb p-component'" [attr.data-pc-name]="'breadcrumb'" [attr.data-pc-section]="'root'">
<ol [attr.data-pc-section]="'menu'" class="p-breadcrumb-list">
<li [class]="home.styleClass" [attr.id]="home.id" [ngClass]="{ 'p-breadcrumb-home': true, 'p-disabled': home.disabled }" [ngStyle]="home.style" *ngIf="home" pTooltip [tooltipOptions]="home.tooltipOptions" [attr.data-pc-section]="'home'">
<li
[class]="home.styleClass"
[attr.id]="home.id"
[ngClass]="{ 'p-breadcrumb-home': true, 'p-disabled': home.disabled }"
[ngStyle]="home.style"
*ngIf="home"
pTooltip
[tooltipOptions]="home.tooltipOptions"
[attr.data-pc-section]="'home'"
>
<a
[href]="home.url ? home.url : null"
*ngIf="!home.routerLink"
Expand Down
5 changes: 2 additions & 3 deletions src/app/components/contextmenu/contextmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,13 +820,12 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {
const processedItem = this.findVisibleItem(this.findFirstFocusedItemIndex());
this.focusedItemInfo.mutate((value) => {
value.index = this.findFirstFocusedItemIndex();
value.item = processedItem.item
value.item = processedItem.item;
});

event.preventDefault();
}


onTabKey(event: KeyboardEvent) {
if (this.focusedItemInfo().index !== -1) {
const processedItem = this.visibleItems[this.focusedItemInfo().index];
Expand Down Expand Up @@ -942,7 +941,7 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {
hide() {
this.visible.set(false);
this.activeItemPath.set([]);
this.focusedItemInfo.set({ index: -1, level: 0, parentKey: '', item: null});
this.focusedItemInfo.set({ index: -1, level: 0, parentKey: '', item: null });
}

toggle(event?: any) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/menubar/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,14 +721,14 @@ export class Menubar implements AfterContentInit, OnDestroy, OnInit {

show() {
const processedItem = this.findVisibleItem(this.findFirstFocusedItemIndex());
this.focusedItemInfo.set({ index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '' , item: processedItem.item});
this.focusedItemInfo.set({ index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '', item: processedItem.item });
DomHandler.focus(this.rootmenu.menubarViewChild.nativeElement);
}

onMenuFocus(event: any) {
this.focused = true;
const processedItem = this.findVisibleItem(this.findFirstFocusedItemIndex());
const focusedItemInfo = this.focusedItemInfo().index !== -1 ? this.focusedItemInfo() : { index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '', item: processedItem.item };
const focusedItemInfo = this.focusedItemInfo().index !== -1 ? this.focusedItemInfo() : { index: this.findFirstFocusedItemIndex(), level: 0, parentKey: '', item: processedItem.item };

this.focusedItemInfo.set(focusedItemInfo);
this.onFocus.emit(event);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/panelmenu/panelmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ export class PanelMenu implements AfterContentInit {
}

getContentId(item, index) {
return item.id ? item.id + '_content' :`${this.getPanelId(index)}_content`;
return item.id ? item.id + '_content' : `${this.getPanelId(index)}_content`;
}

updateFocusedHeader(event) {
Expand Down
10 changes: 5 additions & 5 deletions src/app/components/slidemenu/slidemenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy {
if (grouped) {
let { index, level, key, item } = processedItem;
this.onItemChange({ originalEvent: event, processedItem });
this.focusedItemInfo.set({ index: 0, level: level, parentKey: key});
this.focusedItemInfo.set({ index: 0, level: level, parentKey: key });

this.searchValue = '';
this.animate('right');
Expand Down Expand Up @@ -909,10 +909,10 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy {
onEscapeKey(event: KeyboardEvent) {
if (this.popup) {
this.hide(event, true);
this.focusedItemInfo.mutate(value => {
this.focusedItemInfo.mutate((value) => {
value.index = this.findLastFocusedItemIndex();
value.item = null;
})
});

event.preventDefault();
}
Expand Down Expand Up @@ -967,7 +967,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy {

onMenuFocus() {
this.focused = true;

this.bindOutsideClickListener();
this.bindTransitionListeners();

Expand All @@ -980,7 +980,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy {
}

if (this.focusedItemInfo().index === -1 && !this.left) {
this.focusedItemInfo.set({ index: 0, level: 0, parentKey: '', item: this.findVisibleItem(0).item});
this.focusedItemInfo.set({ index: 0, level: 0, parentKey: '', item: this.findVisibleItem(0).item });
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tieredmenu/tieredmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ export class TieredMenu implements OnInit, AfterContentInit, OnDestroy {

if (grouped) {
this.onItemChange({ originalEvent: event, processedItem });
this.focusedItemInfo.set({ index: -1, parentKey: processedItem.key, item});
this.focusedItemInfo.set({ index: -1, parentKey: processedItem.key, item });
this.searchValue = '';
this.onArrowDownKey(event);
}
Expand Down

2 comments on commit ee3d321

@vercel
Copy link

@vercel vercel bot commented on ee3d321 Sep 27, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on ee3d321 Sep 28, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

primeng – ./

primeng-git-prod-primetek.vercel.app
primeng-primetek.vercel.app
primeng.org

Please sign in to comment.