repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
typekev/react-mk | src/constants.ts | import { Range } from './types';
export const defaultKeyPressDelay: Range = [100, 150];
export const defaultSentenceDelay: Range = [125.8, 219.4];
|
typekev/react-mk | tests/Cursor.test.tsx | <reponame>typekev/react-mk
import React from 'react';
import ReactDOM from 'react-dom';
import Cursor from '../src/Cursor';
describe('Cursor component', () => {
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<Cursor />, div);
ReactDOM.unmountComponentAtN... |
typekev/react-mk | src/useKeyboard.ts | import { useState, useRef, useEffect, Dispatch, SetStateAction } from 'react';
import { Action, Range } from './types';
import getTimers from './getTimers';
import getTimer from './getTimer';
import { defaultKeyPressDelay } from './constants';
const initialState: string[] = [];
export const backspace = (chars: string... |
typekev/react-mk | tests/Keyboard.test.tsx | <reponame>typekev/react-mk
import React from 'react';
import { act } from 'react-dom/test-utils';
import Enzyme, { mount } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Keyboard, { type as typeFunction } from '../src/Keyboard';
Enzyme.configure({ adapter: new Adapter() });
describe('... |
typekev/react-mk | tests/getTimer.test.ts | import getTimer, { clearTimer, createTimer, getTimeout } from '../src/getTimer';
import { Range } from '../src/types'
describe('getTimer function', () => {
it('should not throw an error when passed a string', () => {
expect(() => getTimer('Test')).not.toThrow();
});
it('should return Test', () => {
cons... |
typekev/react-mk | src/getDelay.ts | <reponame>typekev/react-mk
import { Action } from './types';
import getKeyPressDelay from './getKeyPressDelay';
import { defaultKeyPressDelay } from './constants';
/**
* Returns a delay in milliseconds based on a given `action` and `delayRange`
*
* @param action - The smallest possible output
* @param delayRange -... |
typekev/react-mk | src/getKeyPressDelay.ts | <reponame>typekev/react-mk
/**
* Returns a number between `min` and `max`.
*
* @param min - The smallest possible output
* @param max - The largest possible output
* @returns A number in the range of `min` and `max`
*/
const getKeyPressDelay = (min: number, max: number) =>
Math.floor(Math.random() * (max - min)... |
typekev/react-mk | src/Cursor.tsx | <gh_stars>10-100
import React, { PropsWithChildren, DetailedHTMLProps } from 'react';
import { css, keyframes } from '@emotion/css';
const blinkAnimation = keyframes`
from {
opacity: 1;
}
50% {
opacity: 0;
}
to {
opacity: 1;
}
`;
interface Props extends DetailedHTMLProps<React.HTMLAttributes<H... |
typekev/react-mk | src/getTimers.ts | <gh_stars>10-100
import { Action, Range } from "./types";
import getTimer from './getTimer';
import getDelay from './getDelay';
export const getPreviousDelay = (delays: number[], index: number) => index && delays[index - 1];
export const accumulateDelays = (
accumulatedDelays: number[],
action: Action,
index: n... |
typekev/react-mk | tests/useKeyboard.test.tsx | <filename>tests/useKeyboard.test.tsx
import React from 'react';
import { act } from 'react-dom/test-utils';
import Enzyme, { shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import { Action, Range } from '../src/types';
import useKeyboard, { backspace, type } from '../src/useKeyboard';... |
typekev/react-mk | tests/getKeyPressDelay.test.ts | <reponame>typekev/react-mk
import getKeyPressDelay from '../src/getKeyPressDelay';
describe('getKeyPressDelay function', () => {
it('should not throw', () => {
expect(() => getKeyPressDelay(100, 200)).not.toThrow();
});
});
|
typekev/react-mk | tests/getDelay.test.ts | import getDelay from '../src/getDelay';
describe('getDelay function', () => {
it('should not throw an error when passed a string', () => {
expect(() => getDelay('Test')).not.toThrow();
});
it('should equal 100', () => {
const delay = getDelay('A', [100, 100]);
expect(delay).toBe(100);
});
it('s... |
typekev/react-mk | src/getTimer.ts | import { Action, Range } from "./types";
import getDelay from "./getDelay";
interface Props { action: Action, timer: NodeJS.Timeout }
export const clearTimer = ({ action, timer }: Props) => {
clearTimeout(timer);
return action;
};
export const getTimeout = (resolve: (params: Props) => void, action: Action, delay... |
nft-login/nft-marketplace | src/store.ts | import { InjectionKey } from 'vue'
import { createStore, useStore as baseUseStore, Store, MutationTree } from 'vuex'
import { Blockchain } from './model/blockchain';
import { Web3Blockchain } from './controller/web3_blockchain';
export interface State {
account: string;
balance: number;
blockchain: Blockch... |
nft-login/nft-marketplace | src/main.ts | <gh_stars>1-10
import { createApp } from 'vue';
import { createRouter, createWebHashHistory } from 'vue-router';
import App from './App.vue';
import Home from './pages/Home.vue';
import Marketplace from './pages/Marketplace.vue';
import MyTokens from './pages/MyTokens.vue';
import Mint from './pages/Mint.vue';
import A... |
nft-login/nft-marketplace | src/controller/web3_blockchain.ts | import { ethers } from "ethers";
import { ContractFactory } from 'ethers';
import { Blockchain } from "../model/blockchain";
import * as EarlyAccessGame from "../abis/EarlyAccessGame.json";
function getContract() {
const search = window.location.search;
const contract = new URLSearchParams(search).get("contra... |
nft-login/nft-marketplace | src/model/blockchain.ts | <reponame>nft-login/nft-marketplace<gh_stars>1-10
import { Token } from "./token";
export interface Blockchain {
init(): Promise<void>;
chainId(): Promise<string>;
contractAddress(): Promise<string>;
loadContract(contractAddress: string): Promise<void>;
account(): Promise<string>;
balance(): Pr... |
lTyl/phaser-on-nodejs | lib/fakeXMLHttpRequest.d.ts | <gh_stars>0
/// <reference types="node" />
declare class FakeXMLHttpRequest {
url: string;
status: number;
response: any;
responseText: string;
open(_type: string, url: string): void;
send(): void;
onload(xhr: any, event: any): void;
onerror(err: NodeJS.ErrnoException | null): void;
... |
lTyl/phaser-on-nodejs | src/fakeXMLHttpRequest.ts | import path from 'path'
import fs from 'fs'
class FakeXMLHttpRequest {
public url: string
public status = 200
public response: any
public responseText: string
public open(_type: string, url: string) {
this.url = path.resolve(__dirname, url)
}
public send() {
// use base64 for images and utf8 fo... |
lTyl/phaser-on-nodejs | src/index.ts | <gh_stars>0
declare global {
namespace NodeJS {
interface Global {
document: any
window: any
Image: any
navigator: any
// XMLHttpRequest: any
HTMLCanvasElement: any
HTMLVideoElement: any
requestAnimationFrame: any
URL: any
phaserOnNodeFPS: number
}
... |
lTyl/phaser-on-nodejs | lib/index.d.ts | <reponame>lTyl/phaser-on-nodejs
declare global {
namespace NodeJS {
interface Global {
document: any;
window: any;
Image: any;
navigator: any;
HTMLCanvasElement: any;
HTMLVideoElement: any;
requestAnimationFrame: any;
... |
xmlking/nodeui | src/index.ts | <reponame>xmlking/nodeui
export * from './gauge'
export * from './spinner'
export * from './progress'
export * from './sparkline'
export * from './line'
export * from './lineBuffer'
export * from './table'
export * from './banner' |
xmlking/nodeui | src/table.ts | <reponame>xmlking/nodeui<filename>src/table.ts
import * as chalk from "chalk";
export class Table {
constructor(public tableContent = '') {
}
// Adds a new table row to the output
tr() {
return this;
};
// Adds a new table cell to the output
td(cellContent, cellWidth) {
re... |
xmlking/nodeui | src/line.ts | import * as chalk from "chalk";
export class Line {
private lineContent = "";
constructor(public defaultBuffer?) {
}
// Put text in the line
text(text, styles?) {
if(styles) {
styles.forEach(function (element) {
text = element(text);
});
}
... |
xmlking/nodeui | examples.ts | require('core-js/es7/symbol.js');
import * as chalk from 'chalk';
import * as os from 'os';
import {Banner, Gauge, Spinner, Sparkline, Progress, Line, LineBuffer} from './src/index'
require('draftlog').into(console);
export function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
/********... |
xmlking/nodeui | src/progress.ts | <gh_stars>1-10
import * as chalk from "chalk";
export class Progress {
private draft: any;
constructor(public width = 50, public suffix = '', private filled = chalk.blue('='), private empty = ' ') {
this.draft = console.draft();
}
update(currentValue, maxValue) {
let bar = Math.ceil(cu... |
xmlking/nodeui | test.ts | <filename>test.ts<gh_stars>1-10
import { SpecReporter, DisplayProcessor } from "jasmine-spec-reporter";
import {Configuration} from "jasmine-spec-reporter/built/configuration";
const Jasmine = require("jasmine");
import SuiteInfo = jasmine.SuiteInfo;
class CustomProcessor extends DisplayProcessor {
public display... |
xmlking/nodeui | src/gauge.ts | import * as chalk from "chalk";
export class Gauge {
constructor(public value, public maxValue, public width, public dangerZone, public suffix) {
}
toString() {
if (this.maxValue === 0) {
return '[]';
}
else {
let barLength = Math.ceil(this.value / this.ma... |
xmlking/nodeui | src/typings.d.ts | <filename>src/typings.d.ts
// https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/third-party-lib.md
// https://www.typescriptlang.org/docs/handbook/declaration-merging.html
// declare module 'typeless-package';
// declare var stringScriptGlobal: any;
// import { Observable } from "./observa... |
xmlking/nodeui | src/spinner.spec.ts | <reponame>xmlking/nodeui
import * as chalk from 'chalk';
import {Spinner} from "./spinner";
export function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
describe('Spinner', () => {
let spinner: Spinner;
beforeEach(function(done) {
// require('yargs').argv.serve ? require... |
xmlking/nodeui | src/spinner.ts | import {ChalkChain} from "chalk";
export class Spinner {
private draft: any;
private timer: any;
private frames: string[] = 'win32' == process.platform ? ['|', '/', '-', '\\'] : ['◜', '◠', '◝', '◞', '◡', '◟'];
constructor(public message: any) {
this.draft = console.draft();
}
start(co... |
xmlking/nodeui | src/lineBuffer.ts | <reponame>xmlking/nodeui
import * as chalk from "chalk";
export interface UserOptions {
x?: number
y?: number
width?: string | number
height?: string | number
scroll?: number
}
export class LineBuffer {
static defaultOptions: UserOptions = {
x: 0,
y: 0,
width: 'console'... |
xmlking/nodeui | src/banner.ts | import * as chalk from "chalk";
import {ChalkChain} from "chalk";
export class Banner {
constructor(public text, color: ChalkChain = chalk.yellow) {
const words = text.split('');
console.log(chalk.dim('*'.repeat(words.length)));
const update = console.draft();
console.log(chalk.dim... |
xmlking/nodeui | src/gauge.spec.ts | import * as chalk from 'chalk';
import {Gauge} from "./gauge";
describe('Gauge', () => {
let gauge: Gauge;
beforeEach(function(done) {
const total = 2000;
const free = 500;
const used = total - free;
const human = used + ' MB';
gauge = new Gauge(used, total, 20, total... |
xmlking/nodeui | src/sparkline.ts | import * as chalk from "chalk";
const sparklineSymbols = [
'\u2581',
'\u2582',
'\u2583',
'\u2584',
'\u2585',
'\u2586',
'\u2587',
'\u2588'
];
export class Sparkline {
constructor(public points, public suffix = '') {
}
toString() {
let max = Math.max.apply(Math, thi... |
RS022741/io-source | src/service/mock-service-proxy/MockServiceRequestValidator.ts | import { ServiceOperationTypeEnum, IMockServiceOperation } from './MockServiceOperations';
import { ServiceProxyError } from '../ServiceProxyError';
export class MockServiceRequestValidator {
private isOnline: boolean = false;
public validateRequest<TData, TReturn>(
operationType: ServiceOperationType... |
RS022741/io-source | src/serializers/Serializer.ts | <filename>src/serializers/Serializer.ts
export type Reviver = (key: string, value: any) => any;
export interface ISerializer {
parse<T>(json: string, reviver?: Reviver): T;
stringify<T>(object: T): string;
} |
RS022741/io-source | src/key-value-storage/LocalForageProxy.ts | <gh_stars>1-10
import * as localForage from 'localforage';
import {IKeyValueStorageProxy} from './KeyValueStorageProxy';
import {ISerializer} from '../serializers/Serializer';
export class LocalForageProxy implements IKeyValueStorageProxy {
private localForageStore: LocalForage;
private serializer: ISerialize... |
RS022741/io-source | src/service/mock-service-proxy/GlobalResponseHeaders.ts | import { IServiceResponse } from '../ServiceProxy';
export class GlobalResponseHeaders {
private globalResponseHeaders: {[name: string]: string | (() => string)} = {};
public addGlobalResponseHeader(name: string, value: (() => string) | string) {
this.globalResponseHeaders[name] = value;
}
pu... |
RS022741/io-source | src/index.ts | export {HttpServiceProxy} from './service/HttpServiceProxy';
export {IServiceProxy, IServiceResponse, IServiceResponseError} from './service/ServiceProxy';
export {IServiceResponseListener, ServiceProxyResponseEvent} from './service/ServiceProxyResponseEvent';
export { MockServiceProxy } from './service/MockServiceProx... |
RS022741/io-source | src/service/ServiceProxy.ts | import {ServiceProxyResponseEvent} from './ServiceProxyResponseEvent';
export interface IHttpHeaders {
[headerName: string]: string;
}
export interface IServiceResponseError {
message: string;
}
export interface IServiceResponse<T> {
status: number;
responseBody: T | IServiceResponseError;
heade... |
RS022741/io-source | src/serializers/CircularSerializer.ts | import {ISerializer, Reviver} from './Serializer';
export class CircularSerializer implements ISerializer {
public parse<T>(json: string, reviver?: Reviver): T {
const obj = JSON.parse(json, reviver);
return <T>JsonNetDecycle.retrocycle(obj);
}
public stringify<T>(object: T): string {
... |
RS022741/io-source | src/service/MockServiceProxy.ts | <reponame>RS022741/io-source
import { IServiceProxy, IServiceCallOptions, IHttpHeaders } from './ServiceProxy';
import { ServiceProxyResponseEvent } from './ServiceProxyResponseEvent';
import { MockServiceExecution } from './mock-service-proxy/MockServiceExecution';
import { MockServiceParameters } from './mock-servic... |
RS022741/io-source | src/service/HttpServiceProxy.ts | <gh_stars>1-10
import 'whatwg-fetch';
import {ISerializer} from '../serializers/Serializer';
import {IServiceProxy, IServiceCallOptions} from './ServiceProxy';
import {ServiceProxyResponseEvent} from './ServiceProxyResponseEvent';
import {ServiceProxyError} from './ServiceProxyError';
export class HttpServiceProxy i... |
RS022741/io-source | src/key-value-storage/KeyValueStorageProxy.ts | <gh_stars>1-10
import {ISerializer} from '../serializers/Serializer';
export interface IKeyValueStorageProxy {
getKeys(): Promise<string[]>;
getItem<T>(name: string): Promise<T>;
setItem<T>(name: string, data: T): Promise<void>;
getString(name: string): Promise<string>;
setString(name: string, val... |
RS022741/io-source | src/key-value-storage/LocalStorageProxy.ts | <filename>src/key-value-storage/LocalStorageProxy.ts
import {ISerializer} from '../serializers/Serializer';
import {KeyValueStorageProxy, IKeyValueStorageProxy} from './KeyValueStorageProxy';
export class LocalStorageProxy extends KeyValueStorageProxy implements IKeyValueStorageProxy {
constructor(serializer: ISe... |
RS022741/io-source | src/service/mock-service-proxy/MockServiceOperations.ts | import { IServiceCallOptions, IServiceResponse } from '../ServiceProxy';
export interface IMockServiceOperationResponseFunction<TRequest, TResponse> {
(urlMatches?: string[], requestBody?: TRequest, options?: IServiceCallOptions, params?: any): IServiceResponse<TResponse>;
}
export interface IMockServiceOperation... |
RS022741/io-source | src/service/ServiceProxyError.ts | export class ServiceProxyError extends Error {
public readonly httpStatus: number;
public readonly responseText: string
public readonly details: any;
constructor(url: string, httpStatus: number, responseBody: any) {
super(`Service call to ${url} resulted in an error with status code ${httpS... |
RS022741/io-source | src/service/mock-service-proxy/MockServiceParameters.ts | export class MockServiceParameters {
public params: any = {};
public setParams(params: any) {
this.params = params;
}
public setParam(paramName: string, paramValue: any) {
this.params[paramName] = paramValue;
}
} |
RS022741/io-source | src/service/ServiceProxyResponseEvent.ts | <filename>src/service/ServiceProxyResponseEvent.ts
import {IServiceResponse} from './ServiceProxy';
export interface IServiceResponseListener {
(response: IServiceResponse<any>, url?: string): void;
}
export class ServiceProxyResponseEvent {
private listeners: IServiceResponseListener[] = [];
public list... |
RS022741/io-source | src/service/mock-service-proxy/MockServiceProxyOptions.ts | <reponame>RS022741/io-source<filename>src/service/mock-service-proxy/MockServiceProxyOptions.ts
export interface IMockServiceProxyOptions {
addRandomDelays?: boolean;
maxRandomDelayMilliseconds?: number;
} |
RS022741/io-source | src/service/mock-service-proxy/MockServiceDefinitions.ts | <gh_stars>1-10
import { MockServiceOperations, IMockServiceOperationResponseFunction } from './MockServiceOperations';
import { IServiceResponse } from '../ServiceProxy';
export interface IServiceResponseFunctionBaseArgs {
urlParameters?: string;
requestBody?: any;
globalServiceParameters?: any;
}
export ... |
RS022741/io-source | src/key-value-storage/MockKeyValueStorageProxy.ts | import {IKeyValueStorageProxy} from './KeyValueStorageProxy';
export class MockKeyValueStorageProxy implements IKeyValueStorageProxy {
private data: {[key: string]: any} = {};
public getKeys(): Promise<string[]> {
return Promise.resolve(Object.keys(this.data));
}
public getItem<T>(name: stri... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/app.module.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule } from '@angular/router';
import { HttpModule } from '@angular/http';
import { APP_BASE_HREF } from '@an... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/request-service/request-service.component.ts | import { Component, OnInit } from '@angular/core';
import { DatePipe } from '@angular/common';
import { NgForm } from '@angular/forms';
import { ServicesService } from '../services.service';
import { BusinessService } from '../business.service';
import { FamilyService } from '../family.service';
import { Router, Activa... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/edit-services/edit-services.component.ts | import { Component, OnInit } from '@angular/core';
import { NgForm } from '@angular/forms';
import { ServicesService } from '../services.service';
import { Router, ActivatedRoute } from '@angular/router';
import {Md5} from 'ts-md5/dist/md5';
import Swal from 'sweetalert2';
import { ServiceModel } from 'app/service.mode... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/contact.pipe.spec.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject
import { ContactPipe } from './contact.pipe';
describe('ContactPipe', () => {
it('create an instance', () => {
const pipe = new ContactPipe();
expect(pipe).toBeTruthy();
});
});
|
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/list-volunteers/list-volunteers.component.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject
import { Component, OnInit } from '@angular/core';
import { UsersService } from '../users.service';
import { UserModel } from '../user.model';
import { Router } from '@angular/router';
declare var $: any;
declare interface DataTable {
headerRow... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/new-category/new-category.component.ts | import { Component, OnInit } from '@angular/core';
import { NgForm } from '@angular/forms';
import { BusinessService } from 'app/business.service';
import Swal from 'sweetalert2';
import { Router, ActivatedRoute, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET } from '@angular/router';
@Component({
selector: 'a... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/note.model.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject<filename>src/app/note.model.ts
export interface NoteModel {
id: number;
familyId: number;
createdBy: string;
createdDate: string;
contents: string;
}
|
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/yesnoapproved.pipe.spec.ts | import { YesNoApprovedPipe } from './yesnoapproved.pipe';
describe('YesNoApprovedPipe', () => {
it('create an instance', () => {
const pipe = new YesNoApprovedPipe();
expect(pipe).toBeTruthy();
});
});
|
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/auth.service.ts | import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClient } from '../../node_modules/@angular/common/http';
import { Http, ResponseContentType } from '@angular/http';
import { map } from 'rxjs/operators';
import {environment} from... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/pages/lock/lock.component.ts | <filename>src/app/pages/lock/lock.component.ts
import { Component, OnInit, ElementRef } from '@angular/core';
import { Router, ActivatedRoute, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET } from '@angular/router';
import { Location, LocationStrategy, PathLocationStrategy } from '@angular/common';
import {EmailS... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/active-services/active-services.component.ts | import { Component, OnInit } from '@angular/core';
import { ServicesService } from '../services.service';
import { ServiceModel } from '../service.model';
import { Router, ActivatedRoute } from '@angular/router';
import Swal from 'sweetalert2';
declare var $: any;
declare interface DataTable {
headerRow: string[];
... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/family.service.ts | <filename>src/app/family.service.ts
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Http, ResponseContentType } from '@angular/http';
import { map } from 'rxjs/operators';
import {... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/business-signup/business-signup.component.ts | import { BusinessService } from '../business.service';
import { Router, ActivatedRoute, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET } from '@angular/router';
import Swal from 'sweetalert2';
import { BusinessModel } from '../business.model';
import { rejects } from 'assert';
import { environment } from 'environ... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/yesno.pipe.spec.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject<filename>src/app/yesno.pipe.spec.ts
import { YesNoPipe } from './yesno.pipe';
describe('YesNoPipe', () => {
it('create an instance', () => {
const pipe = new YesNoPipe();
expect(pipe).toBeTruthy();
});
});
|
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/family.model.ts | export interface FamilyModel {
id: number;
first_name: string;
last_name: string;
email: string;
end_of_treatment_date: string;
street_address: string;
active: boolean;
welcomeLetter : boolean;
treamentLetter : boolean;
subscriberList : boolean;
facebookGroup : boolean;
}
|
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/request-service-login/request-service-login.component.ts | <filename>src/app/request-service-login/request-service-login.component.ts
import { Component, OnInit } from '@angular/core';
import { DatePipe } from '@angular/common';
import { NgForm } from '@angular/forms';
import { ServicesService } from '../services.service';
import { BusinessService } from '../business.service';... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/business-category/business-category.component.ts | import { Component, OnInit } from '@angular/core';
import { BusinessService } from 'app/business.service';
declare var $: any;
declare interface DataTable {
headerRow: string[];
footerRow: string[];
dataRows: [];
}
@Component({
selector: 'app-business-category',
templateUrl: './business-category.component.ht... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/active-family/active-family.component.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject
import { Component, OnInit } from '@angular/core';
import { FamilyService } from '../family.service';
import { FamilyModel } from '../family.model';
import { Router, ActivatedRoute } from '@angular/router';
import Swal from 'sweetalert2';
declare ... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/family_response.model.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject
import { FamilyModel } from "./family.model";
export interface FamilyAPIResponse {
status: number;
results: FamilyModel[];
resultsLength: number;
} |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/business.service.ts | import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Http, ResponseContentType } from '@angular/http';
import { map } from 'rxjs/operators';
import {environment} from '../environments/e... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/new-volunteer/new-volunteer.component.ts | import { Component, OnInit } from '@angular/core';
import { NgForm } from '@angular/forms';
import { UsersService } from '../users.service';
import { Router, ActivatedRoute, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET } from '@angular/router';
import {Md5} from 'ts-md5/dist/md5';
import Swal from 'sweetalert2'... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/notes.service.ts | import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Http, ResponseContentType } from '@angular/http';
import {environment} from '../environments/environment';
import { NoteAPIResponse ... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/pages/login/login.component.ts | import { Component, OnInit, ElementRef } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { Location, LocationStrategy, PathLocationStrategy } from '@angular/common';
import { UserModel } from '../../user.model';
import { UserAPIResponse } from '../../response.model';
import {AuthS... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/new-business/new-business.component.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject<gh_stars>0
import { Component, OnInit } from '@angular/core';
import { NgForm } from '@angular/forms';
import { BusinessService } from '../business.service';
import { Router, ActivatedRoute, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET, Nav... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/contact.pipe.ts | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'contact'
})
export class ContactPipe implements PipeTransform {
transform(value: any, ...args: any[]): any {
if(typeof value === 'undefined' || value === null) {
return "Not Stated";
}
else if(value == 'phone') {
return "P... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/business_response.model.ts | export interface BusinessAPIResponse {
status: number;
results: any[];
resultsLength: number;
} |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/yesnoactive.pipe.spec.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject
import { YesNoActivePipe } from './yesno.pipe';
describe('YesNoActivePipe', () => {
it('create an instance', () => {
const pipe = new YesNoActivePipe();
expect(pipe).toBeTruthy();
});
});
|
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/users.service.ts | <filename>src/app/users.service.ts<gh_stars>0
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClient } from '../../node_modules/@angular/common/http';
import { Http, ResponseContentType } from '@angular/http';
import { map } fr... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/business.model.ts | export interface BusinessModel {
id: number;
businessName: string;
email: string;
pContactFName: string;
pContactLName: string;
pContactPNum: string;
sContactFName: string;
sContactLname: string;
sContactPNum: string;
address: string;
category: string;
serviceArea: string... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/active-services/active-services.component.spec.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject<filename>src/app/active-services/active-services.component.spec.ts
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ActiveServicesComponent } from './active-services.component';
describe('ActiveServicesComponent'... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/userpage/user.component.ts | import { environment } from 'environments/environment';
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { UserModel } from 'app/user.model';
import { UsersService } from 'app/users.service';
import { A... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/list-family/list-family.component.spec.ts | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ListFamilyComponent } from './list-family.component';
describe('ListFamilyComponent', () => {
let component: ListFamilyComponent;
let fixture: ComponentFixture<ListFamilyComponent>;
beforeEach(async(() => {
TestBed.configure... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/email.service.ts | <reponame>ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClient } from '../../node_modules/@angular/common/http';
import { Http, ResponseContentType } from '@angula... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/services.service.ts | <gh_stars>0
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { NgModule } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Http, ResponseContentType } from '@angular/http';
import { map } from 'rxjs/operators';
import {environment} from '../en... |
ASRangel2012/VforVictory_Angular_Frontend_SeniorDesignProject | src/app/response.model.ts | import { UserModel } from "./user.model";
import { ServiceModel } from "./service.model";
import { BusinessModel } from "./business.model";
import { FamilyModel } from "./family.model";
import { NoteModel } from "./note.model"
export interface FamilyAPIResponse {
status: number;
results: FamilyModel[];
resultsLe... |
angelxehg/angelxehg.github.io | src/meta/data/platforms.ts | <reponame>angelxehg/angelxehg.github.io<filename>src/meta/data/platforms.ts
import { LinkMeta } from "../types"
const platforms: LinkMeta[] = [
{
name: "Android",
icon: {
style: { color: "#3DD985" },
svgPath: "fontawesome/android-brands.svg",
},
href: "https://www.android.com/intl/es_es/"... |
angelxehg/angelxehg.github.io | src/components/SEO.tsx | <reponame>angelxehg/angelxehg.github.io
import React from "react"
import PropTypes from "prop-types"
import { Helmet } from "react-helmet"
import { useSiteMetadata } from "../hooks/use-site-metadata"
import { useTheme } from "./Theme"
interface SEOProps {
description: any
lang: any
meta: any
title: any
imag... |
angelxehg/angelxehg.github.io | src/pages/posts.tsx | import React, { useEffect, useState } from "react"
import { Link } from "gatsby"
import Layout from "../layouts/Layout"
import DefaultFooter from "../components/Footer"
import SEO from "../components/SEO"
import { CreateBadge, CreateLink } from "../components/Link"
import DefaultNavbar from "../components/Navbar"
int... |
angelxehg/angelxehg.github.io | src/layouts/Center.tsx | <reponame>angelxehg/angelxehg.github.io
import React from "react"
import { ThemeContextProvider } from "../components/Theme"
import "./Center.scss"
interface CenterLayoutProps {
children: React.ReactNode | React.ReactNode[]
}
const CenterLayout = (props: CenterLayoutProps): JSX.Element => (
<ThemeContextProvider... |
angelxehg/angelxehg.github.io | src/components/Navbar.tsx | import React, { useState } from "react"
import { Link } from "gatsby"
import { useTheme } from "./Theme"
const SunSVG = require("../assets/bootstrap-icons/sun.svg")
const MoonSVG = require("../assets/bootstrap-icons/moon.svg")
const ListSVG = require("../assets/bootstrap-icons/list.svg")
const DefaultNavbar = (): JSX... |
angelxehg/angelxehg.github.io | src/components/Link.tsx | <reponame>angelxehg/angelxehg.github.io<filename>src/components/Link.tsx<gh_stars>0
import React from "react"
import { Link as GatsbyLink } from "gatsby"
import Icon, { IconProps } from "./Icon"
import { getLinkMeta } from "../meta/links"
import { LinkMeta } from "../meta/types"
const ClickableIcon = (props: { meta: ... |
angelxehg/angelxehg.github.io | src/components/Footer.tsx | <reponame>angelxehg/angelxehg.github.io
import React from "react"
import { CreateLink } from "./Link"
const repoVer = {
title: "v2.0.3",
href: "https://github.com/angelxehg/angelxehg.github.io/tree/v2.0.3",
}
const issueLink = {
title: "Issues",
href: "https://github.com/angelxehg/angelxehg.github.io/issues"... |
angelxehg/angelxehg.github.io | src/hooks/use-pages.tsx | <filename>src/hooks/use-pages.tsx
import { graphql, useStaticQuery } from "gatsby"
import { IGatsbyImageData } from "gatsby-plugin-image"
export interface RAWPage {
id: string
slug: string
excerpt: string
frontmatter: {
title: string
date: string
image: { childImageSharp: { gatsbyImageData: IGatsby... |
angelxehg/angelxehg.github.io | src/meta/stacks.ts | interface Stack {
title: string
tools: string[]
}
const stacks: Stack[] = [
{
title: "Mis herramientas favoritas:",
tools: [
"React",
"Firebase",
"GatsbyJS",
"Ubuntu",
"VSCode",
"Netlify",
"GitHub",
],
},
{
title: "Estoy aprendiendo:",
tools: ["Da... |
angelxehg/angelxehg.github.io | src/pages/404.tsx | <gh_stars>0
import React from "react"
import { Link } from "gatsby"
import CenterLayout from "../layouts/Center"
import SEO from "../components/SEO"
const ConcernedSVG = require("../assets/concerned.svg")
const NotFoundPage = (): JSX.Element => (
<CenterLayout>
<SEO title="404: Not found" lang="es" />
<mai... |
angelxehg/angelxehg.github.io | src/templates/page.tsx | <gh_stars>0
import React from "react"
import { graphql, Link } from "gatsby"
import { MDXRenderer } from "gatsby-plugin-mdx"
import { GatsbyImage, IGatsbyImageData } from "gatsby-plugin-image"
import Footer from "../components/Footer"
import SEO from "../components/SEO"
import Layout from "../layouts/Layout"
import De... |
angelxehg/angelxehg.github.io | src/meta/data/websites.ts | import { LinkMeta } from "../types"
const websites: LinkMeta[] = [
{
name: "Instagram",
icon: {
svgPath: "bootstrap-icons/instagram.svg",
},
href: "https://instagram.com/",
},
{
name: "LinkedIn",
icon: {
svgPath: "bootstrap-icons/linkedin.svg",
},
href: "https://www.li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.