Add contract-wrappers page and make topBar component more concise
This commit is contained in:
		@@ -25,11 +25,16 @@
 | 
				
			|||||||
        "update_artifacts_v2": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;",
 | 
					        "update_artifacts_v2": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;",
 | 
				
			||||||
        "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
 | 
					        "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
 | 
				
			||||||
        "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts",
 | 
					        "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts",
 | 
				
			||||||
        "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit"
 | 
					        "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
 | 
				
			||||||
 | 
					        "docs:json": "typedoc --excludePrivate --excludeExternals --ignoreCompilerErrors --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "config": {
 | 
					    "config": {
 | 
				
			||||||
        "contracts_v2_beta": "Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken",
 | 
					        "contracts_v2_beta": "Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken",
 | 
				
			||||||
        "contracts_v2": "DummyERC20Token DummyERC721Token"
 | 
					        "contracts_v2": "DummyERC20Token DummyERC721Token",
 | 
				
			||||||
 | 
					        "postpublish": {
 | 
				
			||||||
 | 
					            "assets": [],
 | 
				
			||||||
 | 
					            "shouldPublishDocs": true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "repository": {
 | 
					    "repository": {
 | 
				
			||||||
        "type": "git",
 | 
					        "type": "git",
 | 
				
			||||||
@@ -66,6 +71,7 @@
 | 
				
			|||||||
        "sinon": "^4.0.0",
 | 
					        "sinon": "^4.0.0",
 | 
				
			||||||
        "source-map-support": "^0.5.0",
 | 
					        "source-map-support": "^0.5.0",
 | 
				
			||||||
        "tslint": "5.11.0",
 | 
					        "tslint": "5.11.0",
 | 
				
			||||||
 | 
					        "typedoc": "0xProject/typedoc",
 | 
				
			||||||
        "typescript": "2.7.1",
 | 
					        "typescript": "2.7.1",
 | 
				
			||||||
        "web3-provider-engine": "14.0.6"
 | 
					        "web3-provider-engine": "14.0.6"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,6 +61,8 @@
 | 
				
			|||||||
    "SOL_COV": "Solidity Coverage",
 | 
					    "SOL_COV": "Solidity Coverage",
 | 
				
			||||||
    "ETHEREUM_TYPES": "Ethereum Types",
 | 
					    "ETHEREUM_TYPES": "Ethereum Types",
 | 
				
			||||||
    "SUBPROVIDERS": "Subproviders",
 | 
					    "SUBPROVIDERS": "Subproviders",
 | 
				
			||||||
 | 
					    "CONTRACT_WRAPPERS": "Contract Wrappers",
 | 
				
			||||||
 | 
					    "0x.js": "0x.js",
 | 
				
			||||||
    "BLOG": "博客",
 | 
					    "BLOG": "博客",
 | 
				
			||||||
    "FORUM": "论坛",
 | 
					    "FORUM": "论坛",
 | 
				
			||||||
    "CONNECT": "0x 连接",
 | 
					    "CONNECT": "0x 连接",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,6 +62,8 @@
 | 
				
			|||||||
    "SOL_COV": "Solidity Coverage",
 | 
					    "SOL_COV": "Solidity Coverage",
 | 
				
			||||||
    "ETHEREUM_TYPES": "Ethereum Types",
 | 
					    "ETHEREUM_TYPES": "Ethereum Types",
 | 
				
			||||||
    "SUBPROVIDERS": "Subproviders",
 | 
					    "SUBPROVIDERS": "Subproviders",
 | 
				
			||||||
 | 
					    "CONTRACT_WRAPPERS": "Contract Wrappers",
 | 
				
			||||||
 | 
					    "0X_JS": "0x.js",
 | 
				
			||||||
    "BLOG": "blog",
 | 
					    "BLOG": "blog",
 | 
				
			||||||
    "FORUM": "forum",
 | 
					    "FORUM": "forum",
 | 
				
			||||||
    "CONNECT": "0x Connect",
 | 
					    "CONNECT": "0x Connect",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,6 +61,8 @@
 | 
				
			|||||||
    "SOL_COV": "Solidity Coverage",
 | 
					    "SOL_COV": "Solidity Coverage",
 | 
				
			||||||
    "ETHEREUM_TYPES": "Ethereum Types",
 | 
					    "ETHEREUM_TYPES": "Ethereum Types",
 | 
				
			||||||
    "SUBPROVIDERS": "Subproviders",
 | 
					    "SUBPROVIDERS": "Subproviders",
 | 
				
			||||||
 | 
					    "CONTRACT_WRAPPERS": "Contract Wrappers",
 | 
				
			||||||
 | 
					    "0X_JS": "0x.js",
 | 
				
			||||||
    "BLOG": "블로그",
 | 
					    "BLOG": "블로그",
 | 
				
			||||||
    "FORUM": "포럼",
 | 
					    "FORUM": "포럼",
 | 
				
			||||||
    "CONNECT": "0x Connect",
 | 
					    "CONNECT": "0x Connect",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,6 +61,8 @@
 | 
				
			|||||||
    "SOL_COV": "Solidity Coverage",
 | 
					    "SOL_COV": "Solidity Coverage",
 | 
				
			||||||
    "ETHEREUM_TYPES": "Ethereum Types",
 | 
					    "ETHEREUM_TYPES": "Ethereum Types",
 | 
				
			||||||
    "SUBPROVIDERS": "Subproviders",
 | 
					    "SUBPROVIDERS": "Subproviders",
 | 
				
			||||||
 | 
					    "CONTRACT_WRAPPERS": "Contract Wrappers",
 | 
				
			||||||
 | 
					    "0X_JS": "0x.js",
 | 
				
			||||||
    "BLOG": "Блог",
 | 
					    "BLOG": "Блог",
 | 
				
			||||||
    "FORUM": "Форум",
 | 
					    "FORUM": "Форум",
 | 
				
			||||||
    "CONNECT": "0x Connect",
 | 
					    "CONNECT": "0x Connect",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,6 +62,8 @@
 | 
				
			|||||||
    "SOL_COV": "Solidity Coverage",
 | 
					    "SOL_COV": "Solidity Coverage",
 | 
				
			||||||
    "ETHEREUM_TYPES": "Ethereum Types",
 | 
					    "ETHEREUM_TYPES": "Ethereum Types",
 | 
				
			||||||
    "SUBPROVIDERS": "Subproviders",
 | 
					    "SUBPROVIDERS": "Subproviders",
 | 
				
			||||||
 | 
					    "CONTRACT_WRAPPERS": "Contract Wrappers",
 | 
				
			||||||
 | 
					    "0X_JS": "0x.js",
 | 
				
			||||||
    "BLOG": "blog",
 | 
					    "BLOG": "blog",
 | 
				
			||||||
    "FORUM": "foro",
 | 
					    "FORUM": "foro",
 | 
				
			||||||
    "CONNECT": "0x Connect",
 | 
					    "CONNECT": "0x Connect",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,6 +74,18 @@ const styles: Styles = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const DOC_WEBSITE_PATHS_TO_KEY = {
 | 
				
			||||||
 | 
					    [WebsitePaths.SolCov]: Key.SolCov,
 | 
				
			||||||
 | 
					    [WebsitePaths.SmartContracts]: Key.SmartContracts,
 | 
				
			||||||
 | 
					    [WebsitePaths.Web3Wrapper]: Key.Web3Wrapper,
 | 
				
			||||||
 | 
					    [WebsitePaths.SolCompiler]: Key.SolCompiler,
 | 
				
			||||||
 | 
					    [WebsitePaths.JSONSchemas]: Key.JsonSchemas,
 | 
				
			||||||
 | 
					    [WebsitePaths.Subproviders]: Key.Subproviders,
 | 
				
			||||||
 | 
					    [WebsitePaths.ContractWrappers]: Key.ContractWrappers,
 | 
				
			||||||
 | 
					    [WebsitePaths.Connect]: Key.Connect,
 | 
				
			||||||
 | 
					    [WebsitePaths.ZeroExJs]: Key.ZeroExJs,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const DEFAULT_HEIGHT = 68;
 | 
					const DEFAULT_HEIGHT = 68;
 | 
				
			||||||
const EXPANDED_HEIGHT = 75;
 | 
					const EXPANDED_HEIGHT = 75;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -154,6 +166,12 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
 | 
				
			|||||||
                    primaryText={this.props.translate.get(Key.Web3Wrapper, Deco.CapWords)}
 | 
					                    primaryText={this.props.translate.get(Key.Web3Wrapper, Deco.CapWords)}
 | 
				
			||||||
                />
 | 
					                />
 | 
				
			||||||
            </Link>,
 | 
					            </Link>,
 | 
				
			||||||
 | 
					            <Link key="subMenuItem-contractWrappers" to={WebsitePaths.ContractWrappers} className="text-decoration-none">
 | 
				
			||||||
 | 
					                <MenuItem
 | 
				
			||||||
 | 
					                    style={{ fontSize: styles.menuItem.fontSize }}
 | 
				
			||||||
 | 
					                    primaryText={this.props.translate.get(Key.ContractWrappers, Deco.CapWords)}
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					            </Link>,
 | 
				
			||||||
            <Link key="subMenuItem-sol-compiler" to={WebsitePaths.SolCompiler} className="text-decoration-none">
 | 
					            <Link key="subMenuItem-sol-compiler" to={WebsitePaths.SolCompiler} className="text-decoration-none">
 | 
				
			||||||
                <MenuItem
 | 
					                <MenuItem
 | 
				
			||||||
                    style={{ fontSize: styles.menuItem.fontSize }}
 | 
					                    style={{ fontSize: styles.menuItem.fontSize }}
 | 
				
			||||||
@@ -334,75 +352,16 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
 | 
				
			|||||||
                    <Link to={`${WebsitePaths.Wiki}`} className="text-decoration-none">
 | 
					                    <Link to={`${WebsitePaths.Wiki}`} className="text-decoration-none">
 | 
				
			||||||
                        <MenuItem className="py2">{this.props.translate.get(Key.Wiki, Deco.Cap)}</MenuItem>
 | 
					                        <MenuItem className="py2">{this.props.translate.get(Key.Wiki, Deco.Cap)}</MenuItem>
 | 
				
			||||||
                    </Link>
 | 
					                    </Link>
 | 
				
			||||||
                    {!this._isViewing0xjsDocs() && (
 | 
					                    {_.map(DOC_WEBSITE_PATHS_TO_KEY, (key, websitePath) => {
 | 
				
			||||||
                        <Link to={WebsitePaths.ZeroExJs} className="text-decoration-none">
 | 
					                        if (!this._doesUrlInclude(websitePath)) {
 | 
				
			||||||
                            <MenuItem className="py2">0x.js {this.props.translate.get(Key.Docs, Deco.Cap)}</MenuItem>
 | 
					                            <Link to={websitePath} className="text-decoration-none">
 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingConnectDocs() && (
 | 
					 | 
				
			||||||
                        <Link to={WebsitePaths.Connect} className="text-decoration-none">
 | 
					 | 
				
			||||||
                                <MenuItem className="py2">
 | 
					                                <MenuItem className="py2">
 | 
				
			||||||
                                {this.props.translate.get(Key.Connect, Deco.Cap)}{' '}
 | 
					                                    {this.props.translate.get(key, Deco.Cap)}{' '}
 | 
				
			||||||
                                    {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					                                    {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
				
			||||||
                                </MenuItem>
 | 
					                                </MenuItem>
 | 
				
			||||||
                            </Link>
 | 
					                            </Link>
 | 
				
			||||||
                    )}
 | 
					                        }
 | 
				
			||||||
                    {!this._isViewingSmartContractsDocs() && (
 | 
					                    })}
 | 
				
			||||||
                        <Link to={WebsitePaths.SmartContracts} className="text-decoration-none">
 | 
					 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.SmartContract, Deco.Cap)}{' '}
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					 | 
				
			||||||
                            </MenuItem>
 | 
					 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingWeb3WrapperDocs() && (
 | 
					 | 
				
			||||||
                        <Link to={WebsitePaths.Web3Wrapper} className="text-decoration-none">
 | 
					 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Web3Wrapper, Deco.Cap)}{' '}
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					 | 
				
			||||||
                            </MenuItem>
 | 
					 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingSolCompilerDocs() && (
 | 
					 | 
				
			||||||
                        <Link to={WebsitePaths.SolCompiler} className="text-decoration-none">
 | 
					 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.SolCompiler, Deco.Cap)}{' '}
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					 | 
				
			||||||
                            </MenuItem>
 | 
					 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingJsonSchemasDocs() && (
 | 
					 | 
				
			||||||
                        <Link to={WebsitePaths.JSONSchemas} className="text-decoration-none">
 | 
					 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.JsonSchemas, Deco.Cap)}{' '}
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					 | 
				
			||||||
                            </MenuItem>
 | 
					 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingSolCovDocs() && (
 | 
					 | 
				
			||||||
                        <Link to={WebsitePaths.SolCov} className="text-decoration-none">
 | 
					 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.SolCov, Deco.Cap)}{' '}
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					 | 
				
			||||||
                            </MenuItem>
 | 
					 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingSubprovidersDocs() && (
 | 
					 | 
				
			||||||
                        <Link to={WebsitePaths.Subproviders} className="text-decoration-none">
 | 
					 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Subproviders, Deco.Cap)}{' '}
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					 | 
				
			||||||
                            </MenuItem>
 | 
					 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingEthereumTypesDocs() && (
 | 
					 | 
				
			||||||
                        <Link to={WebsitePaths.EthereumTypes} className="text-decoration-none">
 | 
					 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.EthereumTypes, Deco.Cap)}{' '}
 | 
					 | 
				
			||||||
                                {this.props.translate.get(Key.Docs, Deco.Cap)}
 | 
					 | 
				
			||||||
                            </MenuItem>
 | 
					 | 
				
			||||||
                        </Link>
 | 
					 | 
				
			||||||
                    )}
 | 
					 | 
				
			||||||
                    {!this._isViewingPortal() && (
 | 
					                    {!this._isViewingPortal() && (
 | 
				
			||||||
                        <Link to={`${WebsitePaths.Portal}`} className="text-decoration-none">
 | 
					                        <Link to={`${WebsitePaths.Portal}`} className="text-decoration-none">
 | 
				
			||||||
                            <MenuItem className="py2">
 | 
					                            <MenuItem className="py2">
 | 
				
			||||||
@@ -429,15 +388,11 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
 | 
				
			|||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    private _renderDocsMenu(): React.ReactNode {
 | 
					    private _renderDocsMenu(): React.ReactNode {
 | 
				
			||||||
 | 
					        const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => {
 | 
				
			||||||
 | 
					            return this._doesUrlInclude(websitePath);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
        if (
 | 
					        if (
 | 
				
			||||||
            (!this._isViewing0xjsDocs() &&
 | 
					            !isViewingDocsPage ||
 | 
				
			||||||
                !this._isViewingSmartContractsDocs() &&
 | 
					 | 
				
			||||||
                !this._isViewingWeb3WrapperDocs() &&
 | 
					 | 
				
			||||||
                !this._isViewingSolCompilerDocs() &&
 | 
					 | 
				
			||||||
                !this._isViewingJsonSchemasDocs() &&
 | 
					 | 
				
			||||||
                !this._isViewingSolCovDocs() &&
 | 
					 | 
				
			||||||
                !this._isViewingSubprovidersDocs() &&
 | 
					 | 
				
			||||||
                !this._isViewingConnectDocs()) ||
 | 
					 | 
				
			||||||
            _.isUndefined(this.props.menu)
 | 
					            _.isUndefined(this.props.menu)
 | 
				
			||||||
        ) {
 | 
					        ) {
 | 
				
			||||||
            return undefined;
 | 
					            return undefined;
 | 
				
			||||||
@@ -488,55 +443,21 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
 | 
				
			|||||||
    private _isViewingFAQ(): boolean {
 | 
					    private _isViewingFAQ(): boolean {
 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.FAQ);
 | 
					        return _.includes(this.props.location.pathname, WebsitePaths.FAQ);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    private _isViewing0xjsDocs(): boolean {
 | 
					    private _doesUrlInclude(aPath: string): boolean {
 | 
				
			||||||
        return (
 | 
					        return _.includes(this.props.location.pathname, aPath);
 | 
				
			||||||
            _.includes(this.props.location.pathname, WebsitePaths.ZeroExJs) ||
 | 
					 | 
				
			||||||
            _.includes(this.props.location.pathname, WebsiteLegacyPaths.ZeroExJs)
 | 
					 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingConnectDocs(): boolean {
 | 
					 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.Connect);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingSmartContractsDocs(): boolean {
 | 
					 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.SmartContracts);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingWeb3WrapperDocs(): boolean {
 | 
					 | 
				
			||||||
        return (
 | 
					 | 
				
			||||||
            _.includes(this.props.location.pathname, WebsitePaths.Web3Wrapper) ||
 | 
					 | 
				
			||||||
            _.includes(this.props.location.pathname, WebsiteLegacyPaths.Web3Wrapper)
 | 
					 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingSolCompilerDocs(): boolean {
 | 
					 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.SolCompiler);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingJsonSchemasDocs(): boolean {
 | 
					 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.JSONSchemas);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingSolCovDocs(): boolean {
 | 
					 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.SolCov);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingSubprovidersDocs(): boolean {
 | 
					 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.Subproviders);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    private _isViewingEthereumTypesDocs(): boolean {
 | 
					 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.EthereumTypes);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    private _isViewingWiki(): boolean {
 | 
					    private _isViewingWiki(): boolean {
 | 
				
			||||||
        return _.includes(this.props.location.pathname, WebsitePaths.Wiki);
 | 
					        return _.includes(this.props.location.pathname, WebsitePaths.Wiki);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    private _shouldDisplayBottomBar(): boolean {
 | 
					    private _shouldDisplayBottomBar(): boolean {
 | 
				
			||||||
 | 
					        const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => {
 | 
				
			||||||
 | 
					            return this._doesUrlInclude(websitePath);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
        return (
 | 
					        return (
 | 
				
			||||||
 | 
					            isViewingDocsPage ||
 | 
				
			||||||
            this._isViewingWiki() ||
 | 
					            this._isViewingWiki() ||
 | 
				
			||||||
            this._isViewingFAQ() ||
 | 
					            this._isViewingFAQ() ||
 | 
				
			||||||
            this._isViewingDocs() ||
 | 
					            this._isViewingDocs() ||
 | 
				
			||||||
            this._isViewing0xjsDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingSmartContractsDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingWeb3WrapperDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingSolCompilerDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingJsonSchemasDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingSolCovDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingSubprovidersDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingConnectDocs() ||
 | 
					 | 
				
			||||||
            this._isViewingPortal()
 | 
					            this._isViewingPortal()
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,56 @@
 | 
				
			|||||||
 | 
					import { constants as docConstants, DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs';
 | 
				
			||||||
 | 
					import * as React from 'react';
 | 
				
			||||||
 | 
					import { connect } from 'react-redux';
 | 
				
			||||||
 | 
					import { Dispatch } from 'redux';
 | 
				
			||||||
 | 
					import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
 | 
				
			||||||
 | 
					import { Dispatcher } from 'ts/redux/dispatcher';
 | 
				
			||||||
 | 
					import { State } from 'ts/redux/reducer';
 | 
				
			||||||
 | 
					import { DocPackages } from 'ts/types';
 | 
				
			||||||
 | 
					import { constants } from 'ts/utils/constants';
 | 
				
			||||||
 | 
					import { Translate } from 'ts/utils/translate';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// TODO: Add MD sections
 | 
				
			||||||
 | 
					const markdownSections = {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const docsInfoConfig: DocsInfoConfig = {
 | 
				
			||||||
 | 
					    id: DocPackages.ContractWrappers,
 | 
				
			||||||
 | 
					    type: SupportedDocJson.TypeDoc,
 | 
				
			||||||
 | 
					    displayName: 'Contract Wrappers',
 | 
				
			||||||
 | 
					    packageUrl: 'https://github.com/0xProject/0x-monorepo',
 | 
				
			||||||
 | 
					    markdownMenu: {},
 | 
				
			||||||
 | 
					    sectionNameToMarkdownByVersion: {},
 | 
				
			||||||
 | 
					    markdownSections,
 | 
				
			||||||
 | 
					    typeConfigs: {
 | 
				
			||||||
 | 
					        typeNameToPrefix: {},
 | 
				
			||||||
 | 
					        typeNameToExternalLink: {
 | 
				
			||||||
 | 
					            BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					const docsInfo = new DocsInfo(docsInfoConfig);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interface ConnectedState {
 | 
				
			||||||
 | 
					    docsVersion: string;
 | 
				
			||||||
 | 
					    availableDocVersions: string[];
 | 
				
			||||||
 | 
					    docsInfo: DocsInfo;
 | 
				
			||||||
 | 
					    translate: Translate;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interface ConnectedDispatch {
 | 
				
			||||||
 | 
					    dispatcher: Dispatcher;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({
 | 
				
			||||||
 | 
					    docsVersion: state.docsVersion,
 | 
				
			||||||
 | 
					    availableDocVersions: state.availableDocVersions,
 | 
				
			||||||
 | 
					    docsInfo,
 | 
				
			||||||
 | 
					    translate: state.translate,
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
 | 
				
			||||||
 | 
					    dispatcher: new Dispatcher(dispatch),
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)(
 | 
				
			||||||
 | 
					    DocPageComponent,
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
@@ -37,6 +37,9 @@ const LazyPortal = createLazyComponent('Portal', async () =>
 | 
				
			|||||||
const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () =>
 | 
					const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () =>
 | 
				
			||||||
    System.import<any>(/* webpackChunkName: "zeroExDocs" */ 'ts/containers/zero_ex_js_documentation'),
 | 
					    System.import<any>(/* webpackChunkName: "zeroExDocs" */ 'ts/containers/zero_ex_js_documentation'),
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					const LazyContractWrappersDocumentation = createLazyComponent('Documentation', async () =>
 | 
				
			||||||
 | 
					    System.import<any>(/* webpackChunkName: "contractWrapperDocs" */ 'ts/containers/contract_wrappers_documentation'),
 | 
				
			||||||
 | 
					);
 | 
				
			||||||
const LazySmartContractsDocumentation = createLazyComponent('Documentation', async () =>
 | 
					const LazySmartContractsDocumentation = createLazyComponent('Documentation', async () =>
 | 
				
			||||||
    System.import<any>(/* webpackChunkName: "smartContractDocs" */ 'ts/containers/smart_contracts_documentation'),
 | 
					    System.import<any>(/* webpackChunkName: "smartContractDocs" */ 'ts/containers/smart_contracts_documentation'),
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
@@ -80,6 +83,7 @@ render(
 | 
				
			|||||||
                            <Route path={WebsitePaths.About} component={About as any} />
 | 
					                            <Route path={WebsitePaths.About} component={About as any} />
 | 
				
			||||||
                            <Route path={WebsitePaths.Wiki} component={Wiki as any} />
 | 
					                            <Route path={WebsitePaths.Wiki} component={Wiki as any} />
 | 
				
			||||||
                            <Route path={`${WebsitePaths.ZeroExJs}/:version?`} component={LazyZeroExJSDocumentation} />
 | 
					                            <Route path={`${WebsitePaths.ZeroExJs}/:version?`} component={LazyZeroExJSDocumentation} />
 | 
				
			||||||
 | 
					                            <Route path={`${WebsitePaths.ContractWrappers}/:version?`} component={LazyContractWrappersDocumentation} />
 | 
				
			||||||
                            <Route path={`${WebsitePaths.Connect}/:version?`} component={LazyConnectDocumentation} />
 | 
					                            <Route path={`${WebsitePaths.Connect}/:version?`} component={LazyConnectDocumentation} />
 | 
				
			||||||
                            <Route
 | 
					                            <Route
 | 
				
			||||||
                                path={`${WebsitePaths.SolCompiler}/:version?`}
 | 
					                                path={`${WebsitePaths.SolCompiler}/:version?`}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,6 +28,7 @@ const docIdToSubpackageName: { [id: string]: string } = {
 | 
				
			|||||||
    [DocPackages.Connect]: 'connect',
 | 
					    [DocPackages.Connect]: 'connect',
 | 
				
			||||||
    [DocPackages.SmartContracts]: 'contracts',
 | 
					    [DocPackages.SmartContracts]: 'contracts',
 | 
				
			||||||
    [DocPackages.Web3Wrapper]: 'web3-wrapper',
 | 
					    [DocPackages.Web3Wrapper]: 'web3-wrapper',
 | 
				
			||||||
 | 
					    [DocPackages.ContractWrappers]: 'contract-wrappers',
 | 
				
			||||||
    [DocPackages.SolCompiler]: 'sol-compiler',
 | 
					    [DocPackages.SolCompiler]: 'sol-compiler',
 | 
				
			||||||
    [DocPackages.JSONSchemas]: 'json-schemas',
 | 
					    [DocPackages.JSONSchemas]: 'json-schemas',
 | 
				
			||||||
    [DocPackages.SolCov]: 'sol-cov',
 | 
					    [DocPackages.SolCov]: 'sol-cov',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -371,6 +371,7 @@ export enum WebsitePaths {
 | 
				
			|||||||
    SmartContracts = '/docs/contracts',
 | 
					    SmartContracts = '/docs/contracts',
 | 
				
			||||||
    Connect = '/docs/connect',
 | 
					    Connect = '/docs/connect',
 | 
				
			||||||
    Web3Wrapper = '/docs/web3-wrapper',
 | 
					    Web3Wrapper = '/docs/web3-wrapper',
 | 
				
			||||||
 | 
					    ContractWrappers = '/docs/contract-wrappers',
 | 
				
			||||||
    SolCompiler = '/docs/sol-compiler',
 | 
					    SolCompiler = '/docs/sol-compiler',
 | 
				
			||||||
    JSONSchemas = '/docs/json-schemas',
 | 
					    JSONSchemas = '/docs/json-schemas',
 | 
				
			||||||
    SolCov = '/docs/sol-cov',
 | 
					    SolCov = '/docs/sol-cov',
 | 
				
			||||||
@@ -391,6 +392,7 @@ export enum DocPackages {
 | 
				
			|||||||
    Subproviders = 'SUBPROVIDERS',
 | 
					    Subproviders = 'SUBPROVIDERS',
 | 
				
			||||||
    OrderUtils = 'ORDER_UTILS',
 | 
					    OrderUtils = 'ORDER_UTILS',
 | 
				
			||||||
    EthereumTypes = 'ETHEREUM_TYPES',
 | 
					    EthereumTypes = 'ETHEREUM_TYPES',
 | 
				
			||||||
 | 
					    ContractWrappers = 'CONTRACT_WRAPPERS',
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export enum Key {
 | 
					export enum Key {
 | 
				
			||||||
@@ -444,6 +446,8 @@ export enum Key {
 | 
				
			|||||||
    SolCov = 'SOL_COV',
 | 
					    SolCov = 'SOL_COV',
 | 
				
			||||||
    EthereumTypes = 'ETHEREUM_TYPES',
 | 
					    EthereumTypes = 'ETHEREUM_TYPES',
 | 
				
			||||||
    Subproviders = 'SUBPROVIDERS',
 | 
					    Subproviders = 'SUBPROVIDERS',
 | 
				
			||||||
 | 
					    ZeroExJs = '0X_JS',
 | 
				
			||||||
 | 
					    ContractWrappers = 'CONTRACT_WRAPPERS',
 | 
				
			||||||
    Blog = 'BLOG',
 | 
					    Blog = 'BLOG',
 | 
				
			||||||
    Forum = 'FORUM',
 | 
					    Forum = 'FORUM',
 | 
				
			||||||
    Connect = 'CONNECT',
 | 
					    Connect = 'CONNECT',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user