repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
sawandarekar/family-tree | app.component.ts | import { OnInit } from '@angular/core';
import { Component } from '@angular/core';
import * as d3 from 'd3';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'family-hierarchy-frontend';
treeMa... |
hookerz/Instabug-React-Native | index.d.ts | <filename>index.d.ts<gh_stars>0
// Type definitions for instabug-reactnative 8.0
// Project: https://github.com/Instabug/instabug-reactnative#readme
// Definitions by: <NAME> <https://github.com/alyezz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export namespace BugReporting {
function setInv... |
Islandman93/black-screen | src/views/UserEventsHander.ts | <reponame>Islandman93/black-screen<filename>src/views/UserEventsHander.ts
import {ApplicationComponent} from "./1_ApplicationComponent";
import {SessionComponent} from "./2_SessionComponent";
import {PromptComponent} from "./4_PromptComponent";
import {JobComponent} from "./3_JobComponent";
import {Tab} from "./TabComp... |
Islandman93/black-screen | test/shell/scanner_spec.ts | <filename>test/shell/scanner_spec.ts
import {expect} from "chai";
import {
scan, Word, DoubleQuotedStringLiteral, SingleQuotedStringLiteral,
Pipe, OutputRedirectionSymbol, AppendingOutputRedirectionSymbol, InputRedirectionSymbol, Invalid, Semicolon,
} from "../../src/shell/Scanner";
describe("scan", () => {
... |
Islandman93/black-screen | src/plugins/Ls.tsx | import * as React from "react";
import {PluginManager} from "../PluginManager";
import {Job} from "../shell/Job";
import {join, isAbsolute} from "path";
import {dirStat} from "dirStat";
import * as e from "electron";
import {CSSObject} from "../views/css/definitions";
import {isEqual} from "lodash";
import {colors} fro... |
Islandman93/black-screen | src/Enums.ts | <reponame>Islandman93/black-screen
/**
* @link https://css-tricks.com/snippets/javascript/javascript-keycodes/
* @link https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html
*/
export enum KeyCode {
Bell = 7,
Backspace = 8,
Tab = 9,
NewLine = 10,
CarriageReturn = 13,
... |
Islandman93/black-screen | src/views/1_ApplicationComponent.tsx | import {SessionComponent} from "./2_SessionComponent";
import {TabComponent, TabProps, Tab} from "./TabComponent";
import * as React from "react";
import * as _ from "lodash";
import {ipcRenderer} from "electron";
import {remote} from "electron";
import * as css from "./css/main";
import {saveWindowBounds} from "./View... |
Islandman93/black-screen | src/PTY.ts | <filename>src/PTY.ts<gh_stars>1-10
import * as ChildProcess from "child_process";
import * as OS from "os";
import * as _ from "lodash";
import * as pty from "pty.js";
import {loginShell} from "./utils/Shell";
import {debug} from "./utils/Common";
export class PTY {
private terminal: pty.Terminal;
// TODO: wr... |
Tschrock/Xeact | types/xeact.d.ts | <reponame>Tschrock/Xeact
/** @type{function(string, Object, Array.<HTMLElement>)} */
export const h: (arg0: string, arg1: any, arg2: Array<HTMLElement>) => any;
/** @type{function(string): HTMLElement} */
export const t: (arg0: string) => HTMLElement;
/** @type{function(HTMLElement)} */
export const x: (arg0: HTMLEleme... |
Jos-Rod/escuela-api | test/models/Alumno.spec.ts | import expect from 'expect';
import { v4 as uuid } from 'uuid';
import faker from 'faker';
import Alumno from '../../src/models/Alumno';
const alumnoProps = {
matricula: uuid(),
nombre: faker.name.firstName(),
apellidos: faker.name.lastName(),
escuela: faker.company.companyName(),
correo: faker.internet.emai... |
Jos-Rod/escuela-api | test/stubs/DynamooseStub.ts | import { SinonSandbox, SinonStub } from 'sinon';
import dynamoose from 'dynamoose';
import Alumno from '../../src/models/Alumno';
export default class DynamooseStub {
fakes: {
create: SinonStub;
update: SinonStub;
delete: SinonStub;
scan: SinonStub;
get: SinonStub;
};
stub: SinonStub;
con... |
Jos-Rod/escuela-api | src/persistence/Repository.ts | <filename>src/persistence/Repository.ts
export default interface Repository<T> {
create(entity: T): Promise<T>;
update(entity: T): Promise<T>;
delete(entity: T): Promise<void>;
get(): Promise<T[]>;
getById(identifier: string): Promise<T | null>;
}
|
Jos-Rod/escuela-api | src/api/BaseApi.ts | <reponame>Jos-Rod/escuela-api
import { Express } from 'express';
export default class BaseApi {
protected app: Express;
constructor(app: Express) {
this.app = app;
this.initializeRoutes();
}
// eslint-disable-next-line class-methods-use-this
initializeRoutes(): void {
throw new Error('Method no... |
jedmao/get | src/get.test.ts | /* eslint-env node, jest */
import get from './get'
import commonJSModule = require('./get')
describe('index', () => {
it('exports a CommonJS module for npm compatibility', () => {
expect(commonJSModule).toBe(get)
})
it('has a circular default prop', () => {
// @ts-ignore
expect(get.default.default).toBe(get... |
jedmao/get | src/get.ts | export default function get<
T extends { [K in keyof T]: T[K] } | any[],
K1 extends keyof T = keyof T,
K2 extends keyof T[K1] = keyof T[K1],
K3 extends keyof T[K1][K2] = keyof T[K1][K2],
K4 extends keyof T[K1][K2][K3] = keyof T[K1][K3],
K5 extends keyof T[K1][K2][K3][K4] = keyof T[K1][K3][K4],
K6 extends keyof T... |
hemantsonu20/cric-poll | src/app/components/sign-up/sign-up.component.ts | <reponame>hemantsonu20/cric-poll
import { FlashService } from './../../services/flash.service';
import { Component, OnInit } from '@angular/core';
import { AuthService } from '../../services/auth.service';
import { Router, ActivatedRoute } from '@angular/router';
declare var jquery: any;
declare var $: any;
@Componen... |
hemantsonu20/cric-poll | src/environments/environment.prod.ts | export const environment = {
production: true,
firebase: {
apiKey: '<KEY>',
authDomain: 'cric-poll.firebaseapp.com',
databaseURL: 'https://cric-poll.firebaseio.com',
projectId: 'cric-poll',
storageBucket: 'cric-poll.appspot.com',
messagingSenderId: '579201465027',
},
cricPollBaseUrl: 'ht... |
hemantsonu20/cric-poll | src/app/components/create-poll/create-poll.component.ts | <reponame>hemantsonu20/cric-poll<gh_stars>0
import { map, catchError } from 'rxjs/operators';
import { FlashService } from './../../services/flash.service';
import { PollService } from './../../services/poll.service';
import { Router } from '@angular/router';
import { Poll } from './../../models/poll';
import { Compone... |
hemantsonu20/cric-poll | src/app/components/navbar/navbar.component.ts | <gh_stars>0
import { PollService } from './../../services/poll.service';
import { FlashService } from './../../services/flash.service';
import { Component, OnInit } from '@angular/core';
import { AuthService } from '../../services/auth.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-n... |
hemantsonu20/cric-poll | src/app/services/auth.service.ts | <filename>src/app/services/auth.service.ts
import { Observable, from, of } from 'rxjs';
import { AngularFireAuth } from 'angularfire2/auth';
import { Injectable } from '@angular/core';
import { User } from 'firebase';
@Injectable({
providedIn: 'root',
})
export class AuthService {
constructor(private fireAuth: Ang... |
hemantsonu20/cric-poll | src/app/app.module.ts | import { environment } from '../environments/environment';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from... |
hemantsonu20/cric-poll | src/app/models/user-tag.ts | export interface UserTag {
name: string;
vote: string;
team: string;
}
|
hemantsonu20/cric-poll | src/app/models/auction.ts | <reponame>hemantsonu20/cric-poll<filename>src/app/models/auction.ts
export interface Auction {
firstTeam: string;
firstTeamOwner: string;
secondTeam: string;
secondTeamOwner: string;
next: string;
}
|
hemantsonu20/cric-poll | src/app/components/sign-in/sign-in.component.ts | import { Router, ActivatedRoute } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { AuthService } from '../../services/auth.service';
import { FlashMessagesService } from 'angular2-flash-messages';
import { FlashService } from '../../services/flash.service';
@Component({
selector: '... |
hemantsonu20/cric-poll | src/app/models/poll.ts | export interface Poll {
id?: string;
title: string;
note?: string;
createdDate: string;
scheduledDate: string;
ownerEmail?: string;
ownerName?: string;
userTags?: {};
auction?: {};
}
|
hemantsonu20/cric-poll | src/app/services/poll.service.ts | <filename>src/app/services/poll.service.ts
import { UserTag } from './../models/user-tag';
import { map, mergeMap, catchError } from 'rxjs/operators';
import { throwError, Observable, from } from 'rxjs';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
import { Pol... |
hemantsonu20/cric-poll | src/app/services/flash.service.ts | <filename>src/app/services/flash.service.ts
import { FlashMessagesService } from 'angular2-flash-messages';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class FlashService {
constructor(private flash: FlashMessagesService) {}
success(msg: string, timeout = '4000') {
... |
hemantsonu20/cric-poll | src/app/app-routing.module.ts | import { AuctionComponent } from './components/auction/auction.component';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CommonModule } from '@angular/common';
import { SignInComponent } from './components/sign-in/sign-in.component';
import { SignUpComponent ... |
hemantsonu20/cric-poll | src/app/components/poll/poll.component.ts | <reponame>hemantsonu20/cric-poll
import { UserTag } from './../../models/user-tag';
import { PollService } from './../../services/poll.service';
import { Poll } from './../../models/poll';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import domtoimage from... |
hemantsonu20/cric-poll | src/app/components/polls/polls.component.ts | import { FlashService } from './../../services/flash.service';
import { Poll } from './../../models/poll';
import { AuthService } from './../../services/auth.service';
import { PollService } from './../../services/poll.service';
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-polls',
... |
nvmen/azure-api-management-devops-resource-kit | auth.guard.ts | <reponame>nvmen/azure-api-management-devops-resource-kit
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, RouterStateSnapshot, CanActivate, Router } from '@angular/router';
import { AuthenticateService } from '../service/auth.service';
import { UserService } from '../service/user.service'... |
StellarCrow/wfh-client | src/app/modules/game/game.module.ts | <gh_stars>0
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {GameRoutingModule} from './game-routing.module';
import {SharedModule} from '../../shared/shared.module';
import {LobbyComponent} from './pages/lobb... |
StellarCrow/wfh-client | src/app/modules/game/interfaces/iphrase.ts | export interface IPhrase {
phrase: string;
created_by: string;
}
|
StellarCrow/wfh-client | src/app/modules/game/components/players-list/players-list.component.ts | <reponame>StellarCrow/wfh-client
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import Peer from 'simple-peer';
import {DataStoreService} from '../../../../core/services/data-store.service';
import {PeerService} from '../../services/peer.service';
import {SocketService} from '../... |
StellarCrow/wfh-client | src/app/shared/shared.module.ts | import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {MaterialModule} from './material/material.module';
import {HeaderComponent} from './components/header/header.component';
import {FooterComponent} from './components/footer/footer.component';
import {AlertComponent} from './com... |
StellarCrow/wfh-client | src/app/modules/game/components/room-code/room-code.component.ts | import {Component, OnInit} from '@angular/core';
import {DataStoreService} from 'src/app/core/services/data-store.service';
@Component({
selector: 'app-room-code',
templateUrl: './room-code.component.html',
styleUrls: ['./room-code.component.scss']
})
export class RoomCodeComponent implements OnInit {
roomCode... |
StellarCrow/wfh-client | src/app/modules/game/services/hide-content.service.spec.ts | <reponame>StellarCrow/wfh-client<gh_stars>0
import {TestBed} from '@angular/core/testing';
import {HideContentService} from './hide-content.service';
describe('HideContentService', () => {
let service: HideContentService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(Hid... |
StellarCrow/wfh-client | src/app/core/services/data-store.service.ts | <gh_stars>0
import {Injectable} from '@angular/core';
import {IUser} from '../../shared/interfaces/user';
import {IPlayer} from '../../shared/interfaces/iplayer';
import {BehaviorSubject, Observable, Subject} from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class DataStoreService {
public currentUser: IUser... |
StellarCrow/wfh-client | src/app/modules/game/components/chat/chat.component.ts | <filename>src/app/modules/game/components/chat/chat.component.ts<gh_stars>0
import {Component, ElementRef, OnDestroy, OnInit, QueryList, ViewChildren} from '@angular/core';
import {SocketService} from '../../services/socket.service';
import {IChatMessage} from '../../interfaces/ichat-message';
import {DataStoreService}... |
StellarCrow/wfh-client | src/app/modules/game/constants/stages.enum.ts | <filename>src/app/modules/game/constants/stages.enum.ts
export enum Stages {
painting = 'painting',
phrases = 'phrases',
matching = 'matching',
voting = 'voting',
finish = 'finish'
}
|
StellarCrow/wfh-client | src/app/modules/game/pages/game/game-views/draw-view/draw-view.component.ts | <gh_stars>0
import {Component, OnInit} from '@angular/core';
import {GameViewService} from 'src/app/modules/game/services/game-view.service';
import * as views from 'src/app/modules/game/constants/game-views.js';
@Component({
selector: 'app-draw-view',
templateUrl: './draw-view.component.html',
styleUrls: ['./dr... |
StellarCrow/wfh-client | src/app/modules/game/services/game-view.service.spec.ts | <gh_stars>0
import {TestBed} from '@angular/core/testing';
import {GameViewService} from './game-view.service';
describe('GameViewService', () => {
let service: GameViewService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(GameViewService);
});
it('should be create... |
StellarCrow/wfh-client | src/app/shared/components/router-underlink/router-underlink.component.ts | import {Component, Input} from '@angular/core';
@Component({
selector: 'app-router-underlink',
templateUrl: './router-underlink.component.html',
styleUrls: ['./router-underlink.component.scss']
})
export class RouterUnderlinkComponent {
@Input() link: string = '';
@Input() content: string = '';
}
|
StellarCrow/wfh-client | src/app/modules/main/components/form-upload-file/form-upload-file.component.spec.ts | <filename>src/app/modules/main/components/form-upload-file/form-upload-file.component.spec.ts
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {FormUploadFileComponent} from './form-upload-file.component';
describe('FormUploadFileComponent', () => {
let component: FormUploadFileCompone... |
StellarCrow/wfh-client | src/app/modules/home/components/google-auth-button/google-auth-button.component.ts | import {Component, NgZone, OnInit} from '@angular/core';
import {AuthService} from '../../../../core/services/auth.service';
import {ILoginResponse} from '../../../../shared/interfaces/i-login-response';
import {AlertService} from '../../../../core/services/alert.service';
import {Router} from '@angular/router';
import... |
StellarCrow/wfh-client | src/app/modules/game/components/canvas/canvas.component.ts | <filename>src/app/modules/game/components/canvas/canvas.component.ts
import {SocketService} from '../../services/socket.service';
import {DataStoreService} from '../../../../core/services/data-store.service';
import {AfterViewInit, Component, ElementRef, EventEmitter, OnDestroy, OnInit, Output, ViewChild} from '@angula... |
StellarCrow/wfh-client | src/app/shared/interfaces/iplayer.ts | export interface IPlayer {
username: string;
avatar: string;
socketId: string;
}
|
StellarCrow/wfh-client | src/app/shared/interfaces/iregister-response.ts | <gh_stars>0
import {IServerResponse} from './iserver-response';
export interface IRegisterResponse extends IServerResponse {
payload: IRegisterPayload;
}
interface IRegisterPayload {
payload: null;
}
|
StellarCrow/wfh-client | src/app/modules/game/interfaces/islogans.ts | <reponame>StellarCrow/wfh-client<filename>src/app/modules/game/interfaces/islogans.ts
export interface ISlogans {
username: string;
slogan: string;
}
|
StellarCrow/wfh-client | src/app/core/core.module.ts | import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {AuthorizationInterceptor} from './interceptors/authorization.interceptor';
import {ErrorInterceptor} from './interceptors/error.interceptor';
@NgModul... |
StellarCrow/wfh-client | src/app/shared/components/header/header.component.ts | import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {AuthService} from '../../../core/services/auth.service';
import {IUser} from '../../interfaces/user';
import {DataStoreService} from '../../../core/services/data-store.service';
import {LocalStorageService} from '../../../... |
StellarCrow/wfh-client | src/app/modules/game/pages/game/game.component.ts | <reponame>StellarCrow/wfh-client
import {AfterViewInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {MatSidenav} from '@angular/material/sidenav';
import {HideContentService} from '../../services/hide-content.service';
import {GameViewService} from '../../services/game-view.service';
import {S... |
StellarCrow/wfh-client | src/app/core/services/local-storage.service.ts | <reponame>StellarCrow/wfh-client<filename>src/app/core/services/local-storage.service.ts
import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class LocalStorageService {
public getItem(key: string): any {
const itemString = localStorage.getItem(key);
try {
const item ... |
StellarCrow/wfh-client | src/app/modules/game/components/tee/tee.component.ts | import {Component, Input, OnInit} from '@angular/core';
@Component({
selector: 'app-tee',
templateUrl: './tee.component.html',
styleUrls: ['./tee.component.scss']
})
export class TeeComponent implements OnInit {
@Input() fillColor: string;
@Input() pictureUrl: string;
@Input() phrase: string;
ngOnInit()... |
StellarCrow/wfh-client | src/app/shared/interfaces/user.ts | <filename>src/app/shared/interfaces/user.ts
export interface IUser {
firstName: string;
lastName: string;
email: string;
password: string;
_id?: number;
avatar?: string;
}
|
StellarCrow/wfh-client | src/app/modules/game/components/pencil-colors/pencil-colors.component.ts | <gh_stars>0
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
@Component({
selector: 'app-pencil-colors',
templateUrl: './pencil-colors.component.html',
styleUrls: ['./pencil-colors.component.scss']
})
export class PencilColorsComponent implements OnInit {
constructor() {
}
colors: s... |
StellarCrow/wfh-client | src/app/modules/game/pages/game/game-views/tee-result-view/tee-result-view.component.ts | <reponame>StellarCrow/wfh-client
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {SocketService} from '../../../../services/socket.service';
import {DataStoreService} from '../../../../../../core/services/data-store.service';
import {takeUntil} from 'rxjs/opera... |
StellarCrow/wfh-client | src/app/shared/components/modal-room-deleted/modal-room-deleted.component.spec.ts | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ModalRoomDeletedComponent } from './modal-room-deleted.component';
describe('ModalRoomDeletedComponent', () => {
let component: ModalRoomDeletedComponent;
let fixture: ComponentFixture<ModalRoomDeletedComponent>;
beforeEach(asyn... |
StellarCrow/wfh-client | src/app/modules/home/components/login-form/login-form.component.ts | <filename>src/app/modules/home/components/login-form/login-form.component.ts<gh_stars>0
import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {DataStoreService} from '../../../../core/services/data-store.service';
@Component({
selector: 'app-login-form',
templateUrl: './lo... |
StellarCrow/wfh-client | src/app/modules/game/pages/game/game-views/phrase-view/phrase-view.component.spec.ts | import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {PhraseViewComponent} from './phrase-view.component';
describe('PhraseViewComponent', () => {
let component: PhraseViewComponent;
let fixture: ComponentFixture<PhraseViewComponent>;
beforeEach(async(() => {
TestBed.configureTest... |
StellarCrow/wfh-client | src/app/modules/game/pipes/repeat-element.pipe.spec.ts | import {RepeatElementPipe} from './repeat-element.pipe';
describe('RepeatElementPipe', () => {
it('create an instance', () => {
const pipe = new RepeatElementPipe();
expect(pipe).toBeTruthy();
});
});
|
StellarCrow/wfh-client | src/app/modules/game/services/game-view.service.ts | <gh_stars>0
import {Injectable} from '@angular/core';
import {BehaviorSubject} from 'rxjs';
@Injectable({
providedIn: 'root',
})
export class GameViewService {
private readonly _currentView = new BehaviorSubject<string>('');
readonly currentView$ = this._currentView.asObservable();
get getCurrentView(): strin... |
StellarCrow/wfh-client | src/app/modules/game/components/canvas-background/canvas-background.component.spec.ts | import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {CanvasBackgroundComponent} from './canvas-background.component';
describe('CanvasBackgroundComponent', () => {
let component: CanvasBackgroundComponent;
let fixture: ComponentFixture<CanvasBackgroundComponent>;
beforeEach(async(() ... |
StellarCrow/wfh-client | src/app/modules/main/main.component.ts | import {Component, OnInit} from '@angular/core';
import {NotificationService} from '../../core/services/notification.service';
import {MatSnackBar} from '@angular/material/snack-bar';
@Component({
selector: 'app-main',
templateUrl: './main.component.html',
styleUrls: ['./main.component.scss']
})
export class Mai... |
StellarCrow/wfh-client | src/app/modules/game/services/hide-content.service.ts | <filename>src/app/modules/game/services/hide-content.service.ts
import {Injectable} from '@angular/core';
import {MatSidenav} from '@angular/material/sidenav';
@Injectable({
providedIn: 'root',
})
export class HideContentService {
private sidenavArray = [];
public setSidenav(sidenav: MatSidenav, id: string): vo... |
StellarCrow/wfh-client | src/app/modules/game/interfaces/ipicture.ts | <filename>src/app/modules/game/interfaces/ipicture.ts
export interface IPicture {
url: string;
created_by: string;
background: string;
}
|
StellarCrow/wfh-client | src/app/modules/game/pages/lobby/lobby.component.ts | import {Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {Router} from '@angular/router';
import {Subject} from 'rxjs';
import {takeUntil} from 'rxjs/operators';
import {SocketService} from '../../services/socket.service';
import {ISocket} from '../../interfaces/isocket';
import {DataSt... |
StellarCrow/wfh-client | src/app/modules/main/components/welcome/welcome.component.ts | import {Component, OnDestroy} from '@angular/core';
import {Router} from '@angular/router';
import {MatDialog} from '@angular/material/dialog';
import {takeUntil} from 'rxjs/operators';
import {Subject} from 'rxjs';
import {ModalJoinRoomComponent} from '../modal-join-room/modal-join-room.component';
import {SocketServi... |
StellarCrow/wfh-client | src/app/modules/game/services/audio.service.ts | <filename>src/app/modules/game/services/audio.service.ts
import {Injectable} from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class AudioService {
private audioObj = new Audio();
public isPlaying = false;
constructor() {
this.audioObj.autoplay = true;
this.audioObj.loop = true;
thi... |
StellarCrow/wfh-client | src/app/core/guards/game-enter/game-enter.guard.spec.ts | <filename>src/app/core/guards/game-enter/game-enter.guard.spec.ts<gh_stars>0
import {TestBed} from '@angular/core/testing';
import {GameEnterGuard} from './game-enter.guard';
describe('GameEnterGuard', () => {
let guard: GameEnterGuard;
beforeEach(() => {
TestBed.configureTestingModule({});
guard = TestB... |
StellarCrow/wfh-client | src/app/core/guards/login/login.guard.ts | import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot} from '@angular/router';
import {AuthorizationService} from '../../services/authorization.service';
@Injectable({
providedIn: 'root'
})
export class LoginGuard implements CanActivate {
constructor(
... |
StellarCrow/wfh-client | src/app/shared/interfaces/iserver-response.ts | export interface IServerResponse {
success: boolean;
status?: string;
error?: IError;
}
interface IError {
status: string;
message: string;
}
|
StellarCrow/wfh-client | src/app/modules/game/interfaces/icanvas-lines.ts | export interface ICanvasLines {
lineNumber: number;
x: number;
y: number;
color: string;
}
|
StellarCrow/wfh-client | src/app/modules/game/pages/game/game-views/tee-vote-view/tee-vote-view.component.ts | <filename>src/app/modules/game/pages/game/game-views/tee-vote-view/tee-vote-view.component.ts
import {Component, OnInit} from '@angular/core';
import {DataStoreService} from '../../../../../../core/services/data-store.service';
import {Stages} from '../../../../constants/stages.enum';
import {ITee} from 'src/app/modul... |
StellarCrow/wfh-client | src/app/modules/game/game-routing.module.ts | <reponame>StellarCrow/wfh-client<gh_stars>0
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {LobbyComponent} from './pages/lobby/lobby.component';
import {GameComponent} from './pages/game/game.component';
import {GameCoreComponent} from './game-core.component';
impo... |
StellarCrow/wfh-client | src/app/modules/main/components/form-join-room/form-join-room.component.ts | <reponame>StellarCrow/wfh-client<gh_stars>0
import {Component, OnDestroy, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {SocketService} from '../../../game/services/socket.service';
import {DataStoreService} from '../../../../core/services/data-store.service';
i... |
StellarCrow/wfh-client | src/app/modules/game/services/socket.service.ts | import {Injectable} from '@angular/core';
import * as io from 'socket.io-client';
import {Observable, Subscriber} from 'rxjs';
import {socketUrl} from 'src/environments/environment';
import {ISocket, ISocketPayload} from '../interfaces/isocket';
@Injectable({
providedIn: 'root'
})
export class SocketService {
pub... |
StellarCrow/wfh-client | src/app/shared/components/modal-room-deleted/modal-room-deleted.component.ts | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-modal-room-deleted',
templateUrl: './modal-room-deleted.component.html',
styleUrls: ['./modal-room-deleted.component.scss']
})
export class ModalRoomDeletedComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
... |
StellarCrow/wfh-client | src/app/modules/game/pipes/repeat-element.pipe.ts | <reponame>StellarCrow/wfh-client<gh_stars>0
import {Pipe, PipeTransform} from '@angular/core';
@Pipe({
name: 'repeatElement'
})
export class RepeatElementPipe implements PipeTransform {
transform(value: number): any {
const iter = {} as Iterable<number>;
iter[Symbol.iterator] = function* () {
let n ... |
StellarCrow/wfh-client | src/app/core/services/alert.service.ts | <reponame>StellarCrow/wfh-client
import {Injectable, OnDestroy} from '@angular/core';
import {NavigationStart, Router} from '@angular/router';
import {Observable, Subject} from 'rxjs';
import {takeUntil} from 'rxjs/operators';
@Injectable({providedIn: 'root'})
export class AlertService implements OnDestroy {
private... |
StellarCrow/wfh-client | src/app/core/guards/login/login.guard.spec.ts | import {TestBed} from '@angular/core/testing';
import {RouterTestingModule} from '@angular/router/testing';
import {LoginGuard} from './login.guard';
describe('LoginGuard', () => {
let guard: LoginGuard;
beforeEach(() => {
TestBed.configureTestingModule({imports: [RouterTestingModule]});
guard = TestBed.... |
StellarCrow/wfh-client | src/app/modules/main/main-routing.module.ts | import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {WelcomeComponent} from './components/welcome/welcome.component';
import {AboutComponent} from './components/about/about.component';
import {MainComponent} from './main.component';
import {SettingsComponent} from './com... |
StellarCrow/wfh-client | src/app/shared/components/underlink/underlink.component.ts | import {Component, Input} from '@angular/core';
@Component({
selector: 'app-underlink',
templateUrl: './underlink.component.html',
styleUrls: ['./underlink.component.scss']
})
export class UnderlinkComponent {
@Input() link: string = '';
@Input() content: string = '';
@Input() title: string = '';
}
|
StellarCrow/wfh-client | src/app/shared/components/tee-image/tee-image.component.ts | <filename>src/app/shared/components/tee-image/tee-image.component.ts<gh_stars>0
import {Component, Input} from '@angular/core';
@Component({
selector: 'app-tee-image',
templateUrl: './tee-image.component.svg',
styleUrls: ['./tee-image.component.scss']
})
export class TeeImageComponent {
@Input() fillColor: str... |
StellarCrow/wfh-client | src/app/modules/main/components/modal-join-room/modal-join-room.component.ts | import {Component, OnInit} from '@angular/core';
@Component({
selector: 'app-modal-join-room',
templateUrl: './modal-join-room.component.html',
styleUrls: ['./modal-join-room.component.scss']
})
export class ModalJoinRoomComponent implements OnInit {
constructor() {
}
ngOnInit(): void {
}
}
|
StellarCrow/wfh-client | src/environments/environment.prod.ts | export const environment = {
production: true
};
export const apiUrl = 'https://wfh-backend.herokuapp.com/api';
export const socketUrl = 'wss://wfh-backend.herokuapp.com/';
export const audiofiles = {
game: 'https://wfh-storage.s3.eu-north-1.amazonaws.com/music/game.mp3',
lobby: 'https://wfh-storage.s3.eu-north-... |
StellarCrow/wfh-client | src/app/modules/home/components/signup/signup.component.ts | import {
Component, EventEmitter, OnInit, Output, ViewChild,
} from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { AuthService } from '../../../../core/services/auth.service';
import { AlertService } from '../../../../core/services/alert.service';
import { IRegisterResp... |
StellarCrow/wfh-client | src/app/core/services/auth.service.ts | import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {IUser} from '../../shared/interfaces/user';
import {apiUrl} from '../../../environments/environment';
import {ILoginResponse} from '../../shared/interfaces/i-login-response';
import {IRegi... |
StellarCrow/wfh-client | src/app/modules/game/game-core.component.spec.ts | import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {GameCoreComponent} from './game-core.component';
describe('GameCoreComponent', () => {
let component: GameCoreComponent;
let fixture: ComponentFixture<GameCoreComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule(... |
StellarCrow/wfh-client | src/app/modules/game/game-core.component.ts | <reponame>StellarCrow/wfh-client
import {Component, HostListener, OnDestroy, OnInit} from '@angular/core';
import {SocketService} from './services/socket.service';
import {DataStoreService} from '../../core/services/data-store.service';
import {takeUntil} from 'rxjs/operators';
import {Subject} from 'rxjs';
import {ISo... |
StellarCrow/wfh-client | src/app/modules/game/components/audio-player/audio-player.component.ts | <reponame>StellarCrow/wfh-client<filename>src/app/modules/game/components/audio-player/audio-player.component.ts
import {Component, OnDestroy, OnInit} from '@angular/core';
import {AudioService} from '../../services/audio.service';
@Component({
selector: 'app-audio-player',
templateUrl: './audio-player.component.h... |
StellarCrow/wfh-client | src/app/core/interceptors/authorization.interceptor.ts | import {Injectable} from '@angular/core';
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angular/common/http';
import {Observable} from 'rxjs';
import {LocalStorageService} from '../services/local-storage.service';
@Injectable()
export class AuthorizationInterceptor implements HttpInterceptor {
... |
StellarCrow/wfh-client | src/app/core/guards/game-leave/game-leave.guard.ts | <filename>src/app/core/guards/game-leave/game-leave.guard.ts<gh_stars>0
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, CanDeactivate, Router, RouterStateSnapshot} from '@angular/router';
import {MatDialog} from '@angular/material/dialog';
import {ModalLeavePage} from '../../../shared/componen... |
StellarCrow/wfh-client | src/app/modules/game/pages/game/game-views/phrase-view/phrase-view.component.ts | <filename>src/app/modules/game/pages/game/game-views/phrase-view/phrase-view.component.ts
import {Component, OnDestroy, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {SocketService} from '../../../../services/socket.service';
import {DataStoreService} from '../.... |
StellarCrow/wfh-client | src/app/modules/game/interfaces/isocket.ts | <filename>src/app/modules/game/interfaces/isocket.ts
export interface ISocket {
answer: string;
payload: any;
}
export interface ISocketPayload {
[key: string]: any;
}
|
StellarCrow/wfh-client | src/app/core/services/authorization.service.ts | import {Injectable} from '@angular/core';
import {JwtHelperService} from '@auth0/angular-jwt';
@Injectable({
providedIn: 'root'
})
export class AuthorizationService {
public helper: JwtHelperService = new JwtHelperService();
constructor() {
}
public isAuthorized(): any {
return !this.helper.isTokenExpi... |
StellarCrow/wfh-client | src/app/shared/components/modal-leave-page/modal-leave-page.ts | <gh_stars>0
import {Component} from '@angular/core';
import {Router} from '@angular/router';
@Component({
selector: 'app-modal-game-started',
templateUrl: './modal-leave-page.component.html',
styleUrls: ['./modal-leave-page.component.scss']
})
export class ModalLeavePage {
constructor(private router: Router) ... |
StellarCrow/wfh-client | src/app/modules/game/pages/game/game-views/tee-vote-view/tee-vote-view.component.spec.ts | <filename>src/app/modules/game/pages/game/game-views/tee-vote-view/tee-vote-view.component.spec.ts
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {TeeVoteViewComponent} from './tee-vote-view.component';
describe('TeeVoteViewComponent', () => {
let component: TeeVoteViewComponent;
l... |
StellarCrow/wfh-client | src/app/modules/game/components/canvas-background/canvas-background.component.ts | <filename>src/app/modules/game/components/canvas-background/canvas-background.component.ts
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
@Component({
selector: 'app-canvas-background',
templateUrl: './canvas-background.component.html',
styleUrls: ['./canvas-background.component.scss']
})... |
StellarCrow/wfh-client | src/app/modules/main/components/form-upload-file/form-upload-file.component.ts | <reponame>StellarCrow/wfh-client<filename>src/app/modules/main/components/form-upload-file/form-upload-file.component.ts
import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import {No... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.