From c8b7c5d4a61f8f76135c6d48fcd6ef4c2aa887ca Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 7 Jan 2024 21:41:36 +0100 Subject: [PATCH] fix: run prettier on all file to avoid prettier issue inside PR --- .../anchor-scrolling/src/app/app.component.ts | 4 +- .../anchor-scrolling/src/app/foo.component.ts | 2 +- .../src/app/home.component.ts | 2 +- apps/angular/anchor-scrolling/src/index.html | 2 +- apps/angular/anchor-scrolling/src/main.ts | 4 +- apps/angular/bug-cd/src/app/app.component.ts | 2 +- apps/angular/bug-cd/src/app/bar.component.ts | 4 +- apps/angular/bug-cd/src/app/foo.component.ts | 4 +- .../src/app/main-navigation.component.ts | 2 +- apps/angular/bug-cd/src/index.html | 2 +- apps/angular/bug-cd/src/main.ts | 4 +- .../src/app/list.component.ts | 5 +- .../src/app/person.component.ts | 2 +- .../context-outlet-type/src/index.html | 2 +- apps/angular/crud/src/app/app.component.ts | 2 +- apps/angular/crud/src/app/app.config.ts | 3 +- apps/angular/crud/src/index.html | 2 +- apps/angular/crud/src/main.ts | 2 +- .../decoupling/src/app/app.component.ts | 4 +- apps/angular/decoupling/src/index.html | 2 +- apps/angular/di/src/app/app.component.ts | 2 +- apps/angular/di/src/app/currency.pipe.ts | 2 +- apps/angular/di/src/app/currency.service.ts | 2 +- apps/angular/di/src/index.html | 2 +- .../injection-token/src/app/app.component.ts | 10 ++-- .../src/app/phone.component.ts | 6 +- .../src/app/timer.component.ts | 4 +- .../src/app/video.component.ts | 6 +- apps/angular/injection-token/src/index.html | 2 +- apps/angular/injection-token/src/main.ts | 4 +- .../src/app/app.component.ts | 4 +- .../interop-rxjs-signal/src/app/app.config.ts | 2 +- .../src/app/detail/detail.component.ts | 22 +++++-- .../src/app/list/photos.store.ts | 24 ++++---- .../src/app/photos.service.ts | 4 +- .../interop-rxjs-signal/src/index.html | 2 +- apps/angular/interop-rxjs-signal/src/main.ts | 4 +- .../src/app/app.component.ts | 12 ++-- .../module-to-standalone/src/index.html | 2 +- apps/angular/ngfor-enhancement/src/index.html | 2 +- .../permissions/src/app/app.component.ts | 4 +- .../permissions/src/app/button.component.ts | 4 +- apps/angular/permissions/src/app/routes.ts | 2 +- apps/angular/permissions/src/index.html | 2 +- apps/angular/permissions/src/main.ts | 2 +- apps/angular/pipe-easy/src/index.html | 2 +- apps/angular/pipe-hard/src/index.html | 2 +- apps/angular/pipe-intermediate/src/index.html | 2 +- .../student-card/student-card.component.ts | 15 +++-- .../teacher-card/teacher-card.component.ts | 15 +++-- .../app/ui/list-item/list-item.component.ts | 4 +- apps/angular/projection/src/index.html | 2 +- .../router-input/src/app/app.component.ts | 6 +- .../router-input/src/app/home.component.ts | 4 +- apps/angular/router-input/src/index.html | 2 +- apps/angular/router-input/src/main.ts | 4 +- apps/angular/styling/src/index.html | 2 +- .../effect-selector/src/app/app.component.ts | 2 +- .../effect-selector/src/app/app.config.ts | 6 +- .../app/store/activity/activity.effects.ts | 12 ++-- .../app/store/activity/activity.reducer.ts | 2 +- .../app/store/activity/activity.selectors.ts | 4 +- .../src/app/store/status/status.actions.ts | 2 +- .../src/app/store/status/status.effects.ts | 15 +++-- .../src/app/store/status/status.reducer.ts | 2 +- .../src/app/store/status/status.selectors.ts | 6 +- .../src/app/store/user/user.effects.ts | 11 ++-- .../src/app/store/user/user.reducer.ts | 2 +- .../src/app/store/user/user.selectors.ts | 4 +- apps/ngrx/effect-selector/src/index.html | 2 +- apps/ngrx/notification/src/app/app.config.ts | 23 ++++---- .../app/data-access/notification.service.ts | 4 +- .../src/app/school/school.store.ts | 10 ++-- .../src/app/student/store/student.effects.ts | 6 +- .../src/app/student/store/student.reducer.ts | 6 +- .../app/student/store/student.selectors.ts | 2 +- .../src/app/teacher/store/teacher.effects.ts | 6 +- .../src/app/teacher/store/teacher.reducer.ts | 6 +- .../app/teacher/store/teacher.selectors.ts | 2 +- apps/ngrx/notification/src/index.html | 2 +- apps/ngrx/notification/src/main.ts | 2 +- .../unknown-person.component.css | 4 +- .../christmas-web-worker/src/index.html | 2 +- .../src/app/person-list.component.ts | 2 +- .../src/app/random.component.ts | 4 +- .../performance/default-onpush/src/index.html | 2 +- apps/performance/default-onpush/src/main.ts | 4 +- .../memoized/src/app/app.component.ts | 2 +- .../memoized/src/app/person-list.component.ts | 4 +- apps/performance/memoized/src/index.html | 2 +- apps/performance/memoized/src/main.ts | 4 +- .../ngfor-biglist/src/app/app.component.ts | 4 +- .../ngfor-biglist/src/app/list.service.ts | 4 +- .../src/app/person-list.component.ts | 4 +- apps/performance/ngfor-biglist/src/index.html | 2 +- apps/performance/ngfor-biglist/src/main.ts | 4 +- .../ngfor-optimize/src/app/app.component.ts | 4 +- .../ngfor-optimize/src/app/list.service.ts | 4 +- .../src/app/person-list.component.ts | 6 +- .../performance/ngfor-optimize/src/index.html | 2 +- apps/performance/ngfor-optimize/src/main.ts | 4 +- apps/performance/scroll-cd/src/index.html | 2 +- apps/rxjs/catch-error/src/app/app.config.ts | 2 +- apps/rxjs/catch-error/src/index.html | 2 +- apps/rxjs/catch-error/src/main.ts | 4 +- apps/rxjs/pipe-bug/src/app/app.component.ts | 6 +- apps/rxjs/pipe-bug/src/app/app.service.ts | 4 +- apps/rxjs/pipe-bug/src/app/localDB.service.ts | 2 +- apps/rxjs/pipe-bug/src/index.html | 2 +- apps/rxjs/race-condition/cypress.config.ts | 2 +- .../cypress/support/component-index.html | 2 +- .../race-condition/src/app/app.component.ts | 4 +- .../rxjs/race-condition/src/app/app.config.ts | 3 +- .../src/app/topic-dialog.component.ts | 8 ++- apps/rxjs/race-condition/src/index.html | 2 +- apps/rxjs/race-condition/src/main.ts | 2 +- .../testing/checkbox/src/app/app.component.ts | 8 ++- apps/testing/checkbox/src/index.html | 2 +- .../src/app/slider.component.ts | 2 +- apps/testing/create-harness/src/index.html | 2 +- apps/testing/create-harness/src/main.ts | 4 +- apps/testing/harness/src/app/app.component.ts | 4 +- .../harness/src/app/child.component.ts | 8 +-- apps/testing/harness/src/index.html | 2 +- apps/testing/harness/src/main.ts | 4 +- apps/testing/input-output/cypress.config.ts | 2 +- .../cypress/support/component-index.html | 2 +- apps/testing/input-output/src/index.html | 2 +- apps/testing/modal/cypress.config.ts | 2 +- .../cypress/support/component-index.html | 2 +- apps/testing/modal/src/app/app.component.ts | 4 +- apps/testing/modal/src/app/error.dialog.ts | 4 +- apps/testing/modal/src/index.html | 2 +- apps/testing/modal/src/main.ts | 4 +- apps/testing/nested/cypress.config.ts | 2 +- .../cypress/support/component-index.html | 2 +- apps/testing/nested/src/app/app.component.ts | 4 +- .../testing/nested/src/app/child.component.ts | 16 +++-- apps/testing/nested/src/index.html | 2 +- apps/testing/router-outlet/cypress.config.ts | 2 +- .../cypress/support/component-index.html | 2 +- .../router-outlet/src/app/book.guard.ts | 4 +- .../src/app/no-book-search.component.ts | 4 +- .../router-outlet/src/app/shelf.component.ts | 6 +- apps/testing/router-outlet/src/index.html | 2 +- apps/testing/router-outlet/src/main.ts | 4 +- apps/testing/table/cypress.config.ts | 2 +- .../cypress/support/component-index.html | 2 +- apps/testing/table/src/app/app.component.ts | 4 +- apps/testing/table/src/app/table.component.ts | 18 +++--- apps/testing/table/src/index.html | 2 +- apps/testing/todos-list/cypress.config.ts | 2 +- .../cypress/support/component-index.html | 2 +- .../todos-list/src/app/app.component.ts | 4 +- .../todos-list/src/app/backend.service.ts | 2 +- .../src/app/detail/detail.component.ts | 16 +++-- .../todos-list/src/app/detail/detail.store.ts | 17 +++--- .../todos-list/src/app/list/list.component.ts | 7 +-- .../todos-list/src/app/list/ticket.store.ts | 58 +++++++++---------- .../src/app/list/ui/add.component.ts | 45 +++++++------- .../src/app/list/ui/row.component.ts | 26 ++++++--- apps/testing/todos-list/src/index.html | 2 +- apps/testing/todos-list/src/main.ts | 4 +- .../overload/src/app/vehicle.utils.ts | 2 +- apps/typescript/overload/src/index.html | 2 +- commitlint.config.js | 2 +- docs/src/content/docs/pt/index.mdx | 48 ++++++++------- libs/cli/src/utils/normalize.ts | 4 +- .../custom-library/generator.spec.ts | 2 +- .../generators/custom-library/generator.ts | 2 +- .../generators/feature-component/generator.ts | 2 +- .../helmet/src/lib/btn-style.directive.ts | 2 +- .../feature/src/lib/admin-feature.module.ts | 4 +- .../lib/create-user/create-user.component.ts | 8 ++- .../src/lib/dashboard/dashboard.component.ts | 8 ++- .../admin/shared/src/lib/authorized.guard.ts | 6 +- .../forbidden/src/lib/forbidden.component.ts | 4 +- .../home/src/lib/home.component.ts | 10 ++-- .../shell/src/lib/main-shell.routes.ts | 8 +-- .../contact/src/lib/contact-feature.module.ts | 4 +- .../create-contact.component.ts | 8 ++- .../src/lib/dashboard/dashboard.component.ts | 8 ++- .../user/home/src/lib/home.component.ts | 4 +- .../shell/src/lib/user-shell.component.ts | 6 +- .../user/shell/src/lib/user-shell.routes.ts | 4 +- .../backend/src/lib/fake-db.service.ts | 6 +- .../backend/src/lib/push.service.ts | 2 +- .../src/lib/cd-flashing.directive.ts | 5 +- libs/shared/ngrx-callstate-store/README.md | 3 +- .../src/lib/call-state-component-store.ts | 20 +++---- .../src/lib/call-state.model.ts | 2 +- .../src/lib/external.model.ts | 2 +- .../src/lib/non-flicker-loader.ts | 8 +-- .../utils/src/lib/destroy-service.service.ts | 2 +- .../backend/src/lib/fake-backend.service.ts | 4 +- 195 files changed, 575 insertions(+), 452 deletions(-) diff --git a/apps/angular/anchor-scrolling/src/app/app.component.ts b/apps/angular/anchor-scrolling/src/app/app.component.ts index 5a930fb..3fb7c5d 100644 --- a/apps/angular/anchor-scrolling/src/app/app.component.ts +++ b/apps/angular/anchor-scrolling/src/app/app.component.ts @@ -5,6 +5,8 @@ import { RouterOutlet } from '@angular/router'; standalone: true, imports: [RouterOutlet], selector: 'app-root', - template: ` `, + template: ` + + `, }) export class AppComponent {} diff --git a/apps/angular/anchor-scrolling/src/app/foo.component.ts b/apps/angular/anchor-scrolling/src/app/foo.component.ts index a5109a8..87f9b59 100644 --- a/apps/angular/anchor-scrolling/src/app/foo.component.ts +++ b/apps/angular/anchor-scrolling/src/app/foo.component.ts @@ -7,7 +7,7 @@ import { NavButtonComponent } from './nav-button.component'; selector: 'app-foo', template: ` Welcome to foo page - Home Page + Home Page
section 1
section 2
`, diff --git a/apps/angular/anchor-scrolling/src/app/home.component.ts b/apps/angular/anchor-scrolling/src/app/home.component.ts index 836a198..0f24ff6 100644 --- a/apps/angular/anchor-scrolling/src/app/home.component.ts +++ b/apps/angular/anchor-scrolling/src/app/home.component.ts @@ -6,7 +6,7 @@ import { NavButtonComponent } from './nav-button.component'; imports: [NavButtonComponent], selector: 'app-home', template: ` - Foo Page + Foo Page
Empty Scroll Bottom diff --git a/apps/angular/anchor-scrolling/src/index.html b/apps/angular/anchor-scrolling/src/index.html index 9a98ab3..7a2a4b3 100644 --- a/apps/angular/anchor-scrolling/src/index.html +++ b/apps/angular/anchor-scrolling/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/anchor-scrolling/src/main.ts b/apps/angular/anchor-scrolling/src/main.ts index 4ecc5cf..7961924 100644 --- a/apps/angular/anchor-scrolling/src/main.ts +++ b/apps/angular/anchor-scrolling/src/main.ts @@ -1,8 +1,8 @@ -import { appConfig } from './app/app.config'; import { bootstrapApplication } from '@angular/platform-browser'; +import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/angular/bug-cd/src/app/app.component.ts b/apps/angular/bug-cd/src/app/app.component.ts index 3b45baa..046492f 100644 --- a/apps/angular/bug-cd/src/app/app.component.ts +++ b/apps/angular/bug-cd/src/app/app.component.ts @@ -6,7 +6,7 @@ import { RouterOutlet } from '@angular/router'; imports: [RouterOutlet], selector: 'app-root', template: ` -

My Application

+

My Application

diff --git a/apps/angular/bug-cd/src/app/bar.component.ts b/apps/angular/bug-cd/src/app/bar.component.ts index 26eef1e..b7a5392 100644 --- a/apps/angular/bug-cd/src/app/bar.component.ts +++ b/apps/angular/bug-cd/src/app/bar.component.ts @@ -2,6 +2,8 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-bar', standalone: true, - template: ` BarComponent `, + template: ` + BarComponent + `, }) export class BarComponent {} diff --git a/apps/angular/bug-cd/src/app/foo.component.ts b/apps/angular/bug-cd/src/app/foo.component.ts index 8006ecb..a5b1207 100644 --- a/apps/angular/bug-cd/src/app/foo.component.ts +++ b/apps/angular/bug-cd/src/app/foo.component.ts @@ -2,6 +2,8 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-foo', standalone: true, - template: `Foo Component `, + template: ` + Foo Component + `, }) export class FooComponent {} diff --git a/apps/angular/bug-cd/src/app/main-navigation.component.ts b/apps/angular/bug-cd/src/app/main-navigation.component.ts index c30281a..c8a6f6d 100644 --- a/apps/angular/bug-cd/src/app/main-navigation.component.ts +++ b/apps/angular/bug-cd/src/app/main-navigation.component.ts @@ -15,7 +15,7 @@ interface MenuItem { template: ` {{ menu.name }} diff --git a/apps/angular/bug-cd/src/index.html b/apps/angular/bug-cd/src/index.html index c05f415..ab925a7 100644 --- a/apps/angular/bug-cd/src/index.html +++ b/apps/angular/bug-cd/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/bug-cd/src/main.ts b/apps/angular/bug-cd/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/angular/bug-cd/src/main.ts +++ b/apps/angular/bug-cd/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/angular/context-outlet-type/src/app/list.component.ts b/apps/angular/context-outlet-type/src/app/list.component.ts index 4c58a1c..5212a42 100644 --- a/apps/angular/context-outlet-type/src/app/list.component.ts +++ b/apps/angular/context-outlet-type/src/app/list.component.ts @@ -17,11 +17,10 @@ import { *ngTemplateOutlet=" listTemplateRef || emptyRef; context: { $implicit: item, appList: item, index: i } - "> - + ">
- No Template + No Template `, changeDetection: ChangeDetectionStrategy.OnPush, }) diff --git a/apps/angular/context-outlet-type/src/app/person.component.ts b/apps/angular/context-outlet-type/src/app/person.component.ts index 4c33ae3..1550cf2 100644 --- a/apps/angular/context-outlet-type/src/app/person.component.ts +++ b/apps/angular/context-outlet-type/src/app/person.component.ts @@ -17,7 +17,7 @@ interface Person { context: { $implicit: person.name, age: person.age } "> - No Template + No Template `, }) export class PersonComponent { diff --git a/apps/angular/context-outlet-type/src/index.html b/apps/angular/context-outlet-type/src/index.html index 0f087d3..b3ee6c6 100644 --- a/apps/angular/context-outlet-type/src/index.html +++ b/apps/angular/context-outlet-type/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/crud/src/app/app.component.ts b/apps/angular/crud/src/app/app.component.ts index 400d403..8c3d1b8 100644 --- a/apps/angular/crud/src/app/app.component.ts +++ b/apps/angular/crud/src/app/app.component.ts @@ -42,7 +42,7 @@ export class AppComponent implements OnInit { headers: { 'Content-type': 'application/json; charset=UTF-8', }, - } + }, ) .subscribe((todoUpdated: any) => { this.todos[todoUpdated.id - 1] = todoUpdated; diff --git a/apps/angular/crud/src/app/app.config.ts b/apps/angular/crud/src/app/app.config.ts index cf4075b..de0a3cc 100644 --- a/apps/angular/crud/src/app/app.config.ts +++ b/apps/angular/crud/src/app/app.config.ts @@ -1,6 +1,5 @@ -import { ApplicationConfig } from '@angular/core'; -import { enableProdMode, importProvidersFrom } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; +import { ApplicationConfig, importProvidersFrom } from '@angular/core'; export const appConfig: ApplicationConfig = { providers: [importProvidersFrom(HttpClientModule)], }; diff --git a/apps/angular/crud/src/index.html b/apps/angular/crud/src/index.html index 601c359..c556437 100644 --- a/apps/angular/crud/src/index.html +++ b/apps/angular/crud/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/crud/src/main.ts b/apps/angular/crud/src/main.ts index ea9f26c..9bb5c30 100644 --- a/apps/angular/crud/src/main.ts +++ b/apps/angular/crud/src/main.ts @@ -4,5 +4,5 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/angular/decoupling/src/app/app.component.ts b/apps/angular/decoupling/src/app/app.component.ts index e595318..34082c3 100644 --- a/apps/angular/decoupling/src/app/app.component.ts +++ b/apps/angular/decoupling/src/app/app.component.ts @@ -6,6 +6,8 @@ import { Component } from '@angular/core'; standalone: true, imports: [BtnDisabledDirective, BtnHelmetDirective], selector: 'app-root', - template: ` `, + template: ` + + `, }) export class AppComponent {} diff --git a/apps/angular/decoupling/src/index.html b/apps/angular/decoupling/src/index.html index c1bf2b7..25b5ea1 100644 --- a/apps/angular/decoupling/src/index.html +++ b/apps/angular/decoupling/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/di/src/app/app.component.ts b/apps/angular/di/src/app/app.component.ts index bacff72..e57a5a5 100644 --- a/apps/angular/di/src/app/app.component.ts +++ b/apps/angular/di/src/app/app.component.ts @@ -16,7 +16,7 @@ interface ProductContext { export class ProductDirective { static ngTemplateContextGuard( dir: ProductDirective, - ctx: unknown + ctx: unknown, ): ctx is ProductContext { return true; } diff --git a/apps/angular/di/src/app/currency.pipe.ts b/apps/angular/di/src/app/currency.pipe.ts index 1c8fcc0..9d90e52 100644 --- a/apps/angular/di/src/app/currency.pipe.ts +++ b/apps/angular/di/src/app/currency.pipe.ts @@ -11,7 +11,7 @@ export class CurrencyPipe implements PipeTransform { transform(price: number) { return this.currencyService.symbol$.pipe( - map((s) => `${String(price)}${s}`) + map((s) => `${String(price)}${s}`), ); } } diff --git a/apps/angular/di/src/app/currency.service.ts b/apps/angular/di/src/app/currency.service.ts index 076ffa1..38b403e 100644 --- a/apps/angular/di/src/app/currency.service.ts +++ b/apps/angular/di/src/app/currency.service.ts @@ -20,7 +20,7 @@ export const currency: Currency[] = [ export class CurrencyService extends ComponentStore<{ code: string }> { readonly code$ = this.select((state) => state.code); readonly symbol$ = this.code$.pipe( - map((code) => currency.find((c) => c.code === code)?.symbol ?? code) + map((code) => currency.find((c) => c.code === code)?.symbol ?? code), ); constructor() { diff --git a/apps/angular/di/src/index.html b/apps/angular/di/src/index.html index 98e94c0..c120f5b 100644 --- a/apps/angular/di/src/index.html +++ b/apps/angular/di/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/injection-token/src/app/app.component.ts b/apps/angular/injection-token/src/app/app.component.ts index 51cf42e..5ac8087 100644 --- a/apps/angular/injection-token/src/app/app.component.ts +++ b/apps/angular/injection-token/src/app/app.component.ts @@ -5,15 +5,17 @@ import { RouterLink, RouterOutlet } from '@angular/router'; standalone: true, imports: [RouterOutlet, RouterLink], selector: 'app-root', - template: `
- -
- `, + + `, host: { class: 'p-10 flex flex-col', }, diff --git a/apps/angular/injection-token/src/app/phone.component.ts b/apps/angular/injection-token/src/app/phone.component.ts index 73866ca..a58b3cd 100644 --- a/apps/angular/injection-token/src/app/phone.component.ts +++ b/apps/angular/injection-token/src/app/phone.component.ts @@ -5,10 +5,12 @@ import { TimerContainerComponent } from './timer-container.component'; selector: 'app-phone', standalone: true, imports: [TimerContainerComponent], - template: `
+ template: ` +
Phone Call Timer:

(should be 2000s)

- `, + + `, }) export default class PhoneComponent {} diff --git a/apps/angular/injection-token/src/app/timer.component.ts b/apps/angular/injection-token/src/app/timer.component.ts index db5b963..95707ec 100644 --- a/apps/angular/injection-token/src/app/timer.component.ts +++ b/apps/angular/injection-token/src/app/timer.component.ts @@ -6,7 +6,9 @@ import { DEFAULT_TIMER } from './data'; @Component({ selector: 'timer', standalone: true, - template: ` Timer running {{ timer() }} `, + template: ` + Timer running {{ timer() }} + `, }) export class TimerComponent { timer = toSignal(interval(DEFAULT_TIMER)); diff --git a/apps/angular/injection-token/src/app/video.component.ts b/apps/angular/injection-token/src/app/video.component.ts index 5ea2c2b..2c21807 100644 --- a/apps/angular/injection-token/src/app/video.component.ts +++ b/apps/angular/injection-token/src/app/video.component.ts @@ -5,10 +5,12 @@ import { TimerContainerComponent } from './timer-container.component'; selector: 'app-video', standalone: true, imports: [TimerContainerComponent], - template: `
+ template: ` +
Video Call Timer:

(should be the default 1000s)

- `, + + `, }) export default class VideoComponent {} diff --git a/apps/angular/injection-token/src/index.html b/apps/angular/injection-token/src/index.html index befe4cf..3c35787 100644 --- a/apps/angular/injection-token/src/index.html +++ b/apps/angular/injection-token/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/injection-token/src/main.ts b/apps/angular/injection-token/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/angular/injection-token/src/main.ts +++ b/apps/angular/injection-token/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/angular/interop-rxjs-signal/src/app/app.component.ts b/apps/angular/interop-rxjs-signal/src/app/app.component.ts index f63192e..7b83d14 100644 --- a/apps/angular/interop-rxjs-signal/src/app/app.component.ts +++ b/apps/angular/interop-rxjs-signal/src/app/app.component.ts @@ -5,7 +5,9 @@ import { RouterOutlet } from '@angular/router'; standalone: true, imports: [RouterOutlet], selector: 'app-root', - template: ``, + template: ` + + `, styles: [''], }) export class AppComponent {} diff --git a/apps/angular/interop-rxjs-signal/src/app/app.config.ts b/apps/angular/interop-rxjs-signal/src/app/app.config.ts index cd49643..2885bb0 100644 --- a/apps/angular/interop-rxjs-signal/src/app/app.config.ts +++ b/apps/angular/interop-rxjs-signal/src/app/app.config.ts @@ -23,7 +23,7 @@ export const appConfig: ApplicationConfig = { redirectTo: '', }, ], - withComponentInputBinding() + withComponentInputBinding(), ), ], }; diff --git a/apps/angular/interop-rxjs-signal/src/app/detail/detail.component.ts b/apps/angular/interop-rxjs-signal/src/app/detail/detail.component.ts index c1493b2..3576db4 100644 --- a/apps/angular/interop-rxjs-signal/src/app/detail/detail.component.ts +++ b/apps/angular/interop-rxjs-signal/src/app/detail/detail.component.ts @@ -9,13 +9,25 @@ import { Photo } from '../photo.model'; imports: [DatePipe, RouterLink], template: ` {{ photo.title }} -

Title: {{ photo.title }}

-

Owner: {{ photo.ownername }}

-

Date: {{ photo.datetaken | date }}

-

Tags: {{ photo.tags }}

+

+ Title: + {{ photo.title }} +

+

+ Owner: + {{ photo.ownername }} +

+

+ Date: + {{ photo.datetaken | date }} +

+

+ Tags: + {{ photo.tags }} +

diff --git a/apps/angular/interop-rxjs-signal/src/app/list/photos.store.ts b/apps/angular/interop-rxjs-signal/src/app/list/photos.store.ts index 8f039c4..01de2d4 100644 --- a/apps/angular/interop-rxjs-signal/src/app/list/photos.store.ts +++ b/apps/angular/interop-rxjs-signal/src/app/list/photos.store.ts @@ -47,7 +47,7 @@ export class PhotoStore private readonly endOfPage$ = this.select( this.page$, this.pages$, - (page, pages) => page === pages + (page, pages) => page === pages, ); readonly vm$ = this.select( @@ -60,7 +60,7 @@ export class PhotoStore loading: this.loading$, error: this.error$, }, - { debounce: true } + { debounce: true }, ); ngrxOnStoreInit() { @@ -82,7 +82,7 @@ export class PhotoStore this.select({ search: this.search$, page: this.page$, - }) + }), ); } @@ -91,21 +91,21 @@ export class PhotoStore ...state, search, page: 1, - }) + }), ); readonly nextPage = this.updater( (state): PhotoState => ({ ...state, page: state.page + 1, - }) + }), ); readonly previousPage = this.updater( (state): PhotoState => ({ ...state, page: state.page - 1, - }) + }), ); readonly searchPhotos = this.effect<{ search: string; page: number }>( @@ -123,13 +123,13 @@ export class PhotoStore }); localStorage.setItem( PHOTO_STATE_KEY, - JSON.stringify({ search, page }) + JSON.stringify({ search, page }), ); }, - (error: unknown) => this.patchState({ error, loading: false }) - ) - ) - ) - ) + (error: unknown) => this.patchState({ error, loading: false }), + ), + ), + ), + ), ); } diff --git a/apps/angular/interop-rxjs-signal/src/app/photos.service.ts b/apps/angular/interop-rxjs-signal/src/app/photos.service.ts index a7999e6..03ab383 100644 --- a/apps/angular/interop-rxjs-signal/src/app/photos.service.ts +++ b/apps/angular/interop-rxjs-signal/src/app/photos.service.ts @@ -16,7 +16,7 @@ export class PhotoService { public searchPublicPhotos( searchTerm: string, - page: number + page: number, ): Observable { return this.http.get( 'https://www.flickr.com/services/rest/', @@ -33,7 +33,7 @@ export class PhotoService { extras: 'tags,date_taken,owner_name,url_q,url_m', api_key: 'c3050d39a5bb308d9921bef0e15c437d', }, - } + }, ); } } diff --git a/apps/angular/interop-rxjs-signal/src/index.html b/apps/angular/interop-rxjs-signal/src/index.html index b072aa4..1c69fbc 100644 --- a/apps/angular/interop-rxjs-signal/src/index.html +++ b/apps/angular/interop-rxjs-signal/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/interop-rxjs-signal/src/main.ts b/apps/angular/interop-rxjs-signal/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/angular/interop-rxjs-signal/src/main.ts +++ b/apps/angular/interop-rxjs-signal/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/angular/module-to-standalone/src/app/app.component.ts b/apps/angular/module-to-standalone/src/app/app.component.ts index 91a72fa..95eeab5 100644 --- a/apps/angular/module-to-standalone/src/app/app.component.ts +++ b/apps/angular/module-to-standalone/src/app/app.component.ts @@ -2,24 +2,26 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-root', - template: `
+ template: ` +
- `, + + `, host: { class: 'flex flex-col p-4 gap-3', }, diff --git a/apps/angular/module-to-standalone/src/index.html b/apps/angular/module-to-standalone/src/index.html index 153133d..4902faa 100644 --- a/apps/angular/module-to-standalone/src/index.html +++ b/apps/angular/module-to-standalone/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/ngfor-enhancement/src/index.html b/apps/angular/ngfor-enhancement/src/index.html index 02e3b69..c38d89d 100644 --- a/apps/angular/ngfor-enhancement/src/index.html +++ b/apps/angular/ngfor-enhancement/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/permissions/src/app/app.component.ts b/apps/angular/permissions/src/app/app.component.ts index 5fc4531..d89a2f5 100644 --- a/apps/angular/permissions/src/app/app.component.ts +++ b/apps/angular/permissions/src/app/app.component.ts @@ -5,7 +5,9 @@ import { RouterOutlet } from '@angular/router'; standalone: true, imports: [RouterOutlet], selector: 'app-root', - template: ` `, + template: ` + + `, styles: [], }) export class AppComponent {} diff --git a/apps/angular/permissions/src/app/button.component.ts b/apps/angular/permissions/src/app/button.component.ts index b6599e5..b1d59e8 100644 --- a/apps/angular/permissions/src/app/button.component.ts +++ b/apps/angular/permissions/src/app/button.component.ts @@ -4,7 +4,9 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; @Component({ standalone: true, selector: 'button[app-button]', - template: ``, + template: ` + + `, host: { class: 'border border-blue-700 bg-blue-400 p-2 rounded-sm text-white', }, diff --git a/apps/angular/permissions/src/app/routes.ts b/apps/angular/permissions/src/app/routes.ts index 79a3ecc..4db203f 100644 --- a/apps/angular/permissions/src/app/routes.ts +++ b/apps/angular/permissions/src/app/routes.ts @@ -8,7 +8,7 @@ export const APP_ROUTES = [ path: 'enter', loadComponent: () => import('./dashboard/admin.component').then( - (m) => m.AdminDashboardComponent + (m) => m.AdminDashboardComponent, ), }, ]; diff --git a/apps/angular/permissions/src/index.html b/apps/angular/permissions/src/index.html index b78cf57..14ab31c 100644 --- a/apps/angular/permissions/src/index.html +++ b/apps/angular/permissions/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/permissions/src/main.ts b/apps/angular/permissions/src/main.ts index 5679319..7961924 100644 --- a/apps/angular/permissions/src/main.ts +++ b/apps/angular/permissions/src/main.ts @@ -4,5 +4,5 @@ import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/angular/pipe-easy/src/index.html b/apps/angular/pipe-easy/src/index.html index 63b45d4..eacdd37 100644 --- a/apps/angular/pipe-easy/src/index.html +++ b/apps/angular/pipe-easy/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/pipe-hard/src/index.html b/apps/angular/pipe-hard/src/index.html index 748c8e6..0b81de3 100644 --- a/apps/angular/pipe-hard/src/index.html +++ b/apps/angular/pipe-hard/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/pipe-intermediate/src/index.html b/apps/angular/pipe-intermediate/src/index.html index 07ccccc..1a8b2ee 100644 --- a/apps/angular/pipe-intermediate/src/index.html +++ b/apps/angular/pipe-intermediate/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/projection/src/app/component/student-card/student-card.component.ts b/apps/angular/projection/src/app/component/student-card/student-card.component.ts index 421630a..441cda1 100644 --- a/apps/angular/projection/src/app/component/student-card/student-card.component.ts +++ b/apps/angular/projection/src/app/component/student-card/student-card.component.ts @@ -7,10 +7,12 @@ import { CardComponent } from '../../ui/card/card.component'; @Component({ selector: 'app-student-card', - template: ``, + template: ` + + `, standalone: true, styles: [ ` @@ -25,7 +27,10 @@ export class StudentCardComponent implements OnInit { students: Student[] = []; cardType = CardType.STUDENT; - constructor(private http: FakeHttpService, private store: StudentStore) {} + constructor( + private http: FakeHttpService, + private store: StudentStore, + ) {} ngOnInit(): void { this.http.fetchStudents$.subscribe((s) => this.store.addAll(s)); diff --git a/apps/angular/projection/src/app/component/teacher-card/teacher-card.component.ts b/apps/angular/projection/src/app/component/teacher-card/teacher-card.component.ts index 006b8db..995cb7c 100644 --- a/apps/angular/projection/src/app/component/teacher-card/teacher-card.component.ts +++ b/apps/angular/projection/src/app/component/teacher-card/teacher-card.component.ts @@ -7,10 +7,12 @@ import { CardComponent } from '../../ui/card/card.component'; @Component({ selector: 'app-teacher-card', - template: ``, + template: ` + + `, styles: [ ` ::ng-deep .bg-light-red { @@ -25,7 +27,10 @@ export class TeacherCardComponent implements OnInit { teachers: Teacher[] = []; cardType = CardType.TEACHER; - constructor(private http: FakeHttpService, private store: TeacherStore) {} + constructor( + private http: FakeHttpService, + private store: TeacherStore, + ) {} ngOnInit(): void { this.http.fetchTeachers$.subscribe((t) => this.store.addAll(t)); diff --git a/apps/angular/projection/src/app/ui/list-item/list-item.component.ts b/apps/angular/projection/src/app/ui/list-item/list-item.component.ts index 2258602..c0f9cff 100644 --- a/apps/angular/projection/src/app/ui/list-item/list-item.component.ts +++ b/apps/angular/projection/src/app/ui/list-item/list-item.component.ts @@ -6,7 +6,7 @@ import { CardType } from '../../model/card.model'; @Component({ selector: 'app-list-item', template: ` -
+
{{ name }} - `, + + `, }) export class AppComponent { userName = new FormControl(); diff --git a/apps/angular/router-input/src/app/home.component.ts b/apps/angular/router-input/src/app/home.component.ts index be6a891..2ef8c5e 100644 --- a/apps/angular/router-input/src/app/home.component.ts +++ b/apps/angular/router-input/src/app/home.component.ts @@ -3,6 +3,8 @@ import { Component } from '@angular/core'; selector: 'app-home', standalone: true, imports: [], - template: `
Home
`, + template: ` +
Home
+ `, }) export default class HomeComponent {} diff --git a/apps/angular/router-input/src/index.html b/apps/angular/router-input/src/index.html index 43f4b79..daa1215 100644 --- a/apps/angular/router-input/src/index.html +++ b/apps/angular/router-input/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/angular/router-input/src/main.ts b/apps/angular/router-input/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/angular/router-input/src/main.ts +++ b/apps/angular/router-input/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/angular/styling/src/index.html b/apps/angular/styling/src/index.html index 67d4296..7ea1636 100644 --- a/apps/angular/styling/src/index.html +++ b/apps/angular/styling/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/ngrx/effect-selector/src/app/app.component.ts b/apps/ngrx/effect-selector/src/app/app.component.ts index 0411abc..1e48366 100644 --- a/apps/ngrx/effect-selector/src/app/app.component.ts +++ b/apps/ngrx/effect-selector/src/app/app.component.ts @@ -2,8 +2,8 @@ import { AsyncPipe, NgFor } from '@angular/common'; import { ChangeDetectionStrategy, Component, - inject, OnInit, + inject, } from '@angular/core'; import { Store } from '@ngrx/store'; import { loadActivities } from './store/activity/activity.actions'; diff --git a/apps/ngrx/effect-selector/src/app/app.config.ts b/apps/ngrx/effect-selector/src/app/app.config.ts index e18cd33..d59c436 100644 --- a/apps/ngrx/effect-selector/src/app/app.config.ts +++ b/apps/ngrx/effect-selector/src/app/app.config.ts @@ -1,13 +1,13 @@ import { ApplicationConfig } from '@angular/core'; -import { provideStore } from '@ngrx/store'; import { provideEffects } from '@ngrx/effects'; +import { provideStore } from '@ngrx/store'; import { ActivityEffects } from './store/activity/activity.effects'; -import { UserEffects } from './store/user/user.effects'; -import { StatusEffects } from './store/status/status.effects'; import { activityFeatureKey, activityReducer, } from './store/activity/activity.reducer'; +import { StatusEffects } from './store/status/status.effects'; +import { UserEffects } from './store/user/user.effects'; import { statusFeatureKey, statusReducer } from './store/status/status.reducer'; diff --git a/apps/ngrx/effect-selector/src/app/store/activity/activity.effects.ts b/apps/ngrx/effect-selector/src/app/store/activity/activity.effects.ts index 63b27e9..88f8b23 100644 --- a/apps/ngrx/effect-selector/src/app/store/activity/activity.effects.ts +++ b/apps/ngrx/effect-selector/src/app/store/activity/activity.effects.ts @@ -13,18 +13,18 @@ export class ActivityEffects { concatMap(() => this.ActivityService.fetchActivities().pipe( map((activities) => - ActivityActions.loadActivitiesSuccess({ activities }) + ActivityActions.loadActivitiesSuccess({ activities }), ), catchError((error) => - of(ActivityActions.loadActivitiesFailure({ error })) - ) - ) - ) + of(ActivityActions.loadActivitiesFailure({ error })), + ), + ), + ), ); }); constructor( private actions$: Actions, - private ActivityService: ActivityService + private ActivityService: ActivityService, ) {} } diff --git a/apps/ngrx/effect-selector/src/app/store/activity/activity.reducer.ts b/apps/ngrx/effect-selector/src/app/store/activity/activity.reducer.ts index f370b4b..b7285e8 100644 --- a/apps/ngrx/effect-selector/src/app/store/activity/activity.reducer.ts +++ b/apps/ngrx/effect-selector/src/app/store/activity/activity.reducer.ts @@ -21,5 +21,5 @@ export const activityReducer = createReducer( on(ActivityActions.loadActivitiesFailure, (state) => ({ state, activities: [], - })) + })), ); diff --git a/apps/ngrx/effect-selector/src/app/store/activity/activity.selectors.ts b/apps/ngrx/effect-selector/src/app/store/activity/activity.selectors.ts index 7e200de..6c6a25a 100644 --- a/apps/ngrx/effect-selector/src/app/store/activity/activity.selectors.ts +++ b/apps/ngrx/effect-selector/src/app/store/activity/activity.selectors.ts @@ -1,10 +1,10 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'; -import { activityFeatureKey, ActivityState } from './activity.reducer'; +import { ActivityState, activityFeatureKey } from './activity.reducer'; export const selectActivityState = createFeatureSelector(activityFeatureKey); export const selectActivities = createSelector( selectActivityState, - (state) => state.activities + (state) => state.activities, ); diff --git a/apps/ngrx/effect-selector/src/app/store/status/status.actions.ts b/apps/ngrx/effect-selector/src/app/store/status/status.actions.ts index c966824..8fc2ddc 100644 --- a/apps/ngrx/effect-selector/src/app/store/status/status.actions.ts +++ b/apps/ngrx/effect-selector/src/app/store/status/status.actions.ts @@ -5,5 +5,5 @@ export const loadStatuses = createAction('[Status] Load Statuses'); export const loadStatusesSuccess = createAction( '[Status] Load Statuses Success', - props<{ statuses: Status[] }>() + props<{ statuses: Status[] }>(), ); diff --git a/apps/ngrx/effect-selector/src/app/store/status/status.effects.ts b/apps/ngrx/effect-selector/src/app/store/status/status.effects.ts index 3459a59..997eb0c 100644 --- a/apps/ngrx/effect-selector/src/app/store/status/status.effects.ts +++ b/apps/ngrx/effect-selector/src/app/store/status/status.effects.ts @@ -22,7 +22,7 @@ export class StatusEffects { return activities.reduce( (status: Status[], activity): Status[] => { const index = status.findIndex( - (s) => s.name === activity.type + (s) => s.name === activity.type, ); if (index === -1) { return [ @@ -34,16 +34,19 @@ export class StatusEffects { return status; } }, - [] + [], ); } return []; }), - map((statuses) => StatusActions.loadStatusesSuccess({ statuses })) - ) - ) + map((statuses) => StatusActions.loadStatusesSuccess({ statuses })), + ), + ), ); }); - constructor(private actions$: Actions, private store: Store) {} + constructor( + private actions$: Actions, + private store: Store, + ) {} } diff --git a/apps/ngrx/effect-selector/src/app/store/status/status.reducer.ts b/apps/ngrx/effect-selector/src/app/store/status/status.reducer.ts index 1dd8ece..b91cbe2 100644 --- a/apps/ngrx/effect-selector/src/app/store/status/status.reducer.ts +++ b/apps/ngrx/effect-selector/src/app/store/status/status.reducer.ts @@ -25,5 +25,5 @@ export const statusReducer = createReducer( statuses, teachersMap: map, }; - }) + }), ); diff --git a/apps/ngrx/effect-selector/src/app/store/status/status.selectors.ts b/apps/ngrx/effect-selector/src/app/store/status/status.selectors.ts index 85b72f8..80ed059 100644 --- a/apps/ngrx/effect-selector/src/app/store/status/status.selectors.ts +++ b/apps/ngrx/effect-selector/src/app/store/status/status.selectors.ts @@ -1,17 +1,17 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'; import { ActivityType } from '../activity/activity.model'; -import { statusFeatureKey, StatusState } from './status.reducer'; +import { StatusState, statusFeatureKey } from './status.reducer'; export const selectStatusState = createFeatureSelector(statusFeatureKey); export const selectStatuses = createSelector( selectStatusState, - (state) => state.statuses + (state) => state.statuses, ); export const selectAllTeachersByActivityType = (name: ActivityType) => createSelector( selectStatusState, - (state) => state.teachersMap.get(name) ?? [] + (state) => state.teachersMap.get(name) ?? [], ); diff --git a/apps/ngrx/effect-selector/src/app/store/user/user.effects.ts b/apps/ngrx/effect-selector/src/app/store/user/user.effects.ts index 6f68e5b..fff3f6f 100644 --- a/apps/ngrx/effect-selector/src/app/store/user/user.effects.ts +++ b/apps/ngrx/effect-selector/src/app/store/user/user.effects.ts @@ -13,11 +13,14 @@ export class UserEffects { concatMap(() => this.userService.fetchUser().pipe( map((user) => UserActions.loadUsersSuccess({ user })), - catchError((error) => of(UserActions.loadUsersFailure({ error }))) - ) - ) + catchError((error) => of(UserActions.loadUsersFailure({ error }))), + ), + ), ); }); - constructor(private actions$: Actions, private userService: UserService) {} + constructor( + private actions$: Actions, + private userService: UserService, + ) {} } diff --git a/apps/ngrx/effect-selector/src/app/store/user/user.reducer.ts b/apps/ngrx/effect-selector/src/app/store/user/user.reducer.ts index 45596af..3f4768c 100644 --- a/apps/ngrx/effect-selector/src/app/store/user/user.reducer.ts +++ b/apps/ngrx/effect-selector/src/app/store/user/user.reducer.ts @@ -15,5 +15,5 @@ export const initialState: UserState = { export const userReducer = createReducer( initialState, on(UserActions.loadUsersSuccess, (state, { user }) => ({ ...state, user })), - on(UserActions.loadUsersFailure, (state) => ({ ...state, user: undefined })) + on(UserActions.loadUsersFailure, (state) => ({ ...state, user: undefined })), ); diff --git a/apps/ngrx/effect-selector/src/app/store/user/user.selectors.ts b/apps/ngrx/effect-selector/src/app/store/user/user.selectors.ts index eb6deda..7970b0d 100644 --- a/apps/ngrx/effect-selector/src/app/store/user/user.selectors.ts +++ b/apps/ngrx/effect-selector/src/app/store/user/user.selectors.ts @@ -1,9 +1,9 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'; -import { userFeatureKey, UserState } from './user.reducer'; +import { UserState, userFeatureKey } from './user.reducer'; export const selectUserState = createFeatureSelector(userFeatureKey); export const selectUser = createSelector( selectUserState, - (state) => state.user + (state) => state.user, ); diff --git a/apps/ngrx/effect-selector/src/index.html b/apps/ngrx/effect-selector/src/index.html index 5664dcf..21d5736 100644 --- a/apps/ngrx/effect-selector/src/index.html +++ b/apps/ngrx/effect-selector/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/ngrx/notification/src/app/app.config.ts b/apps/ngrx/notification/src/app/app.config.ts index 52badc4..480c86c 100644 --- a/apps/ngrx/notification/src/app/app.config.ts +++ b/apps/ngrx/notification/src/app/app.config.ts @@ -1,21 +1,20 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideStore } from '@ngrx/store'; -import { provideEffects } from '@ngrx/effects'; -import { TeacherEffects } from './teacher/store/teacher.effects'; -import { StudentEffects } from './student/store/student.effects'; -import { provideRouter } from '@angular/router'; -import { ROUTES } from './routes'; -import { APP_INITIALIZER, inject } from '@angular/core'; import { FakeBackendService } from '@angular-challenges/ngrx-notification/backend'; +import { APP_INITIALIZER, ApplicationConfig, inject } from '@angular/core'; +import { provideRouter } from '@angular/router'; +import { provideEffects } from '@ngrx/effects'; +import { provideStore } from '@ngrx/store'; import { NotificationService } from './data-access/notification.service'; -import { - teacherReducer, - teachersFeatureKey, -} from './teacher/store/teacher.reducer'; +import { ROUTES } from './routes'; +import { StudentEffects } from './student/store/student.effects'; import { studentReducer, studentsFeatureKey, } from './student/store/student.reducer'; +import { TeacherEffects } from './teacher/store/teacher.effects'; +import { + teacherReducer, + teachersFeatureKey, +} from './teacher/store/teacher.reducer'; const REDUCERS = { [teachersFeatureKey]: teacherReducer, diff --git a/apps/ngrx/notification/src/app/data-access/notification.service.ts b/apps/ngrx/notification/src/app/data-access/notification.service.ts index 2daca97..aa295bf 100644 --- a/apps/ngrx/notification/src/app/data-access/notification.service.ts +++ b/apps/ngrx/notification/src/app/data-access/notification.service.ts @@ -22,12 +22,12 @@ export class NotificationService { .subscribe((notification: Push) => { if (isTeacher(notification)) { this.store.dispatch( - teacherActions.addOneTeacher({ teacher: notification }) + teacherActions.addOneTeacher({ teacher: notification }), ); } if (isStudent(notification)) { this.store.dispatch( - studentActions.addOneStudent({ student: notification }) + studentActions.addOneStudent({ student: notification }), ); } if (isSchool(notification)) { diff --git a/apps/ngrx/notification/src/app/school/school.store.ts b/apps/ngrx/notification/src/app/school/school.store.ts index 59899dc..0c18349 100644 --- a/apps/ngrx/notification/src/app/school/school.store.ts +++ b/apps/ngrx/notification/src/app/school/school.store.ts @@ -35,11 +35,11 @@ export class SchoolStore this.httpService.getAllSchools().pipe( tapResponse( (schools) => this.patchState({ schools }), - (_) => _ - ) - ) - ) - ) + (_) => _, + ), + ), + ), + ), ); ngrxOnStoreInit() { diff --git a/apps/ngrx/notification/src/app/student/store/student.effects.ts b/apps/ngrx/notification/src/app/student/store/student.effects.ts index 1eef890..b741bd2 100644 --- a/apps/ngrx/notification/src/app/student/store/student.effects.ts +++ b/apps/ngrx/notification/src/app/student/store/student.effects.ts @@ -16,8 +16,8 @@ export class StudentEffects { switchMap(() => this.httpService .getAllStudents() - .pipe(map((students) => studentActions.addAllStudents({ students }))) - ) - ) + .pipe(map((students) => studentActions.addAllStudents({ students }))), + ), + ), ); } diff --git a/apps/ngrx/notification/src/app/student/store/student.reducer.ts b/apps/ngrx/notification/src/app/student/store/student.reducer.ts index 068d890..0b02cd3 100644 --- a/apps/ngrx/notification/src/app/student/store/student.reducer.ts +++ b/apps/ngrx/notification/src/app/student/store/student.reducer.ts @@ -13,11 +13,11 @@ export const studentAdapter: EntityAdapter = export const studentReducer = createReducer( studentAdapter.getInitialState(), on(studentActions.addOneStudent, (state, { student }) => - studentAdapter.upsertOne(student, state) + studentAdapter.upsertOne(student, state), ), on(studentActions.addAllStudents, (state, { students }) => - studentAdapter.setAll(students, state) - ) + studentAdapter.setAll(students, state), + ), ); export const { selectIds, selectEntities, selectAll, selectTotal } = diff --git a/apps/ngrx/notification/src/app/student/store/student.selectors.ts b/apps/ngrx/notification/src/app/student/store/student.selectors.ts index 5c04e23..b041ff4 100644 --- a/apps/ngrx/notification/src/app/student/store/student.selectors.ts +++ b/apps/ngrx/notification/src/app/student/store/student.selectors.ts @@ -1,8 +1,8 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'; import { + StudentState, studentAdapter, studentsFeatureKey, - StudentState, } from './student.reducer'; const selectStudentState = diff --git a/apps/ngrx/notification/src/app/teacher/store/teacher.effects.ts b/apps/ngrx/notification/src/app/teacher/store/teacher.effects.ts index 9eca53b..43c3fab 100644 --- a/apps/ngrx/notification/src/app/teacher/store/teacher.effects.ts +++ b/apps/ngrx/notification/src/app/teacher/store/teacher.effects.ts @@ -16,8 +16,8 @@ export class TeacherEffects { switchMap(() => this.httpService .getAllTeachers() - .pipe(map((teachers) => teacherActions.addAllTeachers({ teachers }))) - ) - ) + .pipe(map((teachers) => teacherActions.addAllTeachers({ teachers }))), + ), + ), ); } diff --git a/apps/ngrx/notification/src/app/teacher/store/teacher.reducer.ts b/apps/ngrx/notification/src/app/teacher/store/teacher.reducer.ts index ecc95a0..d793b96 100644 --- a/apps/ngrx/notification/src/app/teacher/store/teacher.reducer.ts +++ b/apps/ngrx/notification/src/app/teacher/store/teacher.reducer.ts @@ -13,11 +13,11 @@ export const teacherAdapter: EntityAdapter = export const teacherReducer = createReducer( teacherAdapter.getInitialState(), on(teacherActions.addOneTeacher, (state, { teacher }) => - teacherAdapter.upsertOne(teacher, state) + teacherAdapter.upsertOne(teacher, state), ), on(teacherActions.addAllTeachers, (state, { teachers }) => - teacherAdapter.setAll(teachers, state) - ) + teacherAdapter.setAll(teachers, state), + ), ); export const { selectIds, selectEntities, selectAll, selectTotal } = diff --git a/apps/ngrx/notification/src/app/teacher/store/teacher.selectors.ts b/apps/ngrx/notification/src/app/teacher/store/teacher.selectors.ts index f9fc4f1..a32e82c 100644 --- a/apps/ngrx/notification/src/app/teacher/store/teacher.selectors.ts +++ b/apps/ngrx/notification/src/app/teacher/store/teacher.selectors.ts @@ -1,8 +1,8 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'; import { + TeacherState, teacherAdapter, teachersFeatureKey, - TeacherState, } from './teacher.reducer'; const selectTeacherState = diff --git a/apps/ngrx/notification/src/index.html b/apps/ngrx/notification/src/index.html index a8fe88b..cc46b13 100644 --- a/apps/ngrx/notification/src/index.html +++ b/apps/ngrx/notification/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/ngrx/notification/src/main.ts b/apps/ngrx/notification/src/main.ts index 444ad6d..6f91f21 100644 --- a/apps/ngrx/notification/src/main.ts +++ b/apps/ngrx/notification/src/main.ts @@ -5,5 +5,5 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/performance/christmas-web-worker/src/app/unknown-person/unknown-person.component.css b/apps/performance/christmas-web-worker/src/app/unknown-person/unknown-person.component.css index 254caa2..edc1f75 100644 --- a/apps/performance/christmas-web-worker/src/app/unknown-person/unknown-person.component.css +++ b/apps/performance/christmas-web-worker/src/app/unknown-person/unknown-person.component.css @@ -147,7 +147,9 @@ body { position: absolute; top: 40px; left: 40px; - box-shadow: 38px 0 #0078ca, 19px 20px #f69697; + box-shadow: + 38px 0 #0078ca, + 19px 20px #f69697; } .eyes:before { height: 12px; diff --git a/apps/performance/christmas-web-worker/src/index.html b/apps/performance/christmas-web-worker/src/index.html index fc6ebdf..4ca3789 100644 --- a/apps/performance/christmas-web-worker/src/index.html +++ b/apps/performance/christmas-web-worker/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/performance/default-onpush/src/app/person-list.component.ts b/apps/performance/default-onpush/src/app/person-list.component.ts index 3c6535e..c4f5569 100644 --- a/apps/performance/default-onpush/src/app/person-list.component.ts +++ b/apps/performance/default-onpush/src/app/person-list.component.ts @@ -21,7 +21,7 @@ import { MatListModule } from '@angular/material/list'; CDFlashingDirective, ], template: ` -

+

{{ title | titlecase }}

diff --git a/apps/performance/default-onpush/src/app/random.component.ts b/apps/performance/default-onpush/src/app/random.component.ts index 105f7b9..d46cdd0 100644 --- a/apps/performance/default-onpush/src/app/random.component.ts +++ b/apps/performance/default-onpush/src/app/random.component.ts @@ -4,7 +4,9 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-random', standalone: true, - template: `
I do nothing but I'm here
`, + template: ` +
I do nothing but I'm here
+ `, imports: [CDFlashingDirective], }) export class RandomComponent {} diff --git a/apps/performance/default-onpush/src/index.html b/apps/performance/default-onpush/src/index.html index dcea384..eecd767 100644 --- a/apps/performance/default-onpush/src/index.html +++ b/apps/performance/default-onpush/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/performance/default-onpush/src/main.ts b/apps/performance/default-onpush/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/performance/default-onpush/src/main.ts +++ b/apps/performance/default-onpush/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/performance/memoized/src/app/app.component.ts b/apps/performance/memoized/src/app/app.component.ts index 01d0493..4b24fce 100644 --- a/apps/performance/memoized/src/app/app.component.ts +++ b/apps/performance/memoized/src/app/app.component.ts @@ -11,7 +11,7 @@ import { PersonListComponent } from './person-list.component';

Performance is key!!

diff --git a/apps/performance/memoized/src/app/person-list.component.ts b/apps/performance/memoized/src/app/person-list.component.ts index 1f8ae15..4a425d4 100644 --- a/apps/performance/memoized/src/app/person-list.component.ts +++ b/apps/performance/memoized/src/app/person-list.component.ts @@ -27,7 +27,7 @@ const fibonacci = (num: number): number => { MatChipsModule, ], template: ` -

+

{{ title | titlecase }}

@@ -43,7 +43,7 @@ const fibonacci = (num: number): number => {

{{ person.name }}

- {{ calculate(person.fib) }} + {{ calculate(person.fib) }}
diff --git a/apps/performance/memoized/src/index.html b/apps/performance/memoized/src/index.html index 459031f..1c07d98 100644 --- a/apps/performance/memoized/src/index.html +++ b/apps/performance/memoized/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/performance/memoized/src/main.ts b/apps/performance/memoized/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/performance/memoized/src/main.ts +++ b/apps/performance/memoized/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/performance/ngfor-biglist/src/app/app.component.ts b/apps/performance/ngfor-biglist/src/app/app.component.ts index 1baa61d..9c26149 100644 --- a/apps/performance/ngfor-biglist/src/app/app.component.ts +++ b/apps/performance/ngfor-biglist/src/app/app.component.ts @@ -21,13 +21,13 @@ import { PersonListComponent } from './person-list.component'; template: ` `, host: { diff --git a/apps/performance/ngfor-biglist/src/app/list.service.ts b/apps/performance/ngfor-biglist/src/app/list.service.ts index e56bdde..9a54824 100644 --- a/apps/performance/ngfor-biglist/src/app/list.service.ts +++ b/apps/performance/ngfor-biglist/src/app/list.service.ts @@ -16,7 +16,7 @@ export class PersonService { this.persons.set( this.fakeBackend .returnNewList(this.persons()) - .filter((p) => p.email !== email) + .filter((p) => p.email !== email), ); } @@ -24,7 +24,7 @@ export class PersonService { this.persons.set( this.fakeBackend .returnNewList(this.persons()) - .map((p) => (p.email === email ? { email, name: randFirstName() } : p)) + .map((p) => (p.email === email ? { email, name: randFirstName() } : p)), ); } diff --git a/apps/performance/ngfor-biglist/src/app/person-list.component.ts b/apps/performance/ngfor-biglist/src/app/person-list.component.ts index e9bbb17..4d438e6 100644 --- a/apps/performance/ngfor-biglist/src/app/person-list.component.ts +++ b/apps/performance/ngfor-biglist/src/app/person-list.component.ts @@ -9,11 +9,11 @@ import { Person } from './person.model'; standalone: true, imports: [CommonModule, NgForTrackByModule], template: ` -
+
+ class="flex h-9 items-center justify-between border-b">

{{ person.name }}

{{ person.email }}

diff --git a/apps/performance/ngfor-biglist/src/index.html b/apps/performance/ngfor-biglist/src/index.html index f23a85c..1b05827 100644 --- a/apps/performance/ngfor-biglist/src/index.html +++ b/apps/performance/ngfor-biglist/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/performance/ngfor-biglist/src/main.ts b/apps/performance/ngfor-biglist/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/performance/ngfor-biglist/src/main.ts +++ b/apps/performance/ngfor-biglist/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/performance/ngfor-optimize/src/app/app.component.ts b/apps/performance/ngfor-optimize/src/app/app.component.ts index 58d89f4..fb9e985 100644 --- a/apps/performance/ngfor-optimize/src/app/app.component.ts +++ b/apps/performance/ngfor-optimize/src/app/app.component.ts @@ -16,7 +16,7 @@ import { PersonListComponent } from './person-list.component'; providers: [PersonService], selector: 'app-root', template: ` -

+

List of Persons

@@ -30,7 +30,7 @@ import { PersonListComponent } from './person-list.component'; diff --git a/apps/performance/ngfor-optimize/src/app/list.service.ts b/apps/performance/ngfor-optimize/src/app/list.service.ts index e56bdde..9a54824 100644 --- a/apps/performance/ngfor-optimize/src/app/list.service.ts +++ b/apps/performance/ngfor-optimize/src/app/list.service.ts @@ -16,7 +16,7 @@ export class PersonService { this.persons.set( this.fakeBackend .returnNewList(this.persons()) - .filter((p) => p.email !== email) + .filter((p) => p.email !== email), ); } @@ -24,7 +24,7 @@ export class PersonService { this.persons.set( this.fakeBackend .returnNewList(this.persons()) - .map((p) => (p.email === email ? { email, name: randFirstName() } : p)) + .map((p) => (p.email === email ? { email, name: randFirstName() } : p)), ); } diff --git a/apps/performance/ngfor-optimize/src/app/person-list.component.ts b/apps/performance/ngfor-optimize/src/app/person-list.component.ts index 69aee34..ca04956 100644 --- a/apps/performance/ngfor-optimize/src/app/person-list.component.ts +++ b/apps/performance/ngfor-optimize/src/app/person-list.component.ts @@ -10,16 +10,16 @@ import { Person } from './person.model'; template: `
+ class="flex items-center justify-between border-b">

{{ person.name }}

diff --git a/apps/performance/ngfor-optimize/src/index.html b/apps/performance/ngfor-optimize/src/index.html index 63fe2ad..e5b7990 100644 --- a/apps/performance/ngfor-optimize/src/index.html +++ b/apps/performance/ngfor-optimize/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/performance/ngfor-optimize/src/main.ts b/apps/performance/ngfor-optimize/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/performance/ngfor-optimize/src/main.ts +++ b/apps/performance/ngfor-optimize/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/performance/scroll-cd/src/index.html b/apps/performance/scroll-cd/src/index.html index 5a26734..1d22cac 100644 --- a/apps/performance/scroll-cd/src/index.html +++ b/apps/performance/scroll-cd/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/rxjs/catch-error/src/app/app.config.ts b/apps/rxjs/catch-error/src/app/app.config.ts index 610704b..c5abc2a 100644 --- a/apps/rxjs/catch-error/src/app/app.config.ts +++ b/apps/rxjs/catch-error/src/app/app.config.ts @@ -1,5 +1,5 @@ -import { ApplicationConfig, importProvidersFrom } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; +import { ApplicationConfig, importProvidersFrom } from '@angular/core'; export const appConfig: ApplicationConfig = { providers: [importProvidersFrom(HttpClientModule)], diff --git a/apps/rxjs/catch-error/src/index.html b/apps/rxjs/catch-error/src/index.html index 07c9d66..7a765fa 100644 --- a/apps/rxjs/catch-error/src/index.html +++ b/apps/rxjs/catch-error/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/rxjs/catch-error/src/main.ts b/apps/rxjs/catch-error/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/rxjs/catch-error/src/main.ts +++ b/apps/rxjs/catch-error/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/rxjs/pipe-bug/src/app/app.component.ts b/apps/rxjs/pipe-bug/src/app/app.component.ts index b0c6951..f22b167 100644 --- a/apps/rxjs/pipe-bug/src/app/app.component.ts +++ b/apps/rxjs/pipe-bug/src/app/app.component.ts @@ -1,6 +1,6 @@ /* eslint-disable @angular-eslint/component-selector */ import { AsyncPipe, NgFor } from '@angular/common'; -import { Component, inject, Input } from '@angular/core'; +import { Component, Input, inject } from '@angular/core'; import { BehaviorSubject, take } from 'rxjs'; import { AppService } from './app.service'; import { TopicType } from './localDB.service'; @@ -29,8 +29,8 @@ export class ButtonDeleteComponent { this.message$$.next( result ? `All ${this.topic} have been deleted` - : `Error: deletion of some ${this.topic} failed` - ) + : `Error: deletion of some ${this.topic} failed`, + ), ); } } diff --git a/apps/rxjs/pipe-bug/src/app/app.service.ts b/apps/rxjs/pipe-bug/src/app/app.service.ts index 09a9ed1..7c81735 100644 --- a/apps/rxjs/pipe-bug/src/app/app.service.ts +++ b/apps/rxjs/pipe-bug/src/app/app.service.ts @@ -16,8 +16,8 @@ export class AppService { ? topicToDelete .map((t) => this.dbService.deleteOneTopic(t.id)) .reduce((acc, curr) => merge(acc, curr), of(true)) - : of(true) - ) + : of(true), + ), ); } } diff --git a/apps/rxjs/pipe-bug/src/app/localDB.service.ts b/apps/rxjs/pipe-bug/src/app/localDB.service.ts index 88d1e1d..d13d0ed 100644 --- a/apps/rxjs/pipe-bug/src/app/localDB.service.ts +++ b/apps/rxjs/pipe-bug/src/app/localDB.service.ts @@ -44,7 +44,7 @@ export class LocalDBService extends ComponentStore { deleteOne = this.updater( (state, id: number): DBState => ({ infos: state.infos.filter((i) => i.id !== id), - }) + }), ); deleteOneTopic = (id: number) => diff --git a/apps/rxjs/pipe-bug/src/index.html b/apps/rxjs/pipe-bug/src/index.html index caa71f3..401ddc0 100644 --- a/apps/rxjs/pipe-bug/src/index.html +++ b/apps/rxjs/pipe-bug/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/rxjs/race-condition/cypress.config.ts b/apps/rxjs/race-condition/cypress.config.ts index 7287d91..1abef9c 100644 --- a/apps/rxjs/race-condition/cypress.config.ts +++ b/apps/rxjs/race-condition/cypress.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'cypress'; import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; +import { defineConfig } from 'cypress'; export default defineConfig({ component: nxComponentTestingPreset(__filename), diff --git a/apps/rxjs/race-condition/cypress/support/component-index.html b/apps/rxjs/race-condition/cypress/support/component-index.html index 5ce08c7..6afcd57 100644 --- a/apps/rxjs/race-condition/cypress/support/component-index.html +++ b/apps/rxjs/race-condition/cypress/support/component-index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/rxjs/race-condition/src/app/app.component.ts b/apps/rxjs/race-condition/src/app/app.component.ts index 8b3a04a..a7eb777 100644 --- a/apps/rxjs/race-condition/src/app/app.component.ts +++ b/apps/rxjs/race-condition/src/app/app.component.ts @@ -12,7 +12,9 @@ import { TopicService, TopicType } from './topic.service'; @Component({ standalone: true, selector: 'app-root', - template: ` `, + template: ` + + `, changeDetection: ChangeDetectionStrategy.OnPush, }) export class AppComponent implements OnInit { diff --git a/apps/rxjs/race-condition/src/app/app.config.ts b/apps/rxjs/race-condition/src/app/app.config.ts index d580f04..692a8f2 100644 --- a/apps/rxjs/race-condition/src/app/app.config.ts +++ b/apps/rxjs/race-condition/src/app/app.config.ts @@ -1,5 +1,4 @@ -import { ApplicationConfig } from '@angular/core'; -import { importProvidersFrom } from '@angular/core'; +import { ApplicationConfig, importProvidersFrom } from '@angular/core'; import { MatDialogModule } from '@angular/material/dialog'; export const appConfig: ApplicationConfig = { providers: [importProvidersFrom(MatDialogModule)], diff --git a/apps/rxjs/race-condition/src/app/topic-dialog.component.ts b/apps/rxjs/race-condition/src/app/topic-dialog.component.ts index 3171241..d63ed4a 100644 --- a/apps/rxjs/race-condition/src/app/topic-dialog.component.ts +++ b/apps/rxjs/race-condition/src/app/topic-dialog.component.ts @@ -1,10 +1,11 @@ import { NgFor } from '@angular/common'; import { ChangeDetectionStrategy, Component, inject } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; -import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog'; @Component({ - template: `

Show all Topics

+ template: ` +

Show all Topics

  • @@ -14,7 +15,8 @@ import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
-
`, +
+ `, imports: [MatDialogModule, MatButtonModule, NgFor], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/apps/rxjs/race-condition/src/index.html b/apps/rxjs/race-condition/src/index.html index 4160653..af75950 100644 --- a/apps/rxjs/race-condition/src/index.html +++ b/apps/rxjs/race-condition/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/rxjs/race-condition/src/main.ts b/apps/rxjs/race-condition/src/main.ts index ea9f26c..9bb5c30 100644 --- a/apps/rxjs/race-condition/src/main.ts +++ b/apps/rxjs/race-condition/src/main.ts @@ -4,5 +4,5 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/testing/checkbox/src/app/app.component.ts b/apps/testing/checkbox/src/app/app.component.ts index 3a2eb36..936cc78 100644 --- a/apps/testing/checkbox/src/app/app.component.ts +++ b/apps/testing/checkbox/src/app/app.component.ts @@ -3,7 +3,8 @@ import { Component } from '@angular/core'; @Component({ standalone: true, selector: 'app-root', - template: ` + template: ` + `, + + `, }) export class AppComponent { check = false; diff --git a/apps/testing/checkbox/src/index.html b/apps/testing/checkbox/src/index.html index c4f1121..75e95fe 100644 --- a/apps/testing/checkbox/src/index.html +++ b/apps/testing/checkbox/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/create-harness/src/app/slider.component.ts b/apps/testing/create-harness/src/app/slider.component.ts index 1c07c11..bc77ff1 100644 --- a/apps/testing/create-harness/src/app/slider.component.ts +++ b/apps/testing/create-harness/src/app/slider.component.ts @@ -11,7 +11,7 @@ import { skip } from 'rxjs'; template: ` -
+
diff --git a/apps/testing/create-harness/src/index.html b/apps/testing/create-harness/src/index.html index 491a132..03bd39e 100644 --- a/apps/testing/create-harness/src/index.html +++ b/apps/testing/create-harness/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/create-harness/src/main.ts b/apps/testing/create-harness/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/testing/create-harness/src/main.ts +++ b/apps/testing/create-harness/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/testing/harness/src/app/app.component.ts b/apps/testing/harness/src/app/app.component.ts index 76ccd4d..1f89505 100644 --- a/apps/testing/harness/src/app/app.component.ts +++ b/apps/testing/harness/src/app/app.component.ts @@ -5,7 +5,9 @@ import { ChildComponent } from './child.component'; standalone: true, imports: [ChildComponent], selector: 'app-root', - template: ``, + template: ` + + `, styles: [''], }) export class AppComponent {} diff --git a/apps/testing/harness/src/app/child.component.ts b/apps/testing/harness/src/app/child.component.ts index 178c06c..cc9a03e 100644 --- a/apps/testing/harness/src/app/child.component.ts +++ b/apps/testing/harness/src/app/child.component.ts @@ -15,7 +15,7 @@ import { MatSliderModule } from '@angular/material/slider';

Slider configuration

- + Value - + Min value - + Max value - + Step size diff --git a/apps/testing/harness/src/index.html b/apps/testing/harness/src/index.html index 1141708..a412201 100644 --- a/apps/testing/harness/src/index.html +++ b/apps/testing/harness/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/harness/src/main.ts b/apps/testing/harness/src/main.ts index 514c89a..f3a7223 100644 --- a/apps/testing/harness/src/main.ts +++ b/apps/testing/harness/src/main.ts @@ -1,7 +1,7 @@ import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; +import { appConfig } from './app/app.config'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/testing/input-output/cypress.config.ts b/apps/testing/input-output/cypress.config.ts index 7287d91..1abef9c 100644 --- a/apps/testing/input-output/cypress.config.ts +++ b/apps/testing/input-output/cypress.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'cypress'; import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; +import { defineConfig } from 'cypress'; export default defineConfig({ component: nxComponentTestingPreset(__filename), diff --git a/apps/testing/input-output/cypress/support/component-index.html b/apps/testing/input-output/cypress/support/component-index.html index c04f2f6..57debcf 100644 --- a/apps/testing/input-output/cypress/support/component-index.html +++ b/apps/testing/input-output/cypress/support/component-index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/input-output/src/index.html b/apps/testing/input-output/src/index.html index 435d4bb..bb1c5ed 100644 --- a/apps/testing/input-output/src/index.html +++ b/apps/testing/input-output/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/modal/cypress.config.ts b/apps/testing/modal/cypress.config.ts index 7287d91..1abef9c 100644 --- a/apps/testing/modal/cypress.config.ts +++ b/apps/testing/modal/cypress.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'cypress'; import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; +import { defineConfig } from 'cypress'; export default defineConfig({ component: nxComponentTestingPreset(__filename), diff --git a/apps/testing/modal/cypress/support/component-index.html b/apps/testing/modal/cypress/support/component-index.html index 539b1d2..7af6567 100644 --- a/apps/testing/modal/cypress/support/component-index.html +++ b/apps/testing/modal/cypress/support/component-index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/modal/src/app/app.component.ts b/apps/testing/modal/src/app/app.component.ts index 8c0fd8d..afb4b29 100644 --- a/apps/testing/modal/src/app/app.component.ts +++ b/apps/testing/modal/src/app/app.component.ts @@ -58,8 +58,8 @@ export class AppComponent { .afterClosed() .subscribe((result) => this.result.next( - result ? 'Name has been submitted' : 'Name is invalid !!' - ) + result ? 'Name has been submitted' : 'Name is invalid !!', + ), ); } } diff --git a/apps/testing/modal/src/app/error.dialog.ts b/apps/testing/modal/src/app/error.dialog.ts index 2dd11e1..38412ba 100644 --- a/apps/testing/modal/src/app/error.dialog.ts +++ b/apps/testing/modal/src/app/error.dialog.ts @@ -9,7 +9,9 @@ import { MatDialogModule } from '@angular/material/dialog'; template: `

Error

- You must enter a name first!! + You must enter a + name + first!!
diff --git a/apps/testing/modal/src/index.html b/apps/testing/modal/src/index.html index ce6d8d4..f63ff68 100644 --- a/apps/testing/modal/src/index.html +++ b/apps/testing/modal/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/modal/src/main.ts b/apps/testing/modal/src/main.ts index 4ecc5cf..7961924 100644 --- a/apps/testing/modal/src/main.ts +++ b/apps/testing/modal/src/main.ts @@ -1,8 +1,8 @@ -import { appConfig } from './app/app.config'; import { bootstrapApplication } from '@angular/platform-browser'; +import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/testing/nested/cypress.config.ts b/apps/testing/nested/cypress.config.ts index 7287d91..1abef9c 100644 --- a/apps/testing/nested/cypress.config.ts +++ b/apps/testing/nested/cypress.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'cypress'; import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; +import { defineConfig } from 'cypress'; export default defineConfig({ component: nxComponentTestingPreset(__filename), diff --git a/apps/testing/nested/cypress/support/component-index.html b/apps/testing/nested/cypress/support/component-index.html index ee5b073..f1b19dd 100644 --- a/apps/testing/nested/cypress/support/component-index.html +++ b/apps/testing/nested/cypress/support/component-index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/nested/src/app/app.component.ts b/apps/testing/nested/src/app/app.component.ts index 8877b8c..098836b 100644 --- a/apps/testing/nested/src/app/app.component.ts +++ b/apps/testing/nested/src/app/app.component.ts @@ -5,6 +5,8 @@ import { ChildComponent } from './child.component'; standalone: true, imports: [ChildComponent], selector: 'app-root', - template: ` `, + template: ` + + `, }) export class AppComponent {} diff --git a/apps/testing/nested/src/app/child.component.ts b/apps/testing/nested/src/app/child.component.ts index e148cca..bcee84e 100644 --- a/apps/testing/nested/src/app/child.component.ts +++ b/apps/testing/nested/src/app/child.component.ts @@ -14,7 +14,9 @@ import { HttpService } from './http.service'; selector: 'app-input', standalone: true, imports: [ReactiveFormsModule], - template: ` `, + template: ` + + `, changeDetection: ChangeDetectionStrategy.OnPush, }) export class InputComponent { @@ -24,7 +26,9 @@ export class InputComponent { @Component({ selector: 'result', standalone: true, - template: `

Title is {{ title }}

`, + template: ` +

Title is {{ title }}

+ `, changeDetection: ChangeDetectionStrategy.OnPush, }) export class ResultComponent { @@ -34,7 +38,9 @@ export class ResultComponent { @Component({ selector: 'app-button', standalone: true, - template: ``, + template: ` + + `, changeDetection: ChangeDetectionStrategy.OnPush, }) export class ButtonComponent { @@ -44,7 +50,9 @@ export class ButtonComponent { @Component({ selector: 'app-error', standalone: true, - template: `

Title is required !!!

`, + template: ` +

Title is required !!!

+ `, changeDetection: ChangeDetectionStrategy.OnPush, }) export class ErrorComponent { diff --git a/apps/testing/nested/src/index.html b/apps/testing/nested/src/index.html index 93eefa7..620e0cd 100644 --- a/apps/testing/nested/src/index.html +++ b/apps/testing/nested/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/router-outlet/cypress.config.ts b/apps/testing/router-outlet/cypress.config.ts index 7287d91..1abef9c 100644 --- a/apps/testing/router-outlet/cypress.config.ts +++ b/apps/testing/router-outlet/cypress.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'cypress'; import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; +import { defineConfig } from 'cypress'; export default defineConfig({ component: nxComponentTestingPreset(__filename), diff --git a/apps/testing/router-outlet/cypress/support/component-index.html b/apps/testing/router-outlet/cypress/support/component-index.html index 4d7f518..208ea71 100644 --- a/apps/testing/router-outlet/cypress/support/component-index.html +++ b/apps/testing/router-outlet/cypress/support/component-index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/router-outlet/src/app/book.guard.ts b/apps/testing/router-outlet/src/app/book.guard.ts index 3fe568e..1419047 100644 --- a/apps/testing/router-outlet/src/app/book.guard.ts +++ b/apps/testing/router-outlet/src/app/book.guard.ts @@ -4,7 +4,7 @@ import { availableBooks } from './book.model'; export const bookGuard = ( route: ActivatedRouteSnapshot, - router = inject(Router) + router = inject(Router), ) => { const searchParam = route.queryParams?.['book'].toLowerCase(); @@ -13,7 +13,7 @@ export const bookGuard = ( availableBooks.some( (b) => b.author.toLowerCase().includes(searchParam) || - b.name.toLowerCase().includes(searchParam) + b.name.toLowerCase().includes(searchParam), ); return isBookAvailable || router.parseUrl('no-result'); diff --git a/apps/testing/router-outlet/src/app/no-book-search.component.ts b/apps/testing/router-outlet/src/app/no-book-search.component.ts index ed41f51..17d6b97 100644 --- a/apps/testing/router-outlet/src/app/no-book-search.component.ts +++ b/apps/testing/router-outlet/src/app/no-book-search.component.ts @@ -2,7 +2,9 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; @Component({ standalone: true, - template: `
No book found for this search
`, + template: ` +
No book found for this search
+ `, changeDetection: ChangeDetectionStrategy.OnPush, }) export default class ShelfComponent {} diff --git a/apps/testing/router-outlet/src/app/shelf.component.ts b/apps/testing/router-outlet/src/app/shelf.component.ts index bb4fd5d..a7da5af 100644 --- a/apps/testing/router-outlet/src/app/shelf.component.ts +++ b/apps/testing/router-outlet/src/app/shelf.component.ts @@ -25,8 +25,8 @@ export default class ShelfComponent { availableBooks.filter( (b) => b.name.toLowerCase().includes(param) || - b.author.toLowerCase().includes(param) - ) - ) + b.author.toLowerCase().includes(param), + ), + ), ); } diff --git a/apps/testing/router-outlet/src/index.html b/apps/testing/router-outlet/src/index.html index dc98015..b706580 100644 --- a/apps/testing/router-outlet/src/index.html +++ b/apps/testing/router-outlet/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/router-outlet/src/main.ts b/apps/testing/router-outlet/src/main.ts index 4ecc5cf..7961924 100644 --- a/apps/testing/router-outlet/src/main.ts +++ b/apps/testing/router-outlet/src/main.ts @@ -1,8 +1,8 @@ -import { appConfig } from './app/app.config'; import { bootstrapApplication } from '@angular/platform-browser'; +import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig).catch((err) => - console.error(err) + console.error(err), ); diff --git a/apps/testing/table/cypress.config.ts b/apps/testing/table/cypress.config.ts index 7287d91..1abef9c 100644 --- a/apps/testing/table/cypress.config.ts +++ b/apps/testing/table/cypress.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'cypress'; import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; +import { defineConfig } from 'cypress'; export default defineConfig({ component: nxComponentTestingPreset(__filename), diff --git a/apps/testing/table/cypress/support/component-index.html b/apps/testing/table/cypress/support/component-index.html index a749e54..c0a4681 100644 --- a/apps/testing/table/cypress/support/component-index.html +++ b/apps/testing/table/cypress/support/component-index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/table/src/app/app.component.ts b/apps/testing/table/src/app/app.component.ts index 534b449..236bc50 100644 --- a/apps/testing/table/src/app/app.component.ts +++ b/apps/testing/table/src/app/app.component.ts @@ -5,6 +5,8 @@ import { TableComponent } from './table.component'; standalone: true, imports: [TableComponent], selector: 'app-root', - template: ` `, + template: ` + + `, }) export class AppComponent {} diff --git a/apps/testing/table/src/app/table.component.ts b/apps/testing/table/src/app/table.component.ts index a2c6d4c..74df216 100644 --- a/apps/testing/table/src/app/table.component.ts +++ b/apps/testing/table/src/app/table.component.ts @@ -94,7 +94,7 @@ export class TableComponent private api = inject(FakeBackendService); readonly issues$ = this.select((s) => s.users).pipe( - tap((t) => console.log('UserNEw ', t)) + tap((t) => console.log('UserNEw ', t)), ); readonly loading$ = this.select((s) => s.loading); readonly error$ = this.select((s) => s.error); @@ -124,11 +124,11 @@ export class TableComponent tap((t) => console.log('user', t)), tapResponse( (data) => this.patchState({ users: data, loading: false }), - (err) => this.patchState({ error: err as string, loading: false }) - ) - ) - ) - ) + (err) => this.patchState({ error: err as string, loading: false }), + ), + ), + ), + ), ); ngAfterViewInit(): void { @@ -137,7 +137,7 @@ export class TableComponent this.loadData( this.select({ sortActive: this.sort.sortChange.pipe( - map((s) => s.active as keyof User) + map((s) => s.active as keyof User), ), sortDir: this.sort.sortChange.pipe(map((s) => s.direction)), pageIndex: this.paginator.page.pipe(map((p) => p.pageIndex)), @@ -146,8 +146,8 @@ export class TableComponent sortActive: this.sort.active as keyof User, sortDir: this.sort.direction, pageIndex: 1, - }) - ) + }), + ), ); } diff --git a/apps/testing/table/src/index.html b/apps/testing/table/src/index.html index 2eadaaa..11da4b0 100644 --- a/apps/testing/table/src/index.html +++ b/apps/testing/table/src/index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/todos-list/cypress.config.ts b/apps/testing/todos-list/cypress.config.ts index 7287d91..1abef9c 100644 --- a/apps/testing/todos-list/cypress.config.ts +++ b/apps/testing/todos-list/cypress.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'cypress'; import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; +import { defineConfig } from 'cypress'; export default defineConfig({ component: nxComponentTestingPreset(__filename), diff --git a/apps/testing/todos-list/cypress/support/component-index.html b/apps/testing/todos-list/cypress/support/component-index.html index 8b1d587..57c8a3d 100644 --- a/apps/testing/todos-list/cypress/support/component-index.html +++ b/apps/testing/todos-list/cypress/support/component-index.html @@ -1,4 +1,4 @@ - + diff --git a/apps/testing/todos-list/src/app/app.component.ts b/apps/testing/todos-list/src/app/app.component.ts index a3de393..6b61097 100644 --- a/apps/testing/todos-list/src/app/app.component.ts +++ b/apps/testing/todos-list/src/app/app.component.ts @@ -5,6 +5,8 @@ import { RouterOutlet } from '@angular/router'; selector: 'app-root', standalone: true, imports: [RouterOutlet], - template: ``, + template: ` + + `, }) export class AppComponent {} diff --git a/apps/testing/todos-list/src/app/backend.service.ts b/apps/testing/todos-list/src/app/backend.service.ts index 2af814b..08929ed 100644 --- a/apps/testing/todos-list/src/app/backend.service.ts +++ b/apps/testing/todos-list/src/app/backend.service.ts @@ -101,7 +101,7 @@ export class BackendService { const updatedTicket = { ...foundTicket, ...updates }; this.storedTickets = this.storedTickets.map((t) => - t.id === ticketId ? updatedTicket : t + t.id === ticketId ? updatedTicket : t, ); return of(updatedTicket).pipe(delay(randomDelay())); diff --git a/apps/testing/todos-list/src/app/detail/detail.component.ts b/apps/testing/todos-list/src/app/detail/detail.component.ts index 5b5214c..7e5eed8 100644 --- a/apps/testing/todos-list/src/app/detail/detail.component.ts +++ b/apps/testing/todos-list/src/app/detail/detail.component.ts @@ -19,22 +19,28 @@ import { DetailStore } from './detail.store'; LetDirective, ], template: ` -

Ticket Detail:

+

Ticket Detail:

-
Ticket: {{ ticket.id }}
- Description: {{ ticket.description }} + Ticket: + {{ ticket.id }}
- AssigneeId: {{ ticket.assigneeId }} + Description: + {{ ticket.description }}
- Is done: {{ ticket.completed }} + AssigneeId: + {{ ticket.assigneeId }} +
+
+ Is done: + {{ ticket.completed }}
diff --git a/apps/testing/todos-list/src/app/detail/detail.store.ts b/apps/testing/todos-list/src/app/detail/detail.store.ts index 9d0f421..9425b25 100644 --- a/apps/testing/todos-list/src/app/detail/detail.store.ts +++ b/apps/testing/todos-list/src/app/detail/detail.store.ts @@ -36,14 +36,17 @@ export class DetailStore loading: this.loading$, }); - constructor(private backend: BackendService, private route: ActivatedRoute) { + constructor( + private backend: BackendService, + private route: ActivatedRoute, + ) { super(initialState); } readonly loadTicket = this.effect( pipe( concatLatestFrom(() => - this.route.params.pipe(map((p) => p[PARAM_TICKET_ID])) + this.route.params.pipe(map((p) => p[PARAM_TICKET_ID])), ), tap(() => this.patchState({ loading: true, error: '' })), mergeMap(([, id]) => @@ -54,11 +57,11 @@ export class DetailStore loading: false, ticket, }), - (error: unknown) => this.patchState({ error }) - ) - ) - ) - ) + (error: unknown) => this.patchState({ error }), + ), + ), + ), + ), ); ngrxOnStateInit() { diff --git a/apps/testing/todos-list/src/app/list/list.component.ts b/apps/testing/todos-list/src/app/list/list.component.ts index bc24485..8942f7c 100644 --- a/apps/testing/todos-list/src/app/list/list.component.ts +++ b/apps/testing/todos-list/src/app/list/list.component.ts @@ -25,7 +25,7 @@ import { RowComponent } from './ui/row.component'; LetDirective, ], template: ` -

Tickets

+

Tickets

Search @@ -45,14 +45,13 @@ import { RowComponent } from './ui/row.component'; mode="query" *ngIf="vm.loading" class="mt-5"> -
    +
      - + (closeTicket)="ticketStore.done($event)">