From d08255b31f5033b58ae6d7aa72edeb9fcbbfae95 Mon Sep 17 00:00:00 2001 From: Vitor Hideyoshi Nakazone Batista Date: Fri, 29 Dec 2023 07:12:29 -0300 Subject: [PATCH] Optimizes Imports --- src/app/app-router.module.ts | 8 ++-- src/app/app-service-worker.module.ts | 8 ++-- src/app/app.component.ts | 18 +++----- src/app/app.module.ts | 22 +++++----- src/app/footer/footer.component.ts | 8 +--- .../header-dropdown.component.ts | 30 +++---------- .../callback/callback.component.ts | 6 +-- .../error-box/error-box.component.ts | 4 +- .../header-popup/help/help.component.ts | 8 ++-- .../header-popup/login/login.component.ts | 38 ++++++----------- .../my-profile/my-profile.component.ts | 31 ++++---------- .../profile-picture-picker.component.ts | 4 +- .../header-popup/signup/signup.component.ts | 40 ++++++------------ .../header-slider/header-slider.component.ts | 21 +++------- .../nav-slider/nav-slider.component.ts | 19 +++------ .../user-slider/user-slider.component.ts | 10 ++--- src/app/header/header.component.ts | 26 ++++-------- src/app/header/header.module.ts | 42 ++++++++++--------- src/app/home/home-router.module.ts | 6 +-- src/app/home/home.component.ts | 2 +- src/app/home/home.module.ts | 3 +- .../stack-card/stack-card.component.spec.ts | 28 ++++++------- .../stack-slider.component.spec.ts | 28 ++++++------- .../project-card/project-card.component.ts | 3 +- src/app/projects/projects-router.module.ts | 6 +-- src/app/projects/projects.module.ts | 2 +- .../components/popup/popup.component.ts | 26 +++--------- .../slider-item/slider-item.component.ts | 10 +---- .../cookie-consent/cookie-consent.module.ts | 9 ++-- .../cookie-consent/cookie-consert.service.ts | 6 +-- .../clicked-outside.directive.ts | 31 ++++---------- .../shared/model/httpError/httpError.model.ts | 2 +- src/app/shared/model/project/project.model.ts | 2 +- src/app/shared/model/stack/stack.model.ts | 2 +- src/app/shared/model/token/token.model.ts | 2 +- src/app/shared/model/user/user.model.ts | 4 +- .../shared/service-worker/update.service.ts | 6 +-- src/app/shared/service/auth.service.ts | 20 ++++----- src/app/shared/service/github.service.ts | 10 ++--- src/app/shared/shared.module.ts | 18 ++++---- .../validators/validate-email.validator.ts | 2 +- .../validate-not-empty.validator.ts | 2 +- .../validators/validate-password.validator.ts | 2 +- src/main.ts | 8 ++-- src/test.ts | 7 +--- 45 files changed, 222 insertions(+), 368 deletions(-) diff --git a/src/app/app-router.module.ts b/src/app/app-router.module.ts index 1f099fc..2615e2d 100644 --- a/src/app/app-router.module.ts +++ b/src/app/app-router.module.ts @@ -1,7 +1,7 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { RouterModule, Routes } from '@angular/router'; -import { CallbackComponent } from './header/header-popup/callback/callback.component'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {RouterModule, Routes} from '@angular/router'; +import {CallbackComponent} from './header/header-popup/callback/callback.component'; const routes: Routes = [ diff --git a/src/app/app-service-worker.module.ts b/src/app/app-service-worker.module.ts index 54b7ba7..2c5f858 100644 --- a/src/app/app-service-worker.module.ts +++ b/src/app/app-service-worker.module.ts @@ -1,7 +1,7 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { environment } from 'src/environments/environment'; -import { ServiceWorkerModule } from '@angular/service-worker'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {environment} from 'src/environments/environment'; +import {ServiceWorkerModule} from '@angular/service-worker'; @NgModule({ declarations: [], diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 66f2d6e..9262493 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,15 +1,9 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { AuthService } from './shared/service/auth.service'; -import { UpdateService } from './shared/service-worker/update.service'; -import { - NgcCookieConsentService, - NgcInitializationErrorEvent, - NgcInitializingEvent, - NgcNoCookieLawEvent, - NgcStatusChangeEvent, -} from 'ngx-cookieconsent'; -import { Subscription } from 'rxjs'; -import { CookieConsertService } from './shared/cookie-consent/cookie-consert.service'; +import {Component, OnInit} from '@angular/core'; +import {AuthService} from './shared/service/auth.service'; +import {UpdateService} from './shared/service-worker/update.service'; +import {NgcCookieConsentService, NgcStatusChangeEvent,} from 'ngx-cookieconsent'; +import {Subscription} from 'rxjs'; +import {CookieConsertService} from './shared/cookie-consent/cookie-consert.service'; @Component({ selector: 'app-root', diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 3c70d55..63299ab 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,15 +1,15 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; +import {NgModule} from '@angular/core'; +import {BrowserModule} from '@angular/platform-browser'; -import { AppComponent } from './app.component'; -import { HeaderModule } from './header/header.module'; -import { SharedModule } from './shared/shared.module'; -import { AppRouterModule } from './app-router.module'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { AppServiceWorkerModule } from './app-service-worker.module'; -import { ServiceWorkerModule } from '@angular/service-worker'; -import { environment } from '../environments/environment'; -import { FooterComponent } from './footer/footer.component'; +import {AppComponent} from './app.component'; +import {HeaderModule} from './header/header.module'; +import {SharedModule} from './shared/shared.module'; +import {AppRouterModule} from './app-router.module'; +import {FontAwesomeModule} from '@fortawesome/angular-fontawesome'; +import {AppServiceWorkerModule} from './app-service-worker.module'; +import {ServiceWorkerModule} from '@angular/service-worker'; +import {environment} from '../environments/environment'; +import {FooterComponent} from './footer/footer.component'; @NgModule({ declarations: [AppComponent, FooterComponent], diff --git a/src/app/footer/footer.component.ts b/src/app/footer/footer.component.ts index 32c74ff..f6ab612 100644 --- a/src/app/footer/footer.component.ts +++ b/src/app/footer/footer.component.ts @@ -1,9 +1,5 @@ -import { Component } from '@angular/core'; -import { - faGithub, - faLinkedinIn, - faTwitter, -} from '@fortawesome/free-brands-svg-icons'; +import {Component} from '@angular/core'; +import {faGithub, faLinkedinIn, faTwitter,} from '@fortawesome/free-brands-svg-icons'; @Component({ selector: 'app-footer', diff --git a/src/app/header/header-dropdown/header-dropdown.component.ts b/src/app/header/header-dropdown/header-dropdown.component.ts index f42a64e..9943fef 100644 --- a/src/app/header/header-dropdown/header-dropdown.component.ts +++ b/src/app/header/header-dropdown/header-dropdown.component.ts @@ -1,27 +1,9 @@ -import { - animate, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { - Component, - EventEmitter, - Input, - OnDestroy, - OnInit, - Output, - ViewContainerRef, -} from '@angular/core'; -import { - faQuestionCircle, faSignIn, - faSignOutAlt, - faUser, -} from '@fortawesome/free-solid-svg-icons'; -import { Subscription } from 'rxjs'; -import { AuthService } from 'src/app/shared/service/auth.service'; -import { User } from '../../shared/model/user/user.model'; +import {animate, state, style, transition, trigger,} from '@angular/animations'; +import {Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewContainerRef,} from '@angular/core'; +import {faQuestionCircle, faSignIn, faSignOutAlt, faUser,} from '@fortawesome/free-solid-svg-icons'; +import {Subscription} from 'rxjs'; +import {AuthService} from 'src/app/shared/service/auth.service'; +import {User} from '../../shared/model/user/user.model'; import {IconDefinition} from "@fortawesome/free-regular-svg-icons"; import {Value} from "@sinclair/typebox/value"; diff --git a/src/app/header/header-popup/callback/callback.component.ts b/src/app/header/header-popup/callback/callback.component.ts index 3a81d79..40b7364 100644 --- a/src/app/header/header-popup/callback/callback.component.ts +++ b/src/app/header/header-popup/callback/callback.component.ts @@ -1,6 +1,6 @@ -import { ActivatedRoute, Router } from '@angular/router'; -import { Component, OnInit } from '@angular/core'; -import { AuthService } from 'src/app/shared/service/auth.service'; +import {ActivatedRoute, Router} from '@angular/router'; +import {Component, OnInit} from '@angular/core'; +import {AuthService} from 'src/app/shared/service/auth.service'; @Component({ selector: 'app-callback', diff --git a/src/app/header/header-popup/error-box/error-box.component.ts b/src/app/header/header-popup/error-box/error-box.component.ts index e627aac..8746775 100644 --- a/src/app/header/header-popup/error-box/error-box.component.ts +++ b/src/app/header/header-popup/error-box/error-box.component.ts @@ -1,4 +1,4 @@ -import { Component, Input } from '@angular/core'; +import {Component, Input} from '@angular/core'; @Component({ selector: 'app-error-box', @@ -7,7 +7,7 @@ import { Component, Input } from '@angular/core'; }) export class ErrorBoxComponent { @Input() - errorMessage: string | null = 'Error, please try again later.'; + errorMessage: string | null = 'Error, please try again later.'; constructor() {} } diff --git a/src/app/header/header-popup/help/help.component.ts b/src/app/header/header-popup/help/help.component.ts index eacad61..7bf90bb 100644 --- a/src/app/header/header-popup/help/help.component.ts +++ b/src/app/header/header-popup/help/help.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, Output } from '@angular/core'; +import {Component, EventEmitter, Input, Output} from '@angular/core'; @Component({ selector: 'app-help', @@ -7,13 +7,13 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; }) export class HelpComponent { @Input() - state: boolean = false; + state: boolean = false; @Input() - ignoreClickOutside!: HTMLDivElement[]; + ignoreClickOutside!: HTMLDivElement[]; @Output() - stateChange = new EventEmitter(); + stateChange = new EventEmitter(); constructor() {} diff --git a/src/app/header/header-popup/login/login.component.ts b/src/app/header/header-popup/login/login.component.ts index d073fe9..9f865d0 100644 --- a/src/app/header/header-popup/login/login.component.ts +++ b/src/app/header/header-popup/login/login.component.ts @@ -8,31 +8,19 @@ import { OnInit, Output, } from '@angular/core'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { MatIconRegistry } from '@angular/material/icon'; -import { DomSanitizer } from '@angular/platform-browser'; -import { faLock, faUser } from '@fortawesome/free-solid-svg-icons'; -import { Subscription } from 'rxjs'; -import { AuthService } from 'src/app/shared/service/auth.service'; -import { Value } from '@sinclair/typebox/value' -import { User } from 'src/app/shared/model/user/user.model'; -import { - animate, - animateChild, - group, - query, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { ValidatePasswordValidator } from '../../../shared/validators/validate-password.validator'; -import { ValidateNotEmptyValidator } from '../../../shared/validators/validate-not-empty.validator'; -import { - NgcCookieConsentService, - NgcStatusChangeEvent, -} from 'ngx-cookieconsent'; -import { CookieConsertService } from '../../../shared/cookie-consent/cookie-consert.service'; +import {FormControl, FormGroup, Validators} from '@angular/forms'; +import {MatIconRegistry} from '@angular/material/icon'; +import {DomSanitizer} from '@angular/platform-browser'; +import {faLock, faUser} from '@fortawesome/free-solid-svg-icons'; +import {Subscription} from 'rxjs'; +import {AuthService} from 'src/app/shared/service/auth.service'; +import {Value} from '@sinclair/typebox/value' +import {User} from 'src/app/shared/model/user/user.model'; +import {animate, animateChild, group, query, state, style, transition, trigger,} from '@angular/animations'; +import {ValidatePasswordValidator} from '../../../shared/validators/validate-password.validator'; +import {ValidateNotEmptyValidator} from '../../../shared/validators/validate-not-empty.validator'; +import {NgcCookieConsentService,} from 'ngx-cookieconsent'; +import {CookieConsertService} from '../../../shared/cookie-consent/cookie-consert.service'; import {HttpError} from "../../../shared/model/httpError/httpError.model"; const GOOGLE_LOGO_SVG = 'assets/img/providers/google.svg'; diff --git a/src/app/header/header-popup/my-profile/my-profile.component.ts b/src/app/header/header-popup/my-profile/my-profile.component.ts index 5087f40..2da9c8b 100644 --- a/src/app/header/header-popup/my-profile/my-profile.component.ts +++ b/src/app/header/header-popup/my-profile/my-profile.component.ts @@ -1,26 +1,11 @@ -import { - Component, - EventEmitter, - Input, - OnInit, - Output, -} from '@angular/core'; -import { AuthService } from '../../../shared/service/auth.service'; -import { User } from '../../../shared/model/user/user.model'; -import { - animate, - animateChild, - group, - query, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { ValidateNotEmptyValidator } from '../../../shared/validators/validate-not-empty.validator'; -import { ValidatePasswordValidator } from '../../../shared/validators/validate-password.validator'; -import { faFileUpload } from '@fortawesome/free-solid-svg-icons'; +import {Component, EventEmitter, Input, OnInit, Output,} from '@angular/core'; +import {AuthService} from '../../../shared/service/auth.service'; +import {User} from '../../../shared/model/user/user.model'; +import {animate, animateChild, group, query, state, style, transition, trigger,} from '@angular/animations'; +import {FormControl, FormGroup, Validators} from '@angular/forms'; +import {ValidateNotEmptyValidator} from '../../../shared/validators/validate-not-empty.validator'; +import {ValidatePasswordValidator} from '../../../shared/validators/validate-password.validator'; +import {faFileUpload} from '@fortawesome/free-solid-svg-icons'; @Component({ selector: 'app-my-profile', diff --git a/src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.ts b/src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.ts index 62e89e2..180e225 100644 --- a/src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.ts +++ b/src/app/header/header-popup/my-profile/profile-picture-picker/profile-picture-picker.component.ts @@ -1,5 +1,5 @@ -import { Component, EventEmitter, Output } from '@angular/core'; -import { AuthService } from '../../../../shared/service/auth.service'; +import {Component, EventEmitter, Output} from '@angular/core'; +import {AuthService} from '../../../../shared/service/auth.service'; @Component({ selector: 'app-profile-picture-picker', diff --git a/src/app/header/header-popup/signup/signup.component.ts b/src/app/header/header-popup/signup/signup.component.ts index 872525c..b00b4e8 100644 --- a/src/app/header/header-popup/signup/signup.component.ts +++ b/src/app/header/header-popup/signup/signup.component.ts @@ -1,30 +1,16 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; -import { MatIconRegistry } from '@angular/material/icon'; -import { DomSanitizer } from '@angular/platform-browser'; -import { - faEnvelope, - faFingerprint, - faLock, - faUser, -} from '@fortawesome/free-solid-svg-icons'; -import { Subscription } from 'rxjs'; -import { AuthService } from 'src/app/shared/service/auth.service'; -import { HttpError } from 'src/app/shared/model/httpError/httpError.model'; -import { User } from 'src/app/shared/model/user/user.model'; -import { - animate, - animateChild, - group, - query, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { ValidateEmailValidator } from '../../../shared/validators/validate-email.validator'; -import { ValidatePasswordValidator } from '../../../shared/validators/validate-password.validator'; -import { ValidateNotEmptyValidator } from '../../../shared/validators/validate-not-empty.validator'; +import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; +import {FormControl, FormGroup, Validators} from '@angular/forms'; +import {MatIconRegistry} from '@angular/material/icon'; +import {DomSanitizer} from '@angular/platform-browser'; +import {faEnvelope, faFingerprint, faLock, faUser,} from '@fortawesome/free-solid-svg-icons'; +import {Subscription} from 'rxjs'; +import {AuthService} from 'src/app/shared/service/auth.service'; +import {HttpError} from 'src/app/shared/model/httpError/httpError.model'; +import {User} from 'src/app/shared/model/user/user.model'; +import {animate, animateChild, group, query, state, style, transition, trigger,} from '@angular/animations'; +import {ValidateEmailValidator} from '../../../shared/validators/validate-email.validator'; +import {ValidatePasswordValidator} from '../../../shared/validators/validate-password.validator'; +import {ValidateNotEmptyValidator} from '../../../shared/validators/validate-not-empty.validator'; import {Value} from "@sinclair/typebox/value"; const GOOGLE_LOGO_SVG = 'assets/img/providers/google.svg'; diff --git a/src/app/header/header-slider/header-slider.component.ts b/src/app/header/header-slider/header-slider.component.ts index 47ef4ca..0460eb8 100644 --- a/src/app/header/header-slider/header-slider.component.ts +++ b/src/app/header/header-slider/header-slider.component.ts @@ -1,14 +1,5 @@ -import { - animate, - animateChild, - group, - query, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import {animate, animateChild, group, query, state, style, transition, trigger,} from '@angular/animations'; +import {Component, EventEmitter, Input, Output} from '@angular/core'; @Component({ selector: 'app-header-slider', @@ -45,16 +36,16 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; }) export class HeaderSliderComponent { @Input() - ignoreClickOutside!: HTMLDivElement[]; + ignoreClickOutside!: HTMLDivElement[]; @Input() - clickOutsideStopWatching: boolean = false; + clickOutsideStopWatching: boolean = false; @Input() - state: boolean = false; + state: boolean = false; @Output() - stateChange = new EventEmitter(); + stateChange = new EventEmitter(); constructor() {} diff --git a/src/app/header/header-slider/nav-slider/nav-slider.component.ts b/src/app/header/header-slider/nav-slider/nav-slider.component.ts index c240456..cfe53cc 100644 --- a/src/app/header/header-slider/nav-slider/nav-slider.component.ts +++ b/src/app/header/header-slider/nav-slider/nav-slider.component.ts @@ -1,16 +1,9 @@ -import { - Component, - EventEmitter, - Input, - OnDestroy, - OnInit, - Output, -} from '@angular/core'; -import { faUser } from '@fortawesome/free-solid-svg-icons'; -import { SliderItemComponent } from 'src/app/shared/components/slider-item/slider-item.component'; -import { User } from '../../../shared/model/user/user.model'; -import { AuthService } from '../../../shared/service/auth.service'; -import { Subscription } from 'rxjs'; +import {Component, EventEmitter, Input, OnDestroy, OnInit, Output,} from '@angular/core'; +import {faUser} from '@fortawesome/free-solid-svg-icons'; +import {SliderItemComponent} from 'src/app/shared/components/slider-item/slider-item.component'; +import {User} from '../../../shared/model/user/user.model'; +import {AuthService} from '../../../shared/service/auth.service'; +import {Subscription} from 'rxjs'; import {Value} from "@sinclair/typebox/value"; @Component({ diff --git a/src/app/header/header-slider/user-slider/user-slider.component.ts b/src/app/header/header-slider/user-slider/user-slider.component.ts index 8320c0b..c38e982 100644 --- a/src/app/header/header-slider/user-slider/user-slider.component.ts +++ b/src/app/header/header-slider/user-slider/user-slider.component.ts @@ -1,8 +1,8 @@ -import { Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { Subscription } from 'rxjs'; -import { AuthService } from 'src/app/shared/service/auth.service'; -import { SliderItemComponent } from 'src/app/shared/components/slider-item/slider-item.component'; -import { User } from 'src/app/shared/model/user/user.model'; +import {Component, EventEmitter, OnInit, Output} from '@angular/core'; +import {Subscription} from 'rxjs'; +import {AuthService} from 'src/app/shared/service/auth.service'; +import {SliderItemComponent} from 'src/app/shared/components/slider-item/slider-item.component'; +import {User} from 'src/app/shared/model/user/user.model'; import {Value} from "@sinclair/typebox/value"; @Component({ diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index fdbac56..6179051 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -1,20 +1,12 @@ -import { - Component, - ComponentRef, - ElementRef, - OnDestroy, - OnInit, - ViewChild, - ViewContainerRef, -} from '@angular/core'; -import { faUser } from '@fortawesome/free-solid-svg-icons'; -import { LoginComponent } from './header-popup/login/login.component'; -import { SignupComponent } from './header-popup/signup/signup.component'; -import { AuthService } from '../shared/service/auth.service'; -import { User } from '../shared/model/user/user.model'; -import { Subscription } from 'rxjs'; -import { HelpComponent } from './header-popup/help/help.component'; -import { MyProfileComponent } from './header-popup/my-profile/my-profile.component'; +import {Component, ComponentRef, ElementRef, OnDestroy, OnInit, ViewChild, ViewContainerRef,} from '@angular/core'; +import {faUser} from '@fortawesome/free-solid-svg-icons'; +import {LoginComponent} from './header-popup/login/login.component'; +import {SignupComponent} from './header-popup/signup/signup.component'; +import {AuthService} from '../shared/service/auth.service'; +import {User} from '../shared/model/user/user.model'; +import {Subscription} from 'rxjs'; +import {HelpComponent} from './header-popup/help/help.component'; +import {MyProfileComponent} from './header-popup/my-profile/my-profile.component'; import {Value} from "@sinclair/typebox/value"; @Component({ diff --git a/src/app/header/header.module.ts b/src/app/header/header.module.ts index 3d91f04..b9cd011 100644 --- a/src/app/header/header.module.ts +++ b/src/app/header/header.module.ts @@ -1,24 +1,26 @@ -import { NgModule } from '@angular/core'; -import { CommonModule, NgOptimizedImage } from '@angular/common'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import {NgModule} from '@angular/core'; +import {CommonModule, NgOptimizedImage} from '@angular/common'; +import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; -import { HeaderComponent } from './header.component'; -import { HeaderSliderComponent } from './header-slider/header-slider.component'; -import { NavSliderComponent } from './header-slider/nav-slider/nav-slider.component'; -import { UserSliderComponent } from './header-slider/user-slider/user-slider.component'; -import { HeaderDropdownComponent } from './header-dropdown/header-dropdown.component'; -import { SharedModule } from '../shared/shared.module'; -import { AppRouterModule } from '../app-router.module'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { LoginComponent } from './header-popup/login/login.component'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { SignupComponent } from './header-popup/signup/signup.component'; -import { CallbackComponent } from './header-popup/callback/callback.component'; -import { MatIconModule } from '@angular/material/icon'; -import { ErrorBoxComponent } from './header-popup/error-box/error-box.component'; -import { HelpComponent } from './header-popup/help/help.component'; -import { MyProfileComponent } from './header-popup/my-profile/my-profile.component'; -import { ProfilePicturePickerComponent } from './header-popup/my-profile/profile-picture-picker/profile-picture-picker.component'; +import {HeaderComponent} from './header.component'; +import {HeaderSliderComponent} from './header-slider/header-slider.component'; +import {NavSliderComponent} from './header-slider/nav-slider/nav-slider.component'; +import {UserSliderComponent} from './header-slider/user-slider/user-slider.component'; +import {HeaderDropdownComponent} from './header-dropdown/header-dropdown.component'; +import {SharedModule} from '../shared/shared.module'; +import {AppRouterModule} from '../app-router.module'; +import {FontAwesomeModule} from '@fortawesome/angular-fontawesome'; +import {LoginComponent} from './header-popup/login/login.component'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {SignupComponent} from './header-popup/signup/signup.component'; +import {CallbackComponent} from './header-popup/callback/callback.component'; +import {MatIconModule} from '@angular/material/icon'; +import {ErrorBoxComponent} from './header-popup/error-box/error-box.component'; +import {HelpComponent} from './header-popup/help/help.component'; +import {MyProfileComponent} from './header-popup/my-profile/my-profile.component'; +import { + ProfilePicturePickerComponent +} from './header-popup/my-profile/profile-picture-picker/profile-picture-picker.component'; @NgModule({ declarations: [ diff --git a/src/app/home/home-router.module.ts b/src/app/home/home-router.module.ts index 7cfc348..cee6019 100644 --- a/src/app/home/home-router.module.ts +++ b/src/app/home/home-router.module.ts @@ -1,6 +1,6 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { RouterModule, Routes } from '@angular/router'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {RouterModule, Routes} from '@angular/router'; import {HomeComponent} from "./home.component"; const routes: Routes = [ diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index 0698872..2597f43 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'app-home', diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index 96d951b..13768af 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -1,4 +1,4 @@ -import { NgModule } from '@angular/core'; +import {NgModule} from '@angular/core'; import {CommonModule, NgOptimizedImage} from '@angular/common'; import {HomeComponent} from "./home.component"; import {StackSliderComponent} from "./stack-slider/stack-slider.component"; @@ -7,7 +7,6 @@ import {NgxGlideComponent} from "ngx-glide"; import {HomeRouterModule} from "./home-router.module"; - @NgModule({ declarations: [ HomeComponent, diff --git a/src/app/home/stack-slider/stack-card/stack-card.component.spec.ts b/src/app/home/stack-slider/stack-card/stack-card.component.spec.ts index c36ef9f..4b34322 100644 --- a/src/app/home/stack-slider/stack-card/stack-card.component.spec.ts +++ b/src/app/home/stack-slider/stack-card/stack-card.component.spec.ts @@ -1,21 +1,21 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { StackCardComponent } from './stack-card.component'; +import {StackCardComponent} from './stack-card.component'; describe('StackCardComponent', () => { - let component: StackCardComponent; - let fixture: ComponentFixture; + let component: StackCardComponent; + let fixture: ComponentFixture; - beforeEach(() => { - TestBed.configureTestingModule({ - declarations: [StackCardComponent] + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [StackCardComponent] + }); + fixture = TestBed.createComponent(StackCardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); }); - fixture = TestBed.createComponent(StackCardComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - it('should create', () => { - expect(component).toBeTruthy(); - }); + it('should create', () => { + expect(component).toBeTruthy(); + }); }); diff --git a/src/app/home/stack-slider/stack-slider.component.spec.ts b/src/app/home/stack-slider/stack-slider.component.spec.ts index 64e0e2e..37f8344 100644 --- a/src/app/home/stack-slider/stack-slider.component.spec.ts +++ b/src/app/home/stack-slider/stack-slider.component.spec.ts @@ -1,21 +1,21 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { StackSliderComponent } from './stack-slider.component'; +import {StackSliderComponent} from './stack-slider.component'; describe('StackSliderComponent', () => { - let component: StackSliderComponent; - let fixture: ComponentFixture; + let component: StackSliderComponent; + let fixture: ComponentFixture; - beforeEach(() => { - TestBed.configureTestingModule({ - declarations: [StackSliderComponent] + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [StackSliderComponent] + }); + fixture = TestBed.createComponent(StackSliderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); }); - fixture = TestBed.createComponent(StackSliderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - it('should create', () => { - expect(component).toBeTruthy(); - }); + it('should create', () => { + expect(component).toBeTruthy(); + }); }); diff --git a/src/app/projects/project-card/project-card.component.ts b/src/app/projects/project-card/project-card.component.ts index 45b5ad3..84946dc 100644 --- a/src/app/projects/project-card/project-card.component.ts +++ b/src/app/projects/project-card/project-card.component.ts @@ -2,7 +2,8 @@ import {Component, HostListener, Input, OnInit, ViewChild} from '@angular/core'; import {faCodeFork, faEye, faScaleBalanced, faStar} from '@fortawesome/free-solid-svg-icons'; import {Language, Project} from "../../shared/model/project/project.model"; import { - ApexChart, ApexDataLabels, + ApexChart, + ApexDataLabels, ApexNonAxisChartSeries, ApexPlotOptions, ApexResponsive, diff --git a/src/app/projects/projects-router.module.ts b/src/app/projects/projects-router.module.ts index 6f01310..2f470f3 100644 --- a/src/app/projects/projects-router.module.ts +++ b/src/app/projects/projects-router.module.ts @@ -1,6 +1,6 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { RouterModule, Routes } from '@angular/router'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {RouterModule, Routes} from '@angular/router'; import {ProjectsComponent} from "./projects.component"; const routes: Routes = [ diff --git a/src/app/projects/projects.module.ts b/src/app/projects/projects.module.ts index 15b5a90..85ce517 100644 --- a/src/app/projects/projects.module.ts +++ b/src/app/projects/projects.module.ts @@ -1,7 +1,7 @@ import {NgModule} from "@angular/core"; import {ProjectsComponent} from "./projects.component"; import {CommonModule, NgOptimizedImage} from "@angular/common"; -import { ProjectCardComponent } from './project-card/project-card.component'; +import {ProjectCardComponent} from './project-card/project-card.component'; import {MatIconModule} from "@angular/material/icon"; import {FontAwesomeModule} from "@fortawesome/angular-fontawesome"; import {NgApexchartsModule} from "ng-apexcharts"; diff --git a/src/app/shared/components/popup/popup.component.ts b/src/app/shared/components/popup/popup.component.ts index 93d3539..45c9217 100644 --- a/src/app/shared/components/popup/popup.component.ts +++ b/src/app/shared/components/popup/popup.component.ts @@ -1,21 +1,5 @@ -import { - animate, - animateChild, - group, - query, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { - Component, - ElementRef, - EventEmitter, - Input, - Output, - ViewEncapsulation, -} from '@angular/core'; +import {animate, animateChild, group, query, state, style, transition, trigger,} from '@angular/animations'; +import {Component, EventEmitter, Input, Output,} from '@angular/core'; @Component({ selector: 'app-popup', @@ -56,13 +40,13 @@ import { }) export class PopupComponent { @Input() - state: boolean = false; + state: boolean = false; @Input() - ignoreClickOutside!: HTMLDivElement[]; + ignoreClickOutside!: HTMLDivElement[]; @Output() - stateChange = new EventEmitter(false); + stateChange = new EventEmitter(false); constructor() {} diff --git a/src/app/shared/components/slider-item/slider-item.component.ts b/src/app/shared/components/slider-item/slider-item.component.ts index 118f1ae..fae02e2 100644 --- a/src/app/shared/components/slider-item/slider-item.component.ts +++ b/src/app/shared/components/slider-item/slider-item.component.ts @@ -1,11 +1,5 @@ -import { - animate, - state, - style, - transition, - trigger, -} from '@angular/animations'; -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import {animate, state, style, transition, trigger,} from '@angular/animations'; +import {Component, Input} from '@angular/core'; @Component({ selector: 'app-slider-item', diff --git a/src/app/shared/cookie-consent/cookie-consent.module.ts b/src/app/shared/cookie-consent/cookie-consent.module.ts index 754461f..343f2ed 100644 --- a/src/app/shared/cookie-consent/cookie-consent.module.ts +++ b/src/app/shared/cookie-consent/cookie-consent.module.ts @@ -1,9 +1,6 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { - NgcCookieConsentConfig, - NgcCookieConsentModule, -} from 'ngx-cookieconsent'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {NgcCookieConsentConfig, NgcCookieConsentModule,} from 'ngx-cookieconsent'; const cookieConfig: NgcCookieConsentConfig = { cookie: { diff --git a/src/app/shared/cookie-consent/cookie-consert.service.ts b/src/app/shared/cookie-consent/cookie-consert.service.ts index 06b8888..ed9b07a 100644 --- a/src/app/shared/cookie-consent/cookie-consert.service.ts +++ b/src/app/shared/cookie-consent/cookie-consert.service.ts @@ -1,6 +1,6 @@ -import { Injectable } from '@angular/core'; -import { BehaviorSubject, Subject, Subscription } from 'rxjs'; -import { CookieService } from 'ngx-cookie-service'; +import {Injectable} from '@angular/core'; +import {BehaviorSubject} from 'rxjs'; +import {CookieService} from 'ngx-cookie-service'; @Injectable({ providedIn: 'root', diff --git a/src/app/shared/directive/clicked-outside/clicked-outside.directive.ts b/src/app/shared/directive/clicked-outside/clicked-outside.directive.ts index 1f9339f..403db43 100644 --- a/src/app/shared/directive/clicked-outside/clicked-outside.directive.ts +++ b/src/app/shared/directive/clicked-outside/clicked-outside.directive.ts @@ -1,39 +1,22 @@ -import { DOCUMENT } from '@angular/common'; -import { - AfterViewInit, - Directive, - ElementRef, - EventEmitter, - Inject, - Input, - OnDestroy, - Output, - ViewChild, -} from '@angular/core'; -import { - combineLatest, - combineLatestWith, - filter, - fromEvent, - merge, - Subscription, -} from 'rxjs'; +import {DOCUMENT} from '@angular/common'; +import {AfterViewInit, Directive, ElementRef, EventEmitter, Inject, Input, OnDestroy, Output,} from '@angular/core'; +import {filter, fromEvent, Subscription,} from 'rxjs'; @Directive({ selector: '[appClickedOutside]', }) export class ClickedOutsideDirective implements AfterViewInit, OnDestroy { @Input() - ignoreElementList!: HTMLDivElement[]; + ignoreElementList!: HTMLDivElement[]; @Input() - includeClickedOutside!: HTMLDivElement[]; + includeClickedOutside!: HTMLDivElement[]; @Input() - clickOutsideStopWatching: boolean = false; + clickOutsideStopWatching: boolean = false; @Output() - clickOutside: EventEmitter = new EventEmitter(); + clickOutside: EventEmitter = new EventEmitter(); eventListener!: Subscription; diff --git a/src/app/shared/model/httpError/httpError.model.ts b/src/app/shared/model/httpError/httpError.model.ts index 7fb659b..3d616ee 100644 --- a/src/app/shared/model/httpError/httpError.model.ts +++ b/src/app/shared/model/httpError/httpError.model.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from '@sinclair/typebox' +import {type Static, Type} from '@sinclair/typebox' export const HttpError = Type.Object({ diff --git a/src/app/shared/model/project/project.model.ts b/src/app/shared/model/project/project.model.ts index 1fb8944..ecdba6c 100644 --- a/src/app/shared/model/project/project.model.ts +++ b/src/app/shared/model/project/project.model.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from '@sinclair/typebox' +import {type Static, Type} from '@sinclair/typebox' export const Language = Type.Object({ diff --git a/src/app/shared/model/stack/stack.model.ts b/src/app/shared/model/stack/stack.model.ts index d9b230d..f5ad19f 100644 --- a/src/app/shared/model/stack/stack.model.ts +++ b/src/app/shared/model/stack/stack.model.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from '@sinclair/typebox' +import {type Static, Type} from '@sinclair/typebox' export const Stack = Type.Object({ diff --git a/src/app/shared/model/token/token.model.ts b/src/app/shared/model/token/token.model.ts index d088952..410a4b1 100644 --- a/src/app/shared/model/token/token.model.ts +++ b/src/app/shared/model/token/token.model.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from '@sinclair/typebox' +import {type Static, Type} from '@sinclair/typebox' export const Token = Type.Object({ diff --git a/src/app/shared/model/user/user.model.ts b/src/app/shared/model/user/user.model.ts index b0bfbd8..013e6be 100644 --- a/src/app/shared/model/user/user.model.ts +++ b/src/app/shared/model/user/user.model.ts @@ -1,6 +1,6 @@ -import { Type, type Static } from '@sinclair/typebox' +import {type Static, Type} from '@sinclair/typebox' -import { Token } from '../token/token.model'; +import {Token} from '../token/token.model'; export const User = Type.Object({ diff --git a/src/app/shared/service-worker/update.service.ts b/src/app/shared/service-worker/update.service.ts index 491d9b5..c34b175 100644 --- a/src/app/shared/service-worker/update.service.ts +++ b/src/app/shared/service-worker/update.service.ts @@ -1,6 +1,6 @@ -import { Injectable } from '@angular/core'; -import { SwUpdate } from '@angular/service-worker'; -import { interval } from 'rxjs'; +import {Injectable} from '@angular/core'; +import {SwUpdate} from '@angular/service-worker'; +import {interval} from 'rxjs'; @Injectable({ providedIn: 'root', diff --git a/src/app/shared/service/auth.service.ts b/src/app/shared/service/auth.service.ts index 678376b..737d258 100644 --- a/src/app/shared/service/auth.service.ts +++ b/src/app/shared/service/auth.service.ts @@ -1,16 +1,10 @@ -import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { - first, - map, - Observable, - of, - Subject, -} from 'rxjs'; -import { catchError } from 'rxjs/operators'; -import { environment } from 'src/environments/environment'; -import { HttpError } from '../model/httpError/httpError.model'; -import { User } from '../model/user/user.model'; +import {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http'; +import {Injectable} from '@angular/core'; +import {first, map, Observable, of, Subject,} from 'rxjs'; +import {catchError} from 'rxjs/operators'; +import {environment} from 'src/environments/environment'; +import {HttpError} from '../model/httpError/httpError.model'; +import {User} from '../model/user/user.model'; @Injectable({ providedIn: 'root', diff --git a/src/app/shared/service/github.service.ts b/src/app/shared/service/github.service.ts index 90ba7d7..9b1ab2b 100644 --- a/src/app/shared/service/github.service.ts +++ b/src/app/shared/service/github.service.ts @@ -1,12 +1,8 @@ -import { Injectable } from '@angular/core'; +import {Injectable} from '@angular/core'; import {Language, Project} from "../model/project/project.model"; import {HttpClient} from "@angular/common/http"; -import { - map, mergeMap, - Observable, - pipe, switchMap, take, tap -} from 'rxjs'; -import { environment } from 'src/environments/environment'; +import {map, Observable, switchMap, tap} from 'rxjs'; +import {environment} from 'src/environments/environment'; @Injectable({ providedIn: 'root' diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 1bf206d..d325cc9 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -1,12 +1,12 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ClickedOutsideDirective } from './directive/clicked-outside/clicked-outside.directive'; -import { SliderItemComponent } from './components/slider-item/slider-item.component'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { HttpClientModule } from '@angular/common/http'; -import { PopupComponent } from './components/popup/popup.component'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { CookieConsentModule } from './cookie-consent/cookie-consent.module'; +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {ClickedOutsideDirective} from './directive/clicked-outside/clicked-outside.directive'; +import {SliderItemComponent} from './components/slider-item/slider-item.component'; +import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; +import {HttpClientModule} from '@angular/common/http'; +import {PopupComponent} from './components/popup/popup.component'; +import {FontAwesomeModule} from '@fortawesome/angular-fontawesome'; +import {CookieConsentModule} from './cookie-consent/cookie-consent.module'; @NgModule({ declarations: [ diff --git a/src/app/shared/validators/validate-email.validator.ts b/src/app/shared/validators/validate-email.validator.ts index 95361fc..0c11fd9 100644 --- a/src/app/shared/validators/validate-email.validator.ts +++ b/src/app/shared/validators/validate-email.validator.ts @@ -1,4 +1,4 @@ -import { AbstractControl } from '@angular/forms'; +import {AbstractControl} from '@angular/forms'; export function ValidateEmailValidator(control: AbstractControl) { const email = control.value; diff --git a/src/app/shared/validators/validate-not-empty.validator.ts b/src/app/shared/validators/validate-not-empty.validator.ts index 04f1f5d..a61cf32 100644 --- a/src/app/shared/validators/validate-not-empty.validator.ts +++ b/src/app/shared/validators/validate-not-empty.validator.ts @@ -1,4 +1,4 @@ -import { AbstractControl } from '@angular/forms'; +import {AbstractControl} from '@angular/forms'; export function ValidateNotEmptyValidator(control: AbstractControl) { const value = control.value; diff --git a/src/app/shared/validators/validate-password.validator.ts b/src/app/shared/validators/validate-password.validator.ts index 3dc3c6b..3eaf05c 100644 --- a/src/app/shared/validators/validate-password.validator.ts +++ b/src/app/shared/validators/validate-password.validator.ts @@ -1,4 +1,4 @@ -import { AbstractControl } from '@angular/forms'; +import {AbstractControl} from '@angular/forms'; export function ValidatePasswordValidator(control: AbstractControl) { var password = control.value; diff --git a/src/main.ts b/src/main.ts index 207c6dd..469eddb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,8 +1,8 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import {enableProdMode} from '@angular/core'; +import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import {AppModule} from './app/app.module'; +import {environment} from './environments/environment'; if (environment.production) { enableProdMode(); diff --git a/src/test.ts b/src/test.ts index f6559e7..62b1307 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,11 +1,8 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting, -} from '@angular/platform-browser-dynamic/testing'; +import {getTestBed} from '@angular/core/testing'; +import {BrowserDynamicTestingModule, platformBrowserDynamicTesting,} from '@angular/platform-browser-dynamic/testing'; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment(