Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
furknyavuz committed Sep 16, 2021
1 parent 5ef5659 commit fee8e69
Show file tree
Hide file tree
Showing 116 changed files with 1,438 additions and 1,425 deletions.
2 changes: 1 addition & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const routes: Routes = [
{ path: URLS_RAW.login, component: LoginComponent },
{ path: URLS_RAW.forgetPassword, component: ForgetPasswordComponent },
{ path: URLS_RAW.resetPassword, component: ResetPasswordComponent },
{ path: URLS_RAW.contactUs, component: ContactUsComponent},
{ path: URLS_RAW.contactUs, component: ContactUsComponent },
{ path: URLS_RAW.u + '/' + ':username', component: PublicProfileComponent, data: { isPublic: true } },
]
},
Expand Down
6 changes: 3 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import { SwiperModule } from 'swiper/angular';
import { environment } from '../environments/environment';

import { AppRoutingModule } from './app-routing.module';
import { AnimatedCodeEditorComponent } from './component/animated-code-editor/animated-code-editor.component';
import { CalendarComponent } from './component/calendar/calendar.component';
import { CommandLineComponent } from './component/command-line/command-line.component';
import { EventDataComponent } from './component/common/block/event-data/event-data.component';
import { EventHamburgerMenuComponent } from './component/common/block/event-hamburger-menu/event-hamburger-menu.component';
import { LabelDataComponent } from './component/common/block/label-data/label-data.component';
Expand Down Expand Up @@ -56,6 +58,7 @@ import { MyProfileComponent } from './page/dashboard-layout/my-profile/my-profil
import { PublicProfileComponent } from './page/dashboard-layout/public-profile/public-profile.component';
import { SideContentComponent } from './page/dashboard-layout/side-content/side-content.component';
import { AboutUsComponent } from './page/landing-layout/about-us/about-us.component';
import { ContactUsComponent } from './page/landing-layout/contact-us/contact-us.component';
import { CookiePolicyComponent } from './page/landing-layout/cookie-policy/cookie-policy.component';
import { ForgetPasswordComponent } from './page/landing-layout/forget-password/forget-password.component';
import { HomeComponent } from './page/landing-layout/home/home.component';
Expand All @@ -78,9 +81,6 @@ import { SettingsLayoutComponent } from './page/settings-layout/settings-layout.
import { CallbackComponent } from './page/splash-layout/callback/callback.component';
import { ExternalComponent } from './page/splash-layout/external/external.component';
import { SplashLayoutComponent } from './page/splash-layout/splash-layout.component';
import { ContactUsComponent } from './page/landing-layout/contact-us/contact-us.component';
import { AnimatedCodeEditorComponent } from './component/animated-code-editor/animated-code-editor.component';
import { CommandLineComponent } from './component/command-line/command-line.component';

FullCalendarModule.registerPlugins( [
dayGridPlugin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';

import { AnimatedCodeEditorComponent } from './animated-code-editor.component';

describe('AnimatedCodeEditorComponent', () => {
describe( 'AnimatedCodeEditorComponent', () => {
let component: AnimatedCodeEditorComponent;
let fixture: ComponentFixture<AnimatedCodeEditorComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
beforeEach( async () => {
await TestBed.configureTestingModule( {
declarations: [ AnimatedCodeEditorComponent ]
})
} )
.compileComponents();
});
} );

beforeEach(() => {
fixture = TestBed.createComponent(AnimatedCodeEditorComponent);
beforeEach( () => {
fixture = TestBed.createComponent( AnimatedCodeEditorComponent );
component = fixture.componentInstance;
fixture.detectChanges();
});
} );

it('should create', () => {
expect(component).toBeTruthy();
});
});
it( 'should create', () => {
expect( component ).toBeTruthy();
} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ import { CommandLineComponent } from '../command-line/command-line.component';
styleUrls: [ './animated-code-editor.component.scss' ],
} )
export class AnimatedCodeEditorComponent implements OnInit, OnChanges, AfterViewInit {
constructor( private resolver: ComponentFactoryResolver ) {
}

@ViewChild( 'codeEditorContent', { static: true, read: ViewContainerRef } )
codeEditorContentRef: ViewContainerRef;

factory: ComponentFactory<CommandLineComponent>;
index = 0;

@Input() commandLines: CommandLine[];

constructor( private resolver: ComponentFactoryResolver ) {
}

ngOnInit(): void {
this.initializeComponent();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/component/calendar/calendar.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
::ng-deep .fc-event{
::ng-deep .fc-event {
cursor: pointer;
}
24 changes: 12 additions & 12 deletions src/app/component/calendar/calendar.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';

import { CalendarComponent } from './calendar.component';

describe('CalendarComponent', () => {
describe( 'CalendarComponent', () => {
let component: CalendarComponent;
let fixture: ComponentFixture<CalendarComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
beforeEach( async () => {
await TestBed.configureTestingModule( {
declarations: [ CalendarComponent ]
})
} )
.compileComponents();
});
} );

beforeEach(() => {
fixture = TestBed.createComponent(CalendarComponent);
beforeEach( () => {
fixture = TestBed.createComponent( CalendarComponent );
component = fixture.componentInstance;
fixture.detectChanges();
});
} );

it('should create', () => {
expect(component).toBeTruthy();
});
});
it( 'should create', () => {
expect( component ).toBeTruthy();
} );
} );
26 changes: 13 additions & 13 deletions src/app/component/calendar/calendar.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, Output, SimpleChanges, EventEmitter } from '@angular/core';
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
import { CalendarOptions } from '@fullcalendar/angular';

export interface CalendarEvent {
Expand All @@ -9,39 +9,39 @@ export interface CalendarEvent {
end: string
}

@Component({
@Component( {
selector: 'app-calendar',
templateUrl: './calendar.component.html',
styleUrls: ['./calendar.component.scss']
})
styleUrls: [ './calendar.component.scss' ]
} )
export class CalendarComponent implements OnChanges {
@Output() handleEventClick = new EventEmitter<any>();
@Output() handleDateClick = new EventEmitter<any>();

// callback function runs when months are changed by user.
@Output() handleDatesSet = new EventEmitter<any>();

@Input() calendarEvents: CalendarEvent[] = []
@Input() calendarEvents: CalendarEvent[] = [];

calendarOptions: CalendarOptions
calendarOptions: CalendarOptions;

ngOnChanges( changes: SimpleChanges ): void {
this.createCalendar()
this.createCalendar();
}

public createCalendar() {
this.calendarOptions = {
initialView: 'dayGridMonth',
events: [...this.calendarEvents],
events: [ ...this.calendarEvents ],
dateClick: ( arg => {
this.handleDateClick.emit( arg )
}),
this.handleDateClick.emit( arg );
} ),
eventClick: ( arg => {
this.handleEventClick.emit( arg )
this.handleEventClick.emit( arg );
} ),
datesSet: ( data => {
this.handleDatesSet.emit( data )
this.handleDatesSet.emit( data );
} )
}
};
}
}
4 changes: 2 additions & 2 deletions src/app/component/command-line/command-line.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p class="command-line">
<span class="request command" *ngIf="commandLine.type === 1">$</span>
<span class="response command" *ngIf="commandLine.type === 2">></span>
<span *ngIf="commandLine.type === 1" class="request command">$</span>
<span *ngIf="commandLine.type === 2" class="response command">></span>
{{ animatedText }}
</p>
24 changes: 12 additions & 12 deletions src/app/component/command-line/command-line.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';

import { CommandLineComponent } from './command-line.component';

describe('CommandLineComponent', () => {
describe( 'CommandLineComponent', () => {
let component: CommandLineComponent;
let fixture: ComponentFixture<CommandLineComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
beforeEach( async () => {
await TestBed.configureTestingModule( {
declarations: [ CommandLineComponent ]
})
} )
.compileComponents();
});
} );

beforeEach(() => {
fixture = TestBed.createComponent(CommandLineComponent);
beforeEach( () => {
fixture = TestBed.createComponent( CommandLineComponent );
component = fixture.componentInstance;
fixture.detectChanges();
});
} );

it('should create', () => {
expect(component).toBeTruthy();
});
});
it( 'should create', () => {
expect( component ).toBeTruthy();
} );
} );
19 changes: 9 additions & 10 deletions src/app/component/command-line/command-line.component.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
import { Component, Input, OnInit } from '@angular/core';
import { CommandLine } from 'src/app/model/product/product.model';

@Component({
@Component( {
selector: 'app-command-line',
templateUrl: './command-line.component.html',
styleUrls: ['./command-line.component.scss'],
})
styleUrls: [ './command-line.component.scss' ],
} )
export class CommandLineComponent implements OnInit {
@Input() commandLine: CommandLine;
animatedText: string = '';
counter: number = 0;

defaultCallback = () => {
console.log('Animation completed for ', this.commandLine.command);
console.log( 'Animation completed for ', this.commandLine.command );
};

@Input() animationComplete?: any = this.defaultCallback;

animatedText: string = '';
counter: number = 0;

ngOnInit(): void {
this.animateCommand();
}

animateCommand = () => {
if (this.counter < this.commandLine.command.length) {
this.animatedText += this.commandLine.command.charAt(this.counter);
if ( this.counter < this.commandLine.command.length ) {
this.animatedText += this.commandLine.command.charAt( this.counter );
this.counter++;
setTimeout(this.animateCommand, 30);
setTimeout( this.animateCommand, 30 );
} else {
this.animationComplete();
}
Expand Down
Loading

0 comments on commit fee8e69

Please sign in to comment.