-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: update all code to angular 17 standalone components
- Loading branch information
1 parent
2032830
commit a915afd
Showing
74 changed files
with
8,159 additions
and
25,661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Nx 18 enables using plugins to infer targets by default | ||
# This is disabled for existing workspaces to maintain compatibility | ||
# For more info, see: https://nx.dev/concepts/inferred-tasks | ||
NX_ADD_PLUGINS=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
//npm.pkg.github.com/:_authToken=${NPM_TOKEN} | ||
@moby-it:registry=https://npm.pkg.github.com/ | ||
//npm.pkg.github.com/:_authToken=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 | ||
@moby-it:registry=https://npm.pkg.github.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<ppo-top-bar></ppo-top-bar> | ||
<router-outlet></router-outlet> | ||
<ppo-loader *ngIf="loading$ | ngrxPush"></ppo-loader> | ||
@if (loading$ | ngrxPush) { | ||
<ppo-loader></ppo-loader> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { LoaderService } from '@ppo/shared/ui'; | ||
import { LoaderComponent, LoaderService } from '@ppo/shared/ui'; | ||
import { TopBarComponent } from './top-bar/top-bar.component'; | ||
import { RouterModule } from '@angular/router'; | ||
import { PushPipe } from '@ngrx/component'; | ||
@Component({ | ||
selector: 'ppo-root', | ||
imports: [TopBarComponent, RouterModule, LoaderComponent, PushPipe], | ||
templateUrl: './app.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
standalone: true | ||
}) | ||
export class AppComponent { | ||
constructor(private loaderService: LoaderService) {} | ||
constructor(private loaderService: LoaderService) { } | ||
loading$ = this.loaderService.loading$; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,39 @@ | ||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; | ||
import { ErrorHandler, NgModule } from '@angular/core'; | ||
import { HttpClientModule } from '@angular/common/http'; | ||
import { NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
import { LetDirective, PushPipe } from '@ngrx/component'; | ||
import { EffectsModule } from '@ngrx/effects'; | ||
import { StoreModule } from '@ngrx/store'; | ||
import { StoreDevtoolsModule } from '@ngrx/store-devtools'; | ||
import { AuthDomainModule } from '@ppo/auth/domain'; | ||
import { AuthFeatureUserFormModule } from '@ppo/auth/feature-user-form'; | ||
import { PlayDomainModule } from '@ppo/play/domain'; | ||
import { API_URL } from '@ppo/shared/config'; | ||
import { SharedUiModule } from '@ppo/shared/ui'; | ||
import { LoaderComponent, SharedUiModule } from '@ppo/shared/ui'; | ||
import { UserDomainModule } from '@ppo/user/domain'; | ||
import { ToastrModule } from 'ngx-toastr'; | ||
import { environment } from '../environments/environment'; | ||
import { AppComponent } from './app.component'; | ||
import { AppRoutingModule } from './app.routing.module'; | ||
import { GlobalErrorHandler } from './errorHandler'; | ||
import { TokenInterceptor } from './interceptors'; | ||
import { TopBarComponent } from './top-bar/top-bar.component'; | ||
import { UserStatusComponent } from './top-bar/user-status/user-status.component'; | ||
@NgModule({ | ||
declarations: [ | ||
AppComponent, | ||
TopBarComponent, | ||
UserStatusComponent, | ||
], | ||
imports: [ | ||
BrowserModule, | ||
HttpClientModule, | ||
BrowserAnimationsModule, | ||
AppRoutingModule, | ||
PushPipe, | ||
LetDirective, | ||
StoreModule.forRoot({}), | ||
EffectsModule.forRoot([]), | ||
StoreDevtoolsModule.instrument({ | ||
maxAge: 25, // Retains last 25 states | ||
logOnly: environment.production, // Restrict extension to log-only mode | ||
autoPause: true, // Pauses recording actions and state changes when the extension window is not open | ||
connectInZone: true | ||
}), | ||
PlayDomainModule, | ||
AuthDomainModule, | ||
SharedUiModule, | ||
UserDomainModule, | ||
AuthFeatureUserFormModule, | ||
ToastrModule.forRoot({ | ||
positionClass: 'toast-bottom-right', | ||
timeOut: 5000, | ||
closeButton: true, | ||
}), // ToastrModule added | ||
], | ||
providers: [ | ||
{ provide: API_URL, useValue: environment.apiUrl }, | ||
{ | ||
provide: HTTP_INTERCEPTORS, | ||
useClass: TokenInterceptor, | ||
multi: true, | ||
}, | ||
{ provide: ErrorHandler, useClass: GlobalErrorHandler }, | ||
], | ||
bootstrap: [AppComponent], | ||
}) | ||
export class AppModule { } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { Component } from '@angular/core'; | ||
import { UserStatusComponent } from './user-status/user-status.component'; | ||
import { RouterModule } from '@angular/router'; | ||
@Component({ | ||
selector: 'ppo-top-bar', | ||
imports: [UserStatusComponent, RouterModule], | ||
templateUrl: './top-bar.component.html', | ||
styles: [` | ||
:host { | ||
display: block; | ||
z-index: 10; | ||
} | ||
`] | ||
`], | ||
standalone: true | ||
}) | ||
export class TopBarComponent { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.