repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
nodespull/nodespull | src/etc/developer-op-files/dockerfile.ts |
export default function file(data:any){
return`FROM node:10
WORKDIR /usr/app
COPY package*.json ./
RUN npm install --quiet
COPY . .
`
} |
nodespull/nodespull | src/database/index.ts | <filename>src/database/index.ts
import {DatabaseConnectionController} from "./connection";
import { DatabaseUserInterfaceController, DatabaseUserPortalInterface } from "./user-interface";
import { Log } from "../etc/log";
import { DatabaseUserPortal_mySQL } from "./systems/mysql/user-interface";
/**
* Database main h... |
andrebiegel/vscode-osgi | src/extension.ts | 'use strict';
import * as vscode from 'vscode';
import { getStandardOsgiHeaders } from './completion/osgi';
import { getBndOsgiHeaders, getBndInstructionHeaders } from './completion/bnd';
import { getLiferayOsgiHeaders } from './completion/liferay';
export function activate(context: vscode.ExtensionContext) {
let h... |
andrebiegel/vscode-osgi | src/completion/common.ts | import * as vscode from 'vscode';
export const OSGI_HEADER_SUFFIX = ": ";
export function generateCompletionItems(headers: {"label":string, "snippet": string, "description": string}[]) {
let completionHeaders = [];
headers.forEach(header => {
let completionHeader = new vscode.CompletionItem(header.lab... |
andrebiegel/vscode-osgi | src/completion/osgi.ts | 'use strict';
import { generateCompletionItems } from './common';
// https://github.com/JetBrains/intellij-community/blob/master/java/manifest/src/org/jetbrains/lang/manifest/header/impl/StandardManifestHeaderParsers.java
// https://www.osgi.org/bundle-headers-reference/
import headers from './data/osgi-headers.json'... |
andrebiegel/vscode-osgi | src/completion/liferay.ts | 'use strict';
import { generateCompletionItems } from './common';
// https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/documentation/bnd_schema_version.markdown
import headers from './data/liferay-headers.json'
export function getLiferayOsgiHeaders() {
return generateCompletionI... |
andrebiegel/vscode-osgi | src/completion/bnd.ts | 'use strict';
import * as vscode from 'vscode';
import { OSGI_HEADER_SUFFIX, generateCompletionItems } from './common';
// https://bnd.bndtools.org/chapters/800-headers.html
import headers from './data/bnd-headers.json';
// https://bnd.bndtools.org/chapters/825-instructions-ref.html
import instrutions from './data/b... |
akovner/ranked-vote-node | tests/tests.ts | <gh_stars>0
import { widest_path, schulze_order } from '../src/index';
import { assert } from 'chai';
describe('Widest path tests', () => {
it('Check Wikipedia example', () => {
let input: number[][] = [
[0, 20, 26, 30, 22],
[25, 0, 16, 33, 18],
[19, 29, 0, 17, 24],
... |
akovner/ranked-vote-node | src/index.ts | <filename>src/index.ts
function widest_path(d: number[][]): number[][] {
let c = d.length;
let p: number[][] = [];
for (let x = 0; x < c; x++) {
p.push([]);
for (let y = 0; y < c; y++) {
p[x].push(0);
}
}
for (let i = 0; i < c; i++) {
for (let j = 0; j <... |
vannobi/trees | src/imgloader.ts | <reponame>vannobi/trees
interface Color {
r: number;
g: number;
b: number;
a: number;
}
export const loadImg = (e: Event) => {
// let img = document.getElementById('output') as HTMLImageElement;
let target = e.target as HTMLInputElement;
let files = target.files as FileList;
if (files) {
... |
vannobi/trees | src/tests.ts | import { Octree, Box, Point3D, Octant } from './Octree';
export function testBox() {
let box = new Box(0, 0, 0, 2, 2, 2);
let point: Point3D = { x: -1, y: 1, z: 1 };
console.assert(
box.findOctant(point) === Octant.UP_FRONT_LEFT,
'should be UP_FRONT_LEFT'
);
point = { x: 1, y: 1, z: 1 };
... |
vannobi/trees | src/Octree.ts | export enum Octant {
UP_FRONT_LEFT = 0,
UP_FRONT_RIGHT,
UP_BACK_LEFT,
UP_BACK_RIGHT,
DOWN_FRONT_LEFT,
DOWN_FRONT_RIGHT,
DOWN_BACK_LEFT,
DOWN_BACK_RIGHT,
ERROR = -1,
}
export interface Point3D {
x: number;
y: number;
z: number;
}
export interface Dimension {
width: number;
... |
vannobi/trees | src/index.ts | <reponame>vannobi/trees<filename>src/index.ts
import { Octree, Box } from './Octree';
import { loadImg } from './imgloader';
let octree = new Octree(new Box(0, 0, 0, 2, 2, 2), 5);
console.log(octree);
let imgInput = document.getElementById('imageInput') as HTMLInputElement;
imgInput.addEventListener('change', ... |
sonofmagic/vue-offscreen-canvas-worker-jszip | src/components/util.ts | <filename>src/components/util.ts
export { saveAs } from 'file-saver'
export const isSupportWorker = Boolean(window.Worker)
export const isSupportOffscreenCanvas = Boolean(window.OffscreenCanvas)
|
sonofmagic/vue-offscreen-canvas-worker-jszip | src/components/fixtures.ts | export { default as BigImage } from '@/assets/big-img.jpg'
export { default as SmallImage } from '@/assets/qrcode.jpg'
|
sonofmagic/vue-offscreen-canvas-worker-jszip | src/workers/main.worker.ts | <gh_stars>0
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="../../node_modules/@types/offscreencanvas/index.d.ts" />
import type {
MainWorkerRequestEventData,
MainWorkerResponseEventData
} from '@/interface/worker'
import JSZip from 'jszip'
const worker: Worker = self as ... |
sonofmagic/vue-offscreen-canvas-worker-jszip | src/interface/worker.ts | export interface MainWorkerRequestEventData {
type: 'zip' | 'main'
bitmap?: ImageBitmap
arraybuffer?: ArrayBuffer
}
export interface MainWorkerResponseEventData {
type: 'percent' | 'save'
percent?: number
content?: ArrayBuffer
}
|
superfaceai/testing | src/superface-test.ts | <gh_stars>1-10
import {
BoundProfileProvider,
err,
ok,
PerformError,
Result,
SuperfaceClient,
} from '@superfaceai/one-sdk';
import createDebug from 'debug';
import {
activate as activateNock,
define,
disableNetConnect,
enableNetConnect,
isActive as isNockActive,
recorder,
restore as restoreRe... |
superfaceai/testing | src/nock/replace-input.test.ts | import { RecordingDefinition } from '..';
import { replaceInputInDefinition } from './utils';
const TMP_PLACEHOLDER = 'placeholder';
const BASE_URL = 'https://localhost';
describe('replaceInput', () => {
describe('when replacing input values', () => {
it('does not mutate recording when input value is empty', ()... |
superfaceai/testing | src/nock/replace-credentials.test.ts | <filename>src/nock/replace-credentials.test.ts
import { ApiKeyPlacement, HttpScheme, SecurityType } from '@superfaceai/ast';
import { RecordingDefinition } from '..';
import { replaceCredentialInDefinition } from './utils';
const TMP_PLACEHOLDER = 'placeholder';
const BASE_URL = 'https://localhost';
describe('replac... |
superfaceai/testing | src/nock/replace-parameters.test.ts | import { RecordingDefinition } from '..';
import { replaceParameterInDefinition } from './utils';
const TMP_PLACEHOLDER = 'placeholder';
const BASE_URL = 'https://localhost';
describe('replaceParameters', () => {
describe('when replacing integration parameters', () => {
it('does not mutate recording when parame... |
superfaceai/testing | src/superface-test.test.ts | <filename>src/superface-test.test.ts
import { ApiKeyPlacement, SecurityType } from '@superfaceai/ast';
import {
err,
MapASTError,
ok,
Profile,
Provider,
SuperfaceClient,
SuperJson,
} from '@superfaceai/one-sdk';
import nock, { pendingMocks, recorder } from 'nock';
import { join as joinPath } from 'path';
... |
superfaceai/testing | src/superface.mock.ts | <gh_stars>1-10
import {
MapDocumentNode,
ProfileDocumentNode,
SecurityScheme,
SecurityValues,
} from '@superfaceai/ast';
import {
PerformError,
Profile,
Provider,
Result,
SuperfaceClient,
SuperJson,
UseCase,
} from '@superfaceai/one-sdk';
import { ServiceSelector } from '@superfaceai/one-sdk/dist/... |
blacksharksjc/beeshell-dist-modify | dist/components/Checkbox/CheckboxItem.d.ts | import { Component, ReactElement } from 'react';
import { ViewStyle } from 'react-native';
declare enum ICON_POSITION {
LEFT = "left",
RIGHT = "right"
}
export interface CheckboxItemProps {
style?: ViewStyle;
label?: string;
value?: any | null | undefined;
disabled?: boolean;
checked?: boole... |
blacksharksjc/beeshell-dist-modify | dist/components/Progress/index.d.ts | import { Component } from 'react';
import { LayoutChangeEvent, ViewStyle } from 'react-native';
export interface ProgressProps {
style?: ViewStyle;
barStyle?: ViewStyle;
percent?: number;
easing?: boolean;
duration?: number;
}
export declare class Progress extends Component<ProgressProps, any> {
... |
blacksharksjc/beeshell-dist-modify | dist/components/Tip/index.d.ts | /// <reference types="react" />
import { Modal, ModalProps } from '../Modal';
export interface TipProps extends ModalProps {
body?: any;
duration?: number | null;
position?: 'top' | 'left' | 'right' | 'bottom' | 'center' | ['top', 'left'] | ['top'] | ['top', 'right'] | ['left'] | ['center'] | ['right'] | ['... |
blacksharksjc/beeshell-dist-modify | dist/components/Checkbox/CheckboxItemAllCheck.d.ts | /// <reference types="react" />
import { CheckboxItem, CheckboxItemProps } from './CheckboxItem';
declare enum ICON_POSITION {
LEFT = "left",
RIGHT = "right"
}
export interface CheckboxItemAllCheckProps extends CheckboxItemProps {
checkedStatus?: number;
}
export declare class CheckboxItemAllCheck extends C... |
blacksharksjc/beeshell-dist-modify | dist/components/Switch/index.d.ts | <reponame>blacksharksjc/beeshell-dist-modify<filename>dist/components/Switch/index.d.ts<gh_stars>0
import { Component } from 'react';
import { Animated, PanResponderInstance, ViewStyle } from 'react-native';
export interface SwitchProps {
testID?: string;
style?: ViewStyle | ViewStyle[];
value?: boolean;
... |
blacksharksjc/beeshell-dist-modify | dist/components/Calendar/index.d.ts | import React from 'react';
export interface CalendarProps {
style?: any;
locale?: string;
format?: string;
date?: string;
startDate?: string;
endDate?: string;
onChange?: Function;
renderItem?: Function;
}
export declare class Calendar extends React.Component<CalendarProps, any> {
st... |
blacksharksjc/beeshell-dist-modify | dist/components/Modal/index.d.ts | <reponame>blacksharksjc/beeshell-dist-modify
import React from 'react';
import { ViewStyle } from 'react-native';
import modalStyles from './styles';
export { modalStyles };
export interface ModalProps {
style?: ViewStyle | ViewStyle[];
containerStyle?: ViewStyle | ViewStyle[];
cancelable?: boolean;
scr... |
blacksharksjc/beeshell-dist-modify | dist/components/SlideModal/index.d.ts | import { StyleProp, ViewStyle } from 'react-native';
import { Modal, ModalProps } from '../Modal';
export declare const slideModalStyles: {
container: {
position: "absolute";
top: number;
left: number;
bottom: number;
right: number;
flexDirection: "row";
align... |
matteopolak/log4j-ts | src/index.ts | <reponame>matteopolak/log4j-ts
import Logger from './classes/logger.js';
const logger = new Logger(process.stdout);
await logger.log(process.argv[2]); |
matteopolak/log4j-ts | src/classes/logger.ts | <reponame>matteopolak/log4j-ts<gh_stars>1-10
import axios from 'axios';
import { WriteStream } from 'fs';
import { execFile } from 'child_process';
const JAVA_MATCHER = /\${(?:java:([^}]+)|jndi:ldap(s)?:\/\/([^}]+))}/g;
export default class Logger {
private out: WriteStream | NodeJS.WriteStream;
constructor(stream... |
zoli-forks/pkg | lib/fabricator.ts | <reponame>zoli-forks/pkg
import { spawn, ChildProcessByStdio } from 'child_process';
import { Readable, Writable } from 'stream';
import { log } from './log';
import { Target } from './types';
const script = `
var vm = require('vm');
var module = require('module');
var stdin = Buffer.alloc(0);
process.stdin.on... |
sayid760/handy-vue | src/types/vue.d.ts | <reponame>sayid760/handy-vue<filename>src/types/vue.d.ts<gh_stars>0
import { App, ComponentCustomOptions } from "vue";
declare module "@vue/runtime-core" {
interface ComponentCustomOptions {
install?: (app: App) => void;
}
}
|
sayid760/handy-vue | src/types/index.d.ts | <filename>src/types/index.d.ts
declare module "*.vue" {
import { ComponentOptions } from "vue";
let component: ComponentOptions;
export default component;
}
declare module "*.md" {
import { ComponentOptions } from "vue";
let component: ComponentOptions;
export default component;
}
|
sayid760/handy-vue | example/main.ts | <reponame>sayid760/handy-vue
import { createApp } from 'vue'
// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
// import 'ant-design-vue/style.js'
import App from './App.vue'
import './index.css'
// import antd from 'ant-design-vue'
import 'highlight.js/styles/github-gist.css'
// Vu... |
sayid760/handy-vue | site/router/index.ts | // tslint:disable
import { createRouter, createWebHashHistory } from 'vue-router'
import home from '../views/home.vue';
import Documents from '../views/documents/Index.vue';
// const routes: Array<RouteConfig> = [
const routes = [
{
path: '/',
component: home,
},
{
path: '/documents',
component: D... |
sayid760/handy-vue | site/store/middle-wares.ts | <reponame>sayid760/handy-vue
import {createLogger} from 'vuex';
export default (process.env.NODE_ENV !== 'production' ? [createLogger()] : []);
|
sayid760/handy-vue | src/loading/index.ts | <gh_stars>0
import { App } from 'vue'
import Component from './src/index.vue'
Component.install = function (app: App) {
app.component(Component.name as string, Component)
}
export default Component
|
sayid760/handy-vue | site/store/index.ts | // import Vue from 'vue';
// import Vuex from 'vuex';
import middlewares from './middle-wares';
// @ts-ignore
import packageJson from '../../package.json';
// Vue.use(Vuex);
const debug = process.env.NODE_ENV !== 'production';
import { createStore } from 'vuex'
const store = createStore({
strict: debug,
plugi... |
sayid760/handy-vue | styles/index.ts | <filename>styles/index.ts
/* eslint-disable */
import './index.scss'; |
sayid760/handy-vue | src/index.ts | import { App } from 'vue'
import Button from "./button"
const version = '1.0.0';
const components = [
Button
];
// const install = function (Vue, opts = {}) { // eslint-disable-line no-unused-vars
// /* istanbul ignore if */
// if (install.installed) return;
// components.map(component => Vue.component(compo... |
sayid760/handy-vue | site/main.ts | <gh_stars>0
import { createApp } from 'vue'
// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
// import 'ant-design-vue/style.js'
import App from './App.vue'
import './index.css'
// import antd from 'ant-design-vue'
import 'highlight.js/styles/github-gist.css'
// Vue.use(ElementUI)
... |
sayid760/handy-vue | site/md.d.ts | <gh_stars>0
declare module '*.md' {
import { VNode } from 'vue'
function render(): VNode[]
export interface Markdown {
render
}
} |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/portal/dashboard.tsx | <gh_stars>0
import React from "react";
import { Link } from "gatsby";
import Login from "../login";
interface IUser {
nickname: string,
email_verified: boolean,
picture: string,
email: string
};
const Dashboard = (user:IUser) => {
const { nickname, email_verified, picture, email } = user;
const userGroup =... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/DynamicComponent.tsx | import React from "react";
import Page from '../contentTypes/page';
import ContentPanel from "../components/contentPanel";
import SbEditable from "storyblok-react";
interface IDynamicComponent {
blok: {
_uid: string,
component: string
}
};
const Components = {
page: Page,
content_panel: ContentPanel... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/pages/portal.tsx | import React from "react";
import { Router } from "@reach/router";
import { useAuth0 } from '@auth0/auth0-react';
import { navigate } from "gatsby";
import Layout from "../components/layout";
import PrivateRoute from "../components/privateRoute";
import Dashboard from "../components/portal/dashboard";
import PortalLan... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/content/index.tsx | import * as React from "react";
import RichTextRender from "../../utils/richTextRender";
import { markdownToRichtext } from "storyblok-markdown-richtext";
interface IContent {
blok: {
content: object
},
type?: string,
rest?: any
};
const Content = ({ blok, type, ...rest }: IContent) => {
// Check if we ... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/utils/richTextRender.tsx | import React from 'react';
import { render } from 'storyblok-rich-text-react-renderer';
type RichTextRenderType = {
content?: object,
copy?: object,
text?: object
}
const RichTextRender = (props:RichTextRenderType) => {
if (!props) return false;
const copy = props.content || props.copy || props.text;
... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/contentPanel/index.tsx | <filename>src/components/contentPanel/index.tsx
import React from "react";
import SbEditable from 'storyblok-react';
import Content from '../../components/content';
interface IContentPanel {
blok: {
_uid: string,
component: string,
title: string,
content: object,
link?: {
url: string
}
... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/pages/index.tsx | <reponame>jamie-l-robertson/gatsby-auth0-protected-content-starter
import React from "react";
import { graphql } from "gatsby";
import useStoryblok from "../utils/storyblok";
import SbEditable from 'storyblok-react';
import DynamicComponent from '../components/DynamicComponent';
import Layout from "../components/layout... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/privateRoute.tsx | <filename>src/components/privateRoute.tsx<gh_stars>0
import React from "react";
import { withAuthenticationRequired } from '@auth0/auth0-react';
interface IPrivateRoute {
component: any,
location?: string,
path?: string
access?: string
};
const PrivateRoute = ({ component: Component, location, ...rest }:IPriv... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/placeholder/index.tsx | import React from 'react';
interface IPlaceholder {
componentName: string
};
const Placeholder = ({ componentName }:IPlaceholder) => (
<p>The component <strong>{componentName}</strong> has not been created yet.</p>
);
export default Placeholder;
|
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/layout.tsx | <filename>src/components/layout.tsx
import React from "react"
import { useStaticQuery, graphql } from "gatsby";
import { useAuth0 } from '@auth0/auth0-react';
import { Link } from "gatsby";
import Login from "../components/login";
interface ILayout {
children: any,
rest?: any
}
const Layout = ({ children, ...rest... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/portal/portal.tsx | import React from "react";
import { gql, useQuery } from '@apollo/client';
import DynamicComponent from "../DynamicComponent";
interface IUser {
any: any
}
const PORTAL_LANDING_QUERY = gql`
query Portal($userGroup: String!) {
PageItems(starts_with: $userGroup, is_startpage: "true") {
items {
content {
... |
jamie-l-robertson/gatsby-auth0-protected-content-starter | src/components/portal/admin.tsx | import React from "react";
import { useAuth0 } from '@auth0/auth0-react';
const Admin = () => {
const { user } = useAuth0();
const permissions = user[`${process.env.AUTH0_PORTAL_ACCESS}`] || false;
if(!permissions.includes('admin')) return <h1>Access denied!</h1>
return (
<>
<p>{user.nickname}'s admin ar... |
saasquatch/squatch-js | demo/sandbox.ts | import { getQueryStringParams } from "./util";
export const tenantAlias = "test_aojsrf4r06zi0";
export const domain = "https://staging.referralsaasquatch.com";
export const script = "https://fast.ssqt.io/squatch-js@2";
export const user = {
id: "5b980d34e4b0cabee07f2cb0",
accountId: "<KEY>",
email: "<EMAIL>",
}... |
saasquatch/squatch-js | src/utils/validate.ts | <filename>src/utils/validate.ts<gh_stars>1-10
import { ConfigOptions, WidgetConfig } from "../types";
type KeysOf<T> = keyof T;
type SimpleObject = {
[key: string]: unknown;
};
export function hasProps<T extends SimpleObject & {}>(
object: unknown,
props: KeysOf<T> | KeysOf<T>[]
): object is T {
if (!isObject... |
saasquatch/squatch-js | src/widgets/Widgets.ts | import debug from "debug";
//@ts-ignore
import * as EventBus from "eventbusjs";
import WidgetApi from "../api/WidgetApi";
import EmbedWidget from "./EmbedWidget";
import PopupWidget from "./PopupWidget";
import CtaWidget from "./CtaWidget";
import Widget, { Params } from "./Widget";
import { WidgetResult, WidgetContext... |
saasquatch/squatch-js | src/widgets/PopupWidget.ts | <filename>src/widgets/PopupWidget.ts
// @ts-check
import debug from "debug";
import Widget, { Params } from "./Widget";
import { domready } from "../utils/domready";
const _log = debug("squatch-js:POPUPwidget");
/**
* The PopupWidget is used to display popups (also known as "Modals").
* Popups widgets are rendered... |
saasquatch/squatch-js | src/widgets/Widget.ts | <filename>src/widgets/Widget.ts
// @ts-check
import debug from "debug";
import AnalyticsApi, { SQHDetails } from "../api/AnalyticsApi";
import WidgetApi from "../api/WidgetApi";
import { WidgetType, WidgetContext, EngagementMedium } from "../types";
import { isObject, hasProps } from "../utils/validate";
/** @hidden ... |
saasquatch/squatch-js | src/api/WidgetApi.ts | <gh_stars>1-10
import { doPost, doPut, doGet } from "../utils/io";
import {
ConfigOptions,
EngagementMedium,
WidgetType,
CookieUser,
WidgetConfig,
} from "../types";
import {
validateConfig,
validateWidgetConfig,
} from "../utils/validate";
import Cookies from "js-cookie";
/**
*
* The WidgetApi class i... |
saasquatch/squatch-js | test/tsd/squatch.test-d.ts | import {
expectType,
expectError,
expectAssignable,
expectNotAssignable,
} from "tsd";
import squatch, { Widgets } from "../../";
/**
* Error -- squatch has no property `foo`
*/
expectError(squatch.foo);
/**
* Error -- squatch is not a function
*/
expectNotAssignable<() => unknown>(squatch);
/**
* Succe... |
saasquatch/squatch-js | src/api/EventsApi.ts | <reponame>saasquatch/squatch-js
import { doPost } from "../utils/io";
import { ConfigOptions, JWT} from "../types";
import {
isObject,
assertProp,
validateConfig,
} from "../utils/validate";
type TrackOptions = { jwt?: JWT };
interface UserEventInput {
userId: string;
accountId: string;
events: UserEventD... |
saasquatch/squatch-js | demo/toolbar.tsx | <gh_stars>1-10
import React, { Component, version } from "react";
import { render } from "react-dom";
import {
popup,
embed,
embedNew,
embedReferred,
popupNew,
popupReferred,
script,
toURL,
users,
href,
} from "./sandbox";
import { getVersions } from "./versions";
import { delay } from "./util";
c... |
saasquatch/squatch-js | src/api/AnalyticsApi.ts | // @ts-check
import { doPost } from "../utils/io";
import { EngagementMedium } from "../types";
import { hasProps } from "../utils/validate";
/**
*
* The AnalyticsApi class is a wrapper around the Analytics Endpoints of
* the SaaSquatch REST API. Used to record Widget events.
*
* @hidden
*/
export default class ... |
saasquatch/squatch-js | src/squatch.ts | // @ts-check
/**
* Squatch.js is the Referral SaaSquatch javascript SDK and a one-stop shop to
* integrate a referral program into your website or web app.
* It can show referral widgets on any website, track users, generate unique
* referral short links and referral codes, and more.
*
* @module squatch
*/
impor... |
ssysm/eatup | client/src/app/common/to-username.pipe.ts | <reponame>ssysm/eatup<filename>client/src/app/common/to-username.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
import {AuthService} from "../auth/auth.service";
import 'rxjs/add/operator/toPromise';
import 'rxjs/add/operator/finally';
@Pipe({
name: 'toUsername'
})
export class ToUsernamePipe implements... |
ssysm/eatup | client/src/app/auth/signup/signup.component.ts | import { Component, OnInit } from '@angular/core';
import {Router} from "@angular/router";
import {AuthService} from "../auth.service";
import {FormControl, FormGroup, Validators} from "@angular/forms";
@Component({
selector: 'app-signup',
templateUrl: './signup.component.html',
styleUrls: ['./signup.component.c... |
ssysm/eatup | client/src/app/app.module.ts | <reponame>ssysm/eatup
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NavbarComponent } from './partical/navbar/navbar.component';
import { SignupCompo... |
ssysm/eatup | client/src/app/event/create/create.component.ts | <reponame>ssysm/eatup
import {Component, ElementRef, EventEmitter, Input, NgZone, OnInit, Output, ViewChild} from '@angular/core';
import {MapsAPILoader} from "@agm/core";
import {FormControl, FormGroup, Validators} from "@angular/forms";
import {EventService} from "../event.service";
import {Router} from "@angular/rou... |
ssysm/eatup | client/src/environments/environment.prod.ts | <reponame>ssysm/eatup<filename>client/src/environments/environment.prod.ts
export const environment = {
production: true,
apiBase:'https://api-eatup.tes-project.xyz'
};
|
ssysm/eatup | client/src/app/auth/auth.service.ts | import { Injectable } from '@angular/core';
import {Http} from "@angular/http";
import {environment} from "../../environments/environment";
import 'rxjs/Rx';
import 'rxjs/operator/map';
@Injectable()
export class AuthService {
constructor(
private http:Http
) { }
login(cred){
return this.http
.pos... |
ssysm/eatup | client/src/app/common/to-username.pipe.spec.ts | <reponame>ssysm/eatup
import { ToUsernamePipe } from './to-username.pipe';
describe('ToUsernamePipe', () => {
it('create an instance', () => {
const pipe = new ToUsernamePipe();
expect(pipe).toBeTruthy();
});
});
|
ssysm/eatup | client/src/app/event/detail/detail.component.ts | <filename>client/src/app/event/detail/detail.component.ts
import { Component, OnInit } from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";
import {EventService} from "../event.service";
import {AuthService} from "../../auth/auth.service";
import {MapsAPILoader} from "@agm/core";
declare var $:... |
ssysm/eatup | client/src/app/partical/navbar/navbar.component.ts | import { Component, OnInit } from '@angular/core';
import {AuthService} from "../../auth/auth.service";
declare var $: any;
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.css']
})
export class NavbarComponent implements OnInit {
constructor(
pub... |
ssysm/eatup | client/src/app/auth/login/login.component.ts | import { Component, OnInit } from '@angular/core';
import {FormControl, FormGroup, Validators} from "@angular/forms";
import {AuthService} from "../auth.service";
import {Router} from "@angular/router";
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css'... |
ssysm/eatup | client/src/app/app-routing.module.ts | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {LoginComponent} from "./auth/login/login.component";
import {SignupComponent} from "./auth/signup/signup.component";
import {DetailComponent} from "./event/detail/detail.component";
import {CreateComponent} from ".... |
ssysm/eatup | client/src/app/auth/guard.service.ts | import { Injectable } from '@angular/core';
import {AuthService} from "./auth.service";
import {el} from "@angular/platform-browser/testing/src/browser_util";
@Injectable()
export class GuardService {
constructor(
private authService:AuthService
) { }
canActivate(){
return this.authService.isLoggedIn()... |
ssysm/eatup | client/src/app/event/event.service.ts | import { Injectable } from '@angular/core';
import {Http} from "@angular/http";
import {environment} from "../../environments/environment";
@Injectable()
export class EventService {
constructor(
private http:Http
) { }
createEvent(data){
return this.http
.post(environment.apiBase+'/event/create'... |
ssysm/eatup | client/src/app/event/my-event/my-event.component.ts | <gh_stars>0
import { Component, OnInit } from '@angular/core';
import {AuthService} from "../../auth/auth.service";
import {EventService} from "../event.service";
@Component({
selector: 'app-my-event',
templateUrl: './my-event.component.html',
styleUrls: ['./my-event.component.css']
})
export class MyEventCompon... |
transcendr/gTove | src/redux/tabletopValidationReducer.ts | <gh_stars>0
import {Action, AnyAction, Reducer} from 'redux';
import {ScenarioType} from '../util/scenarioUtils';
import {ScenarioReducerActionType} from './scenarioReducer';
// =========================== Action types and generators
enum TabletopValidationActionTypes {
SET_LAST_COMMON_SCENARIO_ACTION = 'set-las... |
transcendr/gTove | src/util/mcastNode.ts | <reponame>transcendr/gTove
import {v4} from 'uuid';
import {isEmpty, memoize, throttle} from 'lodash';
import {promiseSleep} from './promiseSleep';
import {CommsNode, CommsNodeEvent, SendToOptions} from './commsNode';
export enum McastMessageType {
connect = 'connect',
otherPeers = 'otherPeers',
data = 'd... |
transcendr/gTove | src/util/peerNode.ts | <gh_stars>0
import * as Peer from 'simple-peer';
import {v4} from 'uuid';
import {memoize, throttle} from 'lodash';
import {promiseSleep} from './promiseSleep';
import {CommsNode, CommsNodeCallback} from './commsNode';
interface ConnectedPeer {
peerId: string;
peer: Peer.Instance;
connected: boolean;
... |
transcendr/gTove | src/container/browseFilesComponent.tsx | <reponame>transcendr/gTove<gh_stars>0
import * as React from 'react';
import * as PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {v4} from 'uuid';
import {toast, ToastContainer} from 'react-toastify';
import {addFilesAction, FileIndexReducerType, removeFileAction} from '../redux/fileIndexRedu... |
transcendr/gTove | src/redux/mainReducer.ts | <filename>src/redux/mainReducer.ts
import {AnyAction, applyMiddleware, combineReducers, createStore, Middleware, Reducer, Store} from 'redux';
import {connectRoutes, Location} from 'redux-first-router';
import createHistory from 'history/createBrowserHistory';
import {composeWithDevTools} from 'redux-devtools-extension... |
transcendr/gTove | src/util/googleDriveUtils.ts | <reponame>transcendr/gTove
export interface RootDirAppProperties {
rootFolder: string;
}
export interface TabletopFileAppProperties {
gmFile: string;
}
export interface FromBundleAppProperties {
fromBundleId?: string;
}
export interface WebLinkAppProperties {
webLink?: string;
}
export interface Map... |
transcendr/gTove | src/presentation/virtualGamingTabletop.tsx | import * as React from 'react';
import * as PropTypes from 'prop-types';
import * as classNames from 'classnames';
import {connect} from 'react-redux';
import {Dispatch} from 'redux';
import {isObject, throttle} from 'lodash';
import {toast, ToastContainer} from 'react-toastify';
import * as THREE from 'three';
import ... |
transcendr/gTove | src/redux/peerToPeerMiddleware.ts | import {AnyAction, Dispatch, MiddlewareAPI} from 'redux';
import {PeerNode, SendToOptions} from '../util/peerNode';
import {setMyPeerIdAction} from './myPeerIdReducer';
import {McastNode} from '../util/mcastNode';
import {CommsNode, CommsStyle, CommsNodeOptions} from '../util/commsNode';
import {removeAllConnectedUser... |
transcendr/gTove | src/util/commsNode.ts | <filename>src/util/commsNode.ts
export enum CommsStyle {
PeerToPeer = 'PeerToPeer',
MultiCast = 'MultiCast'
}
export interface SendToOptions {
only?: string[];
except?: string[];
throttleKey?: string;
onSentMessage?: (recipients: string[], message: string | object) => void;
}
export type Comms... |
transcendr/gTove | src/presentation/templateEditor.tsx | <reponame>transcendr/gTove
import * as React from 'react';
import * as PropTypes from 'prop-types';
import * as THREE from 'three';
import Select from 'react-select';
import {ChromePicker} from 'react-color';
import {AnyAction} from 'redux';
import {ThunkAction} from 'redux-thunk';
import {FileAPI} from '../util/fileU... |
km-zou/clova-cek-sdk-nodejs | src/client.ts | <filename>src/client.ts
import { Context } from './context';
import Clova from './types';
export class SkillConfigurator implements Clova.SkillConfigurator<Context> {
public config: {
requestHandlers: {
[index: string]: (ctx: Context) => void;
};
};
constructor() {
this.config = {
reques... |
nextimecode/nextime-ui | stories/NextButton.stories.tsx | <reponame>nextimecode/nextime-ui<filename>stories/NextButton.stories.tsx
import React from 'react'
import { Meta, Story } from '@storybook/react'
import { NextButton, NextButtonProps } from '../src/components/atoms/NextButton'
import { action } from '@storybook/addon-actions'
const meta: Meta = {
title: 'NextButton'... |
nextimecode/nextime-ui | src/components/atoms/NextButton/index.tsx | import React, { HTMLAttributes, ReactNode } from 'react';
export interface NextButtonProps extends HTMLAttributes<HTMLButtonElement> {
/** O que é children vem aqui */
children: ReactNode
/** Variant é a cor */
variant: 'primary' | 'secondary'
}
/** Texto Sobre o Button */
export const NextButton = ({childre... |
dotlim/gRPC | example/proto/echo_pb.d.ts | <reponame>dotlim/gRPC<gh_stars>0
import * as jspb from 'google-protobuf'
export class Empty extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Empty.AsObject;
static toObject(includeInstance: boolean, msg: Empty): Empty.AsObject;
static serializeBinaryToWriter(message:... |
willmendesneto/perf-marks | src/marks.ts | import { isUserTimingAPISupported } from './is-user-timing-api-supported';
import { isPerformanceObservableSupported } from './is-performance-observable-supported';
import { isNodeJSEnv } from './is-nodejs-env';
// Map() is not used in order to decrease the bundle
let marksMap: { [key: string]: number | undefined } = ... |
nnluukhtn/luxurify | mobile/frontend/types/OrderResponse.ts | type OrderResponse = { orders: any[]; count: number };
export default OrderResponse; |
nnluukhtn/luxurify | mobile/frontend/features/HomeScreen/index.tsx | import React, { useContext, useEffect, useState } from "react";
import styled from "styled-components/native";
import { Text, SafeAreaView } from "react-native";
import { ConnectorContext } from "../../ConnectorContext";
import { useWalletConnect } from "@walletconnect/react-native-dapp";
import Luxurify from "../../..... |
nnluukhtn/luxurify | web/src/app/pages/SignUp/actionTypes.ts | <gh_stars>0
enum ActionTypes {
CREATE_USER_ACCOUNT = 'sign_up/CREATE_USER_ACCOUNT',
}
export default ActionTypes;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.