From 46742de2012753b14973aac5e7332dc0bff2ae7a Mon Sep 17 00:00:00 2001 From: Diego Franchina Date: Wed, 29 Nov 2023 16:47:59 +0100 Subject: [PATCH] formatted code --- src/app/components/slidemenu/slidemenu.ts | 19 ++---- src/app/components/table/table.ts | 3 +- .../doc/inputgroup/inputgroupddoc.module.ts | 2 +- .../showcase/doc/ripple/accessibilitydoc.ts | 6 +- src/app/showcase/layout/app.config.ts | 6 +- .../layout/config/app.config.module.ts | 2 +- .../layout/doc/codeeditor/templates.ts | 68 +++++++++---------- .../pages/landing/userssection.component.ts | 1 - 8 files changed, 50 insertions(+), 57 deletions(-) diff --git a/src/app/components/slidemenu/slidemenu.ts b/src/app/components/slidemenu/slidemenu.ts index ee411dc43c7..a32bc02b83a 100755 --- a/src/app/components/slidemenu/slidemenu.ts +++ b/src/app/components/slidemenu/slidemenu.ts @@ -712,12 +712,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { const focusedItemInfo = this.focusedItemInfo(); if (grouped) { - this.focusedItemInfo.set({...focusedItemInfo, - index : -1, - level : focusedItemInfo.level + 1, - parentKey : processedItem.key, - item : processedItem.item - }) + this.focusedItemInfo.set({ ...focusedItemInfo, index: -1, level: focusedItemInfo.level + 1, parentKey: processedItem.key, item: processedItem.item }); this.animate('right'); } else { this.onItemChange(event); @@ -802,7 +797,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { ...focusedItemInfo, index: -1, item: null - }) + }); break; default: break; @@ -917,7 +912,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { ...focusedItemInfo, index: this.findLastFocusedItemIndex(), item: null - }) + }); event.preventDefault(); } @@ -952,7 +947,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { ...focusedItemInfo, index: processedItem.index, item: processedItem.item - }) + }); } } @@ -984,7 +979,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { } if (this.focusedItemInfo().index === -1 && this.left < 0) { - this.focusedItemInfo.set({...this.focusedItemInfo(), index: 0}) + this.focusedItemInfo.set({ ...this.focusedItemInfo(), index: 0 }); } if (this.focusedItemInfo().index === -1 && !this.left) { @@ -1000,7 +995,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { ...this.focusedItemInfo(), index: -1, item: null - }) + }); } this.searchValue = ''; !this.popup && this.unbindOutsideClickListener(); @@ -1226,7 +1221,7 @@ export class SlideMenu implements OnInit, AfterContentInit, OnDestroy { changeFocusedItemIndex(event: any, index: number) { if (this.focusedItemInfo().index !== index) { - this.focusedItemInfo.set({...this.focusedItemInfo(), index}); + this.focusedItemInfo.set({ ...this.focusedItemInfo(), index }); this.scrollInView(); } } diff --git a/src/app/components/table/table.ts b/src/app/components/table/table.ts index 2fecbb981f5..5ce6a1a3722 100644 --- a/src/app/components/table/table.ts +++ b/src/app/components/table/table.ts @@ -4300,8 +4300,7 @@ export class EditableColumn implements OnChanges, AfterViewInit, OnDestroy { DomHandler.invokeElementMethod(event.target, 'blur'); DomHandler.invokeElementMethod(targetCell, 'click'); event.preventDefault(); - } - else{ + } else { if (this.dt.isEditingCellValid()) { this.closeEditingCell(true, event); } diff --git a/src/app/showcase/doc/inputgroup/inputgroupddoc.module.ts b/src/app/showcase/doc/inputgroup/inputgroupddoc.module.ts index 627fda6dcd6..24182e05119 100644 --- a/src/app/showcase/doc/inputgroup/inputgroupddoc.module.ts +++ b/src/app/showcase/doc/inputgroup/inputgroupddoc.module.ts @@ -17,7 +17,7 @@ import { InputGroupModule } from 'primeng/inputgroup'; import { InputGroupAddonModule } from 'primeng/inputgroupaddon'; @NgModule({ - imports: [CommonModule, RouterModule, AppCodeModule, AppDocModule, FormsModule, InputTextModule, ButtonModule, CheckboxModule, RadioButtonModule,InputGroupModule,InputGroupAddonModule], + imports: [CommonModule, RouterModule, AppCodeModule, AppDocModule, FormsModule, InputTextModule, ButtonModule, CheckboxModule, RadioButtonModule, InputGroupModule, InputGroupAddonModule], exports: [AppDocModule], declarations: [ImportDoc, BasicDoc, MultipleDoc, ButtonDoc, CheckboxDoc] }) diff --git a/src/app/showcase/doc/ripple/accessibilitydoc.ts b/src/app/showcase/doc/ripple/accessibilitydoc.ts index 6e5271cb269..2e0ecb9f224 100644 --- a/src/app/showcase/doc/ripple/accessibilitydoc.ts +++ b/src/app/showcase/doc/ripple/accessibilitydoc.ts @@ -3,13 +3,11 @@ import { Component } from '@angular/core'; @Component({ selector: 'accessibility-doc', template: ` -

Screen Reader

+

Screen Reader

Ripple element has the aria-hidden attribute as true so that it gets ignored by the screen readers.

Keyboard Support

Component does not include any interactive elements.

` }) -export class AccessibilityDoc { - -} +export class AccessibilityDoc {} diff --git a/src/app/showcase/layout/app.config.ts b/src/app/showcase/layout/app.config.ts index 4d49769bb68..ec48c41a172 100644 --- a/src/app/showcase/layout/app.config.ts +++ b/src/app/showcase/layout/app.config.ts @@ -7,5 +7,9 @@ import { provideAnimationsAsync } from '@angular/platform-browser/animations/asy import { provideHttpClient, withFetch } from '@angular/common/http'; export const appConfig: ApplicationConfig = { - providers: [provideRouter(routes, withInMemoryScrolling({ anchorScrolling: 'enabled', scrollPositionRestoration: 'enabled' }), withEnabledBlockingInitialNavigation(), withViewTransitions()), provideHttpClient(withFetch()), provideAnimationsAsync()] + providers: [ + provideRouter(routes, withInMemoryScrolling({ anchorScrolling: 'enabled', scrollPositionRestoration: 'enabled' }), withEnabledBlockingInitialNavigation(), withViewTransitions()), + provideHttpClient(withFetch()), + provideAnimationsAsync() + ] }; diff --git a/src/app/showcase/layout/config/app.config.module.ts b/src/app/showcase/layout/config/app.config.module.ts index 3f69361bda9..b1d15ee68ff 100644 --- a/src/app/showcase/layout/config/app.config.module.ts +++ b/src/app/showcase/layout/config/app.config.module.ts @@ -8,7 +8,7 @@ import { SidebarModule } from 'primeng/sidebar'; import { AppConfigComponent } from './app.config.component'; import { SelectButtonModule } from 'primeng/selectbutton'; @NgModule({ - imports: [CommonModule, FormsModule, SidebarModule, InputSwitchModule, ButtonModule, RadioButtonModule,SelectButtonModule], + imports: [CommonModule, FormsModule, SidebarModule, InputSwitchModule, ButtonModule, RadioButtonModule, SelectButtonModule], exports: [AppConfigComponent], declarations: [AppConfigComponent] }) diff --git a/src/app/showcase/layout/doc/codeeditor/templates.ts b/src/app/showcase/layout/doc/codeeditor/templates.ts index 2e6bf0a76ab..c26c1cc907e 100644 --- a/src/app/showcase/layout/doc/codeeditor/templates.ts +++ b/src/app/showcase/layout/doc/codeeditor/templates.ts @@ -21,42 +21,42 @@ const PrimeNG = { }; const demoDependencies = [ - "@angular-devkit/build-angular", - "@angular/animations", - "@angular/cdk", - "@angular/cli", - "@angular/common", - "@angular/compiler", - "@angular/compiler-cli", - "@angular/core", - "@angular/forms", - "@angular/material", - "@angular/material-moment-adapter", - "@angular/platform-browser", - "@angular/platform-browser-dynamic", - "@angular/platform-server", - "@angular/router", - "@nguniversal/builders", - "@nguniversal/common", - "@nguniversal/express-engine", - "quill", - "primeflex", - "chart.js", - "primeicons", - "rxjs", - "tslib", - "zone.js" + '@angular-devkit/build-angular', + '@angular/animations', + '@angular/cdk', + '@angular/cli', + '@angular/common', + '@angular/compiler', + '@angular/compiler-cli', + '@angular/core', + '@angular/forms', + '@angular/material', + '@angular/material-moment-adapter', + '@angular/platform-browser', + '@angular/platform-browser-dynamic', + '@angular/platform-server', + '@angular/router', + '@nguniversal/builders', + '@nguniversal/common', + '@nguniversal/express-engine', + 'quill', + 'primeflex', + 'chart.js', + 'primeicons', + 'rxjs', + 'tslib', + 'zone.js' ]; const getAppDependencies = () => { - const dependencies = {}; - for (const key in app_dependencies) { - if (demoDependencies.includes(key)) { - dependencies[key] = app_dependencies[key]; - } - } + const dependencies = {}; + for (const key in app_dependencies) { + if (demoDependencies.includes(key)) { + dependencies[key] = app_dependencies[key]; + } + } - return dependencies; + return dependencies; }; const getDependencies = () => { @@ -479,8 +479,6 @@ Firefox ESR not ios_saf 15.2-15.3 not safari 15.2-15.3`; - - const getAngularApp = (props: Props = {}) => { const { code, extFiles, routeFiles, selector } = props; const dependencies = getDependencies(); @@ -730,7 +728,7 @@ export class AppModule {}`; 'src/index.html': { content: index_html }, 'src/karma.conf.js': { content: karma_conf_js }, 'src/styles.scss': { content: staticStyles.global }, - 'src/flags.css': { content: staticStyles.flags }, + 'src/flags.css': { content: staticStyles.flags } }; const files = { diff --git a/src/app/showcase/pages/landing/userssection.component.ts b/src/app/showcase/pages/landing/userssection.component.ts index 0ad07d44149..fbb12681159 100644 --- a/src/app/showcase/pages/landing/userssection.component.ts +++ b/src/app/showcase/pages/landing/userssection.component.ts @@ -78,5 +78,4 @@ export class UsersSectionComponent { get isDarkMode() { return this.configService.config.darkMode; } - }