repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
i-a-n/eui | src/components/icon/assets/lock.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/form/radio/radio.test.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/tour/types.ts | <reponame>i-a-n/eui
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic Licen... |
i-a-n/eui | src/components/basic_table/default_item_action.test.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/services/color/rgb_to_hex.ts | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/tabs/tab.test.tsx | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src-docs/src/views/tabs/tabs.tsx | <gh_stars>0
import React, { useState, Fragment, useMemo } from 'react';
import {
EuiIcon,
EuiTabs,
EuiTab,
EuiSpacer,
EuiText,
EuiNotificationBadge,
} from '../../../../src/components';
const tabs = [
{
id: 'cobalt--id',
name: 'Cobalt',
content: (
<Fragment>
<EuiSpacer />
... |
i-a-n/eui | src/components/form/range/utils.ts | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src/services/security/get_secure_rel_for_target.ts | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src-docs/src/views/theme/override_simple.tsx | import React, { FunctionComponent, ReactNode } from 'react';
import { EuiCode } from '../../../../src/components/code';
import { EuiText } from '../../../../src/components/text';
import { EuiThemeProvider, useEuiTheme } from '../../../../src/services';
const Box: FunctionComponent<{ children: ReactNode }> = ({ childre... |
i-a-n/eui | src/components/markdown_editor/markdown_types.ts | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/icon/assets/ml_classification_job.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/search_bar/query/date_format.test.ts | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src/components/icon/assets/logo_maps.tsx | <filename>src/components/icon/assets/logo_maps.tsx<gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance... |
i-a-n/eui | src/components/responsive/show_for.test.tsx | <filename>src/components/responsive/show_for.test.tsx
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, a... |
i-a-n/eui | src/components/steps/step.tsx | <reponame>i-a-n/eui<gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the El... |
i-a-n/eui | src/components/spacer/spacer.tsx | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src/components/icon/assets/logo_ibm.tsx | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src/components/markdown_editor/markdown_context.ts | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/form/form_fieldset/form_fieldset.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/search_bar/filters/is_filter.test.tsx | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src-docs/src/components/guide_section/guide_section_types.tsx | export const GuideSectionTypes = {
JS: 'JS',
TSX: 'TSX',
HTML: 'HTML',
};
|
i-a-n/eui | src/components/icon/assets/training.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/services/hooks/useMouseMove.ts | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/services/throttle.ts | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/themes/eui-amsterdam/global_styling/variables/_borders.ts | <filename>src/themes/eui-amsterdam/global_styling/variables/_borders.ts
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in ... |
i-a-n/eui | src/components/text/text.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/header/header_breadcrumbs/header_breadcrumbs.test.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src-docs/src/views/guidelines/sass/typography.tsx | import React, { useContext, useState } from 'react';
import { Link } from 'react-router-dom';
// @ts-ignore Importing from Sass file
import fonts from '!!sass-vars-to-js-loader?preserveKeys=true!../../../../../src/global_styling/variables/_font_weight.scss';
import { ThemeContext } from '../../../components/with_theme'... |
i-a-n/eui | src/components/header/header_links/header_links.tsx | <reponame>i-a-n/eui
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic Licen... |
i-a-n/eui | src/components/icon/assets/star_empty.tsx | <gh_stars>0
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 o... |
i-a-n/eui | src/components/page/page_body/page_body.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/side_nav/side_nav_types.ts | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/call_out/call_out.test.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/delay_render/delay_render.tsx | <reponame>i-a-n/eui<filename>src/components/delay_render/delay_render.tsx
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* i... |
i-a-n/eui | src/components/portal/portal.tsx | <reponame>i-a-n/eui
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic Licen... |
i-a-n/eui | src/components/key_pad_menu/key_pad_menu_item.test.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/notification/notification_event_read_button.test.tsx | <reponame>i-a-n/eui
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic Licen... |
i-a-n/eui | src/components/context_menu/context_menu.test.tsx | <reponame>i-a-n/eui<filename>src/components/context_menu/context_menu.test.tsx
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except... |
i-a-n/eui | src/components/combo_box/combo_box_input/combo_box_input.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/icon/assets/logo_osquery.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/form/range/range_track.tsx | <reponame>i-a-n/eui
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic Licen... |
i-a-n/eui | src/components/icon/assets/tokenObject.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
i-a-n/eui | src/components/expression/expression.tsx | <reponame>i-a-n/eui
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic Licen... |
i-a-n/eui | src/components/icon/assets/app_index_pattern.tsx | /*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
joonamo/garden | src/ActionButton.tsx | import * as React from 'react'
import classNames from 'classnames'
export const ActionButton = (props: {
action: () => void
text: string
disabled?: boolean
loading?: boolean
styleOverride?: string
}) => {
return <div className="control">
<button
className={classNames(
'button',
pr... |
joonamo/garden | src/Calendar.tsx | <gh_stars>0
import { observer } from 'mobx-react'
import * as React from 'react'
import { gardenViewModel } from './GardenViewModel'
export const Calendar = observer(() => (
<div className="columns is-mobile">
<div className="column">
<h4 className="title is-4 is-small">{gardenViewModel.dayString}</h4>
... |
joonamo/garden | src/ScoreBoard.tsx | import { observer } from 'mobx-react'
import * as React from 'react'
import { appViewModel } from './AppViewModel'
import { ScoreEntry } from './highscoreClient'
import classNames from 'classnames'
import { gardenViewModel } from './GardenViewModel'
// import classNames from 'classnames'
export const ScoreBoard = obse... |
joonamo/garden | src/GameOverPopup.tsx | <filename>src/GameOverPopup.tsx
import * as React from 'react'
import { appViewModel } from './AppViewModel'
import { gardenViewModel } from './GardenViewModel'
import { ActionButton } from './ActionButton'
import { observer } from 'mobx-react'
export const GameOverPopup = observer(() => {
return <>
<div classN... |
joonamo/garden | src/GameOfLife.ts | class NeighbourReport {
public 1 = 0
public 2 = 0
public 3 = 0
}
const countRowNeighbors = (row: number[], col: number, notThis: boolean = false) => {
return [
(row[col - 1] ?? 0),
(notThis ? 0 : (row[col] ?? 0)),
(row[col + 1] ?? 0),
]
}
export const countNeighbors = (state: number[][], row: nu... |
joonamo/garden | src/App.tsx | import { observer } from 'mobx-react'
import * as React from 'react'
import { Garden } from './Garden'
import { Tools } from './Tools'
import { Calendar } from './Calendar'
import { Score } from './Score'
import { BottomRow } from './BottomRow'
import { ScoreBoard } from './ScoreBoard'
import { HowToPlay } from './HowT... |
joonamo/garden | src/Score.tsx | <reponame>joonamo/garden
import { observer } from 'mobx-react'
import * as React from 'react'
import { gardenViewModel } from './GardenViewModel'
export const Score = observer(() => (
<h2 className="title is-2 is-small">
Score: {gardenViewModel.scores.cumulative.toLocaleString('en-GB')}
</h2>
))
|
joonamo/garden | src/Garden.tsx | <gh_stars>0
import { observer } from 'mobx-react'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import * as React from 'react'
import { gardenViewModel, thisOrPrevious } from './GardenViewModel'
import './styles/sass/garden.scss'
import classNames from 'classnames'
export const Garden = observer((props... |
joonamo/garden | src/Tools.tsx | <filename>src/Tools.tsx
import { observer } from 'mobx-react'
import * as React from 'react'
import { gardenViewModel } from './GardenViewModel'
import classNames from 'classnames'
const showHelp = () => {
const elmnt = document.getElementById('how-to-play')
elmnt?.scrollIntoView()
}
export const Tools = observer... |
joonamo/garden | src/HowToPlay.tsx | import * as React from 'react'
import moment from 'moment'
import { lastMonth, dyingMinimum } from './GardenViewModel'
import './styles/sass/howtoplay.scss'
import classNames from 'classnames'
const showGame = () => {
const elmnt = document.getElementById('title')
elmnt?.scrollIntoView()
}
const ExampleFlower = (... |
joonamo/garden | src/BottomRow.tsx | /* eslint-disable no-restricted-globals */
import { observer } from 'mobx-react'
import * as React from 'react'
import { gardenViewModel } from './GardenViewModel'
import { ActionButton } from './ActionButton'
import { appViewModel } from './AppViewModel'
const confirmRestart = () => {
if (gardenViewModel.gameState... |
joonamo/garden | src/AppViewModel.ts | <reponame>joonamo/garden
/* eslint-disable no-restricted-globals */
import { observable, action, computed } from 'mobx'
import { ReplayEntry, serializeReplay, deserializeReplay } from './Replay'
import { postScore, ScoreEntry, getScores } from './highscoreClient'
import { gardenViewModel } from './GardenViewModel'
c... |
joonamo/garden | src/NameEntry.tsx | <gh_stars>0
import * as React from 'react'
import { appViewModel } from './AppViewModel'
export const NameEntry = () => {
const textRef = React.useRef<HTMLInputElement>(null)
const onClick = () => {
appViewModel.setPlayerName(textRef.current?.value ?? '')
}
return <>
<div className="dummy" />
<div... |
joonamo/garden | src/GardenViewModel.ts | <filename>src/GardenViewModel.ts
import { observable, action } from 'mobx'
import { simulate } from './GameOfLife'
import moment, { Moment } from 'moment'
import { ReplayEntry } from './Replay'
import { appViewModel } from './AppViewModel'
export const gardenSize = 15
export const startMonth = '5'
export const lastMon... |
joonamo/garden | src/Replay.ts | import { GardenState, Inventory } from './GardenViewModel'
export type serializedReplay = number[][][]
export class ReplayEntry {
data: number[][] = []
public pushInput = (row: number, col: number, flower: number) => {
this.data.push([row, col, flower])
}
public applyData = (garden: GardenState, invento... |
joonamo/garden | src/highscoreClient.ts | <reponame>joonamo/garden
import { serializedReplay } from './Replay'
import moment from 'moment'
import CryptoJS from 'crypto-js'
export interface ScoreEntry {
score: number
player: string
replay: serializedReplay
}
export const postScore = async (player: string, score: number, replay: serializedReplay) => {
... |
tsuki-lab/template-converter | src/colors.ts | <reponame>tsuki-lab/template-converter<gh_stars>1-10
const color =
(col: string) =>
(...strArr: string[]) =>
`\u001b[${col}m${strArr.join(' ')}\u001b[0m`;
export const colors = {
black: color('30'),
red: color('31'),
green: color('32'),
yellow: color('33'),
blue: color('34'),
magenta: color('35'),
... |
tsuki-lab/template-converter | src/utils.ts | <gh_stars>1-10
import * as fs from 'fs';
import * as path from 'path';
import { colors } from './colors';
import { OutputFile } from './interface';
export class Utils {
/**
* 引数の階層を作成する
*
* @static
* @param {string} path
* @memberof Utils
*/
public static createDir(path: string): void {
const... |
tsuki-lab/template-converter | src/interface.ts | <filename>src/interface.ts
export type Options = {
templatesDir: string;
template: string;
outputDir: string;
outputFileName: string;
};
export type OutputFile = {
path: string;
data: string;
};
|
tsuki-lab/template-converter | src/index.ts | import * as fs from 'fs';
import cac from 'cac';
import execute from './execute';
import { colors } from './colors';
import { Options } from './interface';
import { Utils } from './utils';
const cli = cac();
cli
.command('<path>', 'required <path>')
.option('-t, --templates-dir <path>', 'Selected templates dir', ... |
tsuki-lab/template-converter | src/execute.ts | import * as path from 'path';
import { prompt, QuestionCollection } from 'inquirer';
import { colors } from './colors';
import { Options } from './interface';
import { Utils } from './utils';
export default async (options: Options): Promise<void> => {
const templates = Utils.getDirInnerContentNames(options.templates... |
tsuki-lab/template-converter | scripts/build.ts | import { build } from 'esbuild';
import { nodeExternalsPlugin } from 'esbuild-node-externals';
void build({
entryPoints: ['src/index.ts'],
outfile: 'dist/bundle.js',
platform: 'node',
bundle: true,
minify: true,
plugins: [nodeExternalsPlugin()]
});
|
Ternoa/bip39 | ts_src/_wordlists.ts | // browserify by default only pulls in files that are hard coded in requires
// In order of last to first in this file, the default wordlist will be chosen
// based on what is present. (Bundles may remove wordlists they don't need)
const wordlists: { [index: string]: string[] } = {};
let _default: string[] | undefined;... |
hanzhangyu/highcharts-tree | src/Dictionary.ts | <reponame>hanzhangyu/highcharts-tree<gh_stars>0
export default class Dictionary<T, K> {
private map = new Map();
public set(key: T, value: K) {
this.map.set(key, value);
}
public get(key: T): K {
return this.map.get(key);
}
public keys(fn?: (key: T) => void): any[] {
co... |
hanzhangyu/highcharts-tree | src/TreeNode.ts | <filename>src/TreeNode.ts
import {TreeNodeData} from "../types";
export default class TreeNode<T extends TreeNodeData> {
public children: Array<TreeNode<T>>;
public x: number;
public y: number;
public mod: number;
public toggle: boolean = true;
public width: number;
public height: number;
constructor... |
hanzhangyu/highcharts-tree | test/dict.test.ts | import anyTest, { TestInterface } from "ava";
import Dictionary from "../src/Dictionary";
const NAMESPACE = "Dictionary: ";
const test = anyTest as TestInterface<{
dict: Dictionary<number, number>,
}>;
test.before(t => {
t.context.dict = new Dictionary<number, number>();
t.context.dict.set(0, 10);
t.context.... |
hanzhangyu/highcharts-tree | src/Tree.ts | <gh_stars>0
import { TreeNodeData } from "../types";
import TreeNode from "./TreeNode";
import Dictionary from "./Dictionary";
export default class Tree<T extends TreeNodeData> {
public static getTree<T extends TreeNodeData>({
tree,
data,
horizontal
}: {
tree?: Tree<T>;
data?: T;
horizontal... |
hanzhangyu/highcharts-tree | src/index.ts | <reponame>hanzhangyu/highcharts-tree
import { TreeNodeData, HighchartsTreeConfig } from "../types";
import TreeNode from "./TreeNode";
import Tree from "./Tree";
interface ElementObjectExtended extends Highcharts.ElementObject {
added: boolean;
}
const SHAPE_OFFSET = 3;
const NODE_WIDTH_OFFSET = SHAPE_OFFSET * 2;
... |
hanzhangyu/highcharts-tree | test/helper/data.ts | export const dataForShift = {
id: 1,
content: { title: "title 1", data: ["data", "text"] },
children: [
{
id: 2,
content: { title: "title 2", data: ["data"] },
children: [
{
id: 4,
content: { title: "title 4", data: ["data"] },
result: { x: 0, y: 2, widt... |
hanzhangyu/highcharts-tree | test/treeNode.test.ts | import {TreeNodeData} from "../types";
import anyTest, { TestInterface } from "ava";
import TreeNode from "../src/TreeNode";
const NAMESPACE = "TreeNode: ";
const test = anyTest as TestInterface<{
parentNode: TreeNode<TreeNodeData>;
childNode1: TreeNode<TreeNodeData>;
childNode2: TreeNode<TreeNodeData>;
child... |
hanzhangyu/highcharts-tree | test/tree.test.ts | <reponame>hanzhangyu/highcharts-tree
import { TreeNodeData } from "../types";
import anyTest, { TestInterface } from "ava";
import { dataForShift, dataForShiftOvermuch } from "./helper/data";
import Tree from "../src/Tree";
import TreeNode from "../src/TreeNode";
interface TreeNodeDataWithResult extends TreeNodeData {... |
hanzhangyu/highcharts-tree | types/index.d.ts | <filename>types/index.d.ts
declare const HighchartsTree: (Highcharts: any) => void;
export default HighchartsTree;
export interface TreeNodeData {
id: number;
content: {
title: string | number,
data: Array<string|number>,
};
children?: TreeNodeData[];
}
export interface HighchartsTreeC... |
paulvollmer/tfjs-models | speech-commands/src/types.ts | <filename>speech-commands/src/types.ts<gh_stars>0
/**
* @license
* Copyright 2018 Google LLC. 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.o... |
nacmartin/react-final-form | examples/strongly-typed-values-typescript/components/NumberInput.tsx | import React from "react";
import { FieldRenderProps } from "react-final-form";
type Props = FieldRenderProps<number, any>;
const NumberInput: React.FC<Props> = ({ input, meta, ...rest }: Props) => (
<input {...input} {...rest} type="number" />
);
export default NumberInput;
|
nacmartin/react-final-form | typescript/useFormState.test.tsx | import * as React from 'react';
import { useFormState } from 'react-final-form';
const submittingToLabel = (submitting: boolean) => (submitting ? 'Yes' : 'No');
function Comp1() {
const { submitting } = useFormState();
return submittingToLabel(submitting);
}
|
nacmartin/react-final-form | examples/strongly-typed-values-typescript/components/TextInput.tsx | <filename>examples/strongly-typed-values-typescript/components/TextInput.tsx
import React from "react";
import { FieldRenderProps } from "react-final-form";
type Props = FieldRenderProps<string, any>;
const TextInput: React.FC<Props> = ({ input, meta, ...rest }: Props) => (
<input type="text" {...input} {...rest} /... |
nacmartin/react-final-form | typescript/FormSpy.test.tsx | import * as React from 'react';
import { FormSpy } from 'react-final-form';
function submitButtonSpy() {
return (
<FormSpy subscription={{ pristine: true, submitting: true, valid: true }}>
{({ pristine, submitting, valid }) => {
return (
<button type="submit" disabled={submitting || prist... |
devcoditor/vscode-livepreview | src/infoManagers/connectionManager.ts | import { Disposable } from '../utils/dispose';
import * as vscode from 'vscode';
import { DEFAULT_HOST } from '../utils/constants';
import { isIPv4 } from 'net';
/**
* @description the port information that the server manager provides.
*/
export interface PortInfo {
port: number;
wsPort: number;
}
/*... |
devcoditor/vscode-livepreview | src/manager.ts | <filename>src/manager.ts
import * as vscode from 'vscode';
import { BrowserPreview } from './editorPreview/browserPreview';
import { Disposable } from './utils/dispose';
import { Server } from './server/serverManager';
import {
INIT_PANEL_TITLE,
DONT_SHOW_AGAIN,
OUTPUT_CHANNEL_NAME,
} from './utils/constants... |
AbeeraTariq02787/HU_Carpool | src/app/app.module.ts | import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import {Observable} from 'rxjs';
//import 'rxjs/add/operator/toPromise';
import { AppComponent... |
AbeeraTariq02787/HU_Carpool | src/app/book-create/book-create.component.ts | import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ApiService } from '../api.service';
import { FormControl, FormGroupDirective, FormBuilder, FormGroup, NgForm, Validators } from '@angular/forms';
@Component({
selector: 'app-book-create',
templateUrl: './book-crea... |
AbeeraTariq02787/HU_Carpool | src/app/auth.guard.ts | <gh_stars>1-10
import {CanActivate, Router} from '@angular/router';
import {Injectable} from '@angular/core';
import {CustomerService} from './customer.service';
import {ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router/src/router_state';
@Injectable()
export class NeedAuthGuard implements CanActivate... |
AbeeraTariq02787/HU_Carpool | src/app/book/book.component.ts | <reponame>AbeeraTariq02787/HU_Carpool
import { Component, OnInit } from '@angular/core';
import { ApiService } from '../api.service';
import { DataSource } from '@angular/cdk/collections';
import { Observable } from 'rxjs';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-book',
templ... |
AbeeraTariq02787/HU_Carpool | src/app/dashboard-page/dashboard-page.module.spec.ts | <filename>src/app/dashboard-page/dashboard-page.module.spec.ts<gh_stars>1-10
import { DashboardPageModule } from './dashboard-page.module';
describe('DashboardPageModule', () => {
let dashboardPageModule: DashboardPageModule;
beforeEach(() => {
dashboardPageModule = new DashboardPageModule();
});
it('sho... |
AbeeraTariq02787/HU_Carpool | models/LoginResultModel.ts | <reponame>AbeeraTariq02787/HU_Carpool
export interface LoginResultModel {
token: string;
error: string;
} |
AbeeraTariq02787/HU_Carpool | src/app/user/user.component.ts | <gh_stars>1-10
import { Component, OnInit } from '@angular/core';
import { ApiService } from '../api.service';
import { DataSource } from '@angular/cdk/collections';
import { Observable } from 'rxjs';
import { Router } from '@angular/router';
import { UserService } from '../core/user.service';
import { AuthService } f... |
AbeeraTariq02787/HU_Carpool | src/app/login-page/login-page.component.ts | import {Component} from '@angular/core';
import {ApiService} from '../api.service';
import {CustomerService} from '../customer.service';
import {Router} from '@angular/router';
@Component({
selector: 'app-login-page',
templateUrl: './login-page.component.html',
styleUrls: ['./login-page.component.css']
})
export... |
AbeeraTariq02787/HU_Carpool | src/app/app.routes.ts | <gh_stars>1-10
import { Routes } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { BookComponent } from './user/user.component';
import { ShowUserComponent } from './book/book.component';
import { RegisterComponent } from './register/register.component';
import { UserResolver }... |
AbeeraTariq02787/HU_Carpool | src/app/book-edit/book-edit.component.ts | <filename>src/app/book-edit/book-edit.component.ts
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { ApiService } from '../api.service';
import { FormControl, FormGroupDirective, FormBuilder, FormGroup, NgForm, Validators } from '@angular/forms';
@Com... |
albertoMejia828/Dashboard | src/app/pages/pages.module.ts | <filename>src/app/pages/pages.module.ts
import { NgModule } from '@angular/core';
import { PAGES_ROUTES } from './pages.routes';
import { PrincipalComponent } from './principal/principal.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { ProgressComponent } from './progress/progr... |
albertoMejia828/Dashboard | src/app/pages/pages.routes.ts | <gh_stars>1-10
import { Routes, RouterModule } from '@angular/router';
import { PrincipalComponent } from './principal/principal.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { ProgressComponent } from './progress/progress.component';
import { ChartComponent } from './chart/ch... |
albertoMejia828/Dashboard | src/app/shared/shared.module.ts | import { NgModule } from '@angular/core';
import { NopagefoundComponent } from '../shared/nopagefound/nopagefound.component';
import { HeaderComponent } from '../shared/header/header.component';
import { SidebarComponent } from '../shared/sidebar/sidebar.component';
import { BreadcrumbsComponent } from '../shared/bread... |
albertoMejia828/Dashboard | src/app/routes.ts | <reponame>albertoMejia828/Dashboard<gh_stars>1-10
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from './pages/dashboard/dashboard.component';
import { LoginComponent } from './login/login.component';
import { ProgressComponent } from './pages/progress/progress.component';
import ... |
WhiteSky7/bookappts2 | frontend/components/Navbar.tsx | import React, { Component } from 'react';
import { withAuth } from '@okta/okta-react';
import { Container, Menu } from 'semantic-ui-react';
export default class Navbar extends Component {
constructor(props) {
super(props);
this.state = { authenticated: null };
this.checkAuthentication = this.checkAuthen... |
WhiteSky7/bookappts2 | frontend/contexts/UserContext.tsx | import React, { createContext, ReactNode, useState } from "react";
export const defaults = {
id: "48732093478543",
name: "George",
email: "<EMAIL>",
}
export interface IUser {
id: string;
name: string;
email: string;
}
interface IProps {
children: ReactNode;
}
export const UserContext = createContext<IUser |... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.