fix remaining tslint errors
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"scripts": {
|
||||
"build": "NODE_ENV=production webpack; exit 0;",
|
||||
"clean": "shx rm -f public/bundle*",
|
||||
"lint": "tslint --project . 'ts/**/*.ts'",
|
||||
"lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'",
|
||||
"dev": "webpack-dev-server --content-base public --https",
|
||||
"update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../website/contracts; done;",
|
||||
"deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {BlockchainErrs} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface BlockchainErrDialogProps {
|
||||
blockchain: Blockchain;
|
||||
@@ -21,6 +21,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
||||
public render() {
|
||||
const dialogActions = [
|
||||
<FlatButton
|
||||
key="blockchainErrOk"
|
||||
label="Ok"
|
||||
primary={true}
|
||||
onTouchTap={this.props.toggleDialogFn.bind(this.props.toggleDialogFn, false)}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import RadioButtonGroup from 'material-ui/RadioButton/RadioButtonGroup';
|
||||
import RadioButton from 'material-ui/RadioButton';
|
||||
import {Side, Token, TokenState} from 'ts/types';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import RadioButtonGroup from 'material-ui/RadioButton/RadioButtonGroup';
|
||||
import * as React from 'react';
|
||||
import {EthAmountInput} from 'ts/components/inputs/eth_amount_input';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import {Side, Token, TokenState} from 'ts/types';
|
||||
|
||||
interface EthWethConversionDialogProps {
|
||||
onComplete: (direction: Side, value: BigNumber) => void;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
TableHeaderColumn,
|
||||
TableRow,
|
||||
TableRowColumn,
|
||||
} from 'material-ui/Table';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {LifeCycleRaisedButton} from 'ts/components/ui/lifecycle_raised_button';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const VALID_ETHEREUM_DERIVATION_PATH_PREFIX = `44'/60'`;
|
||||
|
||||
@@ -59,6 +59,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
|
||||
public render() {
|
||||
const dialogActions = [
|
||||
<FlatButton
|
||||
key="ledgerConnectCancel"
|
||||
label="Cancel"
|
||||
onTouchTap={this.onClose.bind(this)}
|
||||
/>,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface PortalDisclaimerDialogProps {
|
||||
@@ -16,6 +16,7 @@ export function PortalDisclaimerDialog(props: PortalDisclaimerDialogProps) {
|
||||
titleStyle={{fontWeight: 100}}
|
||||
actions={[
|
||||
<FlatButton
|
||||
key="portalAgree"
|
||||
label="I Agree"
|
||||
onTouchTap={props.onToggleDialog.bind(this)}
|
||||
/>,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import RadioButtonGroup from 'material-ui/RadioButton/RadioButtonGroup';
|
||||
import RadioButton from 'material-ui/RadioButton';
|
||||
import {Side, Token, TokenState} from 'ts/types';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import {EthAmountInput} from 'ts/components/inputs/eth_amount_input';
|
||||
import RadioButtonGroup from 'material-ui/RadioButton/RadioButtonGroup';
|
||||
import * as React from 'react';
|
||||
import {AddressInput} from 'ts/components/inputs/address_input';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {EthAmountInput} from 'ts/components/inputs/eth_amount_input';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import {Side, Token, TokenState} from 'ts/types';
|
||||
|
||||
interface SendDialogProps {
|
||||
onComplete: (recipient: string, value: BigNumber) => void;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {TrackTokenConfirmation} from 'ts/components/track_token_confirmation';
|
||||
import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {Token, TokenByAddress} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface TrackTokenConfirmationDialogProps {
|
||||
tokens: Token[];
|
||||
@@ -41,10 +41,12 @@ export class TrackTokenConfirmationDialog extends
|
||||
titleStyle={{fontWeight: 100}}
|
||||
actions={[
|
||||
<FlatButton
|
||||
key="trackNo"
|
||||
label="No"
|
||||
onTouchTap={this.onTrackConfirmationRespondedAsync.bind(this, false)}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="trackYes"
|
||||
label="Yes"
|
||||
onTouchTap={this.onTrackConfirmationRespondedAsync.bind(this, true)}
|
||||
/>,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface U2fNotSupportedDialogProps {
|
||||
@@ -16,6 +16,7 @@ export function U2fNotSupportedDialog(props: U2fNotSupportedDialogProps) {
|
||||
titleStyle={{fontWeight: 100}}
|
||||
actions={[
|
||||
<FlatButton
|
||||
key="u2fNo"
|
||||
label="Ok"
|
||||
onTouchTap={props.onToggleDialog.bind(this)}
|
||||
/>,
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import * as _ from 'lodash';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {BlockchainCallErrs, TokenState} from 'ts/types';
|
||||
import {EthWethConversionDialog} from 'ts/components/dialogs/eth_weth_conversion_dialog';
|
||||
import {Side, Token} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {EthWethConversionDialog} from 'ts/components/dialogs/eth_weth_conversion_dialog';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {BlockchainCallErrs, Side, Token, TokenState} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface EthWethConversionButtonProps {
|
||||
ethToken: Token;
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {Order as ZeroExOrder, ZeroEx} from '0x.js';
|
||||
import * as accounting from 'accounting';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {ZeroEx, Order as ZeroExOrder} from '0x.js';
|
||||
import * as moment from 'moment';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import {Card, CardText, CardHeader} from 'material-ui/Card';
|
||||
import * as _ from 'lodash';
|
||||
import {Card, CardHeader, CardText} from 'material-ui/Card';
|
||||
import Divider from 'material-ui/Divider';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as moment from 'moment';
|
||||
import * as React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {TrackTokenConfirmationDialog} from 'ts/components/dialogs/track_token_confirmation_dialog';
|
||||
import {FillOrderJSON} from 'ts/components/fill_order_json';
|
||||
import {FillWarningDialog} from 'ts/components/fill_warning_dialog';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import {Alert} from 'ts/components/ui/alert';
|
||||
import {EthereumAddress} from 'ts/components/ui/ethereum_address';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {VisualOrder} from 'ts/components/visual_order';
|
||||
import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {orderSchema} from 'ts/schemas/order_schema';
|
||||
import {SchemaValidator} from 'ts/schemas/validator';
|
||||
import {
|
||||
AlertTypes,
|
||||
BlockchainErrs,
|
||||
ContractResponse,
|
||||
ExchangeContractErrs,
|
||||
Order,
|
||||
OrderToken,
|
||||
Side,
|
||||
Token,
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
Order,
|
||||
BlockchainErrs,
|
||||
OrderToken,
|
||||
Token,
|
||||
ExchangeContractErrs,
|
||||
AlertTypes,
|
||||
ContractResponse,
|
||||
WebsitePaths,
|
||||
} from 'ts/types';
|
||||
import {Alert} from 'ts/components/ui/alert';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {EthereumAddress} from 'ts/components/ui/ethereum_address';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import {FillWarningDialog} from 'ts/components/fill_warning_dialog';
|
||||
import {FillOrderJSON} from 'ts/components/fill_order_json';
|
||||
import {VisualOrder} from 'ts/components/visual_order';
|
||||
import {SchemaValidator} from 'ts/schemas/validator';
|
||||
import {orderSchema} from 'ts/schemas/order_schema';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage';
|
||||
import {TrackTokenConfirmationDialog} from 'ts/components/dialogs/track_token_confirmation_dialog';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const CUSTOM_LIGHT_GRAY = '#BBBBBB';
|
||||
|
||||
@@ -100,6 +100,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
|
||||
}
|
||||
public componentWillMount() {
|
||||
if (!_.isEmpty(this.state.orderJSON)) {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.validateFillOrderFireAndForgetAsync(this.state.orderJSON);
|
||||
}
|
||||
}
|
||||
@@ -351,6 +352,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
|
||||
isFillWarningDialogOpen: true,
|
||||
});
|
||||
} else {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.onFillOrderClickFireAndForgetAsync();
|
||||
}
|
||||
}
|
||||
@@ -359,6 +361,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
|
||||
isFillWarningDialogOpen: false,
|
||||
});
|
||||
if (!didUserCancel) {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.onFillOrderClickFireAndForgetAsync();
|
||||
}
|
||||
}
|
||||
@@ -371,6 +374,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
|
||||
didOrderValidationRun: _.isEmpty(orderJSON) && _.isEmpty(this.state.orderJSONErrMsg),
|
||||
didFillOrderSucceed: false,
|
||||
});
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.validateFillOrderFireAndForgetAsync(orderJSON);
|
||||
}
|
||||
private async checkForUntrackedTokensAndAskToAdd() {
|
||||
@@ -563,7 +567,9 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
|
||||
await this.props.blockchain.validateFillOrderThrowIfInvalidAsync(
|
||||
signedOrder, takerFillAmount, this.props.userAddress);
|
||||
} catch (err) {
|
||||
globalErrMsg = this.props.blockchain.zeroExErrToHumanReadableErrMsg(err.message, parsedOrder.taker.address);
|
||||
globalErrMsg = utils.zeroExErrToHumanReadableErrMsg(
|
||||
err.message, parsedOrder.taker.address,
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!_.isEmpty(globalErrMsg)) {
|
||||
@@ -652,7 +658,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
|
||||
await this.props.blockchain.validateCancelOrderThrowIfInvalidAsync(
|
||||
signedOrder, availableTakerTokenAmount);
|
||||
} catch (err) {
|
||||
globalErrMsg = this.props.blockchain.zeroExErrToHumanReadableErrMsg(err.message, parsedOrder.taker.address);
|
||||
globalErrMsg = utils.zeroExErrToHumanReadableErrMsg(err.message, parsedOrder.taker.address);
|
||||
}
|
||||
if (!_.isEmpty(globalErrMsg)) {
|
||||
this.setState({
|
||||
@@ -711,4 +717,4 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
|
||||
tokensToTrack: [],
|
||||
});
|
||||
}
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import {Side, TokenByAddress} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Side, TokenByAddress} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface FillOrderJSONProps {
|
||||
blockchain: Blockchain;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
|
||||
interface FillWarningDialogProps {
|
||||
isOpen: boolean;
|
||||
@@ -16,10 +16,12 @@ export function FillWarningDialog(props: FillWarningDialogProps) {
|
||||
titleStyle={{fontWeight: 100, color: colors.red500}}
|
||||
actions={[
|
||||
<FlatButton
|
||||
key="fillWarningCancel"
|
||||
label="Cancel"
|
||||
onTouchTap={props.onToggleDialog.bind(this, didCancel)}
|
||||
/>,
|
||||
<FlatButton
|
||||
key="fillWarningContinue"
|
||||
label="Fill Order"
|
||||
onTouchTap={props.onToggleDialog.bind(this, !didCancel)}
|
||||
/>,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import * as _ from 'lodash';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {Token} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
interface TransactionSubmittedProps {
|
||||
etherScanLinkIfExists?: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {HashLink} from 'react-router-hash-link';
|
||||
import {Styles, WebsitePaths} from 'ts/types';
|
||||
import {
|
||||
Link,
|
||||
} from 'react-router-dom';
|
||||
import {HashLink} from 'react-router-hash-link';
|
||||
import {
|
||||
Link as ScrollLink,
|
||||
} from 'react-scroll';
|
||||
import {Styles, WebsitePaths} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface MenuItemsBySection {
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import GridList from 'material-ui/GridList/GridList';
|
||||
import GridTile from 'material-ui/GridList/GridTile';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
Token,
|
||||
AssetToken,
|
||||
TokenByAddress,
|
||||
Styles,
|
||||
TokenState,
|
||||
DialogConfigs,
|
||||
TokenVisibility,
|
||||
} from 'ts/types';
|
||||
import {NewTokenForm} from 'ts/components/generate_order/new_token_form';
|
||||
import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage';
|
||||
import {TrackTokenConfirmation} from 'ts/components/track_token_confirmation';
|
||||
import {TokenIcon} from 'ts/components/ui/token_icon';
|
||||
import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
AssetToken,
|
||||
DialogConfigs,
|
||||
Styles,
|
||||
Token,
|
||||
TokenByAddress,
|
||||
TokenState,
|
||||
TokenVisibility,
|
||||
} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const TOKEN_ICON_DIMENSION = 100;
|
||||
const TILE_DIMENSION = 146;
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {ZeroEx, Order} from '0x.js';
|
||||
import {Order, ZeroEx} from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import Divider from 'material-ui/Divider';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import Divider from 'material-ui/Divider';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {SchemaValidator} from 'ts/schemas/validator';
|
||||
import {orderSchema} from 'ts/schemas/order_schema';
|
||||
import {Alert} from 'ts/components/ui/alert';
|
||||
import {OrderJSON} from 'ts/components/order_json';
|
||||
import {IdenticonAddressInput} from 'ts/components/inputs/identicon_address_input';
|
||||
import {TokenInput} from 'ts/components/inputs/token_input';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import {HashInput} from 'ts/components/inputs/hash_input';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {ExpirationInput} from 'ts/components/inputs/expiration_input';
|
||||
import {LifeCycleRaisedButton} from 'ts/components/ui/lifecycle_raised_button';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {HashInput} from 'ts/components/inputs/hash_input';
|
||||
import {IdenticonAddressInput} from 'ts/components/inputs/identicon_address_input';
|
||||
import {TokenAmountInput} from 'ts/components/inputs/token_amount_input';
|
||||
import {TokenInput} from 'ts/components/inputs/token_input';
|
||||
import {OrderJSON} from 'ts/components/order_json';
|
||||
import {Alert} from 'ts/components/ui/alert';
|
||||
import {HelpTooltip} from 'ts/components/ui/help_tooltip';
|
||||
import {LifeCycleRaisedButton} from 'ts/components/ui/lifecycle_raised_button';
|
||||
import {SwapIcon} from 'ts/components/ui/swap_icon';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {orderSchema} from 'ts/schemas/order_schema';
|
||||
import {SchemaValidator} from 'ts/schemas/validator';
|
||||
import {
|
||||
AlertTypes,
|
||||
BlockchainErrs,
|
||||
HashData,
|
||||
Side,
|
||||
SideToAssetToken,
|
||||
SignatureData,
|
||||
HashData,
|
||||
Token,
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
BlockchainErrs,
|
||||
Token,
|
||||
AlertTypes,
|
||||
} from 'ts/types';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
enum SigningState {
|
||||
UNSIGNED,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Token, TokenState, TokenByAddress, AlertTypes} from 'ts/types';
|
||||
import {AddressInput} from 'ts/components/inputs/address_input';
|
||||
import {Alert} from 'ts/components/ui/alert';
|
||||
import {LifeCycleRaisedButton} from 'ts/components/ui/lifecycle_raised_button';
|
||||
import {RequiredLabel} from 'ts/components/ui/required_label';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {AlertTypes, Token, TokenByAddress, TokenState} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface NewTokenFormProps {
|
||||
blockchain: Blockchain;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {isAddress} from 'ethereum-address';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {RequiredLabel} from 'ts/components/ui/required_label';
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import Toggle from 'material-ui/Toggle';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {Token, TokenState, BalanceErrs} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {BalanceErrs, Token, TokenState} from 'ts/types';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const DEFAULT_ALLOWANCE_AMOUNT_IN_BASE_UNITS = new BigNumber(2).pow(256).minus(1);
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {ValidatedBigNumberCallback, InputErrMsg, WebsitePaths} from 'ts/types';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import {RequiredLabel} from 'ts/components/ui/required_label';
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {RequiredLabel} from 'ts/components/ui/required_label';
|
||||
import {InputErrMsg, ValidatedBigNumberCallback, WebsitePaths} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface BalanceBoundedInputProps {
|
||||
label?: string;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {ZeroEx} from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import {ValidatedBigNumberCallback} from 'ts/types';
|
||||
import {BalanceBoundedInput} from 'ts/components/inputs/balance_bounded_input';
|
||||
import {ValidatedBigNumberCallback} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface EthAmountInputProps {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import DatePicker from 'material-ui/DatePicker';
|
||||
import TimePicker from 'material-ui/TimePicker';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as moment from 'moment';
|
||||
import * as React from 'react';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface ExpirationInputProps {
|
||||
orderExpiryTimestamp: BigNumber;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {Order, ZeroEx} from '0x.js';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {ZeroEx, Order} from '0x.js';
|
||||
import {FakeTextField} from 'ts/components/ui/fake_text_field';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {FakeTextField} from 'ts/components/ui/fake_text_field';
|
||||
import {HashData, Styles} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {RequiredLabel} from 'ts/components/ui/required_label';
|
||||
import {AddressInput} from 'ts/components/inputs/address_input';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {InputLabel} from 'ts/components/ui/input_label';
|
||||
import {RequiredLabel} from 'ts/components/ui/required_label';
|
||||
|
||||
interface IdenticonAddressInputProps {
|
||||
initialAddress: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as React from 'react';
|
||||
import * as _ from 'lodash';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import {Link} from 'react-router-dom';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {Token, TokenState, InputErrMsg, ValidatedBigNumberCallback, WebsitePaths} from 'ts/types';
|
||||
import * as React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {BalanceBoundedInput} from 'ts/components/inputs/balance_bounded_input';
|
||||
import {InputErrMsg, Token, TokenState, ValidatedBigNumberCallback, WebsitePaths} from 'ts/types';
|
||||
|
||||
interface TokenAmountInputProps {
|
||||
label: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {AssetToken, Side, TokenByAddress, BlockchainErrs, Token, TokenState} from 'ts/types';
|
||||
import {AssetPicker} from 'ts/components/generate_order/asset_picker';
|
||||
import {InputLabel} from 'ts/components/ui/input_label';
|
||||
import {TokenIcon} from 'ts/components/ui/token_icon';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {AssetToken, BlockchainErrs, Side, Token, TokenByAddress, TokenState} from 'ts/types';
|
||||
|
||||
const TOKEN_ICON_DIMENSION = 80;
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as _ from 'lodash';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
import {CopyIcon} from 'ts/components/ui/copy_icon';
|
||||
import {SideToAssetToken, SignatureData, Order, TokenByAddress, WebsitePaths} from 'ts/types';
|
||||
import {Order, SideToAssetToken, SignatureData, TokenByAddress, WebsitePaths} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface OrderJSONProps {
|
||||
exchangeContractIfExists: string;
|
||||
@@ -36,6 +36,7 @@ export class OrderJSON extends React.Component<OrderJSONProps, OrderJSONState> {
|
||||
this.state = {
|
||||
shareLink: '',
|
||||
};
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.setShareLinkAsync();
|
||||
}
|
||||
public render() {
|
||||
@@ -149,7 +150,7 @@ You can see and fill it here: ${this.state.shareLink}`);
|
||||
await errorReporter.reportAsync(new Error(`Bitly returned non-200: ${JSON.stringify(response)}`));
|
||||
return '';
|
||||
}
|
||||
return (bodyObj as any).data.url;
|
||||
return (bodyObj).data.url;
|
||||
}
|
||||
private getOrderUrl() {
|
||||
const order = utils.generateOrder(this.props.networkId, this.props.exchangeContractIfExists,
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import {Switch, Route} from 'react-router-dom';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {GenerateOrderForm} from 'ts/containers/generate_order_form';
|
||||
import {TokenBalances} from 'ts/components/token_balances';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import {Route, Switch} from 'react-router-dom';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {BlockchainErrDialog} from 'ts/components/dialogs/blockchain_err_dialog';
|
||||
import {PortalDisclaimerDialog} from 'ts/components/dialogs/portal_disclaimer_dialog';
|
||||
import {FillOrder} from 'ts/components/fill_order';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {SchemaValidator} from 'ts/schemas/validator';
|
||||
import {orderSchema} from 'ts/schemas/order_schema';
|
||||
import {localStorage} from 'ts/local_storage/local_storage';
|
||||
import {Footer} from 'ts/components/footer';
|
||||
import {PortalMenu} from 'ts/components/portal_menu';
|
||||
import {TokenBalances} from 'ts/components/token_balances';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {TradeHistory} from 'ts/components/trade_history/trade_history';
|
||||
import {FlashMessage} from 'ts/components/ui/flash_message';
|
||||
import {Loading} from 'ts/components/ui/loading';
|
||||
import {GenerateOrderForm} from 'ts/containers/generate_order_form';
|
||||
import {localStorage} from 'ts/local_storage/local_storage';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {orderSchema} from 'ts/schemas/order_schema';
|
||||
import {SchemaValidator} from 'ts/schemas/validator';
|
||||
import {
|
||||
HashData,
|
||||
TokenByAddress,
|
||||
BlockchainErrs,
|
||||
Order,
|
||||
Fill,
|
||||
HashData,
|
||||
Order,
|
||||
ScreenWidths,
|
||||
Side,
|
||||
Styles,
|
||||
ScreenWidths,
|
||||
Token,
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
WebsitePaths,
|
||||
} from 'ts/types';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {Footer} from 'ts/components/footer';
|
||||
import {Loading} from 'ts/components/ui/loading';
|
||||
import {PortalMenu} from 'ts/components/portal_menu';
|
||||
import {BlockchainErrDialog} from 'ts/components/dialogs/blockchain_err_dialog';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {FlashMessage} from 'ts/components/ui/flash_message';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const THROTTLE_TIMEOUT = 100;
|
||||
|
||||
@@ -131,16 +131,19 @@ export class Portal extends React.Component<PortalAllProps, PortalAllState> {
|
||||
}
|
||||
public componentWillReceiveProps(nextProps: PortalAllProps) {
|
||||
if (nextProps.networkId !== this.state.prevNetworkId) {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.blockchain.networkIdUpdatedFireAndForgetAsync(nextProps.networkId);
|
||||
this.setState({
|
||||
prevNetworkId: nextProps.networkId,
|
||||
});
|
||||
}
|
||||
if (nextProps.userAddress !== this.state.prevUserAddress) {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.blockchain.userAddressUpdatedFireAndForgetAsync(nextProps.userAddress);
|
||||
if (!_.isEmpty(nextProps.userAddress) &&
|
||||
nextProps.blockchainIsLoaded) {
|
||||
const tokens = _.values(nextProps.tokenByAddress);
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.updateBalanceAndAllowanceWithLoadingScreenAsync(tokens);
|
||||
}
|
||||
this.setState({
|
||||
@@ -148,6 +151,7 @@ export class Portal extends React.Component<PortalAllProps, PortalAllState> {
|
||||
});
|
||||
}
|
||||
if (nextProps.nodeVersion !== this.state.prevNodeVersion) {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.blockchain.nodeVersionUpdatedFireAndForgetAsync(nextProps.nodeVersion);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {MenuItem} from 'ts/components/ui/menu_item';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {MenuItem} from 'ts/components/ui/menu_item';
|
||||
import {WebsitePaths} from 'ts/types';
|
||||
|
||||
export interface PortalMenuProps {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import * as _ from 'lodash';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import * as React from 'react';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {BlockchainCallErrs, Token, TokenState} from 'ts/types';
|
||||
import {SendDialog} from 'ts/components/dialogs/send_dialog';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {SendDialog} from 'ts/components/dialogs/send_dialog';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {BlockchainCallErrs, Token, TokenState} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface SendButtonProps {
|
||||
token: Token;
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import DharmaLoanFrame from 'dharma-loan-frame';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import Divider from 'material-ui/Divider';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import FloatingActionButton from 'material-ui/FloatingActionButton';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import ContentAdd from 'material-ui/svg-icons/content/add';
|
||||
import ContentRemove from 'material-ui/svg-icons/content/remove';
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
TableHeaderColumn,
|
||||
TableRow,
|
||||
TableRowColumn,
|
||||
} from 'material-ui/Table';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import BigNumber from 'bignumber.js';
|
||||
import firstBy = require('thenby');
|
||||
import QueryString = require('query-string');
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
Token,
|
||||
BlockchainErrs,
|
||||
BalanceErrs,
|
||||
Styles,
|
||||
ScreenWidths,
|
||||
EtherscanLinkSuffixes,
|
||||
BlockchainCallErrs,
|
||||
TokenVisibility,
|
||||
} from 'ts/types';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import firstBy = require('thenby');
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {LifeCycleRaisedButton} from 'ts/components/ui/lifecycle_raised_button';
|
||||
import {HelpTooltip} from 'ts/components/ui/help_tooltip';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {AllowanceToggle} from 'ts/components/inputs/allowance_toggle';
|
||||
import {EthWethConversionButton} from 'ts/components/eth_weth_conversion_button';
|
||||
import {SendButton} from 'ts/components/send_button';
|
||||
import {AssetPicker} from 'ts/components/generate_order/asset_picker';
|
||||
import {AllowanceToggle} from 'ts/components/inputs/allowance_toggle';
|
||||
import {SendButton} from 'ts/components/send_button';
|
||||
import {HelpTooltip} from 'ts/components/ui/help_tooltip';
|
||||
import {LifeCycleRaisedButton} from 'ts/components/ui/lifecycle_raised_button';
|
||||
import {TokenIcon} from 'ts/components/ui/token_icon';
|
||||
import {trackedTokenStorage} from 'ts/local_storage/tracked_token_storage';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
BalanceErrs,
|
||||
BlockchainCallErrs,
|
||||
BlockchainErrs,
|
||||
EtherscanLinkSuffixes,
|
||||
ScreenWidths,
|
||||
Styles,
|
||||
Token,
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
TokenVisibility,
|
||||
} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {errorReporter} from 'ts/utils/error_reporter';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const ETHER_ICON_PATH = '/images/ether.png';
|
||||
const ETHER_TOKEN_SYMBOL = 'WETH';
|
||||
@@ -665,6 +665,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
|
||||
isZRXSpinnerVisible: true,
|
||||
currentZrxBalance: zrxTokenState.balance,
|
||||
});
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.props.blockchain.pollTokenBalanceAsync(zrxToken);
|
||||
}
|
||||
return true;
|
||||
@@ -696,4 +697,4 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
|
||||
isAddingToken: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {
|
||||
Link as ScrollLink,
|
||||
animateScroll,
|
||||
} from 'react-scroll';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {HashLink} from 'react-router-hash-link';
|
||||
import AppBar from 'material-ui/AppBar';
|
||||
import Drawer from 'material-ui/Drawer';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {HashLink} from 'react-router-hash-link';
|
||||
import {
|
||||
animateScroll,
|
||||
Link as ScrollLink,
|
||||
} from 'react-scroll';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {NestedSidebarMenu} from 'ts/pages/shared/nested_sidebar_menu';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import {PortalMenu} from 'ts/components/portal_menu';
|
||||
import {Styles, TypeDocNode, MenuSubsectionsBySection, WebsitePaths, Docs} from 'ts/types';
|
||||
import {TopBarMenuItem} from 'ts/components/top_bar_menu_item';
|
||||
import {DropDownMenuItem} from 'ts/components/ui/drop_down_menu_item';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {NestedSidebarMenu} from 'ts/pages/shared/nested_sidebar_menu';
|
||||
import {Docs, MenuSubsectionsBySection, Styles, TypeDocNode, WebsitePaths} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
|
||||
const CUSTOM_DARK_GRAY = '#231F20';
|
||||
const SECTION_HEADER_COLOR = 'rgb(234, 234, 234)';
|
||||
@@ -135,8 +135,15 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
|
||||
</a>,
|
||||
];
|
||||
const bottomBorderStyle = this.shouldDisplayBottomBar() ? styles.bottomBar : {};
|
||||
const fullWithClassNames = isFullWidthPage ? 'pr4' : '';
|
||||
const fullWidthClasses = isFullWidthPage ? 'pr4' : '';
|
||||
const logoUrl = isNightVersion ? '/images/protocol_logo_white.png' : '/images/protocol_logo_black.png';
|
||||
const menuClasses = `col col-${isFullWidthPage ? '4' : '5'} ${fullWidthClasses} lg-pr0 md-pr2 sm-hide xs-hide`;
|
||||
const menuIconStyle = {
|
||||
fontSize: 25,
|
||||
color: isNightVersion ? 'white' : 'black',
|
||||
cursor: 'pointer',
|
||||
paddingTop: 16,
|
||||
};
|
||||
return (
|
||||
<div style={{...styles.topBar, ...bottomBorderStyle, ...this.props.style}} className="pb1">
|
||||
<div className={parentClassNames}>
|
||||
@@ -148,7 +155,9 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
|
||||
<div className={`col col-${isFullWidthPage ? '8' : '9'} lg-hide md-hide`} />
|
||||
<div className={`col col-${isFullWidthPage ? '6' : '5'} sm-hide xs-hide`} />
|
||||
{!this.isViewingPortal() &&
|
||||
<div className={`col col-${isFullWidthPage ? '4' : '5'} ${fullWithClassNames} lg-pr0 md-pr2 sm-hide xs-hide`}>
|
||||
<div
|
||||
className={menuClasses}
|
||||
>
|
||||
<div className="flex justify-between">
|
||||
<DropDownMenuItem
|
||||
title="Developers"
|
||||
@@ -188,9 +197,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
|
||||
<div
|
||||
className={`col ${isFullWidthPage ? 'col-2 pl2' : 'col-1'} md-hide lg-hide`}
|
||||
>
|
||||
<div
|
||||
style={{fontSize: 25, color: isNightVersion ? 'white' : 'black', cursor: 'pointer', paddingTop: 16}}
|
||||
>
|
||||
<div style={menuIconStyle}>
|
||||
<i
|
||||
className="zmdi zmdi-menu"
|
||||
onClick={this.onMenuButtonClick.bind(this)}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Party} from 'ts/components/ui/party';
|
||||
import {Token, TokenByAddress} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface TrackTokenConfirmationProps {
|
||||
tokens: Token[];
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import Divider from 'material-ui/Divider';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {Fill, TokenByAddress} from 'ts/types';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import * as React from 'react';
|
||||
import {TradeHistoryItem} from 'ts/components/trade_history/trade_history_item';
|
||||
import {tradeHistoryStorage} from 'ts/local_storage/trade_history_storage';
|
||||
import {Fill, TokenByAddress} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const FILL_POLLING_INTERVAL = 1000;
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as ReactTooltip from 'react-tooltip';
|
||||
import * as moment from 'moment';
|
||||
import * as _ from 'lodash';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import {TokenByAddress, Fill, Token, EtherscanLinkSuffixes} from 'ts/types';
|
||||
import {Party} from 'ts/components/ui/party';
|
||||
import * as moment from 'moment';
|
||||
import * as React from 'react';
|
||||
import * as ReactTooltip from 'react-tooltip';
|
||||
import {EtherScanIcon} from 'ts/components/ui/etherscan_icon';
|
||||
import {Party} from 'ts/components/ui/party';
|
||||
import {EtherscanLinkSuffixes, Fill, Token, TokenByAddress} from 'ts/types';
|
||||
|
||||
const PRECISION = 5;
|
||||
const IDENTICON_DIAMETER = 40;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {AlertTypes} from 'ts/types';
|
||||
|
||||
const CUSTOM_GREEN = 'rgb(137, 199, 116)';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Styles} from 'ts/types';
|
||||
|
||||
const styles: Styles = {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import * as CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import * as CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
|
||||
interface CopyIconProps {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as _ from 'lodash';
|
||||
import Menu from 'material-ui/Menu';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import Popover from 'material-ui/Popover';
|
||||
import * as React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {
|
||||
Link as ScrollLink,
|
||||
} from 'react-scroll';
|
||||
import {Link} from 'react-router-dom';
|
||||
import Popover from 'material-ui/Popover';
|
||||
import Menu from 'material-ui/Menu';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import {Styles, WebsitePaths} from 'ts/types';
|
||||
|
||||
const CHECK_CLOSE_POPOVER_INTERVAL_MS = 300;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import {EtherScanIcon} from 'ts/components/ui/etherscan_icon';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import {EtherScanIcon} from 'ts/components/ui/etherscan_icon';
|
||||
import {EtherscanLinkSuffixes} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {EtherscanLinkSuffixes} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {InputLabel} from 'ts/components/ui/input_label';
|
||||
import {Styles} from 'ts/types';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import Snackbar from 'material-ui/Snackbar';
|
||||
import * as React from 'react';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
|
||||
const SHOW_DURATION_MS = 4000;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import blockies = require('blockies');
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import blockies = require('blockies');
|
||||
|
||||
interface IdenticonProps {
|
||||
address: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
|
||||
export interface InputLabelProps {
|
||||
text: string | Element | React.ReactNode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
|
||||
const CUSTOM_BLUE = '#63A6F1';
|
||||
|
||||
@@ -61,12 +61,9 @@ export class LabeledSwitcher extends React.Component<LabeledSwitcherProps, Label
|
||||
this.setState({
|
||||
isLeftSelected: isLeft,
|
||||
});
|
||||
let didSucceed;
|
||||
if (isLeft) {
|
||||
didSucceed = await this.props.onLeftLabelClickAsync();
|
||||
} else {
|
||||
didSucceed = await this.props.onRightLabelClickAsync();
|
||||
}
|
||||
const didSucceed = isLeft ?
|
||||
await this.props.onLeftLabelClickAsync() :
|
||||
await this.props.onRightLabelClickAsync();
|
||||
if (!didSucceed) {
|
||||
this.setState({
|
||||
isLeftSelected: !isLeft,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {Token} from 'ts/types';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import * as React from 'react';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {Token} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const COMPLETE_STATE_SHOW_LENGTH_MS = 2000;
|
||||
|
||||
@@ -11,7 +11,7 @@ enum ButtonState {
|
||||
READY,
|
||||
LOADING,
|
||||
COMPLETE,
|
||||
};
|
||||
}
|
||||
|
||||
interface LifeCycleRaisedButtonProps {
|
||||
isHidden?: boolean;
|
||||
@@ -49,7 +49,7 @@ export class LifeCycleRaisedButton extends
|
||||
this.didUnmount = true;
|
||||
}
|
||||
public render() {
|
||||
if (this.props.isHidden === true) {
|
||||
if (this.props.isHidden) {
|
||||
return <span />;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export class LifeCycleRaisedButton extends
|
||||
this.setState({
|
||||
buttonState: ButtonState.LOADING,
|
||||
});
|
||||
const didSucceed = await this.props.onClickAsyncFn();
|
||||
const didSucceed = this.props.onClickAsyncFn();
|
||||
if (this.didUnmount) {
|
||||
return; // noop since unmount called before async callback returned.
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import * as React from 'react';
|
||||
import {DefaultPlayer as Video} from 'react-html5video';
|
||||
import 'react-html5video/dist/styles.css';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface LoadingProps {}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {Styles} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {colors} from 'material-ui/styles';
|
||||
|
||||
interface MenuItemProps {
|
||||
to: string;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip = require('react-tooltip');
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {EthereumAddress} from 'ts/components/ui/ethereum_address';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {EtherscanLinkSuffixes} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {EthereumAddress} from 'ts/components/ui/ethereum_address';
|
||||
|
||||
const MIN_ADDRESS_WIDTH = 60;
|
||||
const IMAGE_DIMENSION = 100;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
|
||||
export interface RequiredLabelProps {
|
||||
label: string|React.ReactNode;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import CircularProgress from 'material-ui/CircularProgress';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
|
||||
export interface SimpleLoadingProps {
|
||||
message: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {colors} from 'material-ui/styles';
|
||||
|
||||
interface SwapIconProps {
|
||||
swapTokensFn: () => void;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {Token} from 'ts/types';
|
||||
import {Identicon} from 'ts/components/ui/identicon';
|
||||
import {Token} from 'ts/types';
|
||||
|
||||
interface TokenIconProps {
|
||||
token: Token;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {ZeroEx} from '0x.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {ZeroEx} from '0x.js';
|
||||
import {AssetToken, Token, TokenByAddress} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {Party} from 'ts/components/ui/party';
|
||||
import {AssetToken, Token, TokenByAddress} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const PRECISION = 5;
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {Store as ReduxStore, Dispatch} from 'redux';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {Dispatch, Store as ReduxStore} from 'redux';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {GenerateOrderForm as GenerateOrderFormComponent} from 'ts/components/generate_order/generate_order_form';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {
|
||||
BlockchainErrs,
|
||||
HashData,
|
||||
SideToAssetToken,
|
||||
SignatureData,
|
||||
HashData,
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
BlockchainErrs,
|
||||
} from 'ts/types';
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
interface GenerateOrderFormProps {
|
||||
blockchain: Blockchain;
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {Store as ReduxStore, Dispatch} from 'redux';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
Side,
|
||||
HashData,
|
||||
TokenByAddress,
|
||||
BlockchainErrs,
|
||||
Fill,
|
||||
Order,
|
||||
ScreenWidths,
|
||||
TokenStateByAddress,
|
||||
} from 'ts/types';
|
||||
import {Dispatch, Store as ReduxStore} from 'redux';
|
||||
import {
|
||||
Portal as PortalComponent,
|
||||
PortalAllProps as PortalComponentAllProps,
|
||||
PortalPassedProps as PortalComponentPassedProps,
|
||||
} from 'ts/components/portal';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {
|
||||
BlockchainErrs,
|
||||
Fill,
|
||||
HashData,
|
||||
Order,
|
||||
ScreenWidths,
|
||||
Side,
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface MapStateToProps {
|
||||
blockchainErr: BlockchainErrs;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {Store as ReduxStore, Dispatch} from 'redux';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {Dispatch, Store as ReduxStore} from 'redux';
|
||||
import {
|
||||
SmartContractsDocumentation as SmartContractsDocumentationComponent,
|
||||
SmartContractsDocumentationAllProps,
|
||||
} from 'ts/pages/documentation/smart_contracts_documentation';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
|
||||
interface ConnectedState {
|
||||
docsVersion: string;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {connect} from 'react-redux';
|
||||
import {Store as ReduxStore, Dispatch} from 'redux';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
import {Dispatch, Store as ReduxStore} from 'redux';
|
||||
import {Blockchain} from 'ts/blockchain';
|
||||
import {
|
||||
ZeroExJSDocumentation as ZeroExJSDocumentationComponent,
|
||||
ZeroExJSDocumentationAllProps,
|
||||
} from 'ts/pages/documentation/zero_ex_js_documentation';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {State} from 'ts/redux/reducer';
|
||||
|
||||
interface ConnectedState {
|
||||
docsVersion: string;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
// Polyfills
|
||||
import 'whatwg-fetch';
|
||||
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {colors, getMuiTheme, MuiThemeProvider} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {render} from 'react-dom';
|
||||
import {Provider} from 'react-redux';
|
||||
import {createStore, Store as ReduxStore} from 'redux';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Landing} from 'ts/pages/landing/landing';
|
||||
import {FAQ} from 'ts/pages/faq/faq';
|
||||
import {About} from 'ts/pages/about/about';
|
||||
import {Wiki} from 'ts/pages/wiki/wiki';
|
||||
import {NotFound} from 'ts/pages/not_found';
|
||||
import {createLazyComponent} from 'ts/lazy_component';
|
||||
import {State, reducer} from 'ts/redux/reducer';
|
||||
import {colors, getMuiTheme, MuiThemeProvider} from 'material-ui/styles';
|
||||
import {Switch, BrowserRouter as Router, Route, Link, Redirect} from 'react-router-dom';
|
||||
import {tradeHistoryStorage} from 'ts/local_storage/trade_history_storage';
|
||||
import {BrowserRouter as Router, Link, Redirect, Route, Switch} from 'react-router-dom';
|
||||
import * as injectTapEventPlugin from 'react-tap-event-plugin';
|
||||
import {createStore, Store as ReduxStore} from 'redux';
|
||||
import {createLazyComponent} from 'ts/lazy_component';
|
||||
import {tradeHistoryStorage} from 'ts/local_storage/trade_history_storage';
|
||||
import {About} from 'ts/pages/about/about';
|
||||
import {FAQ} from 'ts/pages/faq/faq';
|
||||
import {Landing} from 'ts/pages/landing/landing';
|
||||
import {NotFound} from 'ts/pages/not_found';
|
||||
import {Wiki} from 'ts/pages/wiki/wiki';
|
||||
import {reducer, State} from 'ts/redux/reducer';
|
||||
import {WebsitePaths} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
injectTapEventPlugin();
|
||||
|
||||
// By default BigNumber's `toString` method converts to exponential notation if the value has
|
||||
@@ -75,15 +75,17 @@ const muiTheme = getMuiTheme({
|
||||
// At the same time webpack statically parses for System.import() to determine bundle chunk split points
|
||||
// so each lazy import needs it's own `System.import()` declaration.
|
||||
const LazyPortal = createLazyComponent(
|
||||
'Portal', () => System.import<any>(/* webpackChunkName: "portal" */'ts/containers/portal'),
|
||||
'Portal', async () => System.import<any>(/* webpackChunkName: "portal" */'ts/containers/portal'),
|
||||
);
|
||||
const LazyZeroExJSDocumentation = createLazyComponent(
|
||||
'ZeroExJSDocumentation',
|
||||
() => System.import<any>(/* webpackChunkName: "zeroExDocs" */'ts/containers/zero_ex_js_documentation'),
|
||||
async () => System.import<any>(/* webpackChunkName: "zeroExDocs" */'ts/containers/zero_ex_js_documentation'),
|
||||
);
|
||||
const LazySmartContractsDocumentation = createLazyComponent(
|
||||
'SmartContractsDocumentation',
|
||||
() => System.import<any>(/* webpackChunkName: "smartContractDocs" */'ts/containers/smart_contracts_documentation'),
|
||||
async () => System.import<any>(
|
||||
/* webpackChunkName: "smartContractDocs" */'ts/containers/smart_contracts_documentation',
|
||||
),
|
||||
);
|
||||
|
||||
const store: ReduxStore<State> = createStore(reducer);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
interface LazyComponentProps {
|
||||
reactComponentPromise: Promise<React.ComponentClass<any>>;
|
||||
@@ -22,10 +22,12 @@ export class LazyComponent extends React.Component<LazyComponentProps, LazyCompo
|
||||
};
|
||||
}
|
||||
public componentWillMount() {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.loadComponentFireAndForgetAsync(this.props);
|
||||
}
|
||||
public componentWillReceiveProps(nextProps: LazyComponentProps) {
|
||||
if (nextProps.reactComponentPromise !== this.props.reactComponentPromise) {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.loadComponentFireAndForgetAsync(nextProps);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import BigNumber from 'bignumber.js';
|
||||
import ethUtil = require('ethereumjs-util');
|
||||
import * as _ from 'lodash';
|
||||
import {localStorage} from 'ts/local_storage/local_storage';
|
||||
import {Fill} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {localStorage} from 'ts/local_storage/local_storage';
|
||||
import ethUtil = require('ethereumjs-util');
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
const FILLS_KEY = 'fills';
|
||||
const FILLS_LATEST_BLOCK = 'fillsLatestBlock';
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {Styles, ProfileInfo} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {Footer} from 'ts/components/footer';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {Profile} from 'ts/pages/about/profile';
|
||||
import {Question} from 'ts/pages/faq/question';
|
||||
import {ProfileInfo, Styles} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Profile} from 'ts/pages/about/profile';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const CUSTOM_BACKGROUND_COLOR = '#F0F0F0';
|
||||
const CUSTOM_GRAY = '#4C4C4C';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import * as React from 'react';
|
||||
import {Element as ScrollElement} from 'react-scroll';
|
||||
import {Styles, ProfileInfo} from 'ts/types';
|
||||
import {ProfileInfo, Styles} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const IMAGE_DIMENSION = 149;
|
||||
const styles: Styles = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {CustomType} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const STRING_ENUM_CODE_PREFIX = ' strEnum(';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {EnumValue, TypeDocNode} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {TypeDocNode, EnumValue} from 'ts/types';
|
||||
|
||||
const STRING_ENUM_CODE_PREFIX = ' strEnum(';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {Event, EventArg, HeaderSizes} from 'ts/types';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {Event, EventArg, HeaderSizes} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const KEYWORD_COLOR = '#a81ca6';
|
||||
const CUSTOM_GREEN = 'rgb(77, 162, 75)';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {CustomType, TypeDocTypes} from 'ts/types';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {MethodSignature} from 'ts/pages/documentation/method_signature';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {CustomType, TypeDocTypes} from 'ts/types';
|
||||
|
||||
interface InterfaceProps {
|
||||
type: CustomType;
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import {Chip} from 'material-ui/Chip';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {MethodSignature} from 'ts/pages/documentation/method_signature';
|
||||
import {SourceLink} from 'ts/pages/documentation/source_link';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {
|
||||
TypeDocNode,
|
||||
HeaderSizes,
|
||||
Parameter,
|
||||
SolidityMethod,
|
||||
Styles,
|
||||
TypeDefinitionByName,
|
||||
TypeDocNode,
|
||||
TypescriptMethod,
|
||||
SolidityMethod,
|
||||
Parameter,
|
||||
HeaderSizes,
|
||||
} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {SourceLink} from 'ts/pages/documentation/source_link';
|
||||
import {MethodSignature} from 'ts/pages/documentation/method_signature';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface MethodBlockProps {
|
||||
method: SolidityMethod|TypescriptMethod;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {TypescriptMethod, SolidityMethod, TypeDefinitionByName, Parameter} from 'ts/types';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {Parameter, SolidityMethod, TypeDefinitionByName, TypescriptMethod} from 'ts/types';
|
||||
|
||||
interface MethodSignatureProps {
|
||||
method: TypescriptMethod|SolidityMethod;
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
import findVersions = require('find-versions');
|
||||
import * as _ from 'lodash';
|
||||
import CircularProgress from 'material-ui/CircularProgress';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle = require('react-document-title');
|
||||
import findVersions = require('find-versions');
|
||||
import semverSort = require('semver-sort');
|
||||
import {colors} from 'material-ui/styles';
|
||||
import CircularProgress from 'material-ui/CircularProgress';
|
||||
import {
|
||||
scroller,
|
||||
} from 'react-scroll';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
SmartContractsDocSections,
|
||||
Styles,
|
||||
DoxityDocObj,
|
||||
TypeDefinitionByName,
|
||||
DocAgnosticFormat,
|
||||
SolidityMethod,
|
||||
Property,
|
||||
CustomType,
|
||||
MenuSubsectionsBySection,
|
||||
Event,
|
||||
Docs,
|
||||
AddressByContractName,
|
||||
Networks,
|
||||
EtherscanLinkSuffixes,
|
||||
} from 'ts/types';
|
||||
import semverSort = require('semver-sort');
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {docUtils} from 'ts/utils/doc_utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Badge} from 'ts/components/ui/badge';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {EventDefinition} from 'ts/pages/documentation/event_definition';
|
||||
import {MethodBlock} from 'ts/pages/documentation/method_block';
|
||||
import {SourceLink} from 'ts/pages/documentation/source_link';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {TypeDefinition} from 'ts/pages/documentation/type_definition';
|
||||
import {MarkdownSection} from 'ts/pages/shared/markdown_section';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {Badge} from 'ts/components/ui/badge';
|
||||
import {EventDefinition} from 'ts/pages/documentation/event_definition';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {SectionHeader} from 'ts/pages/shared/section_header';
|
||||
import {MarkdownSection} from 'ts/pages/shared/markdown_section';
|
||||
import {NestedSidebarMenu} from 'ts/pages/shared/nested_sidebar_menu';
|
||||
import {SectionHeader} from 'ts/pages/shared/section_header';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
AddressByContractName,
|
||||
CustomType,
|
||||
DocAgnosticFormat,
|
||||
Docs,
|
||||
DoxityDocObj,
|
||||
EtherscanLinkSuffixes,
|
||||
Event,
|
||||
MenuSubsectionsBySection,
|
||||
Networks,
|
||||
Property,
|
||||
SmartContractsDocSections,
|
||||
SolidityMethod,
|
||||
Styles,
|
||||
TypeDefinitionByName,
|
||||
} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {docUtils} from 'ts/utils/doc_utils';
|
||||
import {doxityUtils} from 'ts/utils/doxity_utils';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
/* tslint:disable:no-var-requires */
|
||||
const IntroMarkdown = require('md/docs/smart_contracts/introduction');
|
||||
/* tslint:enable:no-var-requires */
|
||||
@@ -104,6 +104,7 @@ export class SmartContractsDocumentation extends
|
||||
const lastSegment = pathName.substr(pathName.lastIndexOf('/') + 1);
|
||||
const versions = findVersions(lastSegment);
|
||||
const preferredVersionIfExists = versions.length > 0 ? versions[0] : undefined;
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.fetchJSONDocsFireAndForgetAsync(preferredVersionIfExists);
|
||||
}
|
||||
public render() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Source} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import {Link as ScrollLink} from 'react-scroll';
|
||||
import * as ReactTooltip from 'react-tooltip';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Type as TypeDef, TypeDocTypes, TypeDefinitionByName} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {TypeDefinition} from 'ts/pages/documentation/type_definition';
|
||||
import {Type as TypeDef, TypeDefinitionByName, TypeDocTypes} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const BUILT_IN_TYPE_COLOR = '#e69d00';
|
||||
const STRING_LITERAL_COLOR = '#4da24b';
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {KindString, CustomType, TypeDocTypes, CustomTypeChild, HeaderSizes} from 'ts/types';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {Interface} from 'ts/pages/documentation/interface';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {CustomEnum} from 'ts/pages/documentation/custom_enum';
|
||||
import {Enum} from 'ts/pages/documentation/enum';
|
||||
import {Interface} from 'ts/pages/documentation/interface';
|
||||
import {MethodSignature} from 'ts/pages/documentation/method_signature';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {CustomType, CustomTypeChild, HeaderSizes, KindString, TypeDocTypes} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const KEYWORD_COLOR = '#a81ca6';
|
||||
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import DocumentTitle = require('react-document-title');
|
||||
import findVersions = require('find-versions');
|
||||
import semverSort = require('semver-sort');
|
||||
import {colors} from 'material-ui/styles';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import * as _ from 'lodash';
|
||||
import CircularProgress from 'material-ui/CircularProgress';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle = require('react-document-title');
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import {
|
||||
Link as ScrollLink,
|
||||
Element as ScrollElement,
|
||||
Link as ScrollLink,
|
||||
scroller,
|
||||
} from 'react-scroll';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
KindString,
|
||||
TypeDocNode,
|
||||
ZeroExJsDocSections,
|
||||
Styles,
|
||||
ScreenWidths,
|
||||
TypeDefinitionByName,
|
||||
DocAgnosticFormat,
|
||||
TypescriptMethod,
|
||||
Property,
|
||||
CustomType,
|
||||
Docs,
|
||||
} from 'ts/types';
|
||||
import semverSort = require('semver-sort');
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {docUtils} from 'ts/utils/doc_utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Loading} from 'ts/components/ui/loading';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {MethodBlock} from 'ts/pages/documentation/method_block';
|
||||
import {SourceLink} from 'ts/pages/documentation/source_link';
|
||||
import {Type} from 'ts/pages/documentation/type';
|
||||
import {TypeDefinition} from 'ts/pages/documentation/type_definition';
|
||||
import {MarkdownSection} from 'ts/pages/shared/markdown_section';
|
||||
import {Comment} from 'ts/pages/documentation/comment';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {SectionHeader} from 'ts/pages/shared/section_header';
|
||||
import {MarkdownSection} from 'ts/pages/shared/markdown_section';
|
||||
import {NestedSidebarMenu} from 'ts/pages/shared/nested_sidebar_menu';
|
||||
import {SectionHeader} from 'ts/pages/shared/section_header';
|
||||
import {Dispatcher} from 'ts/redux/dispatcher';
|
||||
import {
|
||||
CustomType,
|
||||
DocAgnosticFormat,
|
||||
Docs,
|
||||
KindString,
|
||||
Property,
|
||||
ScreenWidths,
|
||||
Styles,
|
||||
TypeDefinitionByName,
|
||||
TypeDocNode,
|
||||
TypescriptMethod,
|
||||
ZeroExJsDocSections,
|
||||
} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {docUtils} from 'ts/utils/doc_utils';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
/* tslint:disable:no-var-requires */
|
||||
const IntroMarkdown = require('md/docs/0xjs/introduction');
|
||||
const InstallationMarkdown = require('md/docs/0xjs/installation');
|
||||
@@ -109,6 +109,7 @@ export class ZeroExJSDocumentation extends React.Component<ZeroExJSDocumentation
|
||||
const lastSegment = pathName.substr(pathName.lastIndexOf('/') + 1);
|
||||
const versions = findVersions(lastSegment);
|
||||
const preferredVersionIfExists = versions.length > 0 ? versions[0] : undefined;
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.fetchJSONDocsFireAndForgetAsync(preferredVersionIfExists);
|
||||
}
|
||||
public render() {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {Styles, FAQSection, FAQQuestion, WebsitePaths} from 'ts/types';
|
||||
import * as React from 'react';
|
||||
import * as DocumentTitle from 'react-document-title';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {Footer} from 'ts/components/footer';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {Question} from 'ts/pages/faq/question';
|
||||
import {FAQQuestion, FAQSection, Styles, WebsitePaths} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {Card, CardHeader, CardText} from 'material-ui/Card';
|
||||
import * as React from 'react';
|
||||
|
||||
export interface QuestionProps {
|
||||
prompt: string;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import * as _ from 'lodash';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle = require('react-document-title');
|
||||
import {Link} from 'react-router-dom';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {Footer} from 'ts/components/footer';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {ScreenWidths, Styles, WebsitePaths} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Styles, WebsitePaths, ScreenWidths} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {Footer} from 'ts/components/footer';
|
||||
|
||||
interface BoxContent {
|
||||
title: string;
|
||||
@@ -840,4 +840,4 @@ export class Landing extends React.Component<LandingProps, LandingState> {
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} // tslint:disable:max-file-line-count
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import {Styles} from 'ts/types';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {Footer} from 'ts/components/footer';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {Styles} from 'ts/types';
|
||||
|
||||
export interface NotFoundProps {
|
||||
location: Location;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import {Styles, HeaderSizes} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {Link as ScrollLink} from 'react-scroll';
|
||||
import {HeaderSizes, Styles} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const headerSizeToScrollOffset: {[headerSize: string]: number} = {
|
||||
h2: -20,
|
||||
@@ -59,11 +59,7 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
|
||||
public render() {
|
||||
let opacity = 0;
|
||||
if (this.props.shouldShowAnchor) {
|
||||
if (this.state.isHovering) {
|
||||
opacity = 0.6;
|
||||
} else {
|
||||
opacity = 1;
|
||||
}
|
||||
opacity = this.state.isHovering ? 0.6 : 1;
|
||||
}
|
||||
return (
|
||||
<div className="relative flex" style={{...styles[this.props.headerSize], ...styles.headers}}>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as _ from 'lodash';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import * as React from 'react';
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import {Element as ScrollElement} from 'react-scroll';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {MarkdownCodeBlock} from 'ts/pages/shared/markdown_code_block';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import {HeaderSizes} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface MarkdownSectionProps {
|
||||
sectionName: string;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {VersionDropDown} from 'ts/pages/shared/version_drop_down';
|
||||
import {ZeroExJsDocSections, Styles, MenuSubsectionsBySection, Docs} from 'ts/types';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import * as React from 'react';
|
||||
import {Link as ScrollLink} from 'react-scroll';
|
||||
import {VersionDropDown} from 'ts/pages/shared/version_drop_down';
|
||||
import {Docs, MenuSubsectionsBySection, Styles, ZeroExJsDocSections} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {typeDocUtils} from 'ts/utils/typedoc_utils';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface NestedSidebarMenuProps {
|
||||
topLevelMenu: {[topLevel: string]: string[]};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as React from 'react';
|
||||
import {Element as ScrollElement} from 'react-scroll';
|
||||
import {AnchorTitle} from 'ts/pages/shared/anchor_title';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {HeaderSizes} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
interface SectionHeaderProps {
|
||||
sectionName: string;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import DropDownMenu from 'material-ui/DropDownMenu';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import * as React from 'react';
|
||||
import {Docs} from 'ts/types';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
|
||||
interface VersionDropDownProps {
|
||||
selectedVersion: string;
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
import * as _ from 'lodash';
|
||||
import CircularProgress from 'material-ui/CircularProgress';
|
||||
import {colors} from 'material-ui/styles';
|
||||
import * as React from 'react';
|
||||
import DocumentTitle = require('react-document-title');
|
||||
import {colors} from 'material-ui/styles';
|
||||
import CircularProgress from 'material-ui/CircularProgress';
|
||||
import {
|
||||
scroller,
|
||||
} from 'react-scroll';
|
||||
import {Styles, Article, ArticlesBySection} from 'ts/types';
|
||||
import {TopBar} from 'ts/components/top_bar';
|
||||
import {HeaderSizes, WebsitePaths} from 'ts/types';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {MarkdownSection} from 'ts/pages/shared/markdown_section';
|
||||
import {NestedSidebarMenu} from 'ts/pages/shared/nested_sidebar_menu';
|
||||
import {SectionHeader} from 'ts/pages/shared/section_header';
|
||||
import {MarkdownSection} from 'ts/pages/shared/markdown_section';
|
||||
import {Article, ArticlesBySection, HeaderSizes, Styles, WebsitePaths} from 'ts/types';
|
||||
import {configs} from 'ts/utils/configs';
|
||||
import {constants} from 'ts/utils/constants';
|
||||
import {utils} from 'ts/utils/utils';
|
||||
|
||||
const WIKI_NOT_READY_BACKOUT_TIMEOUT_MS = 5000;
|
||||
|
||||
@@ -55,6 +54,7 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
|
||||
};
|
||||
}
|
||||
public componentWillMount() {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.fetchArticlesBySectionAsync();
|
||||
}
|
||||
public componentWillUnmount() {
|
||||
@@ -180,6 +180,7 @@ export class Wiki extends React.Component<WikiProps, WikiState> {
|
||||
if (response.status === constants.HTTP_NO_CONTENT_STATUS_CODE) {
|
||||
// We need to backoff and try fetching again later
|
||||
this.wikiBackoffTimeoutId = window.setTimeout(() => {
|
||||
// tslint:disable-next-line:no-floating-promises
|
||||
this.fetchArticlesBySectionAsync();
|
||||
}, WIKI_NOT_READY_BACKOUT_TIMEOUT_MS);
|
||||
return;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
"rules": {
|
||||
"no-implicit-dependencies": false,
|
||||
"no-object-literal-type-assertion": false,
|
||||
"completed-docs": false
|
||||
"completed-docs": false,
|
||||
"prefer-function-over-method": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user