From 143c9b0a5cd9d687312795e699306acb3c2cd1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87etin?= <69278826+cetincakiroglu@users.noreply.github.com> Date: Wed, 1 Nov 2023 16:59:13 +0300 Subject: [PATCH] Code format --- .../animateonscroll/animateonscroll.ts | 35 +- .../components/autocomplete/autocomplete.ts | 2 +- .../components/cascadeselect/cascadeselect.ts | 46 +- src/app/components/contextmenu/contextmenu.ts | 4 +- src/app/components/password/password.ts | 4 +- src/app/components/rating/rating.ts | 36 +- .../components/selectbutton/selectbutton.ts | 2 +- .../doc/animateonscroll/accessibilitydoc.ts | 22 +- .../doc/autocomplete/accessibilitydoc.ts | 255 ++++++----- .../showcase/doc/calendar/accessibilitydoc.ts | 430 +++++++++--------- .../doc/cascadeselect/accessibilitydoc.ts | 225 +++++---- .../showcase/doc/checkbox/accessibilitydoc.ts | 71 ++- .../showcase/doc/chips/accessibilitydoc.ts | 157 ++++--- .../doc/colorpicker/accessibilitydoc.ts | 213 +++++---- .../showcase/doc/dropdown/accessibilitydoc.ts | 323 +++++++------ .../showcase/doc/editor/accessibilitydoc.ts | 17 +- .../doc/inputmask/accessibilitydoc.ts | 59 ++- .../doc/inputnumber/accessibilitydoc.ts | 107 +++-- .../doc/inputswitch/accessibilitydoc.ts | 71 ++- .../doc/inputtext/accessibilitydoc.ts | 59 ++- .../doc/inputtextarea/accessibilitydoc.ts | 59 ++- .../doc/keyfilter/accessibilitydoc.ts | 11 +- src/app/showcase/doc/knob/accessibilitydoc.ts | 143 +++--- .../doc/multiselect/accessibilitydoc.ts | 413 +++++++++-------- src/app/showcase/doc/multiselect/groupdoc.ts | 4 +- .../showcase/doc/password/accessibilitydoc.ts | 71 ++- .../doc/radiobutton/accessibilitydoc.ts | 107 +++-- .../showcase/doc/rating/accessibilitydoc.ts | 109 +++-- .../doc/selectbutton/accessibilitydoc.ts | 69 ++- .../showcase/doc/slider/accessibilitydoc.ts | 143 +++--- .../doc/togglebutton/accessibilitydoc.ts | 73 ++- .../doc/tristatecheckbox/accessibilitydoc.ts | 85 ++-- 32 files changed, 1705 insertions(+), 1720 deletions(-) diff --git a/src/app/components/animateonscroll/animateonscroll.ts b/src/app/components/animateonscroll/animateonscroll.ts index 705a9d794ed..e55257033a6 100644 --- a/src/app/components/animateonscroll/animateonscroll.ts +++ b/src/app/components/animateonscroll/animateonscroll.ts @@ -33,7 +33,7 @@ export class AnimateOnScroll implements OnInit, AfterViewInit { * Specifies the root option of the IntersectionObserver API. * @group Props */ - @Input() root: HTMLElement | undefined | null; + @Input() root: HTMLElement | undefined | null; /** * Specifies the rootMargin option of the IntersectionObserver API. * @group Props @@ -63,13 +63,13 @@ export class AnimateOnScroll implements OnInit, AfterViewInit { 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)){ + if (isPlatformBrowser(this.platformId)) { this.renderer.setStyle(this.host.nativeElement, 'opacity', this.enterClass ? '0' : ''); } } ngAfterViewInit() { - if(isPlatformBrowser(this.platformId)){ + if (isPlatformBrowser(this.platformId)) { this.bindIntersectionObserver(); } } @@ -79,16 +79,16 @@ export class AnimateOnScroll implements OnInit, AfterViewInit { root: this.root, rootMargin: this.rootMargin, threshold: this.threshold - } + }; } bindIntersectionObserver() { this.observer = new IntersectionObserver(([entry]) => { - if(this.isObserverActive) { - if(entry.boundingClientRect.top > 0) { + if (this.isObserverActive) { + if (entry.boundingClientRect.top > 0) { entry.isIntersecting ? this.enter() : this.leave(); } - } else if(entry.isIntersecting) { + } else if (entry.isIntersecting) { this.enter(); } @@ -99,16 +99,19 @@ export class AnimateOnScroll implements OnInit, AfterViewInit { // Reset - this.resetObserver = new IntersectionObserver(([entry]) => { - if (entry.boundingClientRect.top > 0 && !entry.isIntersecting) { - this.host.nativeElement.style.opacity = this.enterClass ? '0' : ''; - DomHandler.removeMultipleClasses(this.host.nativeElement, [this.enterClass, this.leaveClass]); + this.resetObserver = new IntersectionObserver( + ([entry]) => { + if (entry.boundingClientRect.top > 0 && !entry.isIntersecting) { + this.host.nativeElement.style.opacity = this.enterClass ? '0' : ''; + DomHandler.removeMultipleClasses(this.host.nativeElement, [this.enterClass, this.leaveClass]); - this.resetObserver.unobserve(this.host.nativeElement); - } + this.resetObserver.unobserve(this.host.nativeElement); + } - this.animationState = undefined; - }, {...this.options, threshold: 0}) + this.animationState = undefined; + }, + { ...this.options, threshold: 0 } + ); } enter() { @@ -141,7 +144,7 @@ export class AnimateOnScroll implements OnInit, AfterViewInit { DomHandler.removeMultipleClasses(this.host.nativeElement, [this.enterClass, this.leaveClass]); !this.once && this.resetObserver.observe(this.host.nativeElement); this.unbindAnimationEvents(); - }) + }); } } diff --git a/src/app/components/autocomplete/autocomplete.ts b/src/app/components/autocomplete/autocomplete.ts index 7409e04cc67..07cfcf70bae 100755 --- a/src/app/components/autocomplete/autocomplete.ts +++ b/src/app/components/autocomplete/autocomplete.ts @@ -1531,7 +1531,7 @@ export class AutoComplete implements AfterViewChecked, AfterContentInit, OnDestr } getOptionLabel(option: any) { - return this.field || this.optionLabel ? ObjectUtils.resolveFieldData(option, this.field || this.optionLabel) : option && option.label != undefined ? option.label : option; + return this.field || this.optionLabel ? ObjectUtils.resolveFieldData(option, this.field || this.optionLabel) : option && option.label != undefined ? option.label : option; } getOptionValue(option) { diff --git a/src/app/components/cascadeselect/cascadeselect.ts b/src/app/components/cascadeselect/cascadeselect.ts index fb6578a31d3..249530d350a 100755 --- a/src/app/components/cascadeselect/cascadeselect.ts +++ b/src/app/components/cascadeselect/cascadeselect.ts @@ -45,24 +45,18 @@ export const CASCADESELECT_VALUE_ACCESSOR: any = { template: `