Remove react-shared package and fold it into website
This commit is contained in:
parent
cc7dec7a99
commit
ec7f9d8a63
1
.github/autolabeler.yml
vendored
1
.github/autolabeler.yml
vendored
@ -23,7 +23,6 @@ contracts: ['contracts']
|
||||
@0x/asset-buyer: ['packages/asset-buyer']
|
||||
@0x/order-watcher: ['packages/order-watcher']
|
||||
@0x/order-utils: ['packages/order-utils']
|
||||
@0x/react-shared: ['packages/react-shared']
|
||||
@0x/assert: ['packages/assert']
|
||||
@0x/base-contract: ['packages/base-contract']
|
||||
@0x/typescript-typings: ['packages/typescript-typings']
|
||||
|
@ -27,7 +27,6 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@0x/react-shared": "^2.0.14",
|
||||
"basscss": "^8.0.3",
|
||||
"bowser": "^1.9.4",
|
||||
"highlight.js": "^9.13.1",
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Blacklist all files
|
||||
.*
|
||||
*
|
||||
# Whitelist lib
|
||||
!lib/**/*
|
||||
# Blacklist tests and publish scripts
|
||||
/lib/test/*
|
||||
/lib/monorepo_scripts/
|
||||
# Package specific ignore
|
@ -1,506 +0,0 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1563957393,
|
||||
"version": "2.0.15",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1563047529,
|
||||
"version": "2.0.14",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1563006338,
|
||||
"version": "2.0.13",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1558712885,
|
||||
"version": "2.0.12",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1557507213,
|
||||
"version": "2.0.11",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1554997931
|
||||
},
|
||||
{
|
||||
"timestamp": 1553183790,
|
||||
"version": "2.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1553091633,
|
||||
"version": "2.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551479279,
|
||||
"version": "2.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551220833,
|
||||
"version": "2.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1551130135,
|
||||
"version": "2.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549733923,
|
||||
"version": "2.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1549547375
|
||||
},
|
||||
{
|
||||
"timestamp": 1549504360,
|
||||
"version": "2.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1549452781,
|
||||
"version": "2.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Upgrade the bignumber.js to v8.0.2",
|
||||
"pr": 1517
|
||||
}
|
||||
],
|
||||
"timestamp": 1549373905
|
||||
},
|
||||
{
|
||||
"timestamp": 1547561734,
|
||||
"version": "1.1.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1547225310,
|
||||
"version": "1.1.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Change implementation to use react-router-dom NavLink instead of Link. Expose `activeStyle` prop.",
|
||||
"pr": 1448
|
||||
}
|
||||
],
|
||||
"timestamp": 1547040760
|
||||
},
|
||||
{
|
||||
"version": "1.0.25",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1544739608
|
||||
},
|
||||
{
|
||||
"version": "1.0.24",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1544570656
|
||||
},
|
||||
{
|
||||
"timestamp": 1543401373,
|
||||
"version": "1.0.23",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1542821676,
|
||||
"version": "1.0.22",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1542208198,
|
||||
"version": "1.0.21",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1542134075,
|
||||
"version": "1.0.20",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1542028948,
|
||||
"version": "1.0.19",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.18",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1541740904
|
||||
},
|
||||
{
|
||||
"version": "1.0.17",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1539871071
|
||||
},
|
||||
{
|
||||
"timestamp": 1538693146,
|
||||
"version": "1.0.16",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Unpublished package"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1538475601,
|
||||
"version": "1.0.14",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1538157789,
|
||||
"version": "1.0.13",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537907159,
|
||||
"version": "1.0.12",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.11",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1536142250,
|
||||
"version": "1.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1535377027,
|
||||
"version": "1.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1535133899,
|
||||
"version": "1.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1534210131,
|
||||
"version": "1.0.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1532619515,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1532614997,
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1532605697,
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1532551340,
|
||||
"version": "1.0.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1532357734,
|
||||
"version": "1.0.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1532043000,
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1531919263,
|
||||
"version": "0.2.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.2.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.2.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1525477860,
|
||||
"version": "0.2.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Removed portal specific colors"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1525477860,
|
||||
"version": "0.1.6",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1525466747,
|
||||
"version": "0.1.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1525428773,
|
||||
"version": "0.1.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1524044013,
|
||||
"version": "0.1.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1523462196,
|
||||
"version": "0.1.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1522673609,
|
||||
"version": "0.1.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "0.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Added new colors",
|
||||
"pr": 468
|
||||
},
|
||||
{
|
||||
"note": "Fix section and menuItem text display to replace dashes with spaces."
|
||||
},
|
||||
{
|
||||
"note": "Reorganized colors and added new ones"
|
||||
}
|
||||
],
|
||||
"timestamp": 1522658513
|
||||
}
|
||||
]
|
@ -1,228 +0,0 @@
|
||||
<!--
|
||||
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||
Edit the package's CHANGELOG.json file only.
|
||||
-->
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.15 - _July 24, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.14 - _July 13, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.13 - _July 13, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.12 - _May 24, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.11 - _May 10, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.10 - _April 11, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.9 - _March 21, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.8 - _March 20, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.7 - _March 1, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.6 - _February 26, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.5 - _February 25, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.4 - _February 9, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.3 - _February 7, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.2 - _February 7, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.1 - _February 6, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.0 - _February 5, 2019_
|
||||
|
||||
* Upgrade the bignumber.js to v8.0.2 (#1517)
|
||||
|
||||
## v1.1.2 - _January 15, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.1.1 - _January 11, 2019_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.1.0 - _January 9, 2019_
|
||||
|
||||
* Change implementation to use react-router-dom NavLink instead of Link. Expose `activeStyle` prop. (#1448)
|
||||
|
||||
## v1.0.25 - _December 13, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.24 - _December 11, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.23 - _November 28, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.22 - _November 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.21 - _November 14, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.20 - _November 13, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.19 - _November 12, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.18 - _November 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.17 - _October 18, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.16 - _October 4, 2018_
|
||||
|
||||
* Unpublished package
|
||||
|
||||
## v1.0.14 - _October 2, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.13 - _September 28, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.12 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.11 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.10 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 5, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _August 27, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.7 - _August 24, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.6 - _August 14, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.5 - _July 26, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.4 - _July 26, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _July 26, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.2 - _July 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.1 - _July 23, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.0 - _July 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.2.3 - _July 18, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.2.2 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.2.1 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.2.0 - _May 4, 2018_
|
||||
|
||||
* Removed portal specific colors
|
||||
|
||||
## v0.1.6 - _May 4, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.5 - _May 4, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.4 - _May 4, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.3 - _April 18, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.2 - _April 11, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.1 - _April 2, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.0 - _April 2, 2018_
|
||||
|
||||
* Added new colors (#468)
|
||||
* Fix section and menuItem text display to replace dashes with spaces.
|
||||
* Reorganized colors and added new ones
|
@ -1,63 +0,0 @@
|
||||
## @0x/react-shared
|
||||
|
||||
Contains React components & frontend types/utils shared between 0x projects.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
yarn add @0x/react-shared
|
||||
```
|
||||
|
||||
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
||||
|
||||
```json
|
||||
"compilerOptions": {
|
||||
"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
|
||||
|
||||
Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
|
||||
|
||||
### Install dependencies
|
||||
|
||||
If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
|
||||
|
||||
```bash
|
||||
yarn config set workspaces-experimental true
|
||||
```
|
||||
|
||||
Then install dependencies
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
||||
|
||||
```bash
|
||||
PKG=@0x/react-shared yarn build
|
||||
```
|
||||
|
||||
Or continuously rebuild on change:
|
||||
|
||||
```bash
|
||||
PKG=@0x/react-shared yarn watch
|
||||
```
|
||||
|
||||
### Clean
|
||||
|
||||
```bash
|
||||
yarn clean
|
||||
```
|
||||
|
||||
### Lint
|
||||
|
||||
```bash
|
||||
yarn lint
|
||||
```
|
@ -1,66 +0,0 @@
|
||||
{
|
||||
"name": "@0x/react-shared",
|
||||
"version": "2.0.15",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
"description": "0x shared react components",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"scripts": {
|
||||
"lint": "tslint --format stylish --project .",
|
||||
"fix": "tslint --fix --format stylish --project .",
|
||||
"build": "tsc",
|
||||
"build:ci": "yarn build",
|
||||
"watch_without_deps": "tsc -w",
|
||||
"clean": "shx rm -rf lib"
|
||||
},
|
||||
"author": "Fabio Berger",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/0xProject/0x-monorepo/issues"
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/react-shared/README.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0x/dev-utils": "^2.2.5",
|
||||
"@0x/tslint-config": "^3.0.1",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"shx": "^0.2.2",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/types": "^2.4.1",
|
||||
"@material-ui/core": "^3.0.1",
|
||||
"@types/is-mobile": "0.3.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/material-ui": "^0.20.0",
|
||||
"@types/node": "*",
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"@types/react-router-dom": "^4.0.4",
|
||||
"@types/react-scroll": "1.5.3",
|
||||
"@types/styled-components": "4.1.1",
|
||||
"@types/valid-url": "^1.0.2",
|
||||
"basscss": "^8.0.3",
|
||||
"change-case": "^3.0.2",
|
||||
"is-mobile": "^0.2.2",
|
||||
"lodash": "^4.17.11",
|
||||
"material-ui": "^0.20.0",
|
||||
"react": "^16.5.2",
|
||||
"react-dom": "^16.5.2",
|
||||
"react-highlight": "0xproject/react-highlight#react-peer-deps",
|
||||
"react-markdown": "^3.2.2",
|
||||
"react-router-dom": "^4.3.1",
|
||||
"react-scroll": "0xproject/react-scroll#pr-330-and-replace-state",
|
||||
"styled-components": "^4.1.1",
|
||||
"valid-url": "^1.0.9"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
6
packages/react-shared/src/globals.d.ts
vendored
6
packages/react-shared/src/globals.d.ts
vendored
@ -1,6 +0,0 @@
|
||||
declare module '*.json' {
|
||||
const json: any;
|
||||
/* tslint:disable */
|
||||
export default json;
|
||||
/* tslint:enable */
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
export { AnchorTitle } from './components/anchor_title';
|
||||
export { MarkdownLinkBlock } from './components/markdown_link_block';
|
||||
export { MarkdownCodeBlock } from './components/markdown_code_block';
|
||||
export { MarkdownSection } from './components/markdown_section';
|
||||
export { SectionHeader } from './components/section_header';
|
||||
export { Link, LinkProps } from './components/link';
|
||||
|
||||
export { HeaderSizes, Styles, EtherscanLinkSuffixes, Networks, ALink } from './types';
|
||||
|
||||
export { utils } from './utils/utils';
|
||||
export { constants } from './utils/constants';
|
||||
export { colors } from './utils/colors';
|
@ -1,33 +0,0 @@
|
||||
export interface Styles {
|
||||
[name: string]: React.CSSProperties;
|
||||
}
|
||||
|
||||
export enum HeaderSizes {
|
||||
H1 = 'h1',
|
||||
H2 = 'h2',
|
||||
H3 = 'h3',
|
||||
}
|
||||
|
||||
export enum EtherscanLinkSuffixes {
|
||||
Address = 'address',
|
||||
Tx = 'tx',
|
||||
}
|
||||
|
||||
export enum Networks {
|
||||
Mainnet = 'Mainnet',
|
||||
Kovan = 'Kovan',
|
||||
Ropsten = 'Ropsten',
|
||||
Rinkeby = 'Rinkeby',
|
||||
}
|
||||
|
||||
export enum LinkType {
|
||||
External = 'EXTERNAL',
|
||||
ReactScroll = 'REACT_SCROLL',
|
||||
ReactRoute = 'REACT_ROUTE',
|
||||
}
|
||||
|
||||
export interface ALink {
|
||||
title: string;
|
||||
to: string;
|
||||
shouldOpenInNewTab?: boolean;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
import { Networks } from '../types';
|
||||
|
||||
export const constants = {
|
||||
DOCS_SCROLL_DURATION_MS: 0,
|
||||
SCROLL_CONTAINER_ID: 'scroll_container',
|
||||
SCROLL_TOP_ID: 'pageScrollTop',
|
||||
NETWORK_NAME_BY_ID: {
|
||||
1: Networks.Mainnet,
|
||||
3: Networks.Ropsten,
|
||||
4: Networks.Rinkeby,
|
||||
42: Networks.Kovan,
|
||||
} as { [symbol: number]: string },
|
||||
NETWORK_ID_BY_NAME: {
|
||||
[Networks.Mainnet]: 1,
|
||||
[Networks.Ropsten]: 3,
|
||||
[Networks.Rinkeby]: 4,
|
||||
[Networks.Kovan]: 42,
|
||||
} as { [networkName: string]: number },
|
||||
};
|
@ -1,52 +0,0 @@
|
||||
import changeCase = require('change-case');
|
||||
import isMobile = require('is-mobile');
|
||||
import * as _ from 'lodash';
|
||||
import { scroller } from 'react-scroll';
|
||||
|
||||
import { EtherscanLinkSuffixes, Networks } from '../types';
|
||||
|
||||
import { constants } from './constants';
|
||||
|
||||
export const utils = {
|
||||
setUrlHash(anchorId: string): void {
|
||||
window.location.hash = anchorId;
|
||||
},
|
||||
scrollToHash(hash: string, containerId: string): void {
|
||||
let finalHash = hash;
|
||||
if (_.isEmpty(hash)) {
|
||||
finalHash = constants.SCROLL_TOP_ID; // scroll to the top
|
||||
}
|
||||
|
||||
scroller.scrollTo(finalHash, {
|
||||
duration: 0,
|
||||
offset: 0,
|
||||
containerId,
|
||||
});
|
||||
},
|
||||
isUserOnMobile(): boolean {
|
||||
const isUserOnMobile = isMobile();
|
||||
return isUserOnMobile;
|
||||
},
|
||||
getIdFromName(name: string): string {
|
||||
const id = name.replace(/ /g, '-');
|
||||
return id;
|
||||
},
|
||||
convertDashesToSpaces(text: string): string {
|
||||
return text.replace(/-/g, ' ');
|
||||
},
|
||||
convertCamelCaseToSpaces(text: string): string {
|
||||
return changeCase.snake(text).replace(/_/g, ' ');
|
||||
},
|
||||
getEtherScanLinkIfExists(
|
||||
addressOrTxHash: string,
|
||||
networkId: number,
|
||||
suffix: EtherscanLinkSuffixes,
|
||||
): string | undefined {
|
||||
const networkName = constants.NETWORK_NAME_BY_ID[networkId];
|
||||
if (networkName === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
const etherScanPrefix = networkName === Networks.Mainnet ? '' : `${networkName.toLowerCase()}.`;
|
||||
return `https://${etherScanPrefix}etherscan.io/${suffix}/${addressOrTxHash}`;
|
||||
},
|
||||
};
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"rootDir": "src",
|
||||
"jsx": "react",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": ["node_modules/@types/*", "*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*"]
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": ["@0x/tslint-config"],
|
||||
"rules": {
|
||||
"no-object-literal-type-assertion": false,
|
||||
"completed-docs": false,
|
||||
"prefer-function-over-method": false,
|
||||
"custom-no-magic-numbers": false
|
||||
}
|
||||
}
|
@ -26,7 +26,6 @@
|
||||
"@0x/contract-wrappers": "^9.1.7",
|
||||
"@0x/json-schemas": "^3.0.11",
|
||||
"@0x/order-utils": "^8.2.2",
|
||||
"@0x/react-shared": "^2.0.15",
|
||||
"@0x/subproviders": "^4.1.2",
|
||||
"@0x/types": "^2.4.1",
|
||||
"@0x/typescript-typings": "^4.2.4",
|
||||
@ -41,10 +40,13 @@
|
||||
"basscss": "^8.0.3",
|
||||
"blockies": "^0.0.2",
|
||||
"bowser": "^1.9.4",
|
||||
"change-case": "^3.0.2",
|
||||
"deep-equal": "^1.0.1",
|
||||
"ethereum-types": "^2.1.4",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"find-versions": "^2.0.0",
|
||||
"is-mobile": "^0.2.2",
|
||||
"valid-url": "^1.0.9",
|
||||
"jsonschema": "^1.2.0",
|
||||
"less": "^2.7.2",
|
||||
"lodash": "^4.17.11",
|
||||
@ -61,6 +63,7 @@
|
||||
"react-flickity-component": "^3.1.0",
|
||||
"react-headroom": "2.2.2",
|
||||
"react-helmet": "^5.2.0",
|
||||
"react-highlight": "0xproject/react-highlight#react-peer-deps",
|
||||
"react-lazyload": "^2.3.0",
|
||||
"react-loadable": "^5.5.0",
|
||||
"react-markdown": "^4.0.6",
|
||||
@ -90,6 +93,8 @@
|
||||
"@types/blockies": "^0.0.0",
|
||||
"@types/deep-equal": "^1.0.0",
|
||||
"@types/find-versions": "^2.0.0",
|
||||
"@types/is-mobile": "0.3.0",
|
||||
"@types/valid-url": "^1.0.2",
|
||||
"@types/jsonschema": "^1.1.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/material-ui": "^0.20.0",
|
||||
|
@ -9,7 +9,6 @@ import {
|
||||
IndexedFilterValues,
|
||||
} from '@0x/contract-wrappers';
|
||||
import { assetDataUtils, orderHashUtils, signatureUtils } from '@0x/order-utils';
|
||||
import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
|
||||
import {
|
||||
ledgerEthereumBrowserClientFactoryAsync,
|
||||
LedgerSubprovider,
|
||||
@ -43,6 +42,7 @@ import {
|
||||
BlockchainCallErrs,
|
||||
BlockchainErrs,
|
||||
ContractInstance,
|
||||
EtherscanLinkSuffixes,
|
||||
Fill,
|
||||
InjectedProvider,
|
||||
InjectedProviderObservable,
|
||||
@ -258,11 +258,7 @@ export class Blockchain {
|
||||
this._showFlashMessageIfLedger();
|
||||
const txHash = await this._web3Wrapper.sendTransactionAsync(transaction);
|
||||
await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
|
||||
const etherScanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
|
||||
txHash,
|
||||
this.networkId,
|
||||
EtherscanLinkSuffixes.Tx,
|
||||
);
|
||||
const etherScanLinkIfExists = utils.getEtherScanLinkIfExists(txHash, this.networkId, EtherscanLinkSuffixes.Tx);
|
||||
this._dispatcher.showFlashMessage(
|
||||
React.createElement(AssetSendCompleted, {
|
||||
etherScanLinkIfExists,
|
||||
@ -288,11 +284,7 @@ export class Blockchain {
|
||||
},
|
||||
);
|
||||
await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
|
||||
const etherScanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
|
||||
txHash,
|
||||
this.networkId,
|
||||
EtherscanLinkSuffixes.Tx,
|
||||
);
|
||||
const etherScanLinkIfExists = utils.getEtherScanLinkIfExists(txHash, this.networkId, EtherscanLinkSuffixes.Tx);
|
||||
this._dispatcher.showFlashMessage(
|
||||
React.createElement(AssetSendCompleted, {
|
||||
etherScanLinkIfExists,
|
||||
@ -622,11 +614,7 @@ export class Blockchain {
|
||||
private async _showEtherScanLinkAndAwaitTransactionMinedAsync(
|
||||
txHash: string,
|
||||
): Promise<TransactionReceiptWithDecodedLogs> {
|
||||
const etherScanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
|
||||
txHash,
|
||||
this.networkId,
|
||||
EtherscanLinkSuffixes.Tx,
|
||||
);
|
||||
const etherScanLinkIfExists = utils.getEtherScanLinkIfExists(txHash, this.networkId, EtherscanLinkSuffixes.Tx);
|
||||
this._dispatcher.showFlashMessage(
|
||||
React.createElement(TransactionSubmitted, {
|
||||
etherScanLinkIfExists,
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { colors, Networks } from '@0x/react-shared';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import * as React from 'react';
|
||||
import { Blockchain } from 'ts/blockchain';
|
||||
import { BlockchainErrs } from 'ts/types';
|
||||
import { BlockchainErrs, Networks } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
||||
interface BlockchainErrDialogProps {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
@ -8,6 +7,7 @@ import { Blockchain } from 'ts/blockchain';
|
||||
import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
|
||||
import { EthAmountInput } from 'ts/containers/inputs/eth_amount_input';
|
||||
import { Side, Token } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface EthWethConversionDialogProps {
|
||||
blockchain: Blockchain;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { colors, constants as sharedConstants } from '@0x/react-shared';
|
||||
import { BigNumber, logUtils } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
@ -13,6 +12,7 @@ import { NetworkDropDown } from 'ts/components/dropdowns/network_drop_down';
|
||||
import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button';
|
||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import { ProviderType } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { configs } from 'ts/utils/configs';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
@ -85,7 +85,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
|
||||
);
|
||||
}
|
||||
private _renderConnectStep(): React.ReactNode {
|
||||
const networkIds = _.values(sharedConstants.NETWORK_ID_BY_NAME);
|
||||
const networkIds = _.values(constants.NETWORK_ID_BY_NAME);
|
||||
return (
|
||||
<div>
|
||||
<div className="h4 pt3">Follow these instructions before proceeding:</div>
|
||||
@ -166,7 +166,7 @@ export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps,
|
||||
const balanceInWei = this.state.addressBalances[i];
|
||||
const addressTooltipId = `address-${userAddress}`;
|
||||
const balanceTooltipId = `balance-${userAddress}`;
|
||||
const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
|
||||
const networkName = constants.NETWORK_NAME_BY_ID[this.props.networkId];
|
||||
// We specifically prefix kovan ETH.
|
||||
// TODO: We should probably add prefixes for all networks
|
||||
const isKovanNetwork = networkName === 'Kovan';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface PortalDisclaimerDialogProps {
|
||||
isOpen: boolean;
|
||||
|
BIN
packages/website/ts/components/documentation/.DS_Store
vendored
Normal file
BIN
packages/website/ts/components/documentation/.DS_Store
vendored
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
import { Link } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
import { ALink, colors, Link } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import Drawer from 'material-ui/Drawer';
|
||||
import * as React from 'react';
|
||||
import { DocsLogo } from 'ts/components/documentation/docs_logo';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { Deco, Key, ScreenWidths } from 'ts/types';
|
||||
import { ALink, Deco, Key, ScreenWidths } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
|
||||
|
@ -1,14 +1,17 @@
|
||||
import { colors, Link, MarkdownLinkBlock, utils as sharedUtils } from '@0x/react-shared';
|
||||
import { ObjectMap } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import { Element as ScrollElement } from 'react-scroll';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import { MarkdownLinkBlock } from 'ts/components/documentation/shared/markdown_link_block';
|
||||
import { TutorialButton } from 'ts/components/documentation/tutorial_button';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { Deco, Key, Package, TutorialInfo } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
export interface OverviewContentProps {
|
||||
translate: Translate;
|
||||
@ -28,7 +31,7 @@ export class OverviewContent extends React.Component<OverviewContentProps, Overv
|
||||
<Container marginTop="36px">
|
||||
{_.map(this.props.tutorials, tutorialInfo => (
|
||||
<ScrollElement
|
||||
name={sharedUtils.getIdFromName(
|
||||
name={utils.getIdFromName(
|
||||
this.props.translate.get(tutorialInfo.link.title as Key, Deco.Cap),
|
||||
)}
|
||||
key={`tutorial-${tutorialInfo.link.title}`}
|
||||
@ -63,7 +66,7 @@ export class OverviewContent extends React.Component<OverviewContentProps, Overv
|
||||
);
|
||||
}
|
||||
private _renderPackage(pkg: Package): React.ReactNode {
|
||||
const id = sharedUtils.getIdFromName(pkg.link.title);
|
||||
const id = utils.getIdFromName(pkg.link.title);
|
||||
return (
|
||||
<ScrollElement name={id} key={`package-${pkg.link.title}`}>
|
||||
<Container className="pb2">
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Styles } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { Styles } from 'ts/types';
|
||||
|
||||
const styles: Styles = {
|
||||
badge: {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { colors, MarkdownCodeBlock } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import { MarkdownCodeBlock } from 'ts/components/documentation/shared/markdown_code_block';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export interface CommentProps {
|
||||
comment: string;
|
||||
|
@ -1,14 +1,3 @@
|
||||
import {
|
||||
colors,
|
||||
constants as sharedConstants,
|
||||
EtherscanLinkSuffixes,
|
||||
HeaderSizes,
|
||||
Link,
|
||||
MarkdownSection,
|
||||
Networks,
|
||||
SectionHeader,
|
||||
utils as sharedUtils,
|
||||
} from '@0x/react-shared';
|
||||
import {
|
||||
DocAgnosticFormat,
|
||||
Event,
|
||||
@ -22,10 +11,15 @@ import {
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as semver from 'semver';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import { MarkdownSection } from 'ts/components/documentation/shared/markdown_section';
|
||||
import { SectionHeader } from 'ts/components/documentation/shared/section_header';
|
||||
import { AddressByContractName, EtherscanLinkSuffixes, HeaderSizes, Networks, SupportedDocJson } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
import { AddressByContractName, SupportedDocJson } from '../../../types';
|
||||
import { constants } from '../../../utils/constants';
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
|
||||
import { Badge } from './badge';
|
||||
import { Comment } from './comment';
|
||||
@ -55,7 +49,7 @@ export class DocReference extends React.Component<DocReferenceProps, DocReferenc
|
||||
public componentDidUpdate(prevProps: DocReferenceProps, _prevState: DocReferenceState): void {
|
||||
if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
|
||||
const hash = window.location.hash.slice(1);
|
||||
sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
|
||||
utils.scrollToHash(hash, constants.SCROLL_CONTAINER_ID);
|
||||
}
|
||||
}
|
||||
public render(): React.ReactNode {
|
||||
@ -67,7 +61,7 @@ export class DocReference extends React.Component<DocReferenceProps, DocReferenc
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div id={sharedConstants.SCROLL_TOP_ID} />
|
||||
<div id={constants.SCROLL_TOP_ID} />
|
||||
{renderedSections}
|
||||
</div>
|
||||
);
|
||||
@ -250,9 +244,9 @@ export class DocReference extends React.Component<DocReferenceProps, DocReferenc
|
||||
if (contractAddress === undefined) {
|
||||
return null;
|
||||
}
|
||||
const linkIfExists = sharedUtils.getEtherScanLinkIfExists(
|
||||
const linkIfExists = utils.getEtherScanLinkIfExists(
|
||||
contractAddress,
|
||||
sharedConstants.NETWORK_ID_BY_NAME[networkName],
|
||||
constants.NETWORK_ID_BY_NAME[networkName],
|
||||
EtherscanLinkSuffixes.Address,
|
||||
);
|
||||
return (
|
||||
|
@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
import { EnumValue } from '../../../types';
|
||||
import { EnumValue } from 'ts/types';
|
||||
|
||||
export interface EnumProps {
|
||||
values: EnumValue[];
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { AnchorTitle, colors, HeaderSizes } from '@0x/react-shared';
|
||||
import { Event, EventArg } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { AnchorTitle } from 'ts/components/documentation/shared/anchor_title';
|
||||
import { HeaderSizes } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
|
||||
import { Type } from './type';
|
||||
|
||||
|
@ -3,7 +3,7 @@ import * as React from 'react';
|
||||
|
||||
import { CustomType, TypeDefinitionByName } from '@0x/types';
|
||||
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
|
||||
import { Signature } from './signature';
|
||||
import { Type } from './type';
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { AnchorTitle, HeaderSizes } from '@0x/react-shared';
|
||||
import { Property, TypeDefinitionByName } from '@0x/types';
|
||||
import * as React from 'react';
|
||||
import { AnchorTitle } from 'ts/components/documentation/shared/anchor_title';
|
||||
|
||||
import { constants } from '../../../utils/constants';
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { HeaderSizes } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
|
||||
import { Comment } from './comment';
|
||||
import { SourceLink } from './source_link';
|
||||
|
@ -3,7 +3,7 @@ import * as React from 'react';
|
||||
|
||||
import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '@0x/types';
|
||||
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
|
||||
import { Type } from './type';
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
import { AnchorTitle, colors, HeaderSizes, Styles } from '@0x/react-shared';
|
||||
import { Parameter, SolidityMethod, TypeDefinitionByName, TypescriptFunction, TypescriptMethod } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { AnchorTitle } from 'ts/components/documentation/shared/anchor_title';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
import { constants } from '../../../utils/constants';
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { HeaderSizes, Styles } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
|
||||
import { Comment } from './comment';
|
||||
import { Signature } from './signature';
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { colors, Link } from '@0x/react-shared';
|
||||
import { Source } from '@0x/types';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
import { Link } from '../shared/link';
|
||||
|
||||
export interface SourceLinkProps {
|
||||
source: Source;
|
||||
|
@ -1,11 +1,13 @@
|
||||
import { colors, Link, utils as sharedUtils } from '@0x/react-shared';
|
||||
import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0x/types';
|
||||
import { errorUtils } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import * as ReactTooltip from 'react-tooltip';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { Link } from '../shared/link';
|
||||
|
||||
import { Signature } from './signature';
|
||||
import { TypeDefinition } from './type_definition';
|
||||
@ -223,7 +225,7 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
|
||||
: `${props.docsInfo.typeSectionName}-${typeName}`;
|
||||
typeName = (
|
||||
<span>
|
||||
{sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? (
|
||||
{utils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? (
|
||||
<span style={{ color: colors.lightBlueA700, cursor: 'pointer' }}>{typeName}</span>
|
||||
) : (
|
||||
<Link to={typeDefinitionAnchorId}>
|
||||
|
@ -1,12 +1,13 @@
|
||||
import { AnchorTitle, colors, HeaderSizes } from '@0x/react-shared';
|
||||
import { CustomType, CustomTypeChild, TypeDefinitionByName, TypeDocTypes } from '@0x/types';
|
||||
import { errorUtils } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { AnchorTitle } from 'ts/components/documentation/shared/anchor_title';
|
||||
|
||||
import { KindString, SupportedDocJson } from '../../../types';
|
||||
import { constants } from '../../../utils/constants';
|
||||
import { DocsInfo } from '../../../utils/docs_info';
|
||||
import { HeaderSizes, KindString, SupportedDocJson } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { DocsInfo } from 'ts/utils/docs_info';
|
||||
|
||||
import { Comment } from './comment';
|
||||
import { CustomEnum } from './custom_enum';
|
||||
|
BIN
packages/website/ts/components/documentation/shared/.DS_Store
vendored
Normal file
BIN
packages/website/ts/components/documentation/shared/.DS_Store
vendored
Normal file
Binary file not shown.
@ -1,9 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Link } from '../components/link';
|
||||
import { HeaderSizes, Styles } from '../types';
|
||||
import { colors } from '../utils/colors';
|
||||
import { HeaderSizes, Styles } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
import { Link } from './link';
|
||||
|
||||
export interface AnchorTitleProps {
|
||||
title: string | React.ReactNode;
|
@ -4,8 +4,8 @@ import { NavLink as ReactRounterLink } from 'react-router-dom';
|
||||
import { Link as ScrollLink } from 'react-scroll';
|
||||
import * as validUrl from 'valid-url';
|
||||
|
||||
import { LinkType } from '../types';
|
||||
import { constants } from '../utils/constants';
|
||||
import { LinkType } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
||||
export interface BaseLinkProps {
|
||||
to: string;
|
@ -1,8 +1,8 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
import { constants } from '../utils/constants';
|
||||
import { utils } from '../utils/utils';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
export interface MarkdownLinkBlockProps {
|
||||
href: string;
|
@ -1,7 +1,7 @@
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
import { colors } from '../utils/colors';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export interface MarkdownParagraphBlockProps {}
|
||||
|
@ -3,9 +3,9 @@ import * as React from 'react';
|
||||
import * as ReactMarkdown from 'react-markdown';
|
||||
import { Element as ScrollElement } from 'react-scroll';
|
||||
|
||||
import { HeaderSizes } from '../types';
|
||||
import { colors } from '../utils/colors';
|
||||
import { utils } from '../utils/utils';
|
||||
import { HeaderSizes } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
import { AnchorTitle } from './anchor_title';
|
||||
import { Link } from './link';
|
@ -1,9 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import { Element as ScrollElement } from 'react-scroll';
|
||||
|
||||
import { HeaderSizes } from '../types';
|
||||
import { colors } from '../utils/colors';
|
||||
import { utils } from '../utils/utils';
|
||||
import { HeaderSizes } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
import { AnchorTitle } from './anchor_title';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { VersionDropDown } from 'ts/components/documentation/version_drop_down';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { ScreenWidths } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export interface SidebarHeaderProps {
|
||||
screenWidth: ScreenWidths;
|
||||
|
@ -1,12 +1,13 @@
|
||||
import { colors, Link } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { Deco, Key, TutorialInfo } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { Link } from './shared/link';
|
||||
|
||||
export interface TutorialButtonProps {
|
||||
className?: string;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Button } from 'ts/components/ui/button';
|
||||
@ -6,6 +5,7 @@ import { Container } from 'ts/components/ui/container';
|
||||
import { DropDown, DropdownMouseEvent } from 'ts/components/ui/drop_down';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface ActiveNodeProps {
|
||||
className?: string;
|
||||
|
@ -1,13 +1,15 @@
|
||||
import { ALink, colors, Link } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { DropDown } from 'ts/components/ui/drop_down';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { Deco, Key, WebsitePaths } from 'ts/types';
|
||||
import { ALink, Deco, Key, WebsitePaths } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
|
||||
import { Link } from '../documentation/shared/link';
|
||||
|
||||
const gettingStartedKeyToLinkInfo1: ALink[] = [
|
||||
{
|
||||
title: Key.BuildARelayer,
|
||||
|
@ -1,8 +1,6 @@
|
||||
import { Link } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import styled, { withTheme } from 'styled-components';
|
||||
|
||||
import { Button } from 'ts/components/button';
|
||||
import { Column, FlexWrap, WrapGrid } from 'ts/components/newLayout';
|
||||
import { ThemeValuesInterface } from 'ts/components/siteWrap';
|
||||
@ -10,6 +8,8 @@ import { Heading } from 'ts/components/text';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
||||
import { Link } from '../documentation/shared/link';
|
||||
|
||||
interface Props {
|
||||
theme: ThemeValuesInterface;
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { Link } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import styled, { withTheme } from 'styled-components';
|
||||
|
||||
import { Column, FlexWrap } from 'ts/components/newLayout';
|
||||
import { ThemeValuesInterface } from 'ts/components/siteWrap';
|
||||
import { Heading } from 'ts/components/text';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
||||
import { Link } from '../documentation/shared/link';
|
||||
|
||||
interface Props {
|
||||
theme: ThemeValuesInterface;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { constants as sharedConstants } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import DropDownMenu from 'material-ui/DropDownMenu';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import * as React from 'react';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
||||
interface NetworkDropDownProps {
|
||||
updateSelectedNetwork: (e: any, index: number, value: number) => void;
|
||||
@ -24,7 +24,7 @@ export class NetworkDropDown extends React.Component<NetworkDropDownProps, Netwo
|
||||
}
|
||||
private _renderDropDownItems(): React.ReactNode {
|
||||
const items = _.map(this.props.avialableNetworkIds, networkId => {
|
||||
const networkName = sharedConstants.NETWORK_NAME_BY_ID[networkId];
|
||||
const networkName = constants.NETWORK_NAME_BY_ID[networkId];
|
||||
const primaryText = (
|
||||
<div className="flex">
|
||||
<div className="pr1" style={{ width: 14, paddingTop: 2 }}>
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
@ -11,6 +10,7 @@ import { Blockchain } from 'ts/blockchain';
|
||||
import { EthWethConversionButton } from 'ts/components/eth_weth_conversion_button';
|
||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import {
|
||||
EtherscanLinkSuffixes,
|
||||
OutdatedWrappedEtherByNetworkId,
|
||||
Side,
|
||||
Token,
|
||||
@ -18,6 +18,7 @@ import {
|
||||
TokenState,
|
||||
TokenStateByAddress,
|
||||
} from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { configs } from 'ts/utils/configs';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
@ -91,7 +92,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
|
||||
const etherToken = this._getEthToken();
|
||||
const wethBalance = Web3Wrapper.toUnitAmount(this.state.ethTokenState.balance, constants.DECIMAL_PLACES_ETH);
|
||||
const isBidirectional = true;
|
||||
const etherscanUrl = sharedUtils.getEtherScanLinkIfExists(
|
||||
const etherscanUrl = utils.getEtherScanLinkIfExists(
|
||||
etherToken.address,
|
||||
this.props.networkId,
|
||||
EtherscanLinkSuffixes.Address,
|
||||
@ -285,7 +286,7 @@ export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersSt
|
||||
this,
|
||||
outdatedWETHIfExists.address,
|
||||
);
|
||||
const etherscanUrl = sharedUtils.getEtherScanLinkIfExists(
|
||||
const etherscanUrl = utils.getEtherScanLinkIfExists(
|
||||
outdatedWETHIfExists.address,
|
||||
this.props.networkId,
|
||||
EtherscanLinkSuffixes.Address,
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
|
||||
import { colors, Link } from '@0x/react-shared';
|
||||
import { BigNumber, logUtils } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as accounting from 'accounting';
|
||||
@ -22,10 +21,13 @@ import { portalOrderSchema } from 'ts/schemas/portal_order_schema';
|
||||
import { validator } from 'ts/schemas/validator';
|
||||
import { AlertTypes, BlockchainErrs, PortalOrder, Token, TokenByAddress, WebsitePaths } from 'ts/types';
|
||||
import { analytics } from 'ts/utils/analytics';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { errorReporter } from 'ts/utils/error_reporter';
|
||||
import { orderParser } from 'ts/utils/order_parser';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
import { Link } from './documentation/shared/link';
|
||||
|
||||
interface FillOrderProps {
|
||||
blockchain: Blockchain;
|
||||
blockchainErr: BlockchainErrs;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import FlatButton from 'material-ui/FlatButton';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface FillWarningDialogProps {
|
||||
isOpen: boolean;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
interface AssetSendCompletedProps {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface TransactionSubmittedProps {
|
||||
etherScanLinkIfExists?: string;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { Link as SmartLink } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import MediaQuery from 'react-responsive';
|
||||
@ -6,6 +5,7 @@ import styled from 'styled-components';
|
||||
|
||||
import { Logo } from 'ts/components/logo';
|
||||
import { Column, FlexWrap, WrapGrid } from 'ts/components/newLayout';
|
||||
import { Link as SmartLink } from 'ts/components/documentation/shared/link';
|
||||
import { NewsletterForm } from 'ts/components/newsletter_form';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils';
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { Order as ZeroExOrder } from '@0x/types';
|
||||
import { BigNumber, logUtils } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
@ -31,6 +30,7 @@ import {
|
||||
TokenByAddress,
|
||||
} from 'ts/types';
|
||||
import { analytics } from 'ts/utils/analytics';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { errorReporter } from 'ts/utils/error_reporter';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as moment from 'moment';
|
||||
@ -9,6 +8,7 @@ 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 { AlertTypes, Token, TokenByAddress } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface NewTokenFormProps {
|
||||
blockchain: Blockchain;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Link } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import MediaQuery from 'react-responsive';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { addressUtils } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
import { RequiredLabel } from 'ts/components/ui/required_label';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface AddressInputProps {
|
||||
disabled?: boolean;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { BigNumber, logUtils } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
@ -11,6 +10,7 @@ import { Text } from 'ts/components/ui/text';
|
||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import { BalanceErrs, Token, TokenState } from 'ts/types';
|
||||
import { analytics } from 'ts/utils/analytics';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { errorReporter } from 'ts/utils/error_reporter';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import TextField from 'material-ui/TextField';
|
||||
import * as React from 'react';
|
||||
import { RequiredLabel } from 'ts/components/ui/required_label';
|
||||
import { ValidatedBigNumberCallback } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
interface BalanceBoundedInputProps {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
|
||||
import { Styles } from '@0x/react-shared';
|
||||
import { Order } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
@ -7,7 +6,7 @@ import ReactTooltip from 'react-tooltip';
|
||||
|
||||
import { Blockchain } from 'ts/blockchain';
|
||||
import { FakeTextField } from 'ts/components/ui/fake_text_field';
|
||||
import { HashData } from 'ts/types';
|
||||
import { HashData, Styles } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
||||
const styles: Styles = {
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { colors, Link } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Blockchain } from 'ts/blockchain';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { Token, ValidatedBigNumberCallback, WebsitePaths } from 'ts/types';
|
||||
|
||||
interface TokenAmountInputProps {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import Paper from 'material-ui/Paper';
|
||||
import * as React from 'react';
|
||||
import { Blockchain } from 'ts/blockchain';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Link as SmartLink } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { Link as SmartLink } from 'ts/components/documentation/shared/link';
|
||||
|
||||
interface LinkInterface {
|
||||
color?: string;
|
||||
|
@ -1,10 +1,13 @@
|
||||
import { ALink, colors, Link, utils as sharedUtils } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
|
||||
import { ObjectMap } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Button } from 'ts/components/ui/button';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { ScreenWidths } from 'ts/types';
|
||||
import { ALink, ScreenWidths } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
export interface NestedSidebarMenuProps {
|
||||
sectionNameToLinks: ObjectMap<ALink[]>;
|
||||
@ -15,10 +18,10 @@ export interface NestedSidebarMenuProps {
|
||||
|
||||
export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => {
|
||||
const navigation = _.map(props.sectionNameToLinks, (links: ALink[], sectionName: string) => {
|
||||
const finalSectionName = sharedUtils.convertCamelCaseToSpaces(sectionName);
|
||||
const finalSectionName = utils.convertCamelCaseToSpaces(sectionName);
|
||||
const menuItems = _.map(links, (link, i) => {
|
||||
const menuItemTitle = props.shouldReformatMenuItemNames
|
||||
? _.capitalize(sharedUtils.convertDashesToSpaces(link.title))
|
||||
? _.capitalize(utils.convertDashesToSpaces(link.title))
|
||||
: link.title;
|
||||
const finalLink = {
|
||||
...link,
|
||||
|
@ -1,12 +1,14 @@
|
||||
import { ALink, colors, Link } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
|
||||
import { ObjectMap } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
import DropDownMenu from 'material-ui/DropDownMenu';
|
||||
import MenuItem from 'material-ui/MenuItem';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/style/colors';
|
||||
|
||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import { Deco, Key, Language, WebsitePaths } from 'ts/types';
|
||||
import { ALink, Deco, Key, Language, WebsitePaths } from 'ts/types';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import * as React from 'react';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Image } from 'ts/components/ui/image';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
import * as _ from 'lodash';
|
||||
import { Button } from 'ts/components/ui/button';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as React from 'react';
|
||||
import { Balance } from 'ts/components/ui/balance';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { IconButton } from 'ts/components/ui/icon_button';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
|
||||
export interface WrapEthOnboardingStep1Props {}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { Link, Styles } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import * as React from 'react';
|
||||
import { Island } from 'ts/components/ui/island';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { Styles } from 'ts/types';
|
||||
|
||||
export interface BackButtonProps {
|
||||
to: string;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { Styles } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
@ -7,7 +6,7 @@ import { defaultMenuItemEntries, Menu } from 'ts/components/portal/menu';
|
||||
import { Identicon } from 'ts/components/ui/identicon';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { ProviderType, WebsitePaths } from 'ts/types';
|
||||
import { ProviderType, Styles, WebsitePaths } from 'ts/types';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
const IDENTICON_DIAMETER = 45;
|
||||
|
@ -1,9 +1,8 @@
|
||||
import { Styles } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { CustomMenuItem } from 'ts/components/ui/custom_menu_item';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { WebsitePaths } from 'ts/types';
|
||||
import { Styles, WebsitePaths } from 'ts/types';
|
||||
|
||||
export interface MenuTheme {
|
||||
paddingLeft: number;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { colors, Link } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Redirect, Route, RouteComponentProps, Switch } from 'react-router-dom';
|
||||
import { colors } from 'ts/style/colors';
|
||||
|
||||
import { Blockchain } from 'ts/blockchain';
|
||||
import { ANNOUNCEMENT_BANNER_HEIGHT, AnnouncementBanner } from 'ts/components/annoucement_banner';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import * as React from 'react';
|
||||
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { Styles } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import { GridTile as PlainGridTile } from 'material-ui/GridList';
|
||||
import * as React from 'react';
|
||||
@ -11,7 +10,7 @@ import { Island } from 'ts/components/ui/island';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { media } from 'ts/style/media';
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { WebsiteBackendRelayerInfo } from 'ts/types';
|
||||
import { Styles, WebsiteBackendRelayerInfo } from 'ts/types';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
export enum RelayerGridTileStyle {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { WebsiteBackendTokenInfo } from 'ts/types';
|
||||
import { EtherscanLinkSuffixes, WebsiteBackendTokenInfo } from 'ts/types';
|
||||
import { analytics } from 'ts/utils/analytics';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
@ -56,6 +56,6 @@ class TokenLink extends React.Component<TokenLinkProps, TokenLinkState> {
|
||||
);
|
||||
}
|
||||
private _tokenLinkFromToken(tokenInfo: WebsiteBackendTokenInfo, networkId: number): string {
|
||||
return sharedUtils.getEtherScanLinkIfExists(tokenInfo.address, networkId, EtherscanLinkSuffixes.Address);
|
||||
return utils.getEtherScanLinkIfExists(tokenInfo.address, networkId, EtherscanLinkSuffixes.Address);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,3 @@
|
||||
import {
|
||||
constants as sharedConstants,
|
||||
EtherscanLinkSuffixes,
|
||||
Networks,
|
||||
Styles,
|
||||
utils as sharedUtils,
|
||||
} from '@0x/react-shared';
|
||||
import { BigNumber, errorUtils, fetchAsync, logUtils } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
@ -31,7 +24,10 @@ import {
|
||||
BalanceErrs,
|
||||
BlockchainCallErrs,
|
||||
BlockchainErrs,
|
||||
EtherscanLinkSuffixes,
|
||||
Networks,
|
||||
ScreenWidths,
|
||||
Styles,
|
||||
Token,
|
||||
TokenByAddress,
|
||||
TokenStateByAddress,
|
||||
@ -115,7 +111,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
|
||||
if (this.state.isBalanceSpinnerVisible) {
|
||||
const receivedAmountInWei = nextProps.userEtherBalanceInWei.minus(this.props.userEtherBalanceInWei);
|
||||
const receivedAmountInEth = Web3Wrapper.toUnitAmount(receivedAmountInWei, constants.DECIMAL_PLACES_ETH);
|
||||
const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
|
||||
const networkName = constants.NETWORK_NAME_BY_ID[this.props.networkId];
|
||||
this.props.dispatcher.showFlashMessage(
|
||||
`Received ${receivedAmountInEth.toString(10)} ${networkName} Ether`,
|
||||
);
|
||||
@ -329,16 +325,16 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
|
||||
}
|
||||
private _renderTokenRow(tokenColSpan: number, actionPaddingX: number, token: Token): React.ReactNode {
|
||||
const tokenState = this.state.trackedTokenStateByAddress[token.address];
|
||||
const tokenLink = sharedUtils.getEtherScanLinkIfExists(
|
||||
const tokenLink = utils.getEtherScanLinkIfExists(
|
||||
token.address,
|
||||
this.props.networkId,
|
||||
EtherscanLinkSuffixes.Address,
|
||||
);
|
||||
const isMintable =
|
||||
(_.includes(configs.SYMBOLS_OF_MINTABLE_KOVAN_TOKENS, token.symbol) &&
|
||||
this.props.networkId === sharedConstants.NETWORK_ID_BY_NAME[Networks.Kovan]) ||
|
||||
this.props.networkId === constants.NETWORK_ID_BY_NAME[Networks.Kovan]) ||
|
||||
(_.includes(configs.SYMBOLS_OF_MINTABLE_ROPSTEN_TOKENS, token.symbol) &&
|
||||
this.props.networkId === sharedConstants.NETWORK_ID_BY_NAME[Networks.Ropsten]);
|
||||
this.props.networkId === constants.NETWORK_ID_BY_NAME[Networks.Ropsten]);
|
||||
return (
|
||||
<TableRow key={token.address} style={{ height: TOKEN_TABLE_ROW_HEIGHT }}>
|
||||
<TableRowColumn colSpan={tokenColSpan}>
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { Styles } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import CircularProgress from 'material-ui/CircularProgress';
|
||||
import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
|
||||
@ -20,7 +19,7 @@ import {
|
||||
import { Text } from 'ts/components/ui/text';
|
||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import { colors } from 'ts/style/colors';
|
||||
import { AccountState, ProviderType } from 'ts/types';
|
||||
import { AccountState, ProviderType, Styles } from 'ts/types';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
const ROOT_HEIGHT = 24;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { ALink, colors, Link, Styles } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
|
||||
import { ObjectMap } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
import Drawer from 'material-ui/Drawer';
|
||||
@ -11,7 +12,8 @@ import { ProviderDisplay } from 'ts/components/top_bar/provider_display';
|
||||
import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||
import { Deco, Key, ProviderType, WebsitePaths } from 'ts/types';
|
||||
import { ALink, Deco, Key, ProviderType, Styles, WebsitePaths } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { constants } from 'ts/utils/constants';
|
||||
import { Translate } from 'ts/utils/translate';
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { colors, Link } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { colors } from 'ts/style/colors';
|
||||
|
||||
import { CallToAction } from 'ts/components/ui/button';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Party } from 'ts/components/ui/party';
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { colors, EtherscanLinkSuffixes } from '@0x/react-shared';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
@ -8,7 +7,8 @@ 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 { Fill, Token, TokenByAddress } from 'ts/types';
|
||||
import { EtherscanLinkSuffixes, Fill, Token, TokenByAddress } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { configs } from 'ts/utils/configs';
|
||||
|
||||
const IDENTICON_DIAMETER = 40;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { AlertTypes } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
interface AlertProps {
|
||||
type: AlertTypes;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { Container } from 'ts/components/ui/container';
|
||||
import { Spinner } from 'ts/components/ui/spinner';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export enum AllowanceState {
|
||||
Locked,
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { darken, saturate } from 'polished';
|
||||
import * as React from 'react';
|
||||
import { styled } from 'ts/style/theme';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export interface ButtonProps {
|
||||
className?: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export interface CheckMarkProps {
|
||||
color?: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import * as React from 'react';
|
||||
import * as CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Link } from '@0x/react-shared';
|
||||
import { Link } from 'ts/components/documentation/shared/link';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { EtherscanLinkSuffixes } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { EtherScanIcon } from 'ts/components/ui/etherscan_icon';
|
||||
import { EtherscanLinkSuffixes } from 'ts/types';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
interface EthereumAddressProps {
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { EtherscanLinkSuffixes } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
interface EtherScanIconProps {
|
||||
addressOrTxHash: string;
|
||||
@ -10,7 +12,7 @@ interface EtherScanIconProps {
|
||||
}
|
||||
|
||||
export const EtherScanIcon = (props: EtherScanIconProps) => {
|
||||
const etherscanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
|
||||
const etherscanLinkIfExists = utils.getEtherScanLinkIfExists(
|
||||
props.addressOrTxHash,
|
||||
props.networkId,
|
||||
props.etherscanLinkSuffixes,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Styles } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { InputLabel } from 'ts/components/ui/input_label';
|
||||
import { Styles } from 'ts/types';
|
||||
|
||||
const styles: Styles = {
|
||||
hr: {
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { colors, Styles } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { Styles } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export interface IconButtonProps {
|
||||
iconName: string;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { colors, Styles } from '@0x/react-shared';
|
||||
import * as React from 'react';
|
||||
import { Styles } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
|
||||
export interface InputLabelProps {
|
||||
text: string | Element | React.ReactNode;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { errorUtils } from '@0x/utils';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import * as React from 'react';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
|
||||
import * as _ from 'lodash';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { EthereumAddress } from 'ts/components/ui/ethereum_address';
|
||||
import { Identicon } from 'ts/components/ui/identicon';
|
||||
import { EtherscanLinkSuffixes } from 'ts/types';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import { utils } from 'ts/utils/utils';
|
||||
|
||||
const IMAGE_DIMENSION = 100;
|
||||
const IDENTICON_DIAMETER = 95;
|
||||
@ -41,7 +43,7 @@ export class Party extends React.Component<PartyProps, PartyState> {
|
||||
width: IMAGE_DIMENSION,
|
||||
height: IMAGE_DIMENSION,
|
||||
};
|
||||
const etherscanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
|
||||
const etherscanLinkIfExists = utils.getEtherScanLinkIfExists(
|
||||
this.props.address,
|
||||
this.props.networkId,
|
||||
EtherscanLinkSuffixes.Address,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { colors } from '@0x/react-shared';
|
||||
import { colors } from 'ts/utils/colors';
|
||||
import * as React from 'react';
|
||||
import { styled } from 'ts/style/theme';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user