Skip to content

Commit

Permalink
chore: standalone migration
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfran committed Sep 12, 2023
1 parent 86f887f commit 9decf1d
Show file tree
Hide file tree
Showing 209 changed files with 1,982 additions and 1,009 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
* Copyright (c) 2023-present Kaleidos INC
*/

export * from './modal.module';
function prettyBytes() {
return '1kb';
}

module.exports = prettyBytes;
2 changes: 0 additions & 2 deletions javascript/apps/taiga/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { selectUser } from './modules/auth/data-access/+state/selectors/auth.sel
import { AuthService } from './modules/auth/services/auth.service';
import { LocalStorageService } from './shared/local-storage/local-storage.service';
import { RouteHistoryService } from './shared/route-history/route-history.service';
import { NavigationService } from './shared/navigation/navigation.service';
import { InputModalityDetector } from '@angular/cdk/a11y';
import { LanguageService } from './services/language/language.service';
import { ConfigService } from '@taiga/core';
Expand All @@ -45,7 +44,6 @@ export class AppComponent {
private store: Store,
private routeHistoryService: RouteHistoryService,
private translocoService: TranslocoService,
private navigationService: NavigationService,
private inputModalityDetector: InputModalityDetector,
private localStorageService: LocalStorageService,
private languageService: LanguageService,
Expand Down
6 changes: 2 additions & 4 deletions javascript/apps/taiga/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import {
} from '@taiga-ui/core';
import { TUI_LANGUAGE } from '@taiga-ui/i18n';
import { tuiToggleOptionsProvider } from '@taiga-ui/kit';
import { ApiModule, SystemApiService } from '@taiga/api';
import { SystemApiService } from '@taiga/api';
import { ConfigService, CoreModule, coreActions } from '@taiga/core';
import { PROMPT_PROVIDER } from '@taiga/ui/modal/services/modal.service';
import { paramCase } from 'change-case';
import { DataAccessAuthModule } from '~/app/modules/auth/data-access/auth.module';
import { WsModule } from '~/app/services/ws';

import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
Expand Down Expand Up @@ -72,8 +72,6 @@ export function prefersReducedMotion(): boolean {
imports: [
DataAccessAuthModule,
ErrorsModule,
ApiModule,
WsModule,
CoreModule,
HttpClientModule,
ApiRestInterceptorModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
* Copyright (c) 2023-present Kaleidos INC
*/

import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';

@Component({
selector: 'tg-auth-forest',
standalone: true,
templateUrl: './auth-forest.component.html',
styleUrls: ['./auth-forest.component.css'],
imports: [CommonModule],
})
export class AuthForestComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco';
import { ConfigService } from '@taiga/core';
import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module';

import { SocialLoginButtonComponent } from '../social-login-button/social-login-button.component';
import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component';

@Component({
selector: 'tg-social-login',
Expand All @@ -22,8 +23,8 @@ import { SocialLoginButtonComponent } from '../social-login-button/social-login-
imports: [
CommonModule,
TranslocoModule,
ContextNotificationModule,
SocialLoginButtonComponent,
ContextNotificationComponent,
],
providers: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,32 @@
*/

import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { UntilDestroy } from '@ngneat/until-destroy';
import { fadeIntOutAnimation } from '~/app/shared/utils/animations';
import { AuthService } from '../services/auth.service';
import { LoginComponent } from './components/login/login.component';
import { SocialLoginComponent } from '../components/social-login/social-login.component';
import { CommonModule } from '@angular/common';
import { AuthForestComponent } from '../components/auth-forest/auth-forest.component';
import { TranslocoDirective } from '@ngneat/transloco';
import { TitleComponent } from '~/app/shared/title/title.component';
@UntilDestroy()
@Component({
selector: 'tg-auth-feature-login',
templateUrl: './auth-feature-login.component.html',
styleUrls: ['./auth-feature-login.component.css'],
animations: [fadeIntOutAnimation],
standalone: true,
imports: [
CommonModule,
TranslocoDirective,
TitleComponent,
AuthForestComponent,
SocialLoginComponent,
LoginComponent,
RouterLink,
],
})
export class AuthFeatureLoginComponent implements OnInit {
public queryParams$!: typeof this.route.queryParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ import { ReactiveFormsModule } from '@angular/forms';
import { RouterModule, Routes } from '@angular/router';
import { TRANSLOCO_SCOPE } from '@ngneat/transloco';
import { TuiLinkModule } from '@taiga-ui/core';
import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module';
import { InputsModule } from '@taiga/ui/inputs/inputs.module';
import { CommonTemplateModule } from '~/app/shared/common-template.module';
import { ButtonLoadingModule } from '~/app/shared/directives/button-loading/button-loading.module';

import { TitleComponent } from '~/app/shared/title/title.component';
import { AuthForestComponent } from '../components/auth-forest/auth-forest.component';
import { SocialLoginComponent } from '../components/social-login/social-login.component';
Expand All @@ -24,7 +21,6 @@ import { LoginComponent } from './components/login/login.component';
const routes: Routes = [{ path: '', component: AuthFeatureLoginComponent }];

@NgModule({
declarations: [AuthFeatureLoginComponent, LoginComponent],
providers: [
{
provide: TRANSLOCO_SCOPE,
Expand All @@ -35,16 +31,14 @@ const routes: Routes = [{ path: '', component: AuthFeatureLoginComponent }];
},
],
imports: [
CommonTemplateModule,
ReactiveFormsModule,
RouterModule.forChild(routes),
InputsModule,
TuiLinkModule,
ContextNotificationModule,
ButtonLoadingModule,
AuthForestComponent,
SocialLoginComponent,
TitleComponent,
AuthFeatureLoginComponent,
LoginComponent,
],
})
export class AuthFeatureLoginModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
*/

import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import {
FormBuilder,
FormGroup,
Validators,
ReactiveFormsModule,
} from '@angular/forms';
import { Store } from '@ngrx/store';
import { RxState } from '@rx-angular/state';
import {
Expand All @@ -19,6 +24,13 @@ import {
import { selectLoginError } from '~/app/modules/auth/data-access/+state/selectors/auth.selectors';
import { fadeIntOutAnimation } from '~/app/shared/utils/animations';
import { filterNil } from '~/app/shared/utils/operators';
import { RouterLink } from '@angular/router';
import { TuiLinkModule, TuiButtonModule } from '@taiga-ui/core';
import { CommonModule } from '@angular/common';
import { TranslocoDirective } from '@ngneat/transloco';
import { InputsModule } from '@taiga/ui/inputs';
import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component';
import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive';

interface Login {
username: string;
Expand All @@ -31,6 +43,18 @@ interface Login {
styleUrls: ['./login.component.css'],
providers: [RxState],
animations: [fadeIntOutAnimation],
standalone: true,
imports: [
TranslocoDirective,
CommonModule,
InputsModule,
ReactiveFormsModule,
TuiLinkModule,
RouterLink,
ContextNotificationComponent,
ButtonLoadingDirective,
TuiButtonModule,
],
})
export class LoginComponent implements OnInit {
@Input() public projectInvitationToken = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,48 @@ import {
FormControl,
FormGroup,
Validators,
ReactiveFormsModule,
} from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { Store } from '@ngrx/store';
import {
initResetPasswordPage,
requestResetPassword,
} from '../data-access/+state/actions/auth.actions';
import { selectShowResetPasswordConfirmation } from '../data-access/+state/selectors/auth.selectors';
import { AuthForestComponent } from '../components/auth-forest/auth-forest.component';
import { CommonModule } from '@angular/common';

import { TranslocoDirective } from '@ngneat/transloco';
import { InputsModule } from '@taiga/ui/inputs';
import { TuiButtonModule } from '@taiga-ui/core';
import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component';

import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive';
import { InternalLinkDirective } from '~/app/shared/directives/internal-link/internal-link.directive';
import { getUrlPipe } from '~/app/shared/pipes/get-url/get-url.pipe';
import { TitleComponent } from '~/app/shared/title/title.component';

@Component({
selector: 'tg-auth-feature-reset-password',
templateUrl: './auth-feature-reset-password.component.html',
styleUrls: ['./auth-feature-reset-password.component.css'],
standalone: true,
imports: [
CommonModule,
TranslocoDirective,
InputsModule,
TitleComponent,
AuthForestComponent,
ContextNotificationComponent,
ReactiveFormsModule,
InputsModule,
ButtonLoadingDirective,
TuiButtonModule,
InternalLinkDirective,
RouterLink,
getUrlPipe,
],
})
export class AuthFeatureResetPasswordComponent implements OnInit {
public resetPasswordForm!: FormGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ import { ReactiveFormsModule } from '@angular/forms';
import { RouterModule, Routes } from '@angular/router';
import { TRANSLOCO_SCOPE } from '@ngneat/transloco';
import { TuiLinkModule } from '@taiga-ui/core';
import { ContextNotificationModule } from '@taiga/ui/context-notification/context-notification.module';
import { InputsModule } from '@taiga/ui/inputs/inputs.module';
import { CommonTemplateModule } from '~/app/shared/common-template.module';
import { ButtonLoadingModule } from '~/app/shared/directives/button-loading/button-loading.module';
import { InternalLinkModule } from '~/app/shared/directives/internal-link/internal-link.module';
import { GetUrlPipeModule } from '~/app/shared/pipes/get-url/get-url.pipe.module';

import { TitleComponent } from '~/app/shared/title/title.component';
import { AuthForestComponent } from '../components/auth-forest/auth-forest.component';
import { AuthFeatureResetPasswordComponent } from './auth-feature-reset-password.component';
Expand All @@ -36,19 +31,14 @@ const routes: Routes = [
];

@NgModule({
declarations: [AuthFeatureResetPasswordComponent, NewPasswordComponent],
imports: [
CommonTemplateModule,
ReactiveFormsModule,
InputsModule,
GetUrlPipeModule,
InternalLinkModule,
ButtonLoadingModule,
TuiLinkModule,
RouterModule.forChild(routes),
ContextNotificationModule,
AuthForestComponent,
TitleComponent,
AuthFeatureResetPasswordComponent,
NewPasswordComponent,
],
exports: [],
providers: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,37 @@ import {
ValidationErrors,
ValidatorFn,
Validators,
ReactiveFormsModule,
} from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { Store } from '@ngrx/store';
import { PasswordStrengthComponent } from '@taiga/ui/inputs/password-strength/password-strength.component';
import { newPassword } from '~/app/modules/auth/data-access/+state/actions/auth.actions';
import { TuiButtonModule } from '@taiga-ui/core';
import { TranslocoDirective } from '@ngneat/transloco';
import { CommonModule } from '@angular/common';
import { InputsModule } from '@taiga/ui/inputs';
import { ButtonLoadingDirective } from '~/app/shared/directives/button-loading/button-loading.directive';
import { InternalLinkDirective } from '~/app/shared/directives/internal-link/internal-link.directive';
import { getUrlPipe } from '~/app/shared/pipes/get-url/get-url.pipe';

@Component({
selector: 'tg-new-password',
templateUrl: './new-password.component.html',
styleUrls: ['./new-password.component.css'],
standalone: true,
imports: [
CommonModule,
TranslocoDirective,
ReactiveFormsModule,
InputsModule,
PasswordStrengthComponent,
ButtonLoadingDirective,
TuiButtonModule,
InternalLinkDirective,
RouterLink,
getUrlPipe,
],
})
export class NewPasswordComponent implements OnInit {
@HostBinding('class.waves') public waves = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { InvitationParams } from '@taiga/data';
import { AuthService } from '../services/auth.service';
import { SignUp } from './models/sign-up.model';
import { AuthFeatureVerifyEmailComponent } from './components/verify-email/verify-email.component';
import { SignupComponent } from './components/signup/signup.component';
import { TuiButtonModule } from '@taiga-ui/core';
import { SocialLoginComponent } from '../components/social-login/social-login.component';
import { CommonModule } from '@angular/common';
import { TranslocoDirective } from '@ngneat/transloco';
import { ContextNotificationComponent } from '@taiga/ui/context-notification/context-notification.component';
import { InlineNotificationComponent } from '@taiga/ui/inline-notification';
import { ExternalLinkDirective } from '~/app/shared/directives/external-link/external-link.directive';
import { InternalLinkDirective } from '~/app/shared/directives/internal-link/internal-link.directive';
import { getUrlPipe } from '~/app/shared/pipes/get-url/get-url.pipe';
import { TitleComponent } from '~/app/shared/title/title.component';

@UntilDestroy()
@Component({
selector: 'tg-sign-up',
Expand All @@ -28,6 +41,21 @@ import { SignUp } from './models/sign-up.model';
'./styles/sign-up.shared.css',
],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [
TranslocoDirective,
TitleComponent,
CommonModule,
ContextNotificationComponent,
InlineNotificationComponent,
SocialLoginComponent,
TuiButtonModule,
ExternalLinkDirective,
SignupComponent,
InternalLinkDirective,
AuthFeatureVerifyEmailComponent,
getUrlPipe,
],
})
export class AuthFeatureSignUpComponent implements OnInit {
@HostBinding('class.verify-email') public displayVerifyEmail = false;
Expand Down
Loading

0 comments on commit 9decf1d

Please sign in to comment.