Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jul 11, 2024
1 parent 2644016 commit e142de6
Show file tree
Hide file tree
Showing 197 changed files with 1,046 additions and 283 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 @@ -437,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
6 changes: 5 additions & 1 deletion src/app/components/animate/animate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ 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: 7 additions & 1 deletion src/app/components/animateonscroll/animateonscroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,13 @@ 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
16 changes: 12 additions & 4 deletions src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,10 +827,10 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr

get panelStyles() {
return {
'max-height': this.virtualScroll ? 'auto' : this.scrollHeight,
...this.panelStyle
'max-height': this.virtualScroll ? 'auto' : this.scrollHeight,
...this.panelStyle
};
}
}

get inputClass() {
return {
Expand Down Expand Up @@ -880,7 +880,15 @@ 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: 5 additions & 1 deletion src/app/components/badge/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ 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: 8 additions & 1 deletion src/app/components/blockui/blockui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ 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: 4 additions & 1 deletion src/app/components/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ 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
12 changes: 10 additions & 2 deletions src/app/components/cascadeselect/cascadeselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ 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 @@ -1303,7 +1306,12 @@ 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: 5 additions & 1 deletion src/app/components/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ 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: 6 additions & 1 deletion src/app/components/chips/chips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,12 @@ 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
9 changes: 8 additions & 1 deletion src/app/components/contextmenu/contextmenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,14 @@ 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: 7 additions & 2 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,7 +358,12 @@ 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: 8 additions & 1 deletion src/app/components/defer/defer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ 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
5 changes: 4 additions & 1 deletion src/app/components/dock/dock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ 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: 10 additions & 2 deletions src/app/components/dragdrop/dragdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ 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 @@ -195,7 +199,11 @@ 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
2 changes: 1 addition & 1 deletion src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ export class Dropdown implements OnInit, AfterViewInit, AfterContentInit, AfterV
}

updatePlaceHolderForFloatingLabel(): void {
if(this._placeholder() !== null && this._placeholder() !== undefined) {
if (this._placeholder() !== null && this._placeholder() !== undefined) {
// We don't want to overwrite the placeholder if it's already set
return;
}
Expand Down
6 changes: 5 additions & 1 deletion src/app/components/dynamicdialog/dialogservice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ 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: 4 additions & 1 deletion src/app/components/dynamicdialog/dynamicdialog-injector.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
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: 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
6 changes: 3 additions & 3 deletions src/app/components/dynamicdialog/dynamicdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ export class DynamicDialogComponent implements AfterViewInit, OnDestroy {

get containerStyle() {
return {
...this.config.style,
'width': this.config.width,
'height': this.config.height
...this.config.style,
width: this.config.width,
height: this.config.height
};
}

Expand Down
5 changes: 4 additions & 1 deletion src/app/components/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ export class Editor implements AfterContentInit, ControlValueAccessor {

private quillElements!: { editorElement: HTMLElement; toolbarElement: HTMLElement };

constructor(public el: ElementRef, @Inject(PLATFORM_ID) private platformId: object) {
constructor(
public el: ElementRef,
@Inject(PLATFORM_ID) private platformId: object
) {
/**
* Read or write the DOM once, when initializing non-Angular (Quill) library.
*/
Expand Down
24 changes: 21 additions & 3 deletions src/app/components/galleria/galleria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@ export class Galleria implements OnChanges, OnDestroy {

numVisibleLimit = 0;

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

ngAfterContentInit() {
this.templates?.forEach((item) => {
Expand Down Expand Up @@ -503,7 +509,13 @@ export class GalleriaContent implements DoCheck {

private differ: any;

constructor(public galleria: Galleria, public cd: ChangeDetectorRef, private differs: KeyValueDiffers, public config: PrimeNGConfig, private elementRef: ElementRef) {
constructor(
public galleria: Galleria,
public cd: ChangeDetectorRef,
private differs: KeyValueDiffers,
public config: PrimeNGConfig,
private elementRef: ElementRef
) {
this.id = this.galleria.id || UniqueComponentId();
this.differ = this.differs.find(this.galleria).create();
}
Expand Down Expand Up @@ -1017,7 +1029,13 @@ export class GalleriaThumbnails implements OnInit, AfterContentChecked, AfterVie

_oldactiveIndex: number = 0;

constructor(public galleria: Galleria, @Inject(DOCUMENT) private document: Document, @Inject(PLATFORM_ID) private platformId: any, private renderer: Renderer2, private cd: ChangeDetectorRef) {}
constructor(
public galleria: Galleria,
@Inject(DOCUMENT) private document: Document,
@Inject(PLATFORM_ID) private platformId: any,
private renderer: Renderer2,
private cd: ChangeDetectorRef
) {}

ngOnInit() {
if (isPlatformBrowser(this.platformId)) {
Expand Down
Loading

0 comments on commit e142de6

Please sign in to comment.