This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>TradingView Trading Terminal demo</title> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0"> | |
| <script type="text/javascript" src="charting_library/charting_library.standalone.js"></script> | |
| <script type="text/javascript" src="datafeeds/udf/dist/bundle.js"></script> | |
| <script type="text/javascript"> | |
| const tvKey = "tv-tp" | |
| const DefaultResolutions = ['1S', '1', '3', '5', '15', '30', '60', '120', '240', '360', '480', '720', '1D', '3D', '1W', '1M'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const machine = Machine({ | |
| initial: 'ready', | |
| on: { | |
| TYPE: { | |
| target: 'startSearching', | |
| actions: ['setKeyword'], | |
| }, | |
| SEARCH: 'searching', | |
| ERROR: 'error', | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Machine, Interpreter, assign, spawn } from 'xstate' | |
| import InputMachine, { | |
| Context as InputContext, | |
| Schema as InputSchema, | |
| Events as InputEvents | |
| } from './inputMachine' | |
| import { submitForm, Response } from './api' | |
| export type Context = { | |
| email: Interpreter<InputContext, InputSchema, InputEvents> | undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // index.js | |
| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| import Select from "react-select"; | |
| import "./styles.css"; | |
| const options = [ | |
| { label: "aaa", value: 1 }, | |
| { label: "bbb", value: 2 }, | |
| { label: "ccc", value: 3 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { Field, reduxForm } from 'redux-form'; | |
| import AutoSuggest from 'react-autosuggest'; | |
| import styles from './styles.css'; | |
| const suggestions = [ | |
| { label: 'Apple', value: 1 }, | |
| { label: 'Aqua', value: 2 }, | |
| { label: 'Banana', value: 3 }, | |
| { label: 'Bean', value: 4 }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import $ from 'jquery'; | |
| import _ from 'lodash'; | |
| import 'normalize.css'; | |
| import "slick-carousel/slick/slick.css"; | |
| import "slick-carousel/slick/slick-theme.css"; | |
| import './App.css'; | |
| const translateArrayIndex = (arr, index) => { | |
| const rest = index % arr.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'react-select/dist/react-select.css'; | |
| import React from 'react'; | |
| import { Field, reduxForm } from 'redux-form'; | |
| import Select from 'react-select'; | |
| const transValue = (value) => ({ label: value, value }); | |
| const Input = ({ input, options = [], showDropdown = false }) => { | |
| return <Select.Creatable | |
| inputProps={input} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Field { | |
| name: string; | |
| path?: string; | |
| } | |
| interface Fields { | |
| [name: string]: Section | Field; | |
| } | |
| interface Section extends Field { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { PureComponent } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { | |
| SortableTreeWithoutDndContext as SortableTree, | |
| dndWrapExternalSource, | |
| insertNode | |
| } from 'react-sortable-tree'; | |
| import HTML5Backend from 'react-dnd-html5-backend'; | |
| import { DropTarget, DragDropContext } from 'react-dnd'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import _ from "lodash"; | |
| import {fn as isGeneratorFn} from "is-generator"; | |
| const generatorMiddleware = store => next => action => { | |
| let {dispatch} = store; | |
| let generator = findGenerator(action); | |
| if(isGeneratorFn(action)){ | |
| return runGenerator(dispatch, action, action); | |
| } | |
| else if(generator){ |
NewerOlder