repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
paulosouzav/memory-game-react
src/constants/shadows.tsx
import { css } from 'styled-components'; import { TRANSPARENT_BLACK } from './colors'; export const SHADOWS = Object.freeze({ none: css` box-shadow: none; `, soft: css` box-shadow: 0 0 8px ${TRANSPARENT_BLACK.soft}; `, normal: css` box-shadow: 0 0 8px ${TRANSPARENT_BLACK.normal}; `, hard: css...
paulosouzav/memory-game-react
src/constants/screen.tsx
interface Indexable { [key: string]: number; } export const MAX_WIDTHS: Indexable = Object.freeze({ sm: 540, md: 720, lg: 960, xl: 1140, }); export const BREAKPOINTS: Indexable = Object.freeze({ sm: 576, md: 758, lg: 992, xl: 1200, });
paulosouzav/memory-game-react
src/containers/MemoryGame/__tests__/Board.test.tsx
<reponame>paulosouzav/memory-game-react import React from 'react'; import Board from '../Board'; import { mount } from 'enzyme'; import 'jest-styled-components'; describe('Board', () => { it('should render without failing', () => { const wrapper = mount(<Board />); expect(wrapper).toMatchSnapshot(); }); ...
paulosouzav/memory-game-react
src/components/Image/index.tsx
<reponame>paulosouzav/memory-game-react<gh_stars>0 import React from 'react'; export interface IImage { className?: string; src: string; alt: string; } export const Image = (props: IImage) => <img {...props} />;
paulosouzav/memory-game-react
src/components/Card/__tests__/index.test.tsx
import React from 'react'; import { mount } from 'enzyme'; import 'jest-styled-components'; import { Card } from '../'; import { DEFAULT_CARD_IMAGE } from '../../../constants/cards'; import Asteroid from '../../../assets/cards/002-asteroid.png'; const CARD_MOCK = { id: 'asteroid', image: { src: Asteroid, a...
paulosouzav/memory-game-react
src/components/Card/__tests__/BaseCard.test.tsx
<filename>src/components/Card/__tests__/BaseCard.test.tsx<gh_stars>0 import React from 'react'; import { mount } from 'enzyme'; import 'jest-styled-components'; import BaseCard from '../BaseCard'; describe('BaseCard', () => { it('should render without failing', () => { const wrapper = mount(<BaseCard />); ex...
paulosouzav/memory-game-react
src/components/Container/__tests__/index.test.tsx
import React from 'react'; import { mount } from 'enzyme'; import 'jest-styled-components'; import Container from '../'; import { SIZES } from '../../../constants/sizes'; describe('BaseCard', () => { it('should render without failing', () => { const wrapper = mount(<Container />); expect(wrapper).toMatchSnap...
paulosouzav/memory-game-react
src/constants/fonts.tsx
import { css } from 'styled-components'; import Roboto from '../assets/fonts/Roboto-Regular.ttf'; import RobotoThin from '../assets/fonts/Roboto-Thin.ttf'; import RobotoLight from '../assets/fonts/Roboto-Light.ttf'; import RobotoBold from '../assets/fonts/Roboto-Bold.ttf'; export const FONTS = Object.freeze({ REGULA...
paulosouzav/memory-game-react
src/components/EndGame/__tests__/index.test.tsx
import React from 'react'; import { mount } from 'enzyme'; import 'jest-styled-components'; import { EndGame } from '../'; describe('EndGame', () => { it('should render without failing', () => { const wrapper = mount(<EndGame />); expect(wrapper).toMatchSnapshot(); }); it('should render active EndGame',...
paulosouzav/memory-game-react
src/components/Card/Face.tsx
import React from 'react'; import styled, { css } from 'styled-components'; import { Image } from '../Image'; import { ROTATION } from '../../constants/rotation'; interface Props { front?: boolean; matched?: boolean; } const Face = styled(({ front, matched, ...props }) => <Image {...props} />)` width: 100%; h...
paulosouzav/memory-game-react
src/containers/MemoryGame/__tests__/utils.test.tsx
<filename>src/containers/MemoryGame/__tests__/utils.test.tsx import { CARDS } from '../../../constants/cards'; import * as UTILS from '../utils'; import { ICard } from '../../../components/Card'; import { delay } from 'q'; describe('Memory Game Utils', () => { describe('generateBoardCards', () => { it('should du...
paulosouzav/memory-game-react
src/views/Game/index.tsx
<filename>src/views/Game/index.tsx import React from 'react'; import styled from 'styled-components'; import { MemoryGame } from '../../containers/MemoryGame'; import { COLORS } from '../../constants/colors'; const PageWrapper = styled.main` height: 100vh; display: flex; background-color: ${COLORS.gray800}; `; ...
fabriciored/page-generator
src/index.ts
<filename>src/index.ts import express, { Application, Request, Response } from 'express' import stream from 'stream' import { generateHtmlString } from './services/page/generateHtmlString' const app: Application = express() const port = process.env.PORT || 3000 const router = express.Router() let html: string app.us...
fabriciored/page-generator
src/services/page/pageProps.ts
<reponame>fabriciored/page-generator export interface pageProperties { navbar: { height: string, backgroundColor: string hasLogo: boolean, logoUrl: string, logoWidth: string, logoHeight: string, hasHeading: boolean, headingText: string, hasCtaB...
fabriciored/page-generator
src/services/page/generateHtmlString.test.ts
import { generateHtmlString } from './generateHtmlString' import { pageProperties } from './pageProps' const props: pageProperties = { navbar: { height: '10', backgroundColor: '', hasLogo: true, logoUrl: '', logoWidth: '10', logoHeight: '10', hasHeading: true, headingText: '', has...
neet/i18next-cli-language-detector
src/i18next-cli-language-detector.ts
<gh_stars>1-10 import { Services, InitOptions } from 'i18next'; export class I18nextCLILanguageDetector { static type = 'languageDetector' as const; private services!: Services; private detectorOptions!: {}; private i18nextOptions!: InitOptions; init(services: Services, detectorOptions: {}, i18nextOptions:...
neet/i18next-cli-language-detector
examples/greeting.ts
<reponame>neet/i18next-cli-language-detector<filename>examples/greeting.ts /* eslint-disable */ import i18next from 'i18next'; import I18nextCLILanguageDetector from 'i18next-cli-language-detector'; i18next.use(I18nextCLILanguageDetector).init({ resources: { ja: { translations: { greeting: '🇯🇵こんにちは' } }, e...
neet/i18next-cli-language-detector
src/index.ts
export { I18nextCLILanguageDetector as default } from './i18next-cli-language-detector';
neet/i18next-cli-language-detector
src/__tests__/i18next-cli-language-detector.spec.ts
import { Services } from 'i18next'; import { I18nextCLILanguageDetector } from '../i18next-cli-language-detector'; const mockServices = { languageUtils: { formatLanguageCode: jest.fn((lng: string) => { return lng; }), isWhitelisted: jest.fn((_lng: string) => { return true; }), }, } as S...
prashantsparx/angular-employee
src/app/services/authGuard.service.ts
import { Injectable } from '@angular/core'; import { Http, Response, Headers } from '@angular/http'; import 'rxjs/add/operator/map'; import {Observable} from 'rxjs/Rx'; import { Router, CanActivate } from '@angular/router'; import { environment } from '../environment/environment'; @Injectable() export class authGuard...
prashantsparx/angular-employee
src/app/login/services/authentication.service.ts
<gh_stars>0 import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import 'rxjs/add/operator/map'; import { Cred } from '../../models/Cred'; import { environment } from '../../environment/environment'; @Injectable() export class authenticateService{ constructor(private http: Ht...
prashantsparx/angular-employee
src/app/app.component.ts
<filename>src/app/app.component.ts import { Component, OnInit } from '@angular/core'; import {Router} from '@angular/router'; import {loginComponent} from './login/login.component'; @Component({ selector: 'my-admin', templateUrl: "app/app.component.html", styleUrls: ["app/app.component.css"], }) export class App...
prashantsparx/angular-employee
src/app/services/auth.service.ts
<filename>src/app/services/auth.service.ts import { Injectable } from '@angular/core'; import { Http, Response, Headers } from '@angular/http'; import 'rxjs/add/operator/map'; import { Router, ActivatedRoute } from '@angular/router'; import { environment } from '../environment/environment'; @Injectable() export class...
prashantsparx/angular-employee
node_modules/@auth0/angular-jwt/index.d.ts
<reponame>prashantsparx/angular-employee import { ModuleWithProviders } from '@angular/core'; export * from './src/jwt.interceptor'; export * from './src/jwthelper.service'; export interface JwtModuleOptions { config: { tokenGetter: () => string; headerName?: string; tokenName?: string; ...
prashantsparx/angular-employee
src/app/signup/services/signup.service.ts
import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import 'rxjs/add/operator/map'; import { environment } from '../../environment/environment'; import { User } from '../../models/User'; @Injectable() export class signupService{ constructor(private http: Http) { } creat...
prashantsparx/angular-employee
src/app/services/eventEmitter.service.ts
<filename>src/app/services/eventEmitter.service.ts import {Injectable, EventEmitter, Output} from '@angular/core'; @Injectable() export class EventEmiterService { @Output() loginChange = new EventEmitter(); loggedIn: boolean = false; constructor() { } checkLogin(data: boolean) { this.loginChange.emit...
prashantsparx/angular-employee
src/app/signup/signup.component.ts
<filename>src/app/signup/signup.component.ts import {Component} from '@angular/core'; import {signupService} from '../signup/services/signup.service'; import { User } from '../models/User'; import {Router} from '@angular/router'; @Component({ templateUrl: "app/signup/signup.component.html", styleUrls: ["app/signup...
prashantsparx/angular-employee
src/app/environment/environment.ts
<reponame>prashantsparx/angular-employee export const environment = { "serverPath":"http://localhost:8000" };
prashantsparx/angular-employee
node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts
<filename>node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts import { CompileDirectiveMetadata, CompilePipeSummary } from '../compile_metadata'; import { CompileReflector } from '../compile_reflector'; import { CompilerConfig } from '../config'; import * as o from '../output/output_ast'; import { Eleme...
prashantsparx/angular-employee
src/app/app.module.ts
<reponame>prashantsparx/angular-employee<gh_stars>0 import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { Routes, RouterModule, CanActivate } from '@angular/router'; import { HttpModule } from '@angular/http'; import { FormsModule } from '@angular/forms'; imp...
prashantsparx/angular-employee
node_modules/@auth0/angular-jwt/src/jwt.interceptor.d.ts
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; import { Observable } from 'rxjs/Observable'; import { JwtHelperService } from './jwthelper.service'; export declare class JwtInterceptor implements HttpInterceptor { jwtHelper: JwtHelperService; tokenGetter: () => stri...
prashantsparx/angular-employee
src/app/others/notFound.component.ts
import {Component} from '@angular/core'; @Component({ template: "The requested URL not found.", }) export class notFoundComponent { }
prashantsparx/angular-employee
src/app/dashboard/index/services/index.service.ts
import { Injectable } from '@angular/core'; import { Http, Response, Headers } from '@angular/http'; import 'rxjs/add/operator/map'; import { Router, ActivatedRoute } from '@angular/router'; @Injectable() export class indexService{ token: string; constructor(private http: Http, private _router: Router) { ...
prashantsparx/angular-employee
src/app/login/login.component.ts
import {Component, Input, Output, EventEmitter} from '@angular/core'; import {authenticateService} from '../login/services/authentication.service'; import { Cred } from '../models/Cred'; import {Router} from '@angular/router'; @Component({ selector: "login", templateUrl: "app/login/login.component.html", styleUr...
prashantsparx/angular-employee
node_modules/@auth0/angular-jwt/src/jwthelper.service.d.ts
export declare class JwtHelperService { tokenGetter: () => string; constructor(config: any); urlBase64Decode(str: string): string; private b64decode(str); private b64DecodeUnicode(str); decodeToken(token?: string): any; getTokenExpirationDate(token?: string): Date; isTokenExpired(token?:...
prashantsparx/angular-employee
src/app/login/forgot/forgot.component.ts
import {Component} from '@angular/core'; @Component({ templateUrl: "app/login/forgot/forgot.component.html", styleUrls: ["app/login/forgot/forgot.component.css"], }) export class forgotComponent { }
prashantsparx/angular-employee
src/app/dashboard/index/index.component.ts
<filename>src/app/dashboard/index/index.component.ts import {Component} from '@angular/core'; import { indexService } from '../index/services/index.service'; import {Router} from '@angular/router'; @Component({ templateUrl: "app/dashboard/index/index.component.html", styleUrls: ["app/dashboard/index/index.componen...
asharpaev/iptv-playlist-parser
src/index.d.ts
declare module 'iptv-playlist-parser' export interface PlaylistHeader { attrs: { 'x-tvg-url': string } raw: string } export interface PlaylistItemTvg { id: string name: string language: string country: string url: string logo: string rec: string } export interface PlaylistI...
hchimachi/sites
wordpress/wp-content/plugins/pdf-builder-for-wpforms/js/lib/velocityAsync/velocityAsync.ts
<reponame>hchimachi/sites<filename>wordpress/wp-content/plugins/pdf-builder-for-wpforms/js/lib/velocityAsync/velocityAsync.ts<gh_stars>0 (jQuery.fn as any).velocityAsync=function(property:any, duration,easing:'easeInExp'|'easeOutExp'|'linear'){ let $element=this; return new Promise((resolve => { $ele...
Marcono1234/known-sites-extension
typescript-src/background-scripts/background.ts
<reponame>Marcono1234/known-sites-extension import * as psl from 'psl' import * as LRUCache from 'lru-cache' // Use trailing slash to avoid import Node module import * as punycode from 'punycode/' const IS_FIREFOX: Promise<boolean> = ( browser.runtime.getBrowserInfo === undefined ? Promise.resolve(false) : b...
MrVichr/vuex-typescript-decorator
vuex-typescript-decorator.ts
<gh_stars>1-10 import * as Vuex from "vuex"; const $vuexts=Symbol("$vuexts"); class PropertyInfo { propertyKey: string; descriptor: PropertyDescriptor; public constructor(propertyKey: string, descriptor: PropertyDescriptor) { this.propertyKey=propertyKey; this.descriptor=descriptor; } } class G...
yoshikazzz/ethproxy
src/server.ts
<gh_stars>0 import errorHandler from 'errorhandler'; import https from 'https'; import http from 'http'; import fs from 'fs'; import app from './app'; /** * Error Handler. Provides full stack - remove for production */ app.use(errorHandler()); /** * Start Express server. */ /* const options = { key: fs.readFil...
yoshikazzz/ethproxy
src/utils/queue.ts
import kue from 'kue'; import * as shell from 'shelljs'; const queue = kue.createQueue(); const sendEmail = (data: any, done: any) => { console.log(data); done(); }; queue.process('email', function (job, done) { sendEmail(job.data, done); }); queue.process('convertme', function (job, done) { const { file, b...
yoshikazzz/ethproxy
src/routes/api-route.ts
import express, { NextFunction } from 'express'; const router = express.Router(); import { check, validationResult } from 'express-validator/check'; /** * Controllers (route handlers). */ import * as ethController from '../controllers/api/eth'; // eth router router.get('/api/eth/create-account', ethController.cre...
yoshikazzz/ethproxy
src/utils/mail.ts
<reponame>yoshikazzz/ethproxy import mailgun from 'mailgun-js'; const api_key = 'key-90e346b922fa8ded8b350a7b90e40d17'; const domain = 'smerp.io'; const mail = mailgun({ apiKey: api_key, domain: domain }); export const sendMail = (to: string, subject: string, text: string) => { const data = { from: 'VM ...
yoshikazzz/ethproxy
src/app.ts
import dotenv from 'dotenv'; // Load environment variables from .env file, where API keys and passwords are configured dotenv.config({ path: '.env' }); import express from 'express'; import { Response, Request, NextFunction } from 'express'; // const RedisStore = connectRedis(session); import compression from 'compres...
yoshikazzz/ethproxy
src/scripts/enc.ts
<reponame>yoshikazzz/ethproxy import * as aesjs from '../utils/aesjs'; if (process.argv[2]) { const str = process.argv[2]; const strDec = aesjs.encryptPK(str); console.log(strDec + ' --> output encrypted string'); } else { console.log('Missing string argv to encrypt'); }
yoshikazzz/ethproxy
src/utils/aesjs.ts
const aesjs = require('aes-js'); const key = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ]; export let encryptPK = (PK: string) => { const text = PK; const textBytes = aesjs.utils.utf8.toBytes(text); // The counter is optional, and if omitted will begin at 1 const aesCtr = new aesjs.ModeOfOperati...
yoshikazzz/ethproxy
src/utils/hexString.ts
<reponame>yoshikazzz/ethproxy export let hexStringFull = (hexStr: string) => { return hexStr.indexOf('0x') === 0 ? hexStr : `0x${hexStr}`; }; export let hexStringSort = (hexStr: string) => { return hexStr.indexOf('0x') === 0 ? hexStr.substr(2) : hexStr; };
yoshikazzz/ethproxy
src/controllers/api/eth.ts
<reponame>yoshikazzz/ethproxy import { Response, Request, NextFunction } from 'express'; import Web3 from 'web3'; import rp from 'request-promise'; import * as aesjs from '../../utils/aesjs'; import * as hex from '../../utils/hexString'; const providerList = { main: { provider: new Web3('https://mainnet.infura....
joelday/ts-proptypes-transformer
src/Transformer.ts
import * as ts from 'typescript'; import { PropTypesEmitter } from './PropTypesEmitter'; // TODO: See if ts has already normalized file paths. export interface ITransformOptions { requireGeneratorComment?: boolean; } const generatorComment = 'ts-proptypes-transformer:generate'; const generatedImportAliasName = ...
lonord/pi-dav
src/index.ts
<gh_stars>0 #!/usr/bin/env node import { copyFileSync, existsSync } from 'fs' import { createServer } from 'http' import * as jsDAV_Locks_Backend_FS from 'jsDAV/lib/DAV/plugins/locks/fs' import * as jsDAV from 'jsDAV/lib/jsdav' import * as mkdirp from 'mkdirp' import * as os from 'os' import { join } from 'path' impor...
Kauanphbbb/SendEmail
src/controller/SendMailController.ts
import { Request, Response } from "express"; import { getCustomRepository } from "typeorm"; import { SurveyRepository } from "../repositories/SurveyRepository"; import { SurveysUsersRepository } from "../repositories/SurveysUsersRepository"; import { UsersRepository } from "../repositories/UsersRepository"; import...
ShengzhenFu/lambda-container-cdk
src/main.ts
<filename>src/main.ts<gh_stars>0 import { App, Construct, Stack, StackProps, Tags } from '@aws-cdk/core'; import * as lambda from "@aws-cdk/aws-lambda"; import { LambdaRestApi } from "@aws-cdk/aws-apigateway"; import * as path from 'path'; export class MyStack extends Stack { constructor(scope: Construct, id: strin...
ShengzhenFu/lambda-container-cdk
src/lambda/app.ts
<gh_stars>0 exports.lambdaHandler=async (event: any)=>{ console.log("starting lambda container"); const lambda_event=JSON.stringify(event, null, 2); console.log("lambda event: "+lambda_event); const bodys= { "hello": "lambda", "world": "container" }; const post_response = { ...
jregistr/Electron-App
src/components/timer-controls.tsx
import React = require('react'); import {MouseEventHandler} from "react"; interface TimerControlsProps { start:MouseEventHandler<HTMLButtonElement>, stop:MouseEventHandler<HTMLButtonElement>, timerOn:boolean } export class TimeControls extends React.Component<TimerControlsProps, {}> { render(): JSX.E...
jregistr/Electron-App
src/renderer.tsx
import ReactDOM = require('react-dom'); import { TimerApp } from './components/timer-app'; import * as React from "react"; require('css-modules-require-hook')({ processCss : css => { const style = document.createElement('style'); style.innerHTML = css; document.head.appendChild(style); } })...
jregistr/Electron-App
src/components/timer-app.tsx
import React = require('react'); import { TimerClock } from './timer-clock'; import { TimeControls } from './timer-controls'; interface TimeAppState { startTime:number, stopTime:number, timerInterval:number } export class TimerApp extends React.Component<{}, TimeAppState> { constructor(props) { ...
jregistr/Electron-App
src/components/timer-clock.tsx
<reponame>jregistr/Electron-App import React = require('react'); import {utc} from 'moment'; interface TimerClockProps { current:number; } export class TimerClock extends React.Component<TimerClockProps, {}> { render(): JSX.Element | any { return <div className="row"> <div className="col-...
kalyani75/simple-toolchain-cf-bot
src/main/webapp/ts/trans.docs.ts
/** * (C) Copyright IBM Corp. 2016. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
kalyani75/simple-toolchain-cf-bot
src/main/webapp/ts/dialog.response.ts
<reponame>kalyani75/simple-toolchain-cf-bot<gh_stars>0 /** * (C) Copyright IBM Corp. 2016. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/l...
kalyani75/simple-toolchain-cf-bot
src/main/webapp/ts/Org.dialog.response.ts
/** * (C) Copyright IBM Corp. 2016. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
YapheeetS/SMS_ionic
SMS/src/app/services/home-service.service.ts
import { Injectable } from '@angular/core'; import { AngularFirestore } from '@angular/fire/firestore'; import { HomeService } from '../interfaces/home-service' import { map } from 'rxjs/operators' @Injectable({ providedIn: 'root' }) export class HomeServiceService { private homeServiceCollection = this.afs.collec...
YapheeetS/SMS_ionic
SMS/src/app/pages/me/me.page.ts
<reponame>YapheeetS/SMS_ionic import { Component, OnInit } from '@angular/core'; import { AngularFirestore, AngularFirestoreDocument } from '@angular/fire/firestore'; import { UserService } from '../../services/user.service' import { AngularFireAuth } from '@angular/fire/auth'; @Component({ selector: 'app-me', tem...
YapheeetS/SMS_ionic
SMS/src/app/services/user.service.ts
import { Injectable } from '@angular/core'; import { AngularFireAuth } from '@angular/fire/auth'; import { AngularFirestore } from '@angular/fire/firestore'; import { auth } from 'firebase/app' import { User } from '../interfaces/user' import { map } from 'rxjs/operators' @Injectable({ providedIn: 'root' }) export c...
YapheeetS/SMS_ionic
SMS/src/app/pages/vendor-location/vendor-location.page.ts
<reponame>YapheeetS/SMS_ionic import { Component, OnInit, ViewChild, NgZone } from '@angular/core'; import { ToastController, Platform, LoadingController, NavController } from '@ionic/angular'; import { GoogleMap, GoogleMaps, GoogleMapsEvent, Marker, GoogleMapsAnimation, MyLocation, Environment, GoogleMapOptions, Geoco...
YapheeetS/SMS_ionic
SMS/src/app/pages/service-detail/service-detail.page.ts
<gh_stars>0 import { Component, OnInit } from '@angular/core'; // import { ProductService } from 'src/app/services/product.service'; import { ActivatedRoute } from '@angular/router'; import { HomeService } from 'src/app/interfaces/home-service'; import { NavController, LoadingController, ToastController } from '@ionic/...
YapheeetS/SMS_ionic
SMS/src/app/pages/profile/profile.page.ts
import { Component, OnInit, ViewChild } from '@angular/core'; import { AngularFirestore, AngularFirestoreDocument } from '@angular/fire/firestore'; import { UserService } from 'src/app/services/user.service'; import { Http } from '@angular/http'; import { AlertController } from '@ionic/angular'; import { Router } from...
YapheeetS/SMS_ionic
SMS/src/app/pages/review/review.page.ts
import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-review', templateUrl: './review.page.html', styleUrls: ['./review.page.scss'], }) export class ReviewPage implements OnInit { constructor() { } ngOnInit() { } logRatingChange(rating){ console.log("changed rating: ",rati...
YapheeetS/SMS_ionic
SMS/src/app/pages/feed/feed.page.ts
<reponame>YapheeetS/SMS_ionic import { Component, OnInit, ViewChild } from '@angular/core'; import { ToastController } from '@ionic/angular'; import { Router } from '@angular/router'; import { AngularFirestore } from '@angular/fire/firestore'; import { UserService } from 'src/app/services/user.service'; import { HomeSe...
YapheeetS/SMS_ionic
SMS/src/app/interfaces/home-service.ts
export interface HomeService { id?: string name?: string description?: string price?: string picture?: string createdAt?: number vendorId?: string category?: string position?: string available?: boolean }
YapheeetS/SMS_ionic
SMS/src/app/customAlertEnter.ts
// import { Animation } from '@ionic/core' // export function customAlertEnter(AnimationC: Animation, baseEl: HTMLElement): Promise<Animation> { // const baseAnimation = new AnimationC(); // const backdropAnimation = new AnimationC(); // backdropAnimation.addElement(baseEl.querySelector('ion-backdrop...
YapheeetS/SMS_ionic
SMS/src/app/pages/service-lists/service-lists.page.ts
<filename>SMS/src/app/pages/service-lists/service-lists.page.ts import { Component, OnInit, ElementRef, Renderer2, ViewChild, NgZone, DoBootstrap } from '@angular/core'; import { ToastController, Platform, LoadingController, NavController } from '@ionic/angular'; import { GoogleMap, GoogleMaps, GoogleMapsEvent, Marker,...
YapheeetS/SMS_ionic
SMS/src/app/pages/history/history.page.ts
import { Component, OnInit } from '@angular/core'; import { UserService } from 'src/app/services/user.service'; import { LoadingController, ToastController } from '@ionic/angular'; import { Subscription } from 'rxjs'; @Component({ selector: 'app-history', templateUrl: './history.page.html', styleUrls: ['./histor...
YapheeetS/SMS_ionic
SMS/src/app/app.module.ts
<reponame>YapheeetS/SMS_ionic<filename>SMS/src/app/app.module.ts<gh_stars>0 import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouteReuseStrategy } from '@angular/router'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { SplashScreen ...
YapheeetS/SMS_ionic
SMS/src/app/app-routing.module.ts
import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; import { LoginGuard } from './guards/login.guard'; const routes: Routes = [ { path: '', redirectTo: 'login', pathMatch: 'full', }, { path: 'home', loadChildren: () => import('./h...
YapheeetS/SMS_ionic
SMS/src/app/interfaces/user.ts
export interface User { email?: string, password?: string firstname?: string lastname?: string }
YapheeetS/SMS_ionic
SMS/src/app/pages/register/register.page.ts
import { Component, OnInit } from '@angular/core'; import { AngularFireAuth } from '@angular/fire/auth'; import { AngularFirestore } from '@angular/fire/firestore'; import { ToastController } from '@ionic/angular'; import { Router } from '@angular/router'; import { UserService } from 'src/app/services/user.service'; ...
MaterializeInc/pulumi-docker-buildkit
examples/aws-nodejs/index.ts
import * as aws from "@pulumi/aws"; import * as dockerBuildkit from "@materializeinc/pulumi-docker-buildkit"; const repo = new aws.ecr.Repository("repo"); const registryInfo = repo.registryId.apply(async id => { const credentials = await aws.ecr.getCredentials({ registryId: id }); const authToken = Buffer.fro...
zxy16305/screeps-typescript-starter
src/roles/BaseRole.ts
/** * 基本类型 */ export interface BaseRole { id: string, priority: number, }
nfxpnk/fantasticon
src/utils/icon-id.ts
<gh_stars>0 import { resolve, relative } from 'path'; import slug from 'slugify'; import { removeExtension } from './path'; export const getIconId = (filepath: string, root: string) => { let iconId = removeExtension(relative(resolve(root), resolve(filepath))).replace(/(\/|\\|\.)+/g, '-'); let matches = iconId.matc...
akurilov/platform
ui/src/logs/utils/queryBuilder.ts
// Libraries import uuid from 'uuid' // Types import {Bucket} from 'src/types/v2/buckets' import {QueryConfig, Field} from 'src/types' import {Filter} from 'src/types/logs' const defaultQueryConfig = { areTagsAccepted: false, fill: '0', measurement: 'syslog', rawText: null, shifts: [], tags: {}, } const ...
WJayWJay/egg-scripts
test/fixtures/ts/app/controller/home.ts
import { Controller } from 'egg'; export default class AppController extends Controller { public index() { try { throw new Error('some err'); } catch (err: any) { this.ctx.logger.error(err); this.ctx.body = { msg: err.message, stack: err.stack, }; } } };
chenhao1024/react_jsp
ts-app/src/reducers/index.tsx
import {EnthusiasmAction} from '../actions' import {StoreState} from '../types/index' import {INCREMENT_ENTHUSIASM,DECREMENT_ENTHUSIASM} from '../constants/index' export function enthusiasm(state: StoreState,action:EnthusiasmAction): StoreState{ switch(action.type){ case INCREMENT_ENTHUSIASM: ...
chenhao1024/react_jsp
ts-app/src/index.tsx
<reponame>chenhao1024/react_jsp<gh_stars>0 import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import * as serviceWorker from './serviceWorker'; import { createStore } from 'redux'; import { enthusiasm } from './reducers/index'; import { StoreState } from './types/index'; import { Enthus...
Shywim/github-repo-size
src/index.ts
import domLoaded from 'dom-loaded' import { AUTO_ASK_KEY, ERROR_UNAUTHORIZED, ERROR_UNKNOWN, GITHUB_API, GITHUB_API_V3, REPO_REFRESH_STATS_QUERY, REPO_SIZE_ID, SIZE_KILO, TOKEN_KEY, UNITS, } from './constants' import { askForToken, createErrorElement, createMissingTokenElement,...
Shywim/github-repo-size
src/options.ts
<filename>src/options.ts import { TOKEN_KEY } from './constants' import { getStoredSetting, setSetting } from './userSettings' async function initForm() { const form = document.getElementById('ghs-options-form') as HTMLFormElement const existingTokenElmt = document.getElementById('existing-token') if (fo...
Shywim/github-repo-size
src/dom.ts
<filename>src/dom.ts<gh_stars>10-100 import { AUTO_ASK_KEY, MODAL_ID, REPO_SIZE_ID, TOKEN_INPUT_ID, TOKEN_KEY, } from './constants' import { HumanSize } from './types' import { getStoredSetting, setSetting } from './userSettings' export const askForToken = async (e?: Event) => { if (e != null) {...
Shywim/github-repo-size
src/constants.ts
export const TOKEN_KEY = 'grs_gh_token' export const GITHUB_API = 'https://api.github.com/graphql' export const GITHUB_API_V3 = 'https://api.github.com/repos/' export const REPO_STATS_CLASS = 'numbers-summary' export const REPO_REFRESH_STATS_QUERY = '.repository-content .Box-header .Details ul' export const REP...
Shywim/github-repo-size
src/types.ts
export type HumanSize = { size: string unit: string } export type RepoInfo = { owner: string name: string } export type PartialGitHubRepo = { data: { repository: { diskUsage: number } } } export type PartialGitHubRepoRestV3 = { size: number }
Shywim/github-repo-size
src/userSettings.ts
export const getStoredSetting = async (key: string) => { const storage = await browser.storage.local.get() return storage[key] } export const setSetting = async (key: string, value: unknown) => { await browser.storage.local.set({ [key]: value, }) }
RicardoValero95/vite-plugin-pages
test/generate.spec.ts
<reponame>RicardoValero95/vite-plugin-pages import { describe, expect, test } from 'vitest' import { PageContext } from '../src/context' const sensitivity = process.platform === 'win32' ? 'base' : 'variant' function deepSortArray(arr: any[], react?: boolean) { const key = react ? 'element' : 'component' arr.forEa...
RicardoValero95/vite-plugin-pages
src/resolvers/solid.ts
<filename>src/resolvers/solid.ts import { countSlash, isCatchAllRoute, isDynamicRoute, } from '../utils' import { generateClientCode } from '../stringify' import type { Optional, ResolvedOptions } from '../types' import type { PageContext } from '../context' export interface Route { rawRoute: string path: s...
webtobesocial/pharmacies_ui
src/app/pharmacy-form/pharmacy-form.component.spec.ts
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { PharmacyFormComponent } from './pharmacy-form.component'; describe('PharmacyFormComponent', () => { let component: PharmacyFormComponent; let fixture: ComponentFixture<PharmacyFormComponent>; beforeEach(async(() => { TestBed...
webtobesocial/pharmacies_ui
src/app/pharmacy.ts
<filename>src/app/pharmacy.ts<gh_stars>0 export class Pharmacy { constructor( public id: string, public oid: string, public name: string, public adr: string, public zip: string, public city: string, public tel: string, public web: string, public lat: string, public lng: string,...
webtobesocial/pharmacies_ui
src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; import { AppRoutingModule } from './app-routing.module'; import { LeafletModule } from '@asymmetrik/ngx-leaflet'; i...
webtobesocial/pharmacies_ui
src/app/map/map.component.ts
import { Component, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; import { icon, marker, latLng, Map, Layer, geoJSON, tileLayer } from 'leaflet'; import { environment } from '../../environments/environment'; import { leafletSearch } from 'leaflet-search'; import { ApiService } from '../api.service'...
webtobesocial/pharmacies_ui
src/app/app-routing.module.ts
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { DashboardComponent } from './dashboard/dashboard.component'; import { CitiesComponent } from './cities/cities.component'; import { MapComponent } from './map/map.component'; const routes: Routes = [ { path: "",...
webtobesocial/pharmacies_ui
src/app/pharmacy-form/pharmacy-form.component.ts
<reponame>webtobesocial/pharmacies_ui import { Component, ChangeDetectorRef, ChangeDetectionStrategy, OnInit, Input } from '@angular/core'; import { ApiService } from '../api.service'; import { Pharmacy } from '../pharmacy'; @Component({ selector: 'app-pharmacy-form', templateUrl: './pharmacy-form.component.html',...
webtobesocial/pharmacies_ui
src/app/api.service.ts
import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { environment } from '../environments/environment'; @Injectable() export class ApiService { constructor(private http: HttpClient) { } getGeoJsonPharmacies(mapBounds) { let apiUrl = environment.apiBaseUrl + '/...