Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jul 18, 2024
1 parent 9b2daf4 commit eb202f4
Show file tree
Hide file tree
Showing 204 changed files with 322 additions and 1,287 deletions.
11 changes: 2 additions & 9 deletions src/app/components/accordion/accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,7 @@ 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 @@ -441,10 +437,7 @@ 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
6 changes: 1 addition & 5 deletions src/app/components/animate/animate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ export class Animate implements OnInit, AfterViewInit {

timeout: any;

constructor(
private host: ElementRef,
public el: ElementRef,
public renderer: Renderer2
) {}
constructor(private host: ElementRef, public el: ElementRef, public renderer: Renderer2) {}

ngOnInit() {
console.log('pAnimate directive is deprecated in 16.7.0 and will be removed in the future. Use pAnimateOnScroll directive instead');
Expand Down
8 changes: 1 addition & 7 deletions src/app/components/animateonscroll/animateonscroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,7 @@ export class AnimateOnScroll implements OnInit, AfterViewInit {

animationEndListener: VoidFunction | undefined;

constructor(
@Inject(DOCUMENT) private document: Document,
@Inject(PLATFORM_ID) private platformId: any,
private host: ElementRef,
public el: ElementRef,
public renderer: Renderer2
) {}
constructor(@Inject(DOCUMENT) private document: Document, @Inject(PLATFORM_ID) private platformId: any, private host: ElementRef, public el: ElementRef, public renderer: Renderer2) {}

ngOnInit() {
if (isPlatformBrowser(this.platformId)) {
Expand Down
10 changes: 1 addition & 9 deletions src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,15 +880,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr
return typeof this.modelValue() === 'string' && this.optionValue;
}

constructor(
@Inject(DOCUMENT) private document: Document,
public el: ElementRef,
public renderer: Renderer2,
public cd: ChangeDetectorRef,
public config: PrimeNGConfig,
public overlayService: OverlayService,
private zone: NgZone
) {
constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public renderer: Renderer2, public cd: ChangeDetectorRef, public config: PrimeNGConfig, public overlayService: OverlayService, private zone: NgZone) {
effect(() => {
this.filled = ObjectUtils.isNotEmpty(this.modelValue());
});
Expand Down
6 changes: 1 addition & 5 deletions src/app/components/badge/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ export class BadgeDirective implements OnChanges, AfterViewInit {
return this.id && !this.disabled;
}

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

public ngOnChanges({ value, size, severity, disabled }: SimpleChanges): void {
if (disabled) {
Expand Down
9 changes: 1 addition & 8 deletions src/app/components/blockui/blockui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,7 @@ export class BlockUI implements AfterViewInit, OnDestroy {

contentTemplate: TemplateRef<any> | undefined;

constructor(
@Inject(DOCUMENT) private document: Document,
public el: ElementRef,
public cd: ChangeDetectorRef,
public config: PrimeNGConfig,
private renderer: Renderer2,
@Inject(PLATFORM_ID) public platformId: any
) {}
constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public cd: ChangeDetectorRef, public config: PrimeNGConfig, private renderer: Renderer2, @Inject(PLATFORM_ID) public platformId: any) {}

ngAfterViewInit() {
if (this._blocked) this.block();
Expand Down
5 changes: 1 addition & 4 deletions src/app/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ export class ButtonDirective implements AfterViewInit, OnDestroy {

private _internalClasses: string[] = Object.values(INTERNAL_BUTTON_CLASSES);

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
10 changes: 1 addition & 9 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1169,15 +1169,7 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor {
return this.currentView === 'year' ? this.getTranslation('nextDecade') : this.currentView === 'month' ? this.getTranslation('nextYear') : this.getTranslation('nextMonth');
}

constructor(
@Inject(DOCUMENT) private document: Document,
public el: ElementRef,
public renderer: Renderer2,
public cd: ChangeDetectorRef,
private zone: NgZone,
private config: PrimeNGConfig,
public overlayService: OverlayService
) {
constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public renderer: Renderer2, public cd: ChangeDetectorRef, private zone: NgZone, private config: PrimeNGConfig, public overlayService: OverlayService) {
this.window = this.document.defaultView as Window;
}

Expand Down
10 changes: 1 addition & 9 deletions src/app/components/carousel/carousel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,7 @@ export class Carousel implements AfterContentInit {

window: Window;

constructor(
public el: ElementRef,
public zone: NgZone,
public cd: ChangeDetectorRef,
private renderer: Renderer2,
@Inject(DOCUMENT) private document: Document,
@Inject(PLATFORM_ID) private platformId: any,
private config: PrimeNGConfig
) {
constructor(public el: ElementRef, public zone: NgZone, public cd: ChangeDetectorRef, private renderer: Renderer2, @Inject(DOCUMENT) private document: Document, @Inject(PLATFORM_ID) private platformId: any, private config: PrimeNGConfig) {
this.totalShiftedItems = this.page * this.numScroll * -1;
this.window = this.document.defaultView as Window;
}
Expand Down
12 changes: 2 additions & 10 deletions src/app/components/cascadeselect/cascadeselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ export class CascadeSelectSub implements OnInit {
return this.config.getTranslation(TranslationKeys.ARIA)['listLabel'];
}

constructor(
private el: ElementRef,
public config: PrimeNGConfig
) {}
constructor(private el: ElementRef, public config: PrimeNGConfig) {}

ngOnInit() {
if (!this.root) {
Expand Down Expand Up @@ -1306,12 +1303,7 @@ export class CascadeSelect implements OnInit, AfterContentInit {
return grouped ? this.getOptionGroupLabel(processedOption.option) : this.getOptionLabel(processedOption.option);
}

constructor(
private el: ElementRef,
private cd: ChangeDetectorRef,
private config: PrimeNGConfig,
public overlayService: OverlayService
) {
constructor(private el: ElementRef, private cd: ChangeDetectorRef, private config: PrimeNGConfig, public overlayService: OverlayService) {
effect(() => {
const activeOptionPath = this.activeOptionPath();
if (ObjectUtils.isNotEmpty(activeOptionPath)) {
Expand Down
6 changes: 1 addition & 5 deletions src/app/components/chart/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ export class UIChart implements AfterViewInit, OnDestroy {

chart: any;

constructor(
@Inject(PLATFORM_ID) private platformId: any,
public el: ElementRef,
private zone: NgZone
) {}
constructor(@Inject(PLATFORM_ID) private platformId: any, public el: ElementRef, private zone: NgZone) {}

ngAfterViewInit() {
this.initChart();
Expand Down
6 changes: 1 addition & 5 deletions src/app/components/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,7 @@ export class Checkbox implements ControlValueAccessor {

focused: boolean = false;

constructor(
public cd: ChangeDetectorRef,
private readonly injector: Injector,
public config: PrimeNGConfig
) {}
constructor(public cd: ChangeDetectorRef, private readonly injector: Injector, public config: PrimeNGConfig) {}

ngAfterContentInit() {
this.templates.forEach((item) => {
Expand Down
7 changes: 1 addition & 6 deletions src/app/components/chips/chips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,7 @@ export class Chips implements AfterContentInit, ControlValueAccessor {
return this.max && this.value && this.max === this.value.length;
}

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

ngAfterContentInit() {
this.templates.forEach((item) => {
Expand Down
10 changes: 1 addition & 9 deletions src/app/components/confirmdialog/confirmdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,7 @@ export class ConfirmDialog implements AfterContentInit, OnInit, OnDestroy {

translationSubscription: Subscription | undefined;

constructor(
public el: ElementRef,
public renderer: Renderer2,
private confirmationService: ConfirmationService,
public zone: NgZone,
private cd: ChangeDetectorRef,
public config: PrimeNGConfig,
@Inject(DOCUMENT) private document: Document
) {
constructor(public el: ElementRef, public renderer: Renderer2, private confirmationService: ConfirmationService, public zone: NgZone, private cd: ChangeDetectorRef, public config: PrimeNGConfig, @Inject(DOCUMENT) private document: Document) {
this.subscription = this.confirmationService.requireConfirmation$.subscribe((confirmation) => {
if (!confirmation) {
this.hide();
Expand Down
9 changes: 1 addition & 8 deletions src/app/components/contextmenu/contextmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,7 @@ export class ContextMenuSub {

@ViewChild('sublist') sublistViewChild: ElementRef;

constructor(
@Inject(DOCUMENT) private document: Document,
public el: ElementRef,
public renderer: Renderer2,
private cd: ChangeDetectorRef,
@Inject(forwardRef(() => ContextMenu)) public contextMenu: ContextMenu,
private ref: ViewContainerRef
) {}
constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public renderer: Renderer2, private cd: ChangeDetectorRef, @Inject(forwardRef(() => ContextMenu)) public contextMenu: ContextMenu, private ref: ViewContainerRef) {}

getItemProp(processedItem: any, name: string, params: any | null = null) {
return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name], params) : undefined;
Expand Down
9 changes: 2 additions & 7 deletions src/app/components/dataview/dataview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ import { DataViewLayoutChangeEvent, DataViewLazyLoadEvent, DataViewPageEvent, Da
></p-paginator>
<div class="p-dataview-content">
<ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: paginator ? (filteredValue || value | slice: (lazy ? 0 : first) : (lazy ? 0 : first) + rows) : filteredValue || value }"></ng-container>
<ng-container *ngTemplateOutlet="itemTemplate; context: { $implicit: paginator ? (filteredValue || value | slice : (lazy ? 0 : first) : (lazy ? 0 : first) + rows) : filteredValue || value }"></ng-container>
<div *ngIf="isEmpty() && !loading">
<div class="p-dataview-emptymessage">
Expand Down Expand Up @@ -358,12 +358,7 @@ export class DataView implements OnInit, AfterContentInit, OnDestroy, BlockableU
return this.emptyMessage || this.config.getTranslation(TranslationKeys.EMPTY_MESSAGE);
}

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

ngOnInit() {
if (this.lazy && this.lazyLoadOnInit) {
Expand Down
9 changes: 1 addition & 8 deletions src/app/components/defer/defer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ export class DeferredLoader implements AfterViewInit, OnDestroy {

window: Window;

constructor(
@Inject(DOCUMENT) private document: Document,
@Inject(PLATFORM_ID) private platformId: any,
public el: ElementRef,
public renderer: Renderer2,
public viewContainer: ViewContainerRef,
private cd: ChangeDetectorRef
) {
constructor(@Inject(DOCUMENT) private document: Document, @Inject(PLATFORM_ID) private platformId: any, public el: ElementRef, public renderer: Renderer2, public viewContainer: ViewContainerRef, private cd: ChangeDetectorRef) {
this.window = this.document.defaultView as Window;
}

Expand Down
10 changes: 1 addition & 9 deletions src/app/components/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,15 +546,7 @@ export class Dialog implements AfterContentInit, OnInit, OnDestroy {
return this.config.getTranslation(TranslationKeys.ARIA)['maximizeLabel'];
}

constructor(
@Inject(DOCUMENT) private document: Document,
@Inject(PLATFORM_ID) private platformId: any,
public el: ElementRef,
public renderer: Renderer2,
public zone: NgZone,
private cd: ChangeDetectorRef,
public config: PrimeNGConfig
) {
constructor(@Inject(DOCUMENT) private document: Document, @Inject(PLATFORM_ID) private platformId: any, public el: ElementRef, public renderer: Renderer2, public zone: NgZone, private cd: ChangeDetectorRef, public config: PrimeNGConfig) {
this.window = this.document.defaultView as Window;
}

Expand Down
5 changes: 1 addition & 4 deletions src/app/components/dock/dock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,7 @@ export class Dock implements AfterContentInit {
return this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : null;
}

constructor(
private el: ElementRef,
public cd: ChangeDetectorRef
) {
constructor(private el: ElementRef, public cd: ChangeDetectorRef) {
this.currentIndex = -3;
}

Expand Down
12 changes: 2 additions & 10 deletions src/app/components/dragdrop/dragdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ export class Draggable implements AfterViewInit, OnDestroy {

_pDraggableDisabled: boolean = false;

constructor(
public el: ElementRef,
public zone: NgZone,
private renderer: Renderer2
) {}
constructor(public el: ElementRef, public zone: NgZone, private renderer: Renderer2) {}

@Input() get pDraggableDisabled(): boolean {
return this._pDraggableDisabled;
Expand Down Expand Up @@ -199,11 +195,7 @@ export class Droppable implements AfterViewInit, OnDestroy {
*/
@Output() onDrop: EventEmitter<DragEvent> = new EventEmitter();

constructor(
public el: ElementRef,
public zone: NgZone,
private renderer: Renderer2
) {}
constructor(public el: ElementRef, public zone: NgZone, private renderer: Renderer2) {}

dragOverListener: VoidListener;

Expand Down
9 changes: 1 addition & 8 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1018,14 +1018,7 @@ 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
6 changes: 1 addition & 5 deletions src/app/components/dynamicdialog/dialogservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ import { ObjectUtils } from 'primeng/utils';
export class DialogService {
dialogComponentRefMap: Map<DynamicDialogRef<any>, ComponentRef<DynamicDialogComponent>> = new Map();

constructor(
private appRef: ApplicationRef,
private injector: Injector,
@Inject(DOCUMENT) private document: Document
) {}
constructor(private appRef: ApplicationRef, private injector: Injector, @Inject(DOCUMENT) private document: Document) {}
/**
* Displays the dialog using the dynamic dialog object options.
* @param {*} componentType - Dynamic component for content template.
Expand Down
5 changes: 1 addition & 4 deletions src/app/components/dynamicdialog/dynamicdialog-injector.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { InjectOptions, Injector, ProviderToken, InjectFlags } from '@angular/core';

export class DynamicDialogInjector implements Injector {
constructor(
private _parentInjector: Injector,
private _additionalTokens: WeakMap<any, any>
) {}
constructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) {}

get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T {
const value = this._additionalTokens.get(token);
Expand Down
5 changes: 1 addition & 4 deletions src/app/components/dynamicdialog/dynamicdialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ 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
Loading

0 comments on commit eb202f4

Please sign in to comment.