Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jun 27, 2024
1 parent b683d1b commit 11c4443
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 10 deletions.
13 changes: 9 additions & 4 deletions src/app/components/accordion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ export class AccordionTab implements AfterContentInit, OnDestroy {

accordion: Accordion;

constructor(@Inject(forwardRef(() => Accordion)) accordion: Accordion, public el: ElementRef, public changeDetector: ChangeDetectorRef) {
constructor(
@Inject(forwardRef(() => Accordion)) accordion: Accordion,
public el: ElementRef,
public changeDetector: ChangeDetectorRef
) {
this.accordion = accordion as Accordion;
this.id = UniqueComponentId();
}
Expand Down Expand Up @@ -258,7 +262,6 @@ export class AccordionTab implements AfterContentInit, OnDestroy {
}

toggle(event?: MouseEvent | KeyboardEvent) {

if (this.disabled) {
return false;
}
Expand Down Expand Up @@ -438,7 +441,10 @@ export class Accordion implements BlockableUI, AfterContentInit, OnDestroy {

public tabs: AccordionTab[] = [];

constructor(public el: ElementRef, public changeDetector: ChangeDetectorRef) {}
constructor(
public el: ElementRef,
public changeDetector: ChangeDetectorRef
) {}

@HostListener('keydown', ['$event'])
onKeydown(event) {
Expand Down Expand Up @@ -638,4 +644,3 @@ export class Accordion implements BlockableUI, AfterContentInit, OnDestroy {
declarations: [Accordion, AccordionTab]
})
export class AccordionModule {}

2 changes: 1 addition & 1 deletion src/app/components/dom/domhandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class DomHandler {
const elementOuterHeight = elementDimensions.height;
const elementOuterWidth = elementDimensions.width;
const targetOuterHeight = target.offsetHeight ?? target.getBoundingClientRect().height;
const targetOuterWidth = target.offsetWidth ?? target.getBoundingClientRect().width;
const targetOuterWidth = target.offsetWidth ?? target.getBoundingClientRect().width;
const targetOffset = target.getBoundingClientRect();
const windowScrollTop = this.getWindowScrollTop();
const windowScrollLeft = this.getWindowScrollLeft();
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/dynamicdialog/dynamicdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class DynamicDialogComponent implements AfterViewInit, OnDestroy {

get parent() {
const domElements = Array.from(this.document.getElementsByClassName('p-dialog'));

if (domElements.length > 1) {
return domElements.pop();
}
Expand Down
8 changes: 7 additions & 1 deletion src/app/components/listbox/listbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,13 @@ export class Listbox implements AfterContentInit, OnInit, ControlValueAccessor,
return this._filterValue() ? this.filterService.filter(options, this.searchFields, this._filterValue(), this.filterMatchMode, this.filterLocale) : options;
});

constructor(public el: ElementRef, public cd: ChangeDetectorRef, public filterService: FilterService, public config: PrimeNGConfig, private renderer: Renderer2) {}
constructor(
public el: ElementRef,
public cd: ChangeDetectorRef,
public filterService: FilterService,
public config: PrimeNGConfig,
private renderer: Renderer2
) {}

ngOnInit() {
this.id = this.id || UniqueComponentId();
Expand Down
7 changes: 6 additions & 1 deletion src/app/components/tabmenu/tabmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,12 @@ export class TabMenu implements AfterContentInit, AfterViewInit, AfterViewChecke
return this._focusableItems;
}

constructor(@Inject(PLATFORM_ID) private platformId: any, private router: Router, private route: ActivatedRoute, private cd: ChangeDetectorRef) {
constructor(
@Inject(PLATFORM_ID) private platformId: any,
private router: Router,
private route: ActivatedRoute,
private cd: ChangeDetectorRef
) {
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((event: NavigationEnd) => {
this.cd.markForCheck();
});
Expand Down
7 changes: 6 additions & 1 deletion src/app/components/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,12 @@ export class Tree implements OnInit, AfterContentInit, OnChanges, OnDestroy, Blo

public dragStopSubscription: Subscription | undefined | null;

constructor(public el: ElementRef, @Optional() public dragDropService: TreeDragDropService, public config: PrimeNGConfig, private cd: ChangeDetectorRef) {}
constructor(
public el: ElementRef,
@Optional() public dragDropService: TreeDragDropService,
public config: PrimeNGConfig,
private cd: ChangeDetectorRef
) {}

ngOnInit() {
if (this.droppableNodes) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/showcase/layout/menu/app.menuitem.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ export class AppMenuItemComponent {

isActiveRootMenuItem(menuitem: MenuItem): boolean {
const url = this.router.url.split('#')[0];
return menuitem.children && !menuitem.children.some((item) => url.includes( item.routerLink) || (item.children && item.children.some((it) => url.includes(it.routerLink))));
return menuitem.children && !menuitem.children.some((item) => url.includes(item.routerLink) || (item.children && item.children.some((it) => url.includes(it.routerLink))));
}
}

0 comments on commit 11c4443

Please sign in to comment.