Skip to content

Commit

Permalink
Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Jun 13, 2024
1 parent 364d722 commit 37ba871
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 13 deletions.
11 changes: 9 additions & 2 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 @@ -439,7 +443,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
5 changes: 4 additions & 1 deletion src/app/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ export class ButtonDirective implements AfterViewInit, OnDestroy {
</defs>
</svg>`;

constructor(public el: ElementRef, @Inject(DOCUMENT) private document: Document) {}
constructor(
public el: ElementRef,
@Inject(DOCUMENT) private document: Document
) {}

ngAfterViewInit() {
DomHandler.addMultipleClasses(this.htmlElement, this.getStyleClass().join(' '));
Expand Down
9 changes: 8 additions & 1 deletion src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,14 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV

editableInputValue = computed(() => this.getOptionLabel(this.selectedOption) || this.modelValue() || '');

constructor(public el: ElementRef, public renderer: Renderer2, public cd: ChangeDetectorRef, public zone: NgZone, public filterService: FilterService, public config: PrimeNGConfig) {
constructor(
public el: ElementRef,
public renderer: Renderer2,
public cd: ChangeDetectorRef,
public zone: NgZone,
public filterService: FilterService,
public config: PrimeNGConfig
) {
effect(() => {
const modelValue = this.modelValue();
const visibleOptions = this.visibleOptions();
Expand Down
5 changes: 4 additions & 1 deletion src/app/components/dynamicdialog/dynamicdialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { DynamicDialogRef } from './dynamicdialog-ref';
template: ` <h2>PrimeNG ROCKS!</h2> `
})
export class TestComponent {
constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig) {}
constructor(
public ref: DynamicDialogRef,
public config: DynamicDialogConfig
) {}
}

@Component({
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft
}

isSelectionAllDisabled() {
return this.showToggleAll && ObjectUtils.isEmpty(this.selectionLimit)
return this.showToggleAll && ObjectUtils.isEmpty(this.selectionLimit);
}

isValidSelectedOption(option) {
Expand Down Expand Up @@ -2004,7 +2004,7 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft
} else {
this.modelValue.set(this.value);
}

this.cd.markForCheck();
}

Expand Down
8 changes: 4 additions & 4 deletions src/app/components/tree/tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,20 +254,20 @@ describe('Tree', () => {
const onKeyDownSpy = spyOn(documentsNode, 'onKeyDown').and.callThrough();

const firstEl = contentEls[0];
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'ArrowRight'}));
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'ArrowRight' }));
fixture.detectChanges();

expect(onKeyDownSpy).toHaveBeenCalled();
expect(documentsNode.node.expanded).toBeTruthy();
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'ArrowLeft'}));
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'ArrowLeft' }));
fixture.detectChanges();

expect(documentsNode.node.expanded).toBeFalsy();
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'Enter'}));
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'Enter' }));
fixture.detectChanges();

expect(documentsNode.node.expanded).toBeFalsy();
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'Enter'}));
firstEl.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { code: 'Enter' }));
fixture.detectChanges();

expect(documentsNode.node.expanded).toBeFalsy();
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 @@ -1157,7 +1157,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/doc/slider/reactiveformsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Code } from '@domain/code';
</app-docsectiontext>
<div class="card flex justify-content-center">
<form [formGroup]="formGroup">
<p-slider formControlName="value" styleClass="w-14rem"/>
<p-slider formControlName="value" styleClass="w-14rem" />
</form>
</div>
<app-code [code]="code" selector="slider-reactive-forms-demo"></app-code>
Expand Down

0 comments on commit 37ba871

Please sign in to comment.