diff --git a/.travis.yml b/.travis.yml index 4a1583e863..73893fa3f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,11 +11,9 @@ env: - GITHUB_REPO: bitshares/bitshares-ui - WALLET_REPO: bitshares/wallet.bitshares.org - STAGING_REPO: bitshares/bitshares-ui-staging + - DEVELOP_REPO: bitshares/develop.bitshares.org - CXX=g++-4.8 - secure: "deD+B8xDM7cguX+PbeOSLh30mi6gHAdlqQphP63ZSCuFbL6hQU7MMb8nmBdBpIuaG2rX5GejSqPWTKt+/MSgQNHMTvRnzG1l1JtDTEAky8ssMyxI+HWiRe7Ic+1pFR0qUBAcPVN3MgPtW3Za47v1IyDyaR/0GdSREdy2KvmwBOWMoT23ubA1QlEhFO7uOlium4gJ6trxNPwfXkNHiMzanpVFyRQljY1PNGEPRzRzyWPNvZ4Pq5yNKnFFcW+afhvsTtK8AoeMFDeKhDF2yva8U0IMCZzrSKWwCIhkhJPii7pPT2LNlpjwVKXn16dRRVKO2tImmWtMpgbJjiNTRzVC4Y30+F7XPc97SpTKfGvoaH/iSZpTT1la0gHgoeBB32y6buPKnF7M2UNwTt2eGXpg/JHyperyQ25ey9EQBk/vHNxS9M3jcfkoXneBOnwICHgrzfamHxmMsiXnNDDriyPqIY9kFGQubqEF74cvBxhPLmfxJCPyHx7BY9ioiAlcgzWqJDOp/ADLjpoh44rUCpQH26Zg0N9efOuLUhuTAa54/9rboWZLxjxEvJ5qfTe+eHMW1r2RzoMJqWOhkbMs4f/qqGY42nqWhiibdSAZzIBuPYt/m9kdQ33930dKWoIkJwqZ2Il+T3FWJtzaguuoxKKYzsok9c/6FY7MbSSPaPw+fjg=" -cache: - directories: - - "node_modules" addons: apt: sources: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8776cce412..079744336f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,76 @@ +--------------------------------------------------------------------- +Release 2.0.180629 +--------------------------------------------------------------------- +New features +-------- +- #1484 TradingView restyle +- #1547: Support New OPs 47 + 48 +- #1591: Add code splitting, dynamic imports +- #1557 - Use order ID consistently +- #1292 - Autoscroll to transaction number +- #1496: Locking CR / Debt values for ratio selection +- List XRP and XMR Openledger assets (#1631) +- Add RuDEX: BTC, ETH, DGB, EOS (#1635) + +Bug fixes and improvements +-------- +- #1620: Fix undefined order property (#1624) +- Updating ru locale (#1602) +- #1620: Order ID is not always populated +- #1605: White screen after order creation +- #1611: Accessing withdraw modal with no account available +- #1612: Add contact with no account selected +- #1538: Disable different precision error message when not creating PM +- #1566: UI Update for BSIP-0037 +- Update TradingView lib +- Fix #1556: Remove forced decimalOffset on Proposed Transaction +- Fix #1532 - Generated password does not show completely +- Fix an issue in PasswordConfirm making input imposible +- #1584: Move to react router v4 +- #1560: Enable develop branch with automatic builds +- #1569: Use unique memo keys when creating new accounts +- Fix #1568: AssetName crash on non-existing asset +- #1580 Integrate bitshares-ui-style-guide +- #1525 - Clear Voting Proxy +- #1555 - Market Picker fixes for improvements + +--------------------------------------------------------------------- +Release 2.0.180629-rc2 +--------------------------------------------------------------------- +Bug fixes and improvements +-------- +- #1605: White screen after order creation +- #1611: Accessing withdraw modal with no account available +- #1612: Add contact with no account selected + +--------------------------------------------------------------------- +Release 2.0.180629-rc1 +--------------------------------------------------------------------- +New features +-------- +- #1484 TradingView restyle +- #1547: Support New OPs 47 + 48 +- #1591: Add code splitting, dynamic imports +- #1557 - Use order ID consistently +- #1292 - Autoscroll to transaction number +- #1496: Locking CR / Debt values for ratio selection + +Bug fixes and improvements +-------- +- #1538: Disable different precision error message when not creating PM +- #1566: UI Update for BSIP-0037 +- Update TradingView lib +- Fix #1556: Remove forced decimalOffset on Proposed Transaction +- Fix #1532 - Generated password does not show completely +- Fix an issue in PasswordConfirm making input imposible +- #1584: Move to react router v4 +- #1560: Enable develop branch with automatic builds +- #1569: Use unique memo keys when creating new accounts +- Fix #1568: AssetName crash on non-existing asset +- #1580 Integrate bitshares-ui-style-guide +- #1525 - Clear Voting Proxy +- #1555 - Market Picker fixes for improvements + --------------------------------------------------------------------- Release 2.0.180525 --------------------------------------------------------------------- diff --git a/app/App.jsx b/app/App.jsx index 5a74f85731..8d74d7009a 100644 --- a/app/App.jsx +++ b/app/App.jsx @@ -1,15 +1,8 @@ -import {hot} from "react-hot-loader"; import React from "react"; import {ChainStore} from "bitsharesjs/es"; -import IntlStore from "stores/IntlStore"; import AccountStore from "stores/AccountStore"; -import SettingsStore from "stores/SettingsStore"; -import IntlActions from "actions/IntlActions"; import NotificationStore from "stores/NotificationStore"; -import intlData from "./components/Utility/intlData"; -import alt from "alt-instance"; -import {connect, supplyFluxContext} from "alt-react"; -import {IntlProvider} from "react-intl"; +import {withRouter} from "react-router-dom"; import SyncError from "./components/SyncError"; import LoadingIndicator from "./components/LoadingIndicator"; import BrowserNotifications from "./components/BrowserNotifications/BrowserNotificationsContainer"; @@ -21,23 +14,107 @@ import WalletUnlockModal from "./components/Wallet/WalletUnlockModal"; import BrowserSupportModal from "./components/Modal/BrowserSupportModal"; import Footer from "./components/Layout/Footer"; import Deprecate from "./Deprecate"; -import WalletManagerStore from "stores/WalletManagerStore"; import Incognito from "./components/Layout/Incognito"; import {isIncognito} from "feature_detect"; import {updateGatewayBackers} from "common/gatewayUtils"; import titleUtils from "common/titleUtils"; -import PropTypes from "prop-types"; +import {BodyClassName} from "bitshares-ui-style-guide"; +import Loadable from "react-loadable"; + +import {Route, Switch} from "react-router-dom"; + +// Nested route components +import Page404 from "./components/Page404/Page404"; + +const Exchange = Loadable({ + loader: () => + import(/* webpackChunkName: "exchange" */ "./components/Exchange/ExchangeContainer"), + loading: LoadingIndicator +}); + +const Explorer = Loadable({ + loader: () => + import(/* webpackChunkName: "explorer" */ "./components/Explorer/Explorer"), + loading: LoadingIndicator +}); + +const AccountPage = Loadable({ + loader: () => + import(/* webpackChunkName: "account" */ "./components/Account/AccountPage"), + loading: LoadingIndicator +}); + +const Transfer = Loadable({ + loader: () => + import(/* webpackChunkName: "transfer" */ "./components/Transfer/Transfer"), + loading: LoadingIndicator +}); + +const AccountDepositWithdraw = Loadable({ + loader: () => + import(/* webpackChunkName: "deposit-withdraw" */ "./components/Account/AccountDepositWithdraw"), + loading: LoadingIndicator +}); + +const News = Loadable({ + loader: () => import(/* webpackChunkName: "news" */ "./components/News"), + loading: LoadingIndicator +}); + +const Settings = Loadable({ + loader: () => + import(/* webpackChunkName: "settings" */ "./components/Settings/SettingsContainer"), + loading: LoadingIndicator +}); + +const Help = Loadable({ + loader: () => import(/* webpackChunkName: "help" */ "./components/Help"), + loading: LoadingIndicator +}); + +const Asset = Loadable({ + loader: () => + import(/* webpackChunkName: "asset" */ "./components/Blockchain/Asset"), + loading: LoadingIndicator +}); + +const Block = Loadable({ + loader: () => + import(/* webpackChunkName: "block" */ "./components/Blockchain/BlockContainer"), + loading: LoadingIndicator +}); + +const DashboardAccountsOnly = Loadable({ + loader: () => + import(/* webpackChunkName: "dashboard-accounts" */ "./components/Dashboard/DashboardAccountsOnly"), + loading: LoadingIndicator +}); + +const DashboardPage = Loadable({ + loader: () => + import(/* webpackChunkName: "dashboard" */ "./components/Dashboard/DashboardPage"), + loading: LoadingIndicator +}); + +const WalletManager = Loadable({ + loader: () => + import(/* webpackChunkName: "wallet" */ "./components/Wallet/WalletManager"), + loading: LoadingIndicator +}); + +const ExistingAccount = Loadable({ + loader: () => + import(/* webpackChunkName: "existing-account" */ "./components/Wallet/ExistingAccount"), + loading: LoadingIndicator +}); + +import LoginSelector from "./components/LoginSelector"; +import {CreateWalletFromBrainkey} from "./components/Wallet/WalletCreate"; class App extends React.Component { - constructor(props) { + constructor() { super(); - // Check for mobile device to disable chat - const user_agent = navigator.userAgent.toLowerCase(); - let isSafari = /^((?!chrome|android).)*safari/i.test( - navigator.userAgent - ); - let syncFail = ChainStore.subError && ChainStore.subError.message === @@ -48,14 +125,12 @@ class App extends React.Component { loading: false, synced: this._syncStatus(), syncFail, - theme: SettingsStore.getState().settings.get("themes"), incognito: false, incognitoWarningDismissed: false, height: window && window.innerHeight }; this._rebuildTooltips = this._rebuildTooltips.bind(this); - this._onSettingsChange = this._onSettingsChange.bind(this); this._chainStoreSub = this._chainStoreSub.bind(this); this._syncStatus = this._syncStatus.bind(this); this._getWindowHeight = this._getWindowHeight.bind(this); @@ -64,7 +139,6 @@ class App extends React.Component { componentWillUnmount() { window.removeEventListener("resize", this._getWindowHeight); NotificationStore.unlisten(this._onNotificationChange); - SettingsStore.unlisten(this._onSettingsChange); ChainStore.unsubscribe(this._chainStoreSub); clearInterval(this.syncCheckInterval); } @@ -98,7 +172,6 @@ class App extends React.Component { passive: true }); NotificationStore.listen(this._onNotificationChange.bind(this)); - SettingsStore.listen(this._onSettingsChange); ChainStore.subscribe(this._chainStoreSub); AccountStore.tryToSetCurrentAccount(); } catch (e) { @@ -121,7 +194,7 @@ class App extends React.Component { this.refs.browser_modal.show(); } - this.props.router.listen(this._rebuildTooltips); + this.props.history.listen(this._rebuildTooltips); this._rebuildTooltips(); @@ -141,7 +214,7 @@ class App extends React.Component { onRouteChanged() { document.title = titleUtils.GetTitleByPath( - this.props.router.location.pathname + this.props.location.pathname ); } @@ -190,15 +263,6 @@ class App extends React.Component { this.refs.notificationSystem.addNotification(notification); } - _onSettingsChange() { - let {settings} = SettingsStore.getState(); - if (settings.get("themes") !== this.state.theme) { - this.setState({ - theme: settings.get("themes") - }); - } - } - _getWindowHeight() { this.setState({height: window && window.innerHeight}); } @@ -210,13 +274,11 @@ class App extends React.Component { // } render() { - let {theme, incognito, incognitoWarningDismissed} = this.state; - let {walletMode} = this.props; + let {incognito, incognitoWarningDismissed} = this.state; + let {walletMode, theme} = this.props; let content = null; - let showFooter = 1; - if (this.state.syncFail) { content = ; } else if (this.state.loading) { @@ -227,22 +289,114 @@ class App extends React.Component { /> ); - } else if (this.props.location.pathname === "/init-error") { - content = ( -
{this.props.children}
- ); } else if (__DEPRECATED__) { content = ; } else { content = (
-
-
+
+
- {this.props.children} + + + + + + + + + + + + + + {/* Explorer routes */} + + + + + + + {/* Wallet backup/restore routes */} + + + + + {/* Help routes */} + + + + + +
- {showFooter ?
: null} +
- {walletMode && incognito && !incognitoWarningDismissed ? ( - - ) : null} -
- {content} - + {walletMode && incognito && !incognitoWarningDismissed ? ( + + ) : null} +
+ {content} + - - - - -
+ }} + /> + + + + +
+
); } } -class RootIntl extends React.Component { - componentWillMount() { - IntlActions.switchLocale(this.props.locale); - } - - render() { - return ( - - - - ); - } -} - -RootIntl = connect(RootIntl, { - listenTo() { - return [IntlStore, WalletManagerStore, SettingsStore]; - }, - getProps() { - return { - locale: IntlStore.getState().currentLocale, - walletMode: - !SettingsStore.getState().settings.get("passwordLogin") || - !!WalletManagerStore.getState().current_wallet - }; - } -}); - -class Root extends React.Component { - static childContextTypes = { - router: PropTypes.object, - location: PropTypes.object - }; - - componentDidMount() { - //Detect OS for platform specific fixes - if (navigator.platform.indexOf("Win") > -1) { - var main = document.getElementById("content"); - var windowsClass = "windows"; - if (main.className.indexOf("windows") === -1) { - main.className = - main.className + - (main.className.length ? " " : "") + - windowsClass; - } - } - } - - getChildContext() { - return { - router: this.props.router, - location: this.props.location - }; - } - - render() { - return ; - } -} - -Root = supplyFluxContext(alt)(Root); -export default hot(module)(Root); +export default withRouter(App); diff --git a/app/AppInit.jsx b/app/AppInit.jsx new file mode 100644 index 0000000000..7b5c3c9bd4 --- /dev/null +++ b/app/AppInit.jsx @@ -0,0 +1,132 @@ +import {hot} from "react-hot-loader"; +import React from "react"; +import App from "./App"; +import IntlActions from "actions/IntlActions"; +import WalletManagerStore from "stores/WalletManagerStore"; +import SettingsStore from "stores/SettingsStore"; +import IntlStore from "stores/IntlStore"; +import intlData from "./components/Utility/intlData"; +import alt from "alt-instance"; +import {connect, supplyFluxContext} from "alt-react"; +import {IntlProvider} from "react-intl"; +import willTransitionTo from "./routerTransition"; +import LoadingIndicator from "./components/LoadingIndicator"; +import InitError from "./components/InitError"; +import counterpart from "counterpart"; + +/* +* Electron does not support browserHistory, so we need to use hashHistory. +* The same is true for servers without configuration options, such as Github Pages +*/ +import {HashRouter, BrowserRouter} from "react-router-dom"; +const Router = __HASH_HISTORY__ ? HashRouter : BrowserRouter; + +class RootIntl extends React.Component { + componentWillMount() { + IntlActions.switchLocale(this.props.locale); + } + + render() { + return ( + + + + + + ); + } +} + +class AppInit extends React.Component { + constructor() { + super(); + + this.state = { + apiConnected: false, + apiError: false + }; + } + + componentWillMount() { + willTransitionTo() + .then(() => { + this.setState({ + apiConnected: true, + apiError: false + }); + }) + .catch(err => { + console.log("willTransitionTo err:", err); + this.setState({ + apiConnected: false, + apiError: true + }); + }); + } + + componentDidMount() { + //Detect OS for platform specific fixes + if (navigator.platform.indexOf("Win") > -1) { + var main = document.getElementById("content"); + var windowsClass = "windows"; + if (main.className.indexOf("windows") === -1) { + main.className = + main.className + + (main.className.length ? " " : "") + + windowsClass; + } + } + } + + render() { + const {theme, apiServer} = this.props; + const {apiConnected, apiError} = this.state; + + if (!apiConnected) { + return ( +
+
+
+ {!apiError ? ( + + ) : ( + + )} +
+
+
+ ); + } + return ; + } +} + +AppInit = connect(AppInit, { + listenTo() { + return [IntlStore, WalletManagerStore, SettingsStore]; + }, + getProps() { + return { + locale: IntlStore.getState().currentLocale, + walletMode: + !SettingsStore.getState().settings.get("passwordLogin") || + !!WalletManagerStore.getState().current_wallet, + theme: SettingsStore.getState().settings.get("themes"), + apiServer: SettingsStore.getState().settings.get("activeNode", "") + }; + } +}); +AppInit = supplyFluxContext(alt)(AppInit); +export default hot(module)(AppInit); diff --git a/app/Deprecate.jsx b/app/Deprecate.jsx index ef8287bc16..88ece341c1 100644 --- a/app/Deprecate.jsx +++ b/app/Deprecate.jsx @@ -1,7 +1,14 @@ import React from "react"; import WalletDb from "stores/WalletDb"; -import Settings from "./components/Settings/SettingsContainer"; import Translate from "react-translate-component"; +import Loadable from "react-loadable"; +import LoadingIndicator from "./components/LoadingIndicator"; + +const Settings = Loadable({ + loader: () => + import(/* webpackChunkName: "settings" */ "./components/Settings/SettingsContainer"), + loading: LoadingIndicator +}); export default class Deprecate extends React.Component { hasWallet() { @@ -28,19 +35,36 @@ export default class Deprecate extends React.Component { render() { return (
-
+
- - -

https://wallet.bitshares.org

- - {this.hasWallet() ? this.renderForWallet() : this.renderForCloud()} + +

+ + https://wallet.bitshares.org + +

+ {this.hasWallet() + ? this.renderForWallet() + : this.renderForCloud()}
- {this.hasWallet() ? : null} + {this.hasWallet() ? ( + + ) : null}
); } -}; +} diff --git a/app/Main-dev.js b/app/Main-dev.js deleted file mode 100644 index 86d35a8bcf..0000000000 --- a/app/Main-dev.js +++ /dev/null @@ -1,11 +0,0 @@ -require("./assets/loader-dev"); -if (!window.Intl) { - // Safari polyfill - require.ensure(["intl"], require => { - window.Intl = require("intl"); - Intl.__addLocaleData(require("./assets/intl-data/en.json")); - require("index-dev.js"); - }); -} else { - require("index-dev.js"); -} diff --git a/app/Routes-dev.jsx b/app/Routes-dev.jsx deleted file mode 100644 index 87cc720016..0000000000 --- a/app/Routes-dev.jsx +++ /dev/null @@ -1,180 +0,0 @@ -import React from "react"; - -import { - Router, - Route, - IndexRoute, - browserHistory, - hashHistory, - Redirect -} from "react-router/es"; -import willTransitionTo from "./routerTransition"; -import App from "./App"; - -// Components imported here for react hot loader (does not work with async route loading) -import DashboardPage from "./components/Dashboard/DashboardPage"; -import DashboardAccountsOnly from "./components/Dashboard/DashboardAccountsOnly"; -import Witnesses from "./components/Explorer/Witnesses"; -import CommitteeMembers from "./components/Explorer/CommitteeMembers"; -import FeesContainer from "./components/Explorer/FeesContainer"; -import BlocksContainer from "./components/Explorer/BlocksContainer"; -import AssetsContainer from "./components/Explorer/AssetsContainer"; -import AccountsContainer from "./components/Explorer/AccountsContainer"; -import Explorer from "components/Explorer/Explorer"; -import AccountPage from "./components/Account/AccountPage"; -import AccountOverview from "./components/Account/AccountOverview"; -import AccountAssets from "./components/Account/AccountAssets"; -import {AccountAssetCreate} from "./components/Account/AccountAssetCreate"; -import AccountAssetUpdate from "./components/Account/AccountAssetUpdate"; -import AccountMembership from "./components/Account/AccountMembership"; -import AccountVesting from "./components/Account/AccountVesting"; -import AccountDepositWithdraw from "./components/Account/AccountDepositWithdraw"; -import AccountPermissions from "./components/Account/AccountPermissions"; -import AccountWhitelist from "./components/Account/AccountWhitelist"; -import AccountVoting from "./components/Account/AccountVoting"; -import Page404 from "./components/Page404/Page404"; -// import AccountOrders from "./components/Account/AccountOrders"; -import AccountSignedMessages from "./components/Account/AccountSignedMessages"; -import ExchangeContainer from "./components/Exchange/ExchangeContainer"; -import MarketsContainer from "./components/Explorer/MarketsContainer"; -import Transfer from "./components/Transfer/Transfer"; -import SettingsContainer from "./components/Settings/SettingsContainer"; -import BlockContainer from "./components/Blockchain/BlockContainer"; -import Asset from "./components/Blockchain/Asset"; -import CreateAccount from "./components/Account/CreateAccount"; -import CreateAccountPassword from "./components/Account/CreateAccountPassword"; -import { - ExistingAccount, - ExistingAccountOptions -} from "./components/Wallet/ExistingAccount"; -import { - WalletCreate, - CreateWalletFromBrainkey -} from "./components/Wallet/WalletCreate"; -import ImportKeys from "./components/Wallet/ImportKeys"; -import Invoice from "./components/Transfer/Invoice"; -import {BackupCreate, BackupRestore} from "./components/Wallet/Backup"; -import WalletChangePassword from "./components/Wallet/WalletChangePassword"; -import { - WalletManager, - WalletOptions, - ChangeActiveWallet, - WalletDelete -} from "./components/Wallet/WalletManager"; -import BalanceClaimActive from "./components/Wallet/BalanceClaimActive"; -import BackupBrainkey from "./components/Wallet/BackupBrainkey"; -import Brainkey from "./components/Wallet/Brainkey"; -import News from "./components/News"; -import Help from "./components/Help"; -import InitError from "./components/InitError"; -import LoginSelector from "./components/LoginSelector"; -import CreateWorker from "./components/Account/CreateWorker"; - -const history = __HASH_HISTORY__ ? hashHistory : browserHistory; - -class Auth extends React.Component { - render() { - return null; - } -} - -const routes = ( - - - - - - - - - - - - - {/* wallet management console */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {/* */} - {/* */} - {/* */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - -); - -export default class Routes extends React.Component { - render() { - return ; - } -} diff --git a/app/Routes.jsx b/app/Routes.jsx deleted file mode 100644 index 9023cc5256..0000000000 --- a/app/Routes.jsx +++ /dev/null @@ -1,541 +0,0 @@ -import React from "react"; - -import {Route, IndexRoute, Redirect} from "react-router/es"; -import willTransitionTo from "./routerTransition"; -import App from "./App"; - -/* -* Electron does not support async loading of components via System.import, -* so we make sure they're bundled already by including them here -*/ -if (__ELECTRON__ || __HASH_HISTORY__) { - require("./electron_imports"); -} - -class Auth extends React.Component { - render() { - return null; - } -} - -function loadRoute(cb, moduleName = "default") { - return module => cb(null, module[moduleName]); -} - -function errorLoading(err) { - console.error("Dynamic page loading failed", err); -} - -const routes = ( - - { - import("components/Dashboard/DashboardPage") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - - { - import("components/Explorer/Explorer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Explorer/FeesContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Explorer/BlocksContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Explorer/AssetsContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Explorer/AccountsContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Explorer/Witnesses") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Explorer/CommitteeMembers") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - { - import("components/Wallet/WalletManager") - .then(loadRoute(cb, "WalletManager")) - .catch(errorLoading); - }} - > - {/* wallet management console */} - { - import("components/Wallet/WalletManager") - .then(loadRoute(cb, "WalletOptions")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/WalletManager") - .then(loadRoute(cb, "ChangeActiveWallet")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/WalletChangePassword") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/ImportKeys") - .then(loadRoute(cb, "ExistingAccountOptions")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/Brainkey") - .then(loadRoute(cb, "ExistingAccountOptions")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/WalletCreate") - .then(loadRoute(cb, "WalletCreate")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/WalletManager") - .then(loadRoute(cb, "WalletDelete")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/Backup") - .then(loadRoute(cb, "BackupRestore")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/Backup") - .then(loadRoute(cb, "BackupCreate")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/BackupBrainkey") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/BalanceClaimActive") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - - { - import("components/Wallet/WalletCreate") - .then(loadRoute(cb, "WalletCreate")) - .catch(errorLoading); - }} - /> - - { - import("components/Wallet/WalletCreate") - .then(loadRoute(cb, "CreateWalletFromBrainkey")) - .catch(errorLoading); - }} - /> - - { - import("components/Transfer/Transfer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - { - import("components/Transfer/Invoice") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Explorer/MarketsContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Exchange/ExchangeContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Settings/SettingsContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Settings/SettingsContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Blockchain/BlockContainer") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Blockchain/Asset") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/LoginSelector") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - > - { - import("components/Account/CreateAccount") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/CreateAccountPassword") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - - { - import("components/Dashboard/DashboardAccountsOnly") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - { - import("components/Wallet/ExistingAccount") - .then(loadRoute(cb, "ExistingAccount")) - .catch(errorLoading); - }} - > - { - import("components/Wallet/Backup") - .then(loadRoute(cb, "BackupRestore")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/ExistingAccount") - .then(loadRoute(cb, "ExistingAccountOptions")) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/ImportKeys") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/Brainkey") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Wallet/BalanceClaimActive") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - - { - import("components/Account/AccountPage") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - > - { - import("components/Account/AccountOverview") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - {/* { - import("components/Account/AccountOverview").then(loadRoute(cb)).catch(errorLoading); - }}/> */} - {/* { - import("components/Account/AccountDepositWithdraw").then(loadRoute(cb)).catch(errorLoading); - }}/> */} - {/* { - import("components/Account/AccountOrders").then(loadRoute(cb)).catch(errorLoading); - }}/> */} - - { - import("components/Account/AccountAssets") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountAssetCreate") - .then(loadRoute(cb, "AccountAssetCreate")) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountAssetUpdate") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountMembership") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountVesting") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountPermissions") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountVoting") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountWhitelist") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/AccountSignedMessages") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - - - - { - import("components/Account/AccountDepositWithdraw") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Account/CreateWorker") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/InitError") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/News") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - { - import("components/Help") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - > - { - import("components/Help") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - > - { - import("components/Help") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - > - { - import("components/Help") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - - - - { - import("components/Page404/Page404") - .then(loadRoute(cb)) - .catch(errorLoading); - }} - /> - -); - -export default routes; diff --git a/app/actions/WalletActions.js b/app/actions/WalletActions.js index 0d5c63c1fe..c924878a23 100644 --- a/app/actions/WalletActions.js +++ b/app/actions/WalletActions.js @@ -63,6 +63,11 @@ class WalletActions { "active", password ); + let {privKey: memo_private} = WalletDb.generateKeyFromPassword( + account_name, + "memo", + password + ); console.log("create account:", account_name); console.log( "new active pubkey", @@ -72,12 +77,17 @@ class WalletActions { "new owner pubkey", owner_private.toPublicKey().toPublicKeyString() ); + console.log( + "new memo pubkey", + memo_private.toPublicKey().toPublicKeyString() + ); return new Promise((resolve, reject) => { let create_account = () => { return ApplicationApi.create_account( owner_private.toPublicKey().toPublicKeyString(), active_private.toPublicKey().toPublicKeyString(), + memo_private.toPublicKey().toPublicKeyString(), account_name, registrar, //registrar_id, referrer, //referrer_id, @@ -124,10 +134,9 @@ class WalletActions { active_key: active_private .toPublicKey() .toPublicKeyString(), - memo_key: active_private + memo_key: memo_private .toPublicKey() .toPublicKeyString(), - //"memo_key": memo_private.private_key.toPublicKey().toPublicKeyString(), refcode: refcode, referrer: referrer } @@ -174,21 +183,22 @@ class WalletActions { } let owner_private = WalletDb.generateNextKey(); let active_private = WalletDb.generateNextKey(); - //let memo_private = WalletDb.generateNextKey() + let memo_private = WalletDb.generateNextKey(); + let updateWallet = () => { let transaction = WalletDb.transaction_update_keys(); let p = WalletDb.saveKeys( - [owner_private, active_private], - //[ owner_private, active_private, memo_private ], + [owner_private, active_private, memo_private], transaction ); - return p.catch(error => transaction.abort()); + return p.catch(() => transaction.abort()); }; let create_account = () => { return ApplicationApi.create_account( owner_private.private_key.toPublicKey().toPublicKeyString(), active_private.private_key.toPublicKey().toPublicKeyString(), + memo_private.private_key.toPublicKey().toPublicKeyString(), account_name, registrar, //registrar_id, referrer, //referrer_id, @@ -251,9 +261,10 @@ class WalletActions { .catch(error => { /* * Since the account creation failed, we need to decrement the - * sequence used to generate private keys from the brainkey. Two - * keys were generated, so we decrement twice. + * sequence used to generate private keys from the brainkey. Three + * keys were generated, so we decrement three times. */ + WalletDb.decrementBrainKeySequence(); WalletDb.decrementBrainKeySequence(); WalletDb.decrementBrainKeySequence(); throw error; diff --git a/app/api/ApplicationApi.js b/app/api/ApplicationApi.js index 4c8bf69e4b..a43a31aea2 100644 --- a/app/api/ApplicationApi.js +++ b/app/api/ApplicationApi.js @@ -15,6 +15,7 @@ const ApplicationApi = { create_account( owner_pubkey, active_pubkey, + memo_pubkey, new_account_name, registrar, referrer, @@ -54,7 +55,7 @@ const ApplicationApi = { address_auths: [] }, options: { - memo_key: active_pubkey, + memo_key: memo_pubkey, voting_account: "1.2.5", num_witness: 0, num_committee: 0, diff --git a/app/assets/asset-symbols/rudex.btc.png b/app/assets/asset-symbols/rudex.btc.png new file mode 100644 index 0000000000..9248fa08a5 Binary files /dev/null and b/app/assets/asset-symbols/rudex.btc.png differ diff --git a/app/assets/asset-symbols/sbd.png b/app/assets/asset-symbols/sbd.png old mode 100755 new mode 100644 diff --git a/app/assets/asset-symbols/symbols.js b/app/assets/asset-symbols/symbols.js index 89eea846bf..5b04f21975 100644 --- a/app/assets/asset-symbols/symbols.js +++ b/app/assets/asset-symbols/symbols.js @@ -68,3 +68,7 @@ require("file-loader?name=asset-symbols/[name].png!./tusd.png"); require("file-loader?name=asset-symbols/[name].png!./zec.png"); require("file-loader?name=asset-symbols/[name].png!./waves.png"); require("file-loader?name=asset-symbols/[name].png!./zrx.png"); +require("file-loader?name=asset-symbols/[name].png!./xrp.png"); +require("file-loader?name=asset-symbols/[name].png!./xmr.png"); +require("file-loader?name=asset-symbols/[name].png!./sbd.png"); +require("file-loader?name=asset-symbols/[name].png!./rudex.btc.png"); diff --git a/app/assets/asset-symbols/xmr.png b/app/assets/asset-symbols/xmr.png new file mode 100644 index 0000000000..1377462689 Binary files /dev/null and b/app/assets/asset-symbols/xmr.png differ diff --git a/app/assets/asset-symbols/xrp.png b/app/assets/asset-symbols/xrp.png new file mode 100644 index 0000000000..607e82db45 Binary files /dev/null and b/app/assets/asset-symbols/xrp.png differ diff --git a/app/assets/index-dev.html b/app/assets/index-dev.html deleted file mode 100644 index 047c898052..0000000000 --- a/app/assets/index-dev.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - BitShares - - - - -
-

Loading...

-
- - - - diff --git a/app/assets/index-electron.html b/app/assets/index-electron.html deleted file mode 100644 index 758e780db9..0000000000 --- a/app/assets/index-electron.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - BitShares - - - - - - - -
-

Loading...

-
- - - - - diff --git a/app/assets/index.html b/app/assets/index.hbs similarity index 53% rename from app/assets/index.html rename to app/assets/index.hbs index 69915370de..8cb409e462 100644 --- a/app/assets/index.html +++ b/app/assets/index.hbs @@ -1,14 +1,15 @@ + {{#if INCLUDE_BASE}} + {{/if}} - - BitShares + {{title}} + - + {{#if ELECTRON}} + + {{/if}}

Loading...

- - diff --git a/app/assets/loader-dev.js b/app/assets/loader-dev.js deleted file mode 100644 index 9b648ab536..0000000000 --- a/app/assets/loader-dev.js +++ /dev/null @@ -1,14 +0,0 @@ -require("./stylesheets/app.scss"); -require("file-loader?name=index.html!./index-dev.html"); -require("file-loader?name=favicon.ico!./favicon.ico"); -// require("file-loader?name=dictionary.json!common/dictionary_en.json"); -require("babel-polyfill"); -require("whatwg-fetch"); -require("indexeddbshim"); -require("./asset-symbols/symbols.js"); -require("./language-dropdown/flags.js"); - -// import locales from "assets/locales"; -// for (let locale of locales) { -// require(`file-loader?name=[name].[ext]!./locales/locale-${locale}.json`); -// } diff --git a/app/assets/loader.js b/app/assets/loader.js index 78015d6b4e..ececa60688 100644 --- a/app/assets/loader.js +++ b/app/assets/loader.js @@ -1,16 +1,7 @@ require("./stylesheets/app.scss"); -require("file-loader?name=index.html!./" + - (__ELECTRON__ || __HASH_HISTORY__ ? "index-electron" : "index") + - ".html"); require("file-loader?name=favicon.ico!./favicon.ico"); -// require("file-loader?name=dictionary.json!common/dictionary_en.json"); require("babel-polyfill"); require("whatwg-fetch"); require("indexeddbshim"); require("./asset-symbols/symbols.js"); require("./language-dropdown/flags.js"); - -// import locales from "assets/locales"; -// for (let locale of locales) { -// require(`file-loader?name=[name].[ext]!./locales/locale-${locale}.json`); -// } diff --git a/app/assets/locales/locale-de.json b/app/assets/locales/locale-de.json index 33e73d5f74..a78daab4e5 100644 --- a/app/assets/locales/locale-de.json +++ b/app/assets/locales/locale-de.json @@ -413,6 +413,18 @@ "whitelist_authorities": "Whitelist authority" } }, + "app_init": { + "browser": "Nicht unterstützter Browser", + "browser_text": + "Ihr Browser ist unzureichend mit der BitShares-Wallet getestet worden. Wir empfehlen Ihnen, eine Sicherung ihrer Geldbörse durchzuführen und diese in den Chrome Browser zu importieren. Nutzen Sie Ihren Browser auf eigene Gefahr!", + "connected": "verbunden", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "Nicht verbunden", + "retry": "nocheinmal versuchen", + "title": "Initialisierungsfehler", + "understand": "Verstanden!", + "ws_status": "Websocket Verbindungsstatus" + }, "borrow": { "adjust": "Position anpassen", "adjust_short": "Adjust", @@ -941,6 +953,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1084,17 +1097,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "Nicht unterstützter Browser", - "browser_text": - "Ihr Browser ist unzureichend mit der BitShares-Wallet getestet worden. Wir empfehlen Ihnen, eine Sicherung ihrer Geldbörse durchzuführen und diese in den Chrome Browser zu importieren. Nutzen Sie Ihren Browser auf eigene Gefahr!", - "connected": "verbunden", - "not_connected": "Nicht verbunden", - "retry": "nocheinmal versuchen", - "title": "Initialisierungsfehler", - "understand": "Verstanden!", - "ws_status": "Websocket Verbindungsstatus" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1244,6 +1246,8 @@ }, "operation": { "annual_upgrade_account": "{account} hat ein Jahresabo gekauft", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} hat das Asset {asset} erzeugt", "asset_fund_fee_pool": "{account} hat {amount} in den Gebührenpool von {asset} transferiert", @@ -1256,6 +1260,8 @@ "asset_update": "{account} hat das Asset {asset} aktualisiert", "asset_update_feed_producers": "{account} hat die Feed-Erzeuger für {asset} aktualisiert", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} hat Guthaben von {amount} beansprucht", "blacklisted_by": "{lister} hat Konto {listee} schwarzgelistet", "call_order_update": @@ -1640,6 +1646,7 @@ "all": "Show all", "assert": "Operation bestätigen", "asset_claim_fees": "Gebühr für 'Asset beanspruchen'", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "Asset erstellen", "asset_fund_fee_pool": "Asset-Gebührenpool finanzieren", "asset_global_settle": "Globales Asset-Settlement", @@ -1651,6 +1658,7 @@ "asset_update": "Asset aktualisieren", "asset_update_bitasset": "SmartCoin aktualisieren", "asset_update_feed_producers": "Asset-Feederzeuger aktualisieren", + "asset_update_issuer": "Update asset issuer", "balance_claim": "Guthaben eingefordert", "blind_transfer": "Blind-Transfer", "call_order_update": "Call-Order aktualisieren", diff --git a/app/assets/locales/locale-en.json b/app/assets/locales/locale-en.json index 61f11c27bb..a61935f4c4 100644 --- a/app/assets/locales/locale-en.json +++ b/app/assets/locales/locale-en.json @@ -408,6 +408,18 @@ "whitelist_authorities": "Whitelist authority" } }, + "app_init": { + "browser": "Unsupported browser", + "browser_text": + "The Browser you are using has not been fully tested to support the BitShares Wallet. We highly recommend that you backup your local wallet and import it using the Chrome Browser until we have had more time to fully test your browser of choice. Use at your own risk.", + "connected": "Connected", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "Not connected", + "retry": "Retry", + "title": "Application initialization issues", + "understand": "I understand", + "ws_status": "Full node connection status" + }, "borrow": { "adjust": "Update position", "adjust_short": "Adjust", @@ -674,7 +686,7 @@ "time": "Time", "title": "Block", "transactions": "Transaction count", - "trx": "Transaction", + "trx": "Tx", "witness": "Witness" }, "blocks": { @@ -936,6 +948,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1081,17 +1094,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "Unsupported browser", - "browser_text": - "The Browser you are using has not been fully tested to support the BitShares Wallet. We highly recommend that you backup your local wallet and import it using the Chrome Browser until we have had more time to fully test your browser of choice. Use at your own risk.", - "connected": "Connected", - "not_connected": "Not connected", - "retry": "Retry", - "title": "Application initialization issues", - "understand": "I understand", - "ws_status": "Full node connection status" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1241,6 +1243,8 @@ }, "operation": { "annual_upgrade_account": "{account} was upgraded to annual member", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} created the asset {asset}", "asset_fund_fee_pool": "{account} funded {asset} fee pool with {amount}", @@ -1253,20 +1257,24 @@ "asset_update": "{account} updated the asset {asset}", "asset_update_feed_producers": "{account} updated the feed producers for the asset {asset}", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} claimed a balance of {amount}", "blacklisted_by": "{lister} blacklisted the account {listee}", "call_order_update": "{account} changed {debtSymbol} debt by {debt} and collateral by {collateral}", "committee_member_update_global_parameters": "{account} updated the global committee parameters", - "fill_order_buy": "{account} bought {amount} at {price}", - "fill_order_sell": "{account} sold {amount} at {price}", + "fill_order_buy": + "{account} bought {amount} at {price} for order #%(order)s", + "fill_order_sell": + "{account} sold {amount} at {price} for order #%(order)s", "lifetime_upgrade_account": "{account} was upgraded to lifetime member", "limit_order_buy": - "{account} placed an order to buy {amount} at {price}", + "{account} placed order %(order)s to buy {amount} at {price}", "limit_order_cancel": "{account} cancelled order #%(order)s", "limit_order_sell": - "{account} placed an order to sell {amount} at {price}", + "{account} placed order %(order)s to sell {amount} at {price}", "no_recent": "No recent transactions", "override_transfer": "{issuer} transferred {amount} from {from} to {to}", @@ -1322,7 +1330,7 @@ "limit_order_buy": "Place an order to buy {amount} at {price} for {account}", "limit_order_create": - "Place order to buy %(buy_amount)s for %(sell_amount)s for %(account)s", + "Place an order to buy %(buy_amount)s for %(sell_amount)s for %(account)s", "limit_order_sell": "Place an order to sell {amount} at {price} for {account}", "override_transfer": @@ -1635,6 +1643,7 @@ "all": "Show all", "assert": "Assert operation", "asset_claim_fees": "Claim asset fees", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "Create asset", "asset_fund_fee_pool": "Fund asset fee pool", "asset_global_settle": "Global asset settlement", @@ -1646,6 +1655,7 @@ "asset_update": "Update asset", "asset_update_bitasset": "Update SmartCoin", "asset_update_feed_producers": "Update asset feed producers", + "asset_update_issuer": "Update asset issuer", "balance_claim": "Claim balance", "blind_transfer": "Blinded transfer", "call_order_update": "Update margin", diff --git a/app/assets/locales/locale-es.json b/app/assets/locales/locale-es.json index e6b5bce217..6e5a294767 100644 --- a/app/assets/locales/locale-es.json +++ b/app/assets/locales/locale-es.json @@ -421,6 +421,18 @@ "whitelist_authorities": "Autoridad de lista blanca" } }, + "app_init": { + "browser": "Navegador no soportado", + "browser_text": + "El navegador que está utilizando no se ha probado completamente para admitir la billetera BitShares. Le recomendamos encarecidamente que haga una copia de seguridad de su monedero local e importarlo utilizando el navegador Chrome hasta que hayamos tenido más tiempo para probar completamente el navegador de su elección. Úselo bajo su propio riesgo.", + "connected": "Conectado", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "No conectado", + "retry": "Reintentar", + "title": "Problemas de inicialización de la aplicación", + "understand": "entiendo", + "ws_status": "Estado de conexión de nodo completo" + }, "borrow": { "adjust": "Actualizar posición", "adjust_short": "ajustar", @@ -952,6 +964,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1095,17 +1108,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "Navegador no soportado", - "browser_text": - "El navegador que está utilizando no se ha probado completamente para admitir la billetera BitShares. Le recomendamos encarecidamente que haga una copia de seguridad de su monedero local e importarlo utilizando el navegador Chrome hasta que hayamos tenido más tiempo para probar completamente el navegador de su elección. Úselo bajo su propio riesgo.", - "connected": "Conectado", - "not_connected": "No conectado", - "retry": "Reintentar", - "title": "Problemas de inicialización de la aplicación", - "understand": "entiendo", - "ws_status": "Estado de conexión de nodo completo" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1256,6 +1258,8 @@ }, "operation": { "annual_upgrade_account": "{account} fue actualizado a miembro anual", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} creado el activo {asset}", "asset_fund_fee_pool": "{account} fundado {asset} grupo de tarifas con {amount}", @@ -1268,6 +1272,8 @@ "asset_update": "{account} actualizado el activo {asset}", "asset_update_feed_producers": "{account} actualizado los productores para el activo {asset}", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} reclamó un saldo de {amount}", "blacklisted_by": "{lister} puso en la lista negra la cuenta {listee}", "call_order_update": @@ -1668,6 +1674,7 @@ "all": "Mostrar todo", "assert": "Afirmar operación", "asset_claim_fees": "Reclamar comisiones de activos", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "Crear activo", "asset_fund_fee_pool": "Financiar Fondo de Comisiones de un activo", "asset_global_settle": "Liquidación global de Activos", @@ -1680,6 +1687,7 @@ "asset_update_bitasset": "Actualizar SmartCoin", "asset_update_feed_producers": "Actualizar productores de feed de activo", + "asset_update_issuer": "Update asset issuer", "balance_claim": "Solicitar balance", "blind_transfer": "Transferencia cegada", "call_order_update": "Actualizar margen", diff --git a/app/assets/locales/locale-fr.json b/app/assets/locales/locale-fr.json index d4c4d533b5..7240078703 100644 --- a/app/assets/locales/locale-fr.json +++ b/app/assets/locales/locale-fr.json @@ -408,6 +408,18 @@ "whitelist_authorities": "Whitelist authority" } }, + "app_init": { + "browser": "Unsupported browser", + "browser_text": + "The Browser you are using has not been fully tested to support the BitShares Wallet. We highly recommend that you backup your local wallet and import it using the Chrome Browser until we have had more time to fully test your browser of choice. Use at your own risk.", + "connected": "Connected", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "Not connected", + "retry": "Retry", + "title": "Application initialization issues", + "understand": "I understand", + "ws_status": "Full node connection status" + }, "borrow": { "adjust": "Update position", "adjust_short": "Adjust", @@ -936,6 +948,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1081,17 +1094,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "Unsupported browser", - "browser_text": - "The Browser you are using has not been fully tested to support the BitShares Wallet. We highly recommend that you backup your local wallet and import it using the Chrome Browser until we have had more time to fully test your browser of choice. Use at your own risk.", - "connected": "Connected", - "not_connected": "Not connected", - "retry": "Retry", - "title": "Application initialization issues", - "understand": "I understand", - "ws_status": "Full node connection status" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1241,6 +1243,8 @@ }, "operation": { "annual_upgrade_account": "{account} a été converti en membre annuel", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} a crée l'actif {asset}", "asset_fund_fee_pool": "{account} funded {asset} fee pool with {amount}", @@ -1253,6 +1257,8 @@ "asset_update": "{account} a mis à jour l'actif {asset}", "asset_update_feed_producers": "{account} updated the feed producers for the asset {asset}", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} a recuperé un solde de {amount}", "blacklisted_by": "{lister} a blacklisté {listee}", "call_order_update": @@ -1637,6 +1643,7 @@ "all": "Show all", "assert": "Assert operation", "asset_claim_fees": "Claim asset fees", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "Creation d'actif", "asset_fund_fee_pool": "Financement de pot de frais", "asset_global_settle": "Couvrement global d'actif", @@ -1648,6 +1655,7 @@ "asset_update": "Mise à jour d'actif", "asset_update_bitasset": "Mise à jour d'actif de marché", "asset_update_feed_producers": "Mise à jour des flux", + "asset_update_issuer": "Update asset issuer", "balance_claim": "Récuperation de solde", "blind_transfer": "Blinded transfer", "call_order_update": "Mise à jour d'ordre à découvert", diff --git a/app/assets/locales/locale-it.json b/app/assets/locales/locale-it.json index 9f72b07b27..8f8b96566b 100644 --- a/app/assets/locales/locale-it.json +++ b/app/assets/locales/locale-it.json @@ -418,6 +418,18 @@ "whitelist_authorities": "Autorità whitelist" } }, + "app_init": { + "browser": "Browser non supportato", + "browser_text": + "Il browser che stai usando non è stato pienamente testato per il supporto del portafoglio BitShares. Raccomandiamo caldamente di fare il backup del tuo portafoglio e importarlo usando il browser Chrome finché non avremo avuto il tempo di testare appieno il tuo browser. Usalo a tuo rischio.", + "connected": "Connesso", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "Non connesso", + "retry": "Riprova", + "title": "Problemi nell'inizializzazione dell'applicazione", + "understand": "Ho capito", + "ws_status": "Stato della connessione del full node" + }, "borrow": { "adjust": "Aggiorna posizione", "adjust_short": "Aggiorna", @@ -952,6 +964,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1097,17 +1110,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "Browser non supportato", - "browser_text": - "Il browser che stai usando non è stato pienamente testato per il supporto del portafoglio BitShares. Raccomandiamo caldamente di fare il backup del tuo portafoglio e importarlo usando il browser Chrome finché non avremo avuto il tempo di testare appieno il tuo browser. Usalo a tuo rischio.", - "connected": "Connesso", - "not_connected": "Non connesso", - "retry": "Riprova", - "title": "Problemi nell'inizializzazione dell'applicazione", - "understand": "Ho capito", - "ws_status": "Stato della connessione del full node" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1257,6 +1259,8 @@ }, "operation": { "annual_upgrade_account": "{account} è stato promosso a membro annuale", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} ha creato l'asset {asset}", "asset_fund_fee_pool": "{account} ha finanziato il fee pool di {asset} con {amount}", @@ -1269,6 +1273,8 @@ "asset_update": "{account} ha aggiornato l'asset {asset}", "asset_update_feed_producers": "{account} ha aggiornato i produttori di feed per l'asset {asset}", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} ha riscosso un saldo di {amount}", "blacklisted_by": "{lister} ha messo in blacklist l'account {listee}", "call_order_update": @@ -1664,6 +1670,7 @@ "all": "Mostra tutti", "assert": "Assert operation", "asset_claim_fees": "Riscuoti le commissioni dell'asset", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "Crea asset", "asset_fund_fee_pool": "Finanzia fee pool dell'asset", "asset_global_settle": "Settlement dell'asset globale", @@ -1676,6 +1683,7 @@ "asset_update_bitasset": "Aggiorna SmartCoin", "asset_update_feed_producers": "Aggiorna produttori di feed per l'asset", + "asset_update_issuer": "Update asset issuer", "balance_claim": "Riscuoti saldo", "blind_transfer": "Blinded transfer", "call_order_update": "Aggiorna margine", diff --git a/app/assets/locales/locale-ja.json b/app/assets/locales/locale-ja.json index 2df6bc482c..a112a1fcd5 100644 --- a/app/assets/locales/locale-ja.json +++ b/app/assets/locales/locale-ja.json @@ -409,6 +409,18 @@ "whitelist_authorities": "ホワイトリスト権限" } }, + "app_init": { + "browser": "サポートされていないブラウザ", + "browser_text": + "使用しているブラウザはBitSharesウォレットをサポートするための完全なテストが行われていません。ウォレットをバックアップし、あなたが選択したブラウザの完全なテストが行われるまで、Chromeブラウザを使用することを強く推奨します。自身の責任で使用してください。", + "connected": "接続しました", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "接続していません", + "retry": "再試行", + "title": "アプリケーション初期化エラー", + "understand": "理解しました。", + "ws_status": "フルノード接続状態" + }, "borrow": { "adjust": "ポジションを更新", "adjust_short": "調整", @@ -938,6 +950,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1083,17 +1096,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "サポートされていないブラウザ", - "browser_text": - "使用しているブラウザはBitSharesウォレットをサポートするための完全なテストが行われていません。ウォレットをバックアップし、あなたが選択したブラウザの完全なテストが行われるまで、Chromeブラウザを使用することを強く推奨します。自身の責任で使用してください。", - "connected": "接続しました", - "not_connected": "接続していません", - "retry": "再試行", - "title": "アプリケーション初期化エラー", - "understand": "理解しました。", - "ws_status": "フルノード接続状態" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1243,6 +1245,8 @@ }, "operation": { "annual_upgrade_account": "{account}は年間会員にアップグレードしました", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account}はアセット{asset}を作成しました", "asset_fund_fee_pool": "{account}は{asset}の手数料プールに{amount}を充填しました", @@ -1255,6 +1259,8 @@ "asset_update": "{account}はアセット{asset}を更新しました", "asset_update_feed_producers": "{account}はアセット{asset}のフィード作成者を更新しました", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account}は{amount}を請求しました", "blacklisted_by": "{lister}は{listee}をブラックリストに登録しました", "call_order_update": @@ -1637,6 +1643,7 @@ "all": "すべて表示", "assert": "アサート操作", "asset_claim_fees": "アセット手数料を請求", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "アセットを作成", "asset_fund_fee_pool": "アセットの手数料プールを充填", "asset_global_settle": "グローバルアセット決済", @@ -1648,6 +1655,7 @@ "asset_update": "アセットを更新", "asset_update_bitasset": "スマートコインを更新", "asset_update_feed_producers": "アセットのフィード作成者を更新", + "asset_update_issuer": "Update asset issuer", "balance_claim": "残高請求", "blind_transfer": "匿名転送", "call_order_update": "マージンを更新", diff --git a/app/assets/locales/locale-ko.json b/app/assets/locales/locale-ko.json index 4a86344026..8f8cdbc92f 100644 --- a/app/assets/locales/locale-ko.json +++ b/app/assets/locales/locale-ko.json @@ -408,6 +408,18 @@ "whitelist_authorities": "Whitelist authority" } }, + "app_init": { + "browser": "Unsupported browser", + "browser_text": + "The Browser you are using has not been fully tested to support the BitShares Wallet. We highly recommend that you backup your local wallet and import it using the Chrome Browser until we have had more time to fully test your browser of choice. Use at your own risk.", + "connected": "연결됨", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "연결안됨", + "retry": "다시 시도", + "title": "Application initialization issues", + "understand": "I understand", + "ws_status": "웹소켓 연결 상태" + }, "borrow": { "adjust": "포지션 조정", "adjust_short": "Adjust", @@ -934,6 +946,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1077,17 +1090,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "Unsupported browser", - "browser_text": - "The Browser you are using has not been fully tested to support the BitShares Wallet. We highly recommend that you backup your local wallet and import it using the Chrome Browser until we have had more time to fully test your browser of choice. Use at your own risk.", - "connected": "연결됨", - "not_connected": "연결안됨", - "retry": "다시 시도", - "title": "Application initialization issues", - "understand": "I understand", - "ws_status": "웹소켓 연결 상태" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1237,6 +1239,8 @@ }, "operation": { "annual_upgrade_account": "{account} was upgraded to annual member", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} created the asset {asset}", "asset_fund_fee_pool": "{account} funded {asset} fee pool with {amount}", @@ -1249,6 +1253,8 @@ "asset_update": "{account} updated the asset {asset}", "asset_update_feed_producers": "{account} updated the feed producers for the asset {asset}", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} claimed a balance of {amount}", "blacklisted_by": "{lister} blacklisted the account {listee}", "call_order_update": @@ -1631,6 +1637,7 @@ "all": "Show all", "assert": "Assert operation", "asset_claim_fees": "Claim asset fees", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "자산 생성", "asset_fund_fee_pool": "자산 수수료 기금 충전", "asset_global_settle": "자산 전체 강제청산", @@ -1642,6 +1649,7 @@ "asset_update": "자산 업데이트", "asset_update_bitasset": "스마트코인 업데이트", "asset_update_feed_producers": "자산 피드 생성자 업데이트", + "asset_update_issuer": "Update asset issuer", "balance_claim": "잔고 청구", "blind_transfer": "Blinded transfer", "call_order_update": "Update call order", diff --git a/app/assets/locales/locale-ru.json b/app/assets/locales/locale-ru.json index c2e9fb7b44..399e13f617 100644 --- a/app/assets/locales/locale-ru.json +++ b/app/assets/locales/locale-ru.json @@ -422,6 +422,18 @@ "whitelist_authorities": "Источник белого списка" } }, + "app_init": { + "browser": "Неподдерживаемый браузер", + "browser_text": + "Браузер, который Вы используете, не тестировался на предмет поддержки кошелька BitShares. Мы настоятельно рекомендуем Вам сделать резервную копию вашего локального кошелька и импортировать его, используя браузер Chrome, пока мы не проведем полное тестирование выбранного Вами браузера. Мы не несем ответственности за использование Вами данного браузера.", + "connected": "Соединение установлено", + "connecting": "Подключение к серверу API: %(server)s", + "not_connected": "Нет соединения", + "retry": "Повторить попытку", + "title": "Проблемы инициализации приложения", + "understand": "Я понимаю", + "ws_status": "Состояние подключения полного узла" + }, "borrow": { "adjust": "Обновить позицию", "adjust_short": "Изменить", @@ -479,9 +491,9 @@ "buysell_formatter": "{direction} {asset}", "call": "Цена досрочного погашения", "change": "Изменение", - "chart_height": "Chart height (pixels)", - "chart_modal": "Chart options", - "chart_type": "Chart type", + "chart_height": "Высота графика (в пикселях)", + "chart_modal": "Параметры графика", + "chart_type": "Тип графика", "confirm_buy": "Ваш ордер в %(diff)s раз выше, чем самое низкое предложение, Вы уверены?", "confirm_no_orders_buy": @@ -529,7 +541,7 @@ "my_bids": "Мои ставки", "my_history": "Мои сделки", "my_orders": "Мои открытые ордера", - "native": "Native", + "native": "Встроенная", "new": "Новый", "no_balance": "Недостаточно средств", "no_data": "Нет данных", @@ -689,7 +701,7 @@ "time": "Время", "title": "Блок", "transactions": "Количество транзакций", - "trx": "Транзакция", + "trx": "Транзакции", "witness": "Заверитель" }, "blocks": { @@ -725,15 +737,15 @@ }, "proposals": { "authority_depth_warning": - "This proposal may not get approved because this permission exceeds the maximum authority depth.", + "Это предложение может не получить утверждения, так как данное разрешение превышает максимальный уровень полномочий.", "children_authority_depth_warning": - "This proposal may not get approved because a permission exceeds the maximum authority depth.", - "failed": "Failed", - "failed_execute": "Approved, failed to execute.", - "pending": "Pending", - "pending_approval": "Pending approval.", - "pending_review": "Approved, review time.", - "review": "Review", + "Это предложение может не получить утверждения, так как данное разрешение превышает максимальный уровень полномочий.", + "failed": "Неутвержденные", + "failed_execute": "Утвержденные, не удалось выполнить.", + "pending": "Ожидающие", + "pending_approval": "Ожидающие утверждения", + "pending_review": "Утвержденные, ожидающие проверки", + "review": "Проверить", "title": "Предложенные транзакции" }, "witnesses": { @@ -956,7 +968,8 @@ "cancel": "Отменить", "confirm": "Подтвердить", "help": "Помощь", - "scan_qr_code": "Scan QR code" + "return_to_top": "Вернуться к началу", + "scan_qr_code": "Сканировать QR-код" }, "header": { "account": "Аккаунт", @@ -989,11 +1002,11 @@ "update_asset": "Обновить актив" }, "icons": { - "adjust": "Изменить маржинальную позицию", + "adjust": "Настроить маржинальную позицию", "assets": "Активы", "checkmark_circle": { - "approved": "Утверждено", - "operation_succeed": "Операция успешна", + "approved": "Подтверждено", + "operation_succeed": "Операция выполнена успешно", "yes": "Да" }, "chevron_down": { @@ -1005,59 +1018,59 @@ "copy": "Скопировать в буфер обмена", "withdraw_full": "Вывести баланс целиком" }, - "clock": "Пожалуйста, проверьте часы на вашем компьютере", + "clock": "Пожалуйста, сверьтесь с часами на вашем компьютере", "cog": "Настройки", "cogs": "Настройки", "connect": "Подключиться к этому узлу API", - "connected": "Узел API подключен", + "connected": "API узел подключен", "cross_circle": { "cancel_order": "Отменить ордер", "close_position": "Закрыть позицию", - "hide_asset": "Спрятать актив", - "hide_market": "Спрятать рынок", - "operation_failed": "Операция провалена", + "hide_asset": "Скрыть актив", + "hide_market": "Скрыть рынок", + "operation_failed": "Не удалось выполнить операцию", "remove": "Удалить" }, - "dashboard": "Панель управления", + "dashboard": "Инфопанель", "deposit": { - "deposit": "Пополнить", - "deposit_withdraw": "Ввод/Вывод" + "deposit": "Пополнить счет", + "deposit_withdraw": "Пополнить/Вывести" }, - "disconnected": "Узел API отключен", + "disconnected": "API узел отключен", "dollar": { - "borrow": "Одолжить", + "borrow": "Занять", "buy": "Купить" }, - "download": "Скачать новую версию BitShares UI", - "excel": "Скачать файл .csv", - "eye": "Спрятать узел", - "eye-striked": "Отобразить узел", + "download": "Скачать новую версию интерфейса BitShares", + "excel": "Скачать CSV-файл", + "eye": "Скрыть узел", + "eye-striked": "Показать узел", "fees": "Комиссии", "fi_star": { - "account": "Добавить/удалить аккаунт из избранного", - "market": "Добавить/удалить рынок из избранного", - "sort_accounts": "Сортировать по избранному", - "symbol": "Добавить/удалить тикер из избранного" + "account": "Добавить/удалить аккаунт из списка избранных", + "market": "Добавить/удалить рынок из списка избранных", + "sort_accounts": "Сортировать по избранным", + "symbol": "Добавить/удалить символ из списка избранных" }, - "filter": "Фильтр", + "filter": "Фильтровать", "folder": "Аккаунты", "hamburger": "Открыть меню", "hamburger_x": "Закрыть меню", - "hourglass": "Вестинговые балансы", + "hourglass": "Вестинговые счета", "info_circle_o": "Информация", "key": "Ключ", "list": "Белый список", "locked": { "action": - "Щелкните для разблокировки аккаунта для совершения этого действия", - "common": "Щелкните для разблокировки аккаунта", - "enable_auto_scroll": "Включить автопрокрутку" + "Нажмите, чтобы разблокировать возможность выполнения этого действия вашим аккаунтом", + "common": "Нажмите, чтобы разблокировать свой аккаунт", + "enable_auto_scroll": "Разрешить автопрокрутку" }, "minus_circle": { - "disapproved": "Не утверждено", + "disapproved": "Отклоненные", "no": "Нет", "remove_contact": "Удалить контакт из списка", - "wrong_address": "Невозможно создать адрес" + "wrong_address": "Не удается создать адрес" }, "news": "Новости", "plus_circle": { @@ -1065,17 +1078,17 @@ "show_asset": "Показать актив", "show_market": "Показать рынок" }, - "power": "Логин", + "power": "Войти", "question_circle": "Помощь", - "server": "Обозреватель", - "settle": "Погашение", - "share": "Детальнее", - "shuffle": "Переключить торговую пару", + "server": "Исследовать", + "settle": "Запросить расчет", + "share": "Подробнее", + "shuffle": "Поменять местами торговые пары", "text": { "membership_stats": "Статистика членства", "signed_messages": "Подписанные сообщения" }, - "thumb_tack": "Прикрепить панель слева", + "thumb_tack": "Прикрепить панель к левой стороне", "thumb_untack": "Открепить панель", "thumbs_up": "Голосование", "times": "Удалить узел API", @@ -1085,16 +1098,16 @@ }, "transfer": "Отправить", "unlocked": { - "common": "Щелкните для блокировки аккаунта", - "disable_auto_scroll": "Выключить автопрокрутку" + "common": "Нажмите, чтобы заблокировать свой аккаунт", + "disable_auto_scroll": "Запретить автопрокрутку" }, "user": { "account": "Аккаунт", "create_account": "Создать аккаунт", - "following": "Вы отслеживаете этого пользователя" + "following": "Вы подписаны на этого пользователя" }, - "warning": "Права доступа", - "withdraw": "Вывод", + "warning": "Разрешения", + "withdraw": "Вывести", "zoom": "Поиск" }, "incognito": { @@ -1102,17 +1115,6 @@ "warning": "Если вы закрываете браузер без резервного копирования вашего кошелька, вы потеряете этот счет навсегда." }, - "init_error": { - "browser": "Неподдерживаемый браузер", - "browser_text": - "Браузер, который Вы используете, не тестировался на поддержку кошелька BitShares. Мы настоятельно рекомендуем Вам сделать резервную копию вашего локального кошелька и импортировать его, используя браузер Chrome, пока мы не найдем время, чтобы провести полное тестирование выбранного Вами браузера. Мы не несем ответственности за использование Вами данного браузера.", - "connected": "Соединение установлено", - "not_connected": "Отключено", - "retry": "Повторить", - "title": "Проблемы инициализации приложения", - "understand": "Я понимаю", - "ws_status": "Состояние подключения полного узла" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1263,6 +1265,8 @@ }, "operation": { "annual_upgrade_account": "{account} обновился до годового членства", + "asset_claim_pool": + "{account} востребовал {amount} из пула комиссий {asset}", "asset_create": "{account} создал актив {asset}", "asset_fund_fee_pool": "{account} финансировал пул комиссий {asset} в размере {amount}", @@ -1271,25 +1275,28 @@ "asset_issue": "{account} эмитировал {amount} к {to}", "asset_reserve": "{account} сжег (зарезервировал) {amount}", "asset_settle": "{account} запросил погашение {amount}", - "asset_settle_cancel": "{account} cancelled settlement of {amount}", + "asset_settle_cancel": "{account} отменил погашение {amount}", "asset_update": "{account} обновил актив {asset}", "asset_update_feed_producers": "{account} обновил определяющих котировки актива {asset}", + "asset_update_issuer": "{from_account} переслал {asset} {to_account}", "balance_claim": "{account} запросил баланс в размере {amount}", "blacklisted_by": "{lister} добавил аккаунт {listee} в черный список", "call_order_update": "{account} изменил {debtSymbol} долг на {debt} и залог на {collateral}", "committee_member_update_global_parameters": "{account} обновил общие параметры комитета", - "fill_order_buy": "{account} купил {amount} при цене {price}", - "fill_order_sell": "{account} продал {amount} при цене {price}", + "fill_order_buy": + "{account} купил {amount} по цене {price} в ордере #%(order)s", + "fill_order_sell": + "{account} продал {amount} по цене {price} в ордере #%(order)s", "lifetime_upgrade_account": "{account} обновился до пожизненного членства", "limit_order_buy": - "{account} разместил ордер на покупку {amount} за {price}", + "{account} разместил ордер #%(order)s на покупку {amount} по {price}", "limit_order_cancel": "{account} отменил ордер #%(order)s", "limit_order_sell": - "{account} разместил ордер на продажу {amount} за {price}", + "{account} разместил ордер #%(order)s на продажу {amount} по {price}", "no_recent": "Нет недавних транзакций", "override_transfer": "{issuer} перевел {amount} с {from} на {to}", "pending": "обрабатывается ещё %(blocks)s блоков", @@ -1328,11 +1335,11 @@ "proposal": { "action": "Действия", "approve": "Подтвердить", - "approvers": "Approver(s)", + "approvers": "Утвердитель(и)", "asset_create": "Создать актив %(asset)s, используя аккаунт {account}", "asset_issue": "Выпустить {amount} {to}, используя {account}", "asset_reserve": "Сжечь (зарезервировать) {amount} с помощью {account}", - "asset_settle": "Запросить расчет", + "asset_settle": "Запросить погашение {amount} на {account}", "asset_update": "Обновить актив %(asset)s, используя аккаунт {account}", "call_order_update": "Изменить {debtSymbol} долг {account} на {debt} и залог на {collateral}", @@ -1342,14 +1349,14 @@ "feed_producer": "Обновить поставщиков котировок для актива {asset} используя аккаунт {account}", "limit_order_buy": - "Разместить ордер на покупку {amount} за {price} для {account}", + "Разместить ордер на покупку {amount} по {price} для {account}", "limit_order_create": "Разместить ордер на покупку %(buy_amount)s за %(sell_amount)s для %(account)s", "limit_order_sell": - "Разместить ордер на продажу {amount} за {price} для {account}", + "Разместить ордер на продажу {amount} по {price} для {account}", "override_transfer": "Перевести {amount} от {from} к {to} по поручению {issuer}", - "proposals": "Proposals", + "proposals": "Предложения", "reject": "Отклонить", "status": "Статус", "transfer": "Перевести {amount} с {from} на {to}", @@ -1376,10 +1383,10 @@ }, "propose": "Предложить", "qr_address_scanner": { - "address_found": "Адрес найден", + "address_found": "Найденные адреса", "amount": "Количество", - "retry": "Еще раз", - "use_address": "Использовать" + "retry": "Повторить попытку", + "use_address": "Использовать адрес" }, "refcode": { "claim": "Ввести", @@ -1581,7 +1588,7 @@ "transaction": { "amount_sell": "Количество для продажи", "asset_claim_fees": - "востребовал комиссии актива %(balance_amount)s из %(asset)s пула комиссий", + "востребовал комиссии актива {balance_amount} из пула комиссий {asset}", "asset_reserve": "сумма сожженого актива", "at": "в", "balance_id": "Идентификатор баланса", @@ -1668,6 +1675,7 @@ "all": "Показать все", "assert": "Операция подтверждения", "asset_claim_fees": "Взыскание комиссий с активов", + "asset_claim_pool": "Востребовать пул комиссий актива", "asset_create": "Создание актива", "asset_fund_fee_pool": "Пополнение пула комиссий актива", "asset_global_settle": "Глобальное погашение активов", @@ -1675,11 +1683,12 @@ "asset_publish_feed": "Публикация котировок", "asset_reserve": "Сжечь актив", "asset_settle": "Погашение активов", - "asset_settle_cancel": "Cancel asset settlement", + "asset_settle_cancel": "Отменить погашение актива", "asset_update": "Обновление актива", "asset_update_bitasset": "Обновление SmartCoin", "asset_update_feed_producers": "Обновление производителей котировок актива", + "asset_update_issuer": "Обновить эмитента актива", "balance_claim": "Взыскание баланса", "blind_transfer": "Слепой перевод", "call_order_update": "Обновление залога", diff --git a/app/assets/locales/locale-tr.json b/app/assets/locales/locale-tr.json index d2724b58ef..50298d8fc0 100644 --- a/app/assets/locales/locale-tr.json +++ b/app/assets/locales/locale-tr.json @@ -414,6 +414,18 @@ "whitelist_authorities": "Whitelist authority" } }, + "app_init": { + "browser": "Desteklenmeyen tarayıcı", + "browser_text": + "Kullandığınız tarayıcı üzerinde testlerimiz devam etmektedir, bu yüzden BitShares Cüzdanını desteklemeyebilir. Cüzdanınızı yedekleyip Chrome Tarayıcısını kullanarak içeri aktarmanızı önemle tavsiye ederiz. Mesuliyet size aittir.", + "connected": "Bağlandı", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "Bağlı değil", + "retry": "Yeniden dene", + "title": "Uygulama başlatma problemleri", + "understand": "Anladım ve onaylıyorum.", + "ws_status": "Websocket Bağlantı Durumu" + }, "borrow": { "adjust": "Pozisyonu Güncelle", "adjust_short": "Adjust", @@ -945,6 +957,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1088,17 +1101,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "Desteklenmeyen tarayıcı", - "browser_text": - "Kullandığınız tarayıcı üzerinde testlerimiz devam etmektedir, bu yüzden BitShares Cüzdanını desteklemeyebilir. Cüzdanınızı yedekleyip Chrome Tarayıcısını kullanarak içeri aktarmanızı önemle tavsiye ederiz. Mesuliyet size aittir.", - "connected": "Bağlandı", - "not_connected": "Bağlı değil", - "retry": "Yeniden dene", - "title": "Uygulama başlatma problemleri", - "understand": "Anladım ve onaylıyorum.", - "ws_status": "Websocket Bağlantı Durumu" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1248,6 +1250,8 @@ }, "operation": { "annual_upgrade_account": "{account} yıllık üyeliğe yükseltildi.", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} şu dijital varlığı oluşturdu: {asset}", "asset_fund_fee_pool": "{account} tarafından {asset} ücret havuzuna {amount} eklendi.", @@ -1261,6 +1265,8 @@ "asset_update": "{account} şu dijital varlığı güncelledi: {asset}", "asset_update_feed_producers": "{account} şu dijital varlığın fiyat kaynaklarını güncelledi: {asset}", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} bakiye güncelleme işlemi - Miktar: {amount}", "blacklisted_by": "{lister} kara listeye {listee} adlı hesabı ekledi.", @@ -1649,6 +1655,7 @@ "all": "Tümünü göster", "assert": "İşlem beyanı", "asset_claim_fees": "Aktif ücretlerini talep et", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "Yeni Oluştur", "asset_fund_fee_pool": "Aktif ücret havuzu finansı", "asset_global_settle": "Genel Aktif Ödemesi", @@ -1660,6 +1667,7 @@ "asset_update": "Güncelle", "asset_update_bitasset": "Akıllıpara güncelleme", "asset_update_feed_producers": "Fiyat kaynağı hesabı güncelleme", + "asset_update_issuer": "Update asset issuer", "balance_claim": "Bakiye talebi", "blind_transfer": "Kör transfer", "call_order_update": "Marjin güncelleme", diff --git a/app/assets/locales/locale-zh.json b/app/assets/locales/locale-zh.json index 729817c80e..dda9d1e681 100644 --- a/app/assets/locales/locale-zh.json +++ b/app/assets/locales/locale-zh.json @@ -395,6 +395,18 @@ "whitelist_authorities": "资产白名单" } }, + "app_init": { + "browser": "不支持的浏览器", + "browser_text": + "你使用的浏览器未经过 BitShares 钱包软件的充分测试。强烈建议你备份钱包,并将其导入谷歌 Chrome 浏览器。今后经过我们充分测试后,你或许可以继续使用现在的浏览器。请了解相关风险。", + "connected": "已连接", + "connecting": "Connecting to API server: %(server)s", + "not_connected": "未连接", + "retry": "重试", + "title": "应用初始化错误", + "understand": "我理解", + "ws_status": "API 节点连接状态" + }, "borrow": { "adjust": "调整债仓", "adjust_short": "调整", @@ -908,6 +920,7 @@ "cancel": "Cancel", "confirm": "Confirm", "help": "Help", + "return_to_top": "Return to top", "scan_qr_code": "Scan QR code" }, "header": { @@ -1051,17 +1064,6 @@ "warning": "If you close your browser without backing up your wallet, you will lose this account permanently." }, - "init_error": { - "browser": "不支持的浏览器", - "browser_text": - "你使用的浏览器未经过 BitShares 钱包软件的充分测试。强烈建议你备份钱包,并将其导入谷歌 Chrome 浏览器。今后经过我们充分测试后,你或许可以继续使用现在的浏览器。请了解相关风险。", - "connected": "已连接", - "not_connected": "未连接", - "retry": "重试", - "title": "应用初始化错误", - "understand": "我理解", - "ws_status": "API 节点连接状态" - }, "languages": { "de": "Deutsch", "en": "English", @@ -1210,6 +1212,8 @@ }, "operation": { "annual_upgrade_account": "{account} 升级到年度会员", + "asset_claim_pool": + "{account} claimed {amount} from asset {asset}'s fee pool", "asset_create": "{account} 创建了资产 {asset}", "asset_fund_fee_pool": "{account} 向 {asset} 的手续费池注资了 {amount}", "asset_global_settle": @@ -1220,6 +1224,8 @@ "asset_settle_cancel": "{account} cancelled settlement of {amount}", "asset_update": "{account} 更新了资产 {asset}", "asset_update_feed_producers": "{account} 更新了资产 {asset} 的喂价者", + "asset_update_issuer": + "{from_account} transferred {asset} to {to_account}", "balance_claim": "{account} 领取了余额 {amount}", "blacklisted_by": "{lister} 将 {listee} 加入黑名单", "call_order_update": @@ -1578,6 +1584,7 @@ "all": "显示全部", "assert": "断言操作", "asset_claim_fees": "领取资产手续费", + "asset_claim_pool": "Claim asset fee pool", "asset_create": "创建资产", "asset_fund_fee_pool": "注资资产手续费池", "asset_global_settle": "全局资产清算", @@ -1589,6 +1596,7 @@ "asset_update": "更新资产", "asset_update_bitasset": "更新智能币", "asset_update_feed_producers": "更新资产喂价者", + "asset_update_issuer": "Update asset issuer", "balance_claim": "领取余额", "blind_transfer": "隐私转账", "call_order_update": "更新债仓", diff --git a/app/assets/stylesheets/components/_all.scss b/app/assets/stylesheets/components/_all.scss index fa1d0cef90..f102b6b50e 100644 --- a/app/assets/stylesheets/components/_all.scss +++ b/app/assets/stylesheets/components/_all.scss @@ -36,3 +36,7 @@ .linethrough { text-decoration: line-through; } + +.fixed-height-2rem tr { + height: 2.5rem; +} \ No newline at end of file diff --git a/app/assets/stylesheets/themes/_theme-template.scss b/app/assets/stylesheets/themes/_theme-template.scss index 1313e887ed..9563506a9b 100644 --- a/app/assets/stylesheets/themes/_theme-template.scss +++ b/app/assets/stylesheets/themes/_theme-template.scss @@ -1784,13 +1784,6 @@ } } - .react-stockcharts-tooltip { - fill: $primary-text-color; - } - .react-stockcharts-tooltip-label { - fill: $link-text-color; - } - div.custom-dropdown-content { background: $panel-bg-color; color: $primary-text-color; @@ -1975,6 +1968,9 @@ .icon.locked > svg > path { fill: $button-bg-color; } + .icon.unlocked > svg > path { + fill: $button-bg-color; + } } &.total-value { td { diff --git a/app/assets/stylesheets/vendors/_all.scss b/app/assets/stylesheets/vendors/_all.scss index 233aed90cf..4b31259486 100644 --- a/app/assets/stylesheets/vendors/_all.scss +++ b/app/assets/stylesheets/vendors/_all.scss @@ -7,3 +7,4 @@ @import "introjs-midnight-theme"; @import "~react-datepicker2/dist/react-datepicker2.css"; @import "~react-sticky-table/dist/react-sticky-table.css"; +@import "~bitshares-ui-style-guide/dist/styles/style.css"; diff --git a/app/components/Account/AccountAssetCreate.jsx b/app/components/Account/AccountAssetCreate.jsx index 9f56af93db..08f1dc75bf 100644 --- a/app/components/Account/AccountAssetCreate.jsx +++ b/app/components/Account/AccountAssetCreate.jsx @@ -56,8 +56,9 @@ class BitAssetOptions extends React.Component { !asset.getIn(["bitasset", "is_prediction_market"])) ) { if ( + this.props.isPredictionMarket && asset.get("precision") !== - parseInt(this.props.assetPrecision, 10) + parseInt(this.props.assetPrecision, 10) ) { this.setState({ error: counterpart.translate( @@ -477,7 +478,7 @@ class AccountAssetCreate extends React.Component { // Enforce uppercase const symbol = target.value.toUpperCase(); // Enforce characters - let regexp = new RegExp("^[.A-Z]+$"); + let regexp = new RegExp("^[.A-Z0-9]+$"); if (symbol !== "" && !regexp.test(symbol)) { break; } @@ -1211,6 +1212,9 @@ class AccountAssetCreate extends React.Component { } assetPrecision={update.precision} assetSymbol={update.symbol} + isPredictionMarket={ + is_prediction_market + } /> ) : null} diff --git a/app/components/Account/AccountAssetUpdate.jsx b/app/components/Account/AccountAssetUpdate.jsx index 984693920f..ee4bdb1cc0 100644 --- a/app/components/Account/AccountAssetUpdate.jsx +++ b/app/components/Account/AccountAssetUpdate.jsx @@ -26,6 +26,7 @@ import AssetFeedProducers from "./AssetFeedProducers"; import BaseModal from "components/Modal/BaseModal"; import ZfApi from "react-foundation-apps/src/utils/foundation-api"; import FundFeePool from "./FundFeePool"; +import {withRouter} from "react-router-dom"; let GRAPHENE_MAX_SHARE_SUPPLY = new big( assetConstants.GRAPHENE_MAX_SHARE_SUPPLY @@ -1750,9 +1751,9 @@ class ConfirmModal extends React.Component { class AssetUpdateWrapper extends React.Component { render() { - let asset = this.props.params.asset; + let asset = this.props.match.params.asset; return ; } } -export default AssetUpdateWrapper; +export default withRouter(AssetUpdateWrapper); diff --git a/app/components/Account/AccountAssets.jsx b/app/components/Account/AccountAssets.jsx index 0befb773a8..b4bd8d2a4f 100644 --- a/app/components/Account/AccountAssets.jsx +++ b/app/components/Account/AccountAssets.jsx @@ -1,6 +1,6 @@ import React from "react"; import PropTypes from "prop-types"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Translate from "react-translate-component"; import AssetActions from "actions/AssetActions"; import AssetStore from "stores/AssetStore"; @@ -170,7 +170,7 @@ class AccountAssets extends React.Component { _editButtonClick(symbol, account_name, e) { e.preventDefault(); - this.props.router.push( + this.props.history.push( `/account/${account_name}/update-asset/${symbol}` ); } diff --git a/app/components/Account/AccountLeftPanel.jsx b/app/components/Account/AccountLeftPanel.jsx index d663d47cb0..21aef3ecb5 100644 --- a/app/components/Account/AccountLeftPanel.jsx +++ b/app/components/Account/AccountLeftPanel.jsx @@ -1,6 +1,6 @@ import React from "react"; import PropTypes from "prop-types"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import ReactTooltip from "react-tooltip"; import AccountInfo from "./AccountInfo"; import Translate from "react-translate-component"; diff --git a/app/components/Account/AccountMembership.jsx b/app/components/Account/AccountMembership.jsx index be2af612d1..d04ea7b289 100644 --- a/app/components/Account/AccountMembership.jsx +++ b/app/components/Account/AccountMembership.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Translate from "react-translate-component"; import {ChainStore} from "bitsharesjs/es"; import ChainTypes from "../Utility/ChainTypes"; @@ -202,7 +202,7 @@ class AccountMembership extends React.Component {   ( { account.lifetime_referrer_name @@ -219,7 +219,7 @@ class AccountMembership extends React.Component {   ( { account.registrar_name @@ -236,7 +236,7 @@ class AccountMembership extends React.Component {   ( { account.referrer_name diff --git a/app/components/Account/AccountOrders.jsx b/app/components/Account/AccountOrders.jsx index f9ec8d68a9..595d44ddc1 100644 --- a/app/components/Account/AccountOrders.jsx +++ b/app/components/Account/AccountOrders.jsx @@ -272,19 +272,19 @@ class AccountOrders extends React.Component { /> ) : null} {selectedOrders.length ? ( - ) : null} {selectedOrders.length ? ( - ) : null}
diff --git a/app/components/Account/AccountOverview.jsx b/app/components/Account/AccountOverview.jsx index c218331fde..c170a26688 100644 --- a/app/components/Account/AccountOverview.jsx +++ b/app/components/Account/AccountOverview.jsx @@ -15,7 +15,7 @@ import SettingsActions from "actions/SettingsActions"; import assetUtils from "common/asset_utils"; import counterpart from "counterpart"; import Icon from "../Icon/Icon"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import EquivalentPrice from "../Utility/EquivalentPrice"; import LinkToAssetById from "../Utility/LinkToAssetById"; import utils from "common/utils"; @@ -229,11 +229,6 @@ class AccountOverview extends React.Component { return render ?  |  : null; } - _onNavigate(route, e) { - e.preventDefault(); - this.props.router.push(route); - } - triggerSend(asset) { this.setState({send_asset: asset}, () => { if (this.send_modal) this.send_modal.show(); diff --git a/app/components/Account/AccountPage.jsx b/app/components/Account/AccountPage.jsx index 30a3f604fc..ca2e6895c6 100644 --- a/app/components/Account/AccountPage.jsx +++ b/app/components/Account/AccountPage.jsx @@ -11,16 +11,25 @@ import {connect} from "alt-react"; import accountUtils from "common/account_utils"; import {List} from "immutable"; import Page404 from "../Page404/Page404"; +import {Route, Switch, Redirect} from "react-router-dom"; + +/* Nested routes */ +import AccountAssets from "./AccountAssets"; +import {AccountAssetCreate} from "./AccountAssetCreate"; +import AccountAssetUpdate from "./AccountAssetUpdate"; +import AccountMembership from "./AccountMembership"; +import AccountVesting from "./AccountVesting"; +import AccountPermissions from "./AccountPermissions"; +import AccountSignedMessages from "./AccountSignedMessages"; +import AccountWhitelist from "./AccountWhitelist"; +import AccountVoting from "./AccountVoting"; +import AccountOverview from "./AccountOverview"; class AccountPage extends React.Component { static propTypes = { account: ChainTypes.ChainAccount.isRequired }; - static defaultProps = { - account: "props.params.account_name" - }; - componentDidMount() { if (this.props.account) { AccountActions.setCurrentAccount.defer( @@ -50,7 +59,6 @@ class AccountPage extends React.Component { render() { let { myActiveAccounts, - account_name, searchAccounts, settings, wallet_locked, @@ -61,12 +69,99 @@ class AccountPage extends React.Component { if (!account) { return ; } + let account_name = this.props.account.get("name"); let isMyAccount = AccountStore.isMyAccount(account); + let passOnProps = { + account_name, + myActiveAccounts, + searchAccounts, + settings, + wallet_locked, + account, + isMyAccount, + hiddenAssets, + contained: true, + balances: account.get("balances", List()).toList(), + orders: account.get("orders", List()).toList(), + backedCoins: this.props.backedCoins, + bridgeCoins: this.props.bridgeCoins, + gatewayDown: this.props.gatewayDown, + viewSettings: this.props.viewSettings, + proxy: account.getIn(["options", "voting_account"]), + history: this.props.history + }; + return (
- {React.cloneElement( + + } + /> + + } + /> + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> + } + /> + ( + + )} + /> + } + /> + } + /> + ( + + )} + /> + + {/* {React.cloneElement( React.Children.only(this.props.children), { account_name, @@ -86,7 +181,7 @@ class AccountPage extends React.Component { viewSettings: this.props.viewSettings, proxy: account.getIn(["options", "voting_account"]) } - )} + )} */}
); @@ -98,9 +193,8 @@ AccountPage = BindToChainState(AccountPage, { class AccountPageStoreWrapper extends React.Component { render() { - let account_name = this.props.routeParams.account_name; - - return ; + let account_name = this.props.match.params.account_name; + return ; } } diff --git a/app/components/Account/AccountPermissionsList.jsx b/app/components/Account/AccountPermissionsList.jsx index 4f3555dd0d..8d4fc2954d 100644 --- a/app/components/Account/AccountPermissionsList.jsx +++ b/app/components/Account/AccountPermissionsList.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import AccountSelector from "./AccountSelector"; import Translate from "react-translate-component"; import AccountImage from "./AccountImage"; diff --git a/app/components/Account/AccountPermissionsMigrate.jsx b/app/components/Account/AccountPermissionsMigrate.jsx index f11c337d46..26e99a9a45 100644 --- a/app/components/Account/AccountPermissionsMigrate.jsx +++ b/app/components/Account/AccountPermissionsMigrate.jsx @@ -34,7 +34,7 @@ export default class AccountPermissionsMigrate extends React.Component { : WalletDb.generateKeyFromPassword(name, "owner", e.value).pubKey; const memo = !valid ? null - : WalletDb.generateKeyFromPassword(name, "active", e.value).pubKey; + : WalletDb.generateKeyFromPassword(name, "memo", e.value).pubKey; this.setState({validPassword: e.valid, pass: e.value}); this.props.onSetPasswordKeys({active, owner, memo}); } @@ -75,7 +75,9 @@ export default class AccountPermissionsMigrate extends React.Component { this.props[ role === "active" ? "onAddActive" - : role === "owner" ? "onAddOwner" : "onSetMemo" + : role === "owner" + ? "onAddOwner" + : "onSetMemo" ](this.props[role], weights[role]); } } diff --git a/app/components/Account/AccountSelector.jsx b/app/components/Account/AccountSelector.jsx index c8a15befbf..17f6b4bfb7 100644 --- a/app/components/Account/AccountSelector.jsx +++ b/app/components/Account/AccountSelector.jsx @@ -61,7 +61,7 @@ class AccountSelector extends React.Component { if (this.props.onAccountChanged && account) this.props.onAccountChanged(account); - if (!this.props.typeahead && !!accountName) + if (!this.props.typeahead && accountName) this.onInputChanged(accountName); } @@ -119,7 +119,7 @@ class AccountSelector extends React.Component { // - Always returns account object if (!typeahead) { if (onChange) onChange(_accountName); - if (onAccountChanged) onAccountChanged(_account); + if (onAccountChanged && _account) onAccountChanged(_account); } } @@ -138,9 +138,8 @@ class AccountSelector extends React.Component { if (!allowUppercase) value = value.toLowerCase(); // If regex matches ^.*#/account/account-name/.*$, parse out account-name - let _value = value - .replace("#", "") - .match(/(?:\/account\/)(.*)(?:\/overview)/); + let _value = value.replace("#", "").match(/(?:\/account\/)(.*)/); + console.log("getVerifiedAccountName", value); if (_value) value = _value[1]; return value; @@ -430,6 +429,7 @@ class AccountSelector extends React.Component { }} name="username" id="username" + autoComplete="username" type="text" value={this.props.accountName || ""} placeholder={ diff --git a/app/components/Account/AccountSignedMessages.jsx b/app/components/Account/AccountSignedMessages.jsx index 324654c378..32ff9aa85b 100644 --- a/app/components/Account/AccountSignedMessages.jsx +++ b/app/components/Account/AccountSignedMessages.jsx @@ -28,10 +28,10 @@ class AccountSignedMessages extends React.Component { this.state = { tabsm_memo_key: this.props.account.get("options").get("memo_key"), tabsm_popup: "", - tabsm_message_text: null, - tabsm_message_signed: null, + tabsm_message_text: "", + tabsm_message_signed: "", tabvm_popup: "", - tabvm_message_signed: null, + tabvm_message_signed: "", tabvm_verified: null, tabvm_message_signed_and_verified: null, tabvm_flag_verifyonchange: false @@ -280,9 +280,9 @@ class AccountSignedMessages extends React.Component { > - +
{this.state.tabsm_popup} - +


diff --git a/app/components/Account/AccountVoting.jsx b/app/components/Account/AccountVoting.jsx index 67c4942f8e..a087f2b8a3 100644 --- a/app/components/Account/AccountVoting.jsx +++ b/app/components/Account/AccountVoting.jsx @@ -9,7 +9,7 @@ import cnames from "classnames"; import {Tabs, Tab} from "../Utility/Tabs"; import BindToChainState from "../Utility/BindToChainState"; import ChainTypes from "../Utility/ChainTypes"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import ApplicationApi from "api/ApplicationApi"; import AccountSelector from "./AccountSelector"; import Icon from "../Icon/Icon"; @@ -678,15 +678,14 @@ class AccountVoting extends React.Component { let proxyInput = ( X:{" "} - - {account} - + {account} ); } @@ -26,9 +24,7 @@ class Connections extends React.Component { return (
  • X:{" "} - - {account} - + {account}
  • ); } diff --git a/app/components/Account/CreateAccount.jsx b/app/components/Account/CreateAccount.jsx index 9b8553f8c0..db6ccd8b9e 100644 --- a/app/components/Account/CreateAccount.jsx +++ b/app/components/Account/CreateAccount.jsx @@ -7,7 +7,7 @@ import AccountNameInput from "./../Forms/AccountNameInput"; import PasswordInput from "./../Forms/PasswordInput"; import WalletDb from "stores/WalletDb"; import notify from "actions/NotificationActions"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import AccountSelect from "../Forms/AccountSelect"; import WalletUnlockActions from "actions/WalletUnlockActions"; import TransactionConfirmStore from "stores/TransactionConfirmStore"; @@ -20,6 +20,7 @@ import ReactTooltip from "react-tooltip"; import utils from "common/utils"; import SettingsActions from "actions/SettingsActions"; import counterpart from "counterpart"; +import {withRouter} from "react-router-dom"; class CreateAccount extends React.Component { constructor() { @@ -90,7 +91,9 @@ class CreateAccount extends React.Component { [this.state.accountName]: true }).then(() => { console.log("onFinishConfirm"); - this.props.router.push("/wallet/backup/create?newAccount=true"); + this.props.history.push( + "/wallet/backup/create?newAccount=true" + ); }); } } @@ -564,6 +567,8 @@ class CreateAccount extends React.Component { } } +CreateAccount = withRouter(CreateAccount); + export default connect(CreateAccount, { listenTo() { return [AccountStore]; diff --git a/app/components/Account/CreateAccountPassword.jsx b/app/components/Account/CreateAccountPassword.jsx index 243762fad3..cbc97f83eb 100644 --- a/app/components/Account/CreateAccountPassword.jsx +++ b/app/components/Account/CreateAccountPassword.jsx @@ -6,7 +6,7 @@ import AccountStore from "stores/AccountStore"; import AccountNameInput from "./../Forms/AccountNameInput"; import WalletDb from "stores/WalletDb"; import notify from "actions/NotificationActions"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import AccountSelect from "../Forms/AccountSelect"; import TransactionConfirmStore from "stores/TransactionConfirmStore"; import LoadingIndicator from "../LoadingIndicator"; @@ -19,13 +19,9 @@ import SettingsActions from "actions/SettingsActions"; import WalletUnlockActions from "actions/WalletUnlockActions"; import Icon from "../Icon/Icon"; import CopyButton from "../Utility/CopyButton"; -import PropTypes from "prop-types"; +import {withRouter} from "react-router-dom"; class CreateAccountPassword extends React.Component { - static contextTypes = { - router: PropTypes.object.isRequired - }; - constructor() { super(); this.state = { @@ -100,7 +96,9 @@ class CreateAccountPassword extends React.Component { FetchChain("getAccount", this.state.accountName, undefined, { [this.state.accountName]: true }).then(() => { - this.props.router.push("/wallet/backup/create?newAccount=true"); + this.props.history.push( + "/wallet/backup/create?newAccount=true" + ); }); } } @@ -262,16 +260,17 @@ class CreateAccountPassword extends React.Component {
    - + > + {this.state.generatedPassword} + { - this.context.router.push("/"); + this.props.history.push("/"); }} className="button" > @@ -673,6 +672,8 @@ class CreateAccountPassword extends React.Component { } } +CreateAccountPassword = withRouter(CreateAccountPassword); + export default connect(CreateAccountPassword, { listenTo() { return [AccountStore]; diff --git a/app/components/Account/MarginPositions.jsx b/app/components/Account/MarginPositions.jsx index faa3358abd..4d81b4d35f 100644 --- a/app/components/Account/MarginPositions.jsx +++ b/app/components/Account/MarginPositions.jsx @@ -15,10 +15,9 @@ import counterpart from "counterpart"; import Icon from "../Icon/Icon"; import TotalBalanceValue from "../Utility/TotalBalanceValue"; import {List} from "immutable"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import TranslateWithLinks from "../Utility/TranslateWithLinks"; import Immutable from "immutable"; -import PropTypes from "prop-types"; const alignRight = {textAlign: "right"}; const alignLeft = {textAlign: "left"}; @@ -41,10 +40,6 @@ class MarginPosition extends React.Component { tempComponent: "tr" }; - static contextTypes = { - router: PropTypes.object - }; - _onUpdatePosition(e) { e.preventDefault(); let ref = @@ -197,11 +192,6 @@ class MarginPosition extends React.Component { } } - _onNavigate(route, e) { - e.preventDefault(); - this.context.router.push(route); - } - render() { let {debtAsset, collateralAsset, object} = this.props; const co = object.toJS(); @@ -211,32 +201,6 @@ class MarginPosition extends React.Component { const statusClass = this._getStatusClass(); - const assetDetailURL = `/asset/${debtAsset.get("symbol")}`; - const marketURL = `/market/${debtAsset.get( - "symbol" - )}_${collateralAsset.get("symbol")}`; - const assetInfoLinks = ( - - ); - return ( @@ -248,7 +212,6 @@ class MarginPosition extends React.Component { @@ -256,7 +219,6 @@ class MarginPosition extends React.Component { @@ -419,10 +381,6 @@ class MarginPositionPlaceHolder extends React.Component { tempComponent: "tr" }; - static contextTypes = { - router: PropTypes.object - }; - _onUpdatePosition(e) { e.preventDefault(); let ref = "cp_modal_" + this.props.debtAsset.get("id"); @@ -457,11 +415,6 @@ class MarginPositionPlaceHolder extends React.Component { ); } - _onNavigate(route, e) { - e.preventDefault(); - this.context.router.push(route); - } - render() { let {debtAsset, collateralAsset, account} = this.props; @@ -490,32 +443,6 @@ class MarginPositionPlaceHolder extends React.Component { }); } - const assetDetailURL = `/asset/${debtAsset.get("symbol")}`; - const marketURL = `/market/${debtAsset.get( - "symbol" - )}_${collateralAsset.get("symbol")}`; - const assetInfoLinks = ( - - ); - return ( @@ -527,7 +454,6 @@ class MarginPositionPlaceHolder extends React.Component { @@ -535,7 +461,6 @@ class MarginPositionPlaceHolder extends React.Component { diff --git a/app/components/Account/RecentTransactions.jsx b/app/components/Account/RecentTransactions.jsx index cb65d2decd..42d11bb991 100644 --- a/app/components/Account/RecentTransactions.jsx +++ b/app/components/Account/RecentTransactions.jsx @@ -247,9 +247,7 @@ class RecentTransactions extends React.Component { ).sort(compareOps); let historyCount = history.length; - style = style ? style : {}; - style.width = "100%"; - style.height = "100%"; + style = style ? style : {width: "100%", height: "100%"}; let options = null; if (true || this.props.showFilters) { @@ -283,6 +281,7 @@ class RecentTransactions extends React.Component { key={o.id} op={o.op} result={o.result} + txIndex={o.trx_in_block} block={o.block_num} current={current_account_id} hideFee diff --git a/app/components/Blockchain/Asset.jsx b/app/components/Blockchain/Asset.jsx index d2edc3ea7d..5a1972766c 100644 --- a/app/components/Blockchain/Asset.jsx +++ b/app/components/Blockchain/Asset.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Translate from "react-translate-component"; import LinkToAccountById from "../Utility/LinkToAccountById"; import AssetWrapper from "../Utility/AssetWrapper"; @@ -154,7 +154,9 @@ class Asset extends React.Component { _assetType(asset) { return "bitasset" in asset - ? asset.bitasset.is_prediction_market ? "Prediction" : "Smart" + ? asset.bitasset.is_prediction_market + ? "Prediction" + : "Smart" : "Simple"; } @@ -254,7 +256,9 @@ class Asset extends React.Component { const core_asset = ChainStore.getAsset("1.3.0"); let preferredMarket = description.market ? description.market - : core_asset ? core_asset.get("symbol") : "BTS"; + : core_asset + ? core_asset.get("symbol") + : "BTS"; if ("bitasset" in asset && asset.bitasset.is_prediction_market) { preferredMarket = ChainStore.getAsset( asset.bitasset.options.short_backing_asset @@ -1190,7 +1194,7 @@ AssetContainer = AssetWrapper(AssetContainer, { export default class AssetSymbolSplitter extends React.Component { render() { - let symbol = this.props.params.symbol.toUpperCase(); + let symbol = this.props.match.params.symbol.toUpperCase(); return ; } } diff --git a/app/components/Blockchain/Block.jsx b/app/components/Blockchain/Block.jsx index 65fa152915..bf65af8689 100644 --- a/app/components/Blockchain/Block.jsx +++ b/app/components/Blockchain/Block.jsx @@ -8,6 +8,7 @@ import Translate from "react-translate-component"; import ChainTypes from "../Utility/ChainTypes"; import BindToChainState from "../Utility/BindToChainState"; import LinkToWitnessById from "../Utility/LinkToWitnessById"; +import {Element, Events, animateScroll as scroll, scroller} from "react-scroll"; class TransactionList extends React.Component { shouldComponentUpdate(nextProps) { @@ -25,7 +26,13 @@ class TransactionList extends React.Component { block.transactions.forEach((trx, index) => { transactions.push( - + + + ); }); } @@ -53,10 +60,21 @@ class Block extends React.Component { this.state = { showInput: false }; + + this.scrollToTop = this.scrollToTop.bind(this); } componentDidMount() { this._getBlock(this.props.height); + + Events.scrollEvent.register("begin", () => { + //console.log("begin", arguments); + }); + + Events.scrollEvent.register("end", () => { + //console.log("end", arguments); + this.setState({scrollEnded: true}); + }); } componentWillReceiveProps(np) { @@ -74,6 +92,15 @@ class Block extends React.Component { ); } + scrollToTop() { + scroll.scrollToTop({ + duration: 1500, + delay: 100, + smooth: true, + containerId: "blockContainer" + }); + } + _getBlock(height) { if (height) { height = parseInt(height, 10); @@ -84,18 +111,18 @@ class Block extends React.Component { } _nextBlock() { - let height = this.props.params.height; + let height = this.props.match.params.height; let nextBlock = Math.min( this.props.dynGlobalObject.get("head_block_number"), parseInt(height, 10) + 1 ); - this.props.router.push(`/block/${nextBlock}`); + this.props.history.push(`/block/${nextBlock}`); } _previousBlock() { - let height = this.props.params.height; + let height = this.props.match.params.height; let previousBlock = Math.max(1, parseInt(height, 10) - 1); - this.props.router.push(`/block/${previousBlock}`); + this.props.history.push(`/block/${previousBlock}`); } toggleInput(e) { @@ -105,7 +132,7 @@ class Block extends React.Component { _onKeyDown(e) { if (e && e.keyCode === 13) { - this.props.router.push(`/block/${e.target.value}`); + this.props.history.push(`/block/${e.target.value}`); this.setState({showInput: false}); } } @@ -117,6 +144,22 @@ class Block extends React.Component { } } + componentDidUpdate() { + let {blocks} = this.props; + let height = parseInt(this.props.height, 10); + let block = blocks.get(height); + + if (this.props.scrollToIndex && !this.state.scrollEnded && block) { + scroller.scrollTo(`tx_${this.props.scrollToIndex}`, { + duration: 1500, + delay: 100, + smooth: true, + offset: -100, + containerId: "blockContainer" + }); + } + } + render() { const {showInput} = this.state; let {blocks} = this.props; @@ -148,7 +191,7 @@ class Block extends React.Component { return (
    -
    +

    {blockHeight}

      @@ -207,6 +250,13 @@ class Block extends React.Component {
    {block ? : null} +
    + + + +
    diff --git a/app/components/Blockchain/BlockContainer.jsx b/app/components/Blockchain/BlockContainer.jsx index c32bfa985d..7b0077fb7d 100644 --- a/app/components/Blockchain/BlockContainer.jsx +++ b/app/components/Blockchain/BlockContainer.jsx @@ -5,7 +5,10 @@ import Block from "./Block"; class BlockContainer extends React.Component { render() { - let height = parseInt(this.props.params.height, 10); + let height = parseInt(this.props.match.params.height, 10); + let txIndex = this.props.match.params.txIndex + ? parseInt(this.props.match.params.txIndex) + : 0; return ( - + ); } diff --git a/app/components/Blockchain/Operation.jsx b/app/components/Blockchain/Operation.jsx index 1208c5112c..7e595be110 100644 --- a/app/components/Blockchain/Operation.jsx +++ b/app/components/Blockchain/Operation.jsx @@ -1,6 +1,6 @@ import React from "react"; import FormattedAsset from "../Utility/FormattedAsset"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import classNames from "classnames"; import Translate from "react-translate-component"; import counterpart from "counterpart"; @@ -43,10 +43,6 @@ class TransactionLabel extends React.Component { } class Row extends React.Component { - static contextTypes = { - router: PropTypes.object.isRequired - }; - static propTypes = { dynGlobalObject: ChainTypes.ChainObject.isRequired }; @@ -58,13 +54,7 @@ class Row extends React.Component { constructor(props) { super(props); - // this.showDetails = this.showDetails.bind(this); } - // - // showDetails(e) { - // e.preventDefault(); - // this.context.router.push(`/block/${this.props.block}`); - // } shouldComponentUpdate(nextProps) { let {block, dynGlobalObject} = this.props; @@ -101,6 +91,7 @@ class Row extends React.Component { {this.props.includeOperationId ? ( + {/* {this.props.block}#{this.props.txIndex}
    */} {this.props.operationId} ) : null} @@ -121,7 +112,9 @@ class Row extends React.Component { ) } )} - to={`/block/${this.props.block}`} + to={`/block/${this.props.block}/${ + this.props.txIndex + }`} > @@ -187,7 +180,7 @@ class Operation extends React.Component { return utils.is_object_id(name_or_id) ? ( ) : ( - {name_or_id} + {name_or_id} ); } @@ -305,6 +298,10 @@ class Operation extends React.Component { const amount = isBid ? op[1].min_to_receive : op[1].amount_to_sell; + let orderId = this.props.result + ? typeof this.props.result[1] == "string" + ? "#" + this.props.result[1].substring(4) : "" + : ""; return ( ); }} @@ -1020,6 +1020,9 @@ class Operation extends React.Component { arg: "price" } ]} + params={{ + order: o.order_id.substring(4) + }} /> ); }} @@ -1301,6 +1304,56 @@ class Operation extends React.Component { ); break; + case "asset_claim_pool": + column = ( + + ); + break; + + case "asset_update_issuer": + column = ( + + ); + break; + default: console.log("unimplemented op:", op); column = ( @@ -1336,6 +1389,7 @@ class Operation extends React.Component { line = column ? ( { ); }; -class TransactionLabel extends React.Component { - shouldComponentUpdate(nextProps) { - return ( - nextProps.color !== this.props.color || - nextProps.type !== this.props.type - ); - } - render() { - let trxTypes = counterpart.translate("transaction.trxTypes"); - let labelClass = classNames("label", this.props.color || "info"); - return ( - {trxTypes[ops[this.props.type]]} - ); - } -} - class Row extends React.Component { - static contextTypes = { - router: PropTypes.object.isRequired - }; - constructor(props) { super(props); this.showDetails = this.showDetails.bind(this); @@ -64,34 +44,16 @@ class Row extends React.Component { showDetails(e) { e.preventDefault(); - this.context.router.push(`/block/${this.props.block}`); + this.props.history.push(`/block/${this.props.block}`); } render() { - let { - id, - block, - fee, - color, - type, - hideDate, - hideFee, - hideOpLabel, - hideExpiration, - expiration - } = this.props; + let {id, fee, hideFee, hideExpiration, expiration} = this.props; fee.amount = parseInt(fee.amount, 10); return (
    - {hideOpLabel ? null : ( - - - - - - )} {this.props.info}  {hideFee ? null : ( @@ -196,11 +158,7 @@ class ProposedOperation extends React.Component { { type: "amount", value: op[1].amount, - arg: "amount", - decimalOffset: - op[1].amount.asset_id === "1.3.0" - ? 5 - : null + arg: "amount" }, {type: "account", value: op[1].to, arg: "to"} ]} diff --git a/app/components/Blockchain/Transaction.jsx b/app/components/Blockchain/Transaction.jsx index 326adbe818..a743e24d8c 100644 --- a/app/components/Blockchain/Transaction.jsx +++ b/app/components/Blockchain/Transaction.jsx @@ -1,7 +1,7 @@ import React from "react"; import PropTypes from "prop-types"; import FormattedAsset from "../Utility/FormattedAsset"; -import {Link as RealLink} from "react-router/es"; +import {Link as RealLink} from "react-router-dom"; import Translate from "react-translate-component"; import counterpart from "counterpart"; import classNames from "classnames"; @@ -20,6 +20,15 @@ import {ChainTypes} from "bitsharesjs/es"; let {operations} = ChainTypes; import ReactTooltip from "react-tooltip"; import moment from "moment"; +import { + Link, + DirectLink, + Element, + Events, + animateScroll as scroll, + scrollSpy, + scroller +} from "react-scroll"; require("./operations.scss"); require("./json-inspector.scss"); @@ -40,7 +49,11 @@ class OpType extends React.Component { - {trxTypes[ops[this.props.type]]} + {trxTypes[ops[this.props.type]]} + {this.props.txIndex > 0 + ? {this.props.txIndex} + : "" + } @@ -80,6 +93,7 @@ class OperationTable extends React.Component { @@ -1919,6 +1933,99 @@ class Transaction extends React.Component { break; + case "asset_claim_pool": + rows.push( + + + + + + + + + ); + rows.push( + + + + + + + + + ); + + rows.push( + + + + + + + + + ); + break; + + case "asset_update_issuer": + rows.push( + + + + + + + + + ); + + rows.push( + + + + + + + + + ); + + rows.push( + + + + + + + + + ); + + break; + default: console.log("unimplemented op:", op); @@ -1940,6 +2047,7 @@ class Transaction extends React.Component { info.push( - {/*
    #{index + 1}
    */} - {info} -
    - ); + return
    {info}
    ; } } diff --git a/app/components/Dashboard/AccountCard.jsx b/app/components/Dashboard/AccountCard.jsx index 16d5a58923..d5298dd654 100644 --- a/app/components/Dashboard/AccountCard.jsx +++ b/app/components/Dashboard/AccountCard.jsx @@ -5,7 +5,7 @@ import ChainTypes from "../Utility/ChainTypes"; import BindToChainState from "../Utility/BindToChainState"; import AccountStore from "stores/AccountStore"; import {ChainStore} from "bitsharesjs/es"; -import PropTypes from "prop-types"; +import {withRouter} from "react-router-dom"; /** * @brief displays the summary of a given account in a condenced view (for the dashboard) @@ -16,10 +16,6 @@ import PropTypes from "prop-types"; */ class AccountCard extends React.Component { - static contextTypes = { - router: PropTypes.object.isRequired - }; - static propTypes = { account: ChainTypes.ChainAccount.isRequired }; @@ -27,7 +23,7 @@ class AccountCard extends React.Component { onCardClick(e) { e.preventDefault(); let name = this.props.account.get("name"); - this.context.router.push(`/account/${name}/overview/`); + this.props.history.push(`/account/${name}`); } render() { @@ -76,5 +72,5 @@ class AccountCard extends React.Component { ); } } - -export default BindToChainState(AccountCard); +AccountCard = BindToChainState(AccountCard); +export default withRouter(AccountCard); diff --git a/app/components/Dashboard/DashboardList.jsx b/app/components/Dashboard/DashboardList.jsx index a829b6a41c..de312d2e0e 100644 --- a/app/components/Dashboard/DashboardList.jsx +++ b/app/components/Dashboard/DashboardList.jsx @@ -16,6 +16,7 @@ import AccountStore from "stores/AccountStore"; import counterpart from "counterpart"; import WalletDb from "stores/WalletDb"; import PropTypes from "prop-types"; +import {withRouter} from "react-router-dom"; const starSort = function(a, b, inverse, starredAccounts) { let aName = a.get("name"); @@ -39,10 +40,6 @@ const starSort = function(a, b, inverse, starredAccounts) { }; class DashboardList extends React.Component { - static contextTypes = { - router: PropTypes.object.isRequired - }; - static propTypes = { accounts: ChainTypes.ChainAccountsList.isRequired, ignoredAccounts: ChainTypes.ChainAccountsList @@ -94,14 +91,14 @@ class DashboardList extends React.Component { } _goAccount(name, tab) { - this.context.router.push(`/account/${name}`); + this.props.history.push(`/account/${name}`); SettingsActions.changeViewSetting({ overviewTab: tab }); } _createAccount() { - this.context.router.push("/create-account/wallet"); + this.props.history.push("/create-account/wallet"); } _onFilter(e) { @@ -566,6 +563,7 @@ class AccountsListWrapper extends React.Component { return ; } } +AccountsListWrapper = withRouter(AccountsListWrapper); export default connect(AccountsListWrapper, { listenTo() { diff --git a/app/components/Dashboard/Markets.jsx b/app/components/Dashboard/Markets.jsx index 237b4bfd7c..b4dca11bc6 100644 --- a/app/components/Dashboard/Markets.jsx +++ b/app/components/Dashboard/Markets.jsx @@ -22,16 +22,19 @@ class StarredMarkets extends React.Component { return ; } } -StarredMarkets = connect(StarredMarkets, { - listenTo() { - return [SettingsStore]; - }, - getProps() { - return { - starredMarkets: SettingsStore.getState().starredMarkets - }; +StarredMarkets = connect( + StarredMarkets, + { + listenTo() { + return [SettingsStore]; + }, + getProps() { + return { + starredMarkets: SettingsStore.getState().starredMarkets + }; + } } -}); +); class FeaturedMarkets extends React.Component { constructor() { @@ -108,6 +111,9 @@ class FeaturedMarkets extends React.Component { ["BTS", "RUDEX.SCR"], ["BTS", "RUDEX.ETH"], ["BTS", "RUDEX.DGB"], + ["BTS", "RUDEX.BTC"], + ["BTS", "RUDEX.EOS"], + ["USD", "RUDEX.EOS"], ["BTS", "ZEPH"], ["BTS", "HERTZ"] ], @@ -159,16 +165,19 @@ class FeaturedMarkets extends React.Component { } } -FeaturedMarkets = connect(FeaturedMarkets, { - listenTo() { - return [MarketsStore]; - }, - getProps() { - return { - lowVolumeMarkets: MarketsStore.getState().lowVolumeMarkets - }; +FeaturedMarkets = connect( + FeaturedMarkets, + { + listenTo() { + return [MarketsStore]; + }, + getProps() { + return { + lowVolumeMarkets: MarketsStore.getState().lowVolumeMarkets + }; + } } -}); +); class TopMarkets extends React.Component { render() { diff --git a/app/components/Dashboard/MarketsTable.jsx b/app/components/Dashboard/MarketsTable.jsx index f9b6251cb5..a63e39a771 100644 --- a/app/components/Dashboard/MarketsTable.jsx +++ b/app/components/Dashboard/MarketsTable.jsx @@ -1,6 +1,6 @@ import React from "react"; import {connect} from "alt-react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import {ChainStore} from "bitsharesjs/es"; import Translate from "react-translate-component"; import cnames from "classnames"; @@ -124,7 +124,12 @@ class MarketRow extends React.Component { function getImageName(asset) { let symbol = asset.get("symbol"); - if (symbol === "OPEN.BTC" || symbol === "GDEX.BTC") return symbol; + if ( + symbol === "OPEN.BTC" || + symbol === "GDEX.BTC" || + symbol === "RUDEX.BTC" + ) + return symbol; let imgName = asset.get("symbol").split("."); return imgName.length === 2 ? imgName[1] : imgName[0]; } @@ -232,19 +237,22 @@ class MarketRow extends React.Component { } MarketRow = BindToChainState(MarketRow); -MarketRow = connect(MarketRow, { - listenTo() { - return [MarketsStore]; - }, - getProps(props) { - return { - marketStats: MarketsStore.getState().allMarketStats.get( - props.marketId - ), - starredMarkets: SettingsStore.getState().starredMarkets - }; +MarketRow = connect( + MarketRow, + { + listenTo() { + return [MarketsStore]; + }, + getProps(props) { + return { + marketStats: MarketsStore.getState().allMarketStats.get( + props.marketId + ), + starredMarkets: SettingsStore.getState().starredMarkets + }; + } } -}); +); class MarketsTable extends React.Component { constructor() { @@ -504,16 +512,19 @@ class MarketsTable extends React.Component { } } -export default connect(MarketsTable, { - listenTo() { - return [SettingsStore]; - }, - getProps() { - let {marketDirections, hiddenMarkets} = SettingsStore.getState(); - - return { - marketDirections, - hiddenMarkets - }; +export default connect( + MarketsTable, + { + listenTo() { + return [SettingsStore]; + }, + getProps() { + let {marketDirections, hiddenMarkets} = SettingsStore.getState(); + + return { + marketDirections, + hiddenMarkets + }; + } } -}); +); diff --git a/app/components/Exchange/Exchange.jsx b/app/components/Exchange/Exchange.jsx index b7e9837542..933ecc1f2a 100644 --- a/app/components/Exchange/Exchange.jsx +++ b/app/components/Exchange/Exchange.jsx @@ -36,22 +36,17 @@ class Exchange extends React.Component { static propTypes = { marketCallOrders: PropTypes.object.isRequired, activeMarketHistory: PropTypes.object.isRequired, - viewSettings: PropTypes.object.isRequired, - priceData: PropTypes.array.isRequired, - volumeData: PropTypes.array.isRequired + viewSettings: PropTypes.object.isRequired }; static defaultProps = { marketCallOrders: [], activeMarketHistory: {}, - viewSettings: {}, - priceData: [], - volumeData: [] + viewSettings: {} }; constructor(props) { super(); - this.state = { ...this._initialState(props), expirationType: { @@ -61,7 +56,8 @@ class Exchange extends React.Component { expirationCustomTime: { bid: moment().add(1, "day"), ask: moment().add(1, "day") - } + }, + feeStatus: {} }; this._getWindowSize = debounce(this._getWindowSize.bind(this), 150); @@ -202,7 +198,6 @@ class Exchange extends React.Component { buySellTop: ws.get("buySellTop", true), buyFeeAssetIdx: ws.get("buyFeeAssetIdx", 0), sellFeeAssetIdx: ws.get("sellFeeAssetIdx", 0), - feeStatus: {}, height: window.innerHeight, width: window.innerWidth, chartHeight: ws.get("chartHeight", 600), @@ -233,11 +228,20 @@ class Exchange extends React.Component { }); } - shouldComponentUpdate(nextProps) { - if (!nextProps.marketReady && !this.props.marketReady) { + shouldComponentUpdate(np, ns) { + if (!np.marketReady && !this.props.marketReady) { return false; } - return true; + let propsChanged = false; + for (let key in np) { + if (np.hasOwnProperty(key)) { + propsChanged = + propsChanged || + !utils.are_equal_shallow(np[key], this.props[key]); + if (propsChanged) break; + } + } + return propsChanged || !utils.are_equal_shallow(ns, this.state); } _checkFeeStatus( @@ -1217,10 +1221,6 @@ class Exchange extends React.Component { "showVolumeChart", true ); - const enableChartClamp = this.props.viewSettings.get( - "enableChartClamp", - true - ); if (quoteAsset.size && baseAsset.size && currentAccount.size) { base = baseAsset; @@ -1833,6 +1833,8 @@ class Exchange extends React.Component { {name: "add", index: 4} ]} current={`${quoteSymbol}_${baseSymbol}`} + location={this.props.location} + history={this.props.history} />
    ; } @@ -52,12 +52,6 @@ class ExchangeContainer extends React.Component { totals: () => { return MarketsStore.getState().totals; }, - priceData: () => { - return MarketsStore.getState().priceData; - }, - volumeData: () => { - return MarketsStore.getState().volumeData; - }, activeMarketHistory: () => { return MarketsStore.getState().activeMarketHistory; }, @@ -119,7 +113,8 @@ class ExchangeContainer extends React.Component { }} > @@ -148,7 +143,7 @@ class ExchangeSubscriber extends React.Component { coreAsset: "1.3.0" }; - constructor() { + constructor(props) { super(); this.state = {sub: null}; @@ -219,7 +214,7 @@ class ExchangeSubscriber extends React.Component { nextProps.baseAsset && nextProps.baseAsset.getIn(["bitasset", "is_prediction_market"]) ) { - this.props.router.push( + this.props.history.push( `/market/${nextProps.baseAsset.get( "symbol" )}_${nextProps.quoteAsset.get("symbol")}` diff --git a/app/components/Exchange/ExchangeHeader.jsx b/app/components/Exchange/ExchangeHeader.jsx index 3125669bc1..99110ef0fe 100644 --- a/app/components/Exchange/ExchangeHeader.jsx +++ b/app/components/Exchange/ExchangeHeader.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Icon from "../Icon/Icon"; import AssetName from "../Utility/AssetName"; import MarketsActions from "actions/MarketsActions"; @@ -253,7 +253,7 @@ export default class ExchangeHeader extends React.Component { /> - { this._addMarket( this.props.quoteAsset.get("symbol"), @@ -269,7 +269,7 @@ export default class ExchangeHeader extends React.Component { name="fi-star" title="icons.fi_star.market" /> - +
    @@ -445,10 +445,14 @@ export default class ExchangeHeader extends React.Component { }} > diff --git a/app/components/Exchange/MarketPicker.jsx b/app/components/Exchange/MarketPicker.jsx index 336ed9e2fe..5316381580 100644 --- a/app/components/Exchange/MarketPicker.jsx +++ b/app/components/Exchange/MarketPicker.jsx @@ -2,7 +2,7 @@ import {connect} from "alt-react"; import AssetStore from "stores/AssetStore"; import React from "react"; import MarketsActions from "actions/MarketsActions"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import AssetName from "../Utility/AssetName"; import Icon from "../Icon/Icon"; import {debounce} from "lodash-es"; diff --git a/app/components/Exchange/MarketRow.jsx b/app/components/Exchange/MarketRow.jsx index 4ce745137f..3f8660f9f1 100644 --- a/app/components/Exchange/MarketRow.jsx +++ b/app/components/Exchange/MarketRow.jsx @@ -6,17 +6,13 @@ import utils from "common/utils"; import Icon from "../Icon/Icon"; import MarketsActions from "actions/MarketsActions"; import SettingsActions from "actions/SettingsActions"; -import PropTypes from "prop-types"; +import {withRouter} from "react-router-dom"; class MarketRow extends React.Component { static defaultProps = { noSymbols: false }; - static contextTypes = { - router: PropTypes.object.isRequired - }; - constructor() { super(); @@ -25,9 +21,9 @@ class MarketRow extends React.Component { _onClick(marketID) { const newPath = `/market/${marketID}`; - if (newPath !== this.context.router.location.pathname) { + if (newPath !== this.props.location.pathname) { MarketsActions.switchMarket(); - this.context.router.push(`/market/${marketID}`); + this.props.history.push(`/market/${marketID}`); } } @@ -348,6 +344,7 @@ class MarketRow extends React.Component { ); } } +MarketRow = withRouter(MarketRow); export default AssetWrapper(MarketRow, { propNames: ["quote", "base"], diff --git a/app/components/Exchange/MyMarkets.jsx b/app/components/Exchange/MyMarkets.jsx index 979b51dd08..b3c36e593c 100644 --- a/app/components/Exchange/MyMarkets.jsx +++ b/app/components/Exchange/MyMarkets.jsx @@ -21,7 +21,6 @@ import AssetSelector from "../Utility/AssetSelector"; import counterpart from "counterpart"; import LoadingIndicator from "../LoadingIndicator"; import {ChainValidation} from "bitsharesjs/es"; -import PropTypes from "prop-types"; let lastLookup = new Date(); @@ -207,8 +206,6 @@ class MarketGroup extends React.Component { } }); - let index = 0; - let marketRows = markets .map(market => { return ( @@ -243,6 +240,8 @@ class MarketGroup extends React.Component { this.props.defaultMarkets.has(market.id) } onCheckMarket={this._onToggleUserMarket.bind(this)} + location={this.props.location} + history={this.props.history} /> ); }) @@ -295,8 +294,6 @@ class MarketGroup extends React.Component { } }); - let caret = open ? : ; - return (
    {open ? ( @@ -325,10 +322,6 @@ class MyMarkets extends React.Component { setMinWidth: false }; - static contextTypes = { - router: PropTypes.object.isRequired - }; - constructor(props) { super(); @@ -470,7 +463,7 @@ class MyMarkets extends React.Component { } _goMarkets() { - this.context.router.push("/markets"); + this.props.history.push("/markets"); } _changeTab(tab) { @@ -1050,6 +1043,8 @@ class MyMarkets extends React.Component { base={base} maxRows={myMarketTab ? 20 : 10} findMarketTab={!myMarketTab} + location={this.props.location} + history={this.props.history} /> ); })} @@ -1068,6 +1063,8 @@ class MyMarkets extends React.Component { base="others" maxRows={myMarketTab ? 20 : 10} findMarketTab={!myMarketTab} + location={this.props.location} + history={this.props.history} /> ) : null}
    diff --git a/app/components/Exchange/MyOpenOrders.jsx b/app/components/Exchange/MyOpenOrders.jsx index ecfab52d74..f6b3bd0c9f 100644 --- a/app/components/Exchange/MyOpenOrders.jsx +++ b/app/components/Exchange/MyOpenOrders.jsx @@ -1,6 +1,6 @@ import React from "react"; import PropTypes from "prop-types"; -import {Link} from "react-router"; +import {Link} from "react-router-dom"; import counterpart from "counterpart"; import Ps from "perfect-scrollbar"; import OpenSettleOrders from "./OpenSettleOrders"; @@ -67,7 +67,10 @@ class TableHeader extends React.Component { ) : ( - + + + + @@ -195,7 +198,8 @@ class OrderRow extends React.Component { ) : ( - + #{order.id.substring(4)} + {isBid ? ( = 0; i--) { - if (indicators[i].name === changed) { - indicators[i].destroy(); - break; - } - } - } - return false; - } - - if ( - chart && - !utils.are_equal_shallow( - nextProps.indicatorSettings, - this.props.indicatorSettings - ) - ) { - let changed, added, changedSetting; - - for (let key in nextProps.indicatorSettings) { - let change = reduce( - nextProps.indicatorSettings[key], - (total, a, settingKey) => { - let change = - a !== this.props.indicatorSettings[key][settingKey]; - changedSetting = change ? settingKey : changedSetting; - return total - ? total - : a !== - this.props.indicatorSettings[key][settingKey]; - }, - null - ); - - changed = change ? key : changed; - } - - if (changedSetting !== "period") { - let indicators = chart.indicators - ? chart.indicators.allItems - : []; - let options = this.getIndicators(nextProps, changed)[0]; - - for (let i = indicators.length - 1; i >= 0; i--) { - if (indicators[i].name === changed) { - indicators[i].update(options); - break; - } - } - chart.redraw(); - return false; - } - } - - let latestCheck = false; - if ( - nextProps.priceData && - !nextProps.priceData.length && - (nextProps.latest && this.props.latest) - ) { - latestCheck = nextProps.latest.full !== this.props.latest.full; - } - return ( - !utils.are_equal_shallow( - nextProps.priceData, - this.props.priceData - ) || - nextState.lastPointY !== this.state.lastPointY || - nextProps.baseSymbol !== this.props.baseSymbol || - latestCheck || - nextProps.leftOrderBook !== this.props.leftOrderBook || - !utils.are_equal_shallow( - nextProps.indicatorSettings, - this.props.indicatorSettings - ) || - nextProps.verticalOrderbook !== this.props.verticalOrderbook || - nextProps.height !== this.props.height || - nextProps.zoom !== this.props.zoom - ); - } - - constructor() { - super(); - this.state = { - offsetHeight: null, - lastPointY: -100, - close: 0, - open: 0 - }; - } - - componentDidMount() { - this.reflowChart(500); - } - - componentWillReceiveProps(nextProps) { - let height = this.offsetHeight; - this.setState({offsetHeight: height - 10}); - - if ( - this.refs.chart && - (nextProps.verticalOrderbook !== this.props.verticalOrderbook || - nextProps.height !== this.props.height) - ) { - this.reflowChart(100); - } - } - - reflowChart(timeout) { - setTimeout(() => { - if (this.refs.chart) { - this.refs.chart.chart.reflow(); - } - }, timeout); - } - - getIndicators(props, select = false) { - let {indicators, indicatorSettings} = props; - let currentIndicator = []; - - for (let indicator in indicators) { - if (indicators[indicator] && (!select || select === indicator)) { - // console.log(indicator, "params:", indicatorSettings[indicator]); - switch (indicator) { - case "sma": - currentIndicator.push({ - id: "primary", - type: "sma", - params: indicatorSettings[indicator], - tooltip: { - pointFormat: - 'pointFormat SMA: {point.y}
    ' - } - }); - break; - - case "ema": - currentIndicator.push({ - id: "primary", - type: "ema", - params: indicatorSettings[indicator], - styles: { - strokeWidth: 2, - stroke: props.priceData.length - ? "green" - : "black", - dashstyle: "solid" - } - }); - break; - - case "rsi": - currentIndicator.push({ - id: "primary", - type: "rsi", - params: indicatorSettings[indicator], - styles: { - strokeWidth: 2, - stroke: "#A7DACD", - dashstyle: "solid" - }, - yAxis: { - lineWidth: 2, - title: { - text: "RSI", - style: { - color: "#FFFFFF" - } - }, - labels: { - style: { - color: "#FFFFFF" - } - } - } - }); - break; - - case "atr": - currentIndicator.push({ - id: "primary", - type: "atr", - params: indicatorSettings[indicator], - styles: { - strokeWidth: 2, - stroke: "orange", - dashstyle: "solid" - }, - yAxis: { - lineWidth: 2, - title: { - text: "ATR", - style: { - color: "#FFFFFF" - } - }, - labels: { - style: { - color: "#FFFFFF" - } - } - } - }); - break; - - default: - currentIndicator = []; - } - } - } - - return currentIndicator; - } - - render() { - let { - priceData, - volumeData, - quoteSymbol, - baseSymbol, - base, - quote, - marketReady, - indicators, - indicatorSettings, - latest, - bucketSize, - theme - } = this.props; - - let priceSeriesData = cloneDeep(priceData); - let currentIndicator = this.getIndicators(this.props); - - let positiveColor = colors[theme].positiveColor; - let negativeColor = colors[theme].negativeColor; - - if (!priceSeriesData.length && latest) { - let now = new Date().getTime(); - priceSeriesData.push([ - now, - latest.full, - latest.full, - latest.full, - latest.full - ]); - volumeData.push([now, 0]); - for (let i = 1; i < 100; i++) { - priceSeriesData.unshift([ - now - bucketSize * 1000 * i, - latest.full, - latest.full, - latest.full, - latest.full - ]); - volumeData.unshift([now - bucketSize * 1000 * i, 0]); - } - // is this required? - positiveColor = "black"; - negativeColor = "black"; - } - - // Find max volume - // let maxVolume = 0; - let volumeColors = [], - colorByPoint = false; - - // if (volumeData.length === priceSeriesData.length) { - // colorByPoint = true; - // } - // for (let i = 0; i < volumeData.length; i++) { - // maxVolume = Math.max(maxVolume, volumeData[i][1]); - // if (colorByPoint) { - // volumeColors.push(priceSeriesData[i][1] <= priceSeriesData[i][4] ? positiveColor : negativeColor); - // } - // } - - // Find highest price - // let maxPrice = 0; - // if (priceSeriesData.length) { - // for (let i = 0; i < priceSeriesData.length; i++) { - // maxPrice = Math.max(maxPrice, priceSeriesData[i][2]); - // } - // } - - let config = { - chart: { - backgroundColor: "rgba(255, 0, 0, 0)", - dataGrouping: { - enabled: false - }, - pinchType: "x", - spacing: [20, 10, 5, 10], - alignTicks: false - }, - - indicators: priceSeriesData.length ? currentIndicator : [], - title: { - text: null - }, - credits: { - enabled: false - }, - legend: { - enabled: false - }, - scrollbar: { - enabled: false - }, - navigator: { - enabled: true, - height: 30, - margin: 10 - }, - rangeSelector: { - enabled: false - }, - plotOptions: { - candlestick: { - oxymoronic: false, - animation: false, - color: negativeColor, - lineColor: negativeColor, - upColor: positiveColor, - upLineColor: positiveColor, - lineWidth: 2 - }, - column: { - animation: false, - borderColor: "#000000" - }, - series: { - marker: { - enabled: false - }, - enableMouseTracking: true - } - }, - tooltip: { - enabledIndicators: true, - shared: true, - backgroundColor: colors[theme].tooltipBackgroundColor, - borderWidth: 0, - shadow: false, - useHTML: true, - padding: 0, - formatter: function() { - let price_dec = base.get("precision"); - let vol_dec = quote.get("precision"); - let time = Highcharts.dateFormat("%Y-%m-%d %H:%M", this.x); - - if (!this.points || this.points.length === 0) { - return ""; - } - - let TA = - this.points[1] && "indicators" in this.points[1] - ? reduce( - this.points[1].indicators, - (finalString, indicator, key) => { - return ( - finalString + - "" + - key.toUpperCase() + - "" + - ": " + - Highcharts.numberFormat( - indicator[1], - price_dec, - ".", - "," - ) + - " " - ); - }, - "" - ) - : ""; - - return ( - "" + - "Open:   " + - Highcharts.numberFormat( - this.points[1].point.open, - price_dec, - ".", - "," - ) + - "  High:   " + - Highcharts.numberFormat( - this.points[1].point.high, - price_dec, - ".", - "," - ) + - "  Time:   " + - time + - "
    Close:  " + - Highcharts.numberFormat( - this.points[1].point.close, - price_dec, - ".", - "," - ) + - "  Low:    " + - Highcharts.numberFormat( - this.points[1].point.low, - price_dec, - ".", - "," - ) + - "   Vol:      " + - Highcharts.numberFormat( - this.points[1] ? this.points[0].point.y : 0, - vol_dec, - ".", - "," - ) + - "  " + - quoteSymbol + - "
    " + - TA + - "
    " - ); - }, - positioner: function() { - return {x: 50, y: -5}; - } - }, - series: [ - { - type: "column", - name: "Volume", - data: volumeData, - color: colors[theme].volumeColor, - yAxis: 1 - }, - { - id: "primary", - type: "candlestick", - name: "Price", - data: priceSeriesData - } - ], - yAxis: [ - { - labels: { - style: { - color: colors[theme].axisLabelsColor - }, - align: "left", - x: 10, - format: "{value:,." + base.get("precision") + "f}" - }, - opposite: true, - title: { - text: null, - style: { - color: colors[theme].axisLabelsColor - } - }, - offset: 5, - lineWidth: 1, - lineColor: "rgba(183, 183, 183, 0.29)", - gridLineWidth: 0, - plotLines: [], - crosshair: { - snap: false - }, - startOnTick: false, - endOnTick: true, - showLastLabel: true, - maxPadding: 0, - currentPriceIndicator: { - precision: base.get("precision"), - backgroundColor: "#C38B8B", - borderColor: "#000000", - lineColor: "#C38B8B", - lineDashStyle: "Solid", - lineOpacity: 0.8, - enabled: priceSeriesData.length > 0 && marketReady, - style: { - color: "#ffffff", - fontSize: "10px" - }, - x: -30, - y: 0, - zIndex: 99, - width: 80 - }, - height: "90%" - }, - { - labels: { - style: { - color: colors[theme].axisLabelsColor - }, - align: "left", - x: 10, - formatter: function() { - if (this.value !== 0) { - if (this.value > 1000000) { - return ( - Highcharts.numberFormat( - this.value / 1000, - 2 - ) + "M" - ); - } else if (this.value > 1000) { - return ( - Highcharts.numberFormat( - this.value / 1000, - 1 - ) + "k" - ); - } else { - return this.value; - } - } else { - return null; - } - } - }, - opposite: false, - offset: 5, - gridLineWidth: 0, - lineWidth: 1, - lineColor: "rgba(183, 183, 183, 0.29)", - endOnTick: true, - showLastLabel: true, - title: { - text: null, - style: { - color: "#FFFFFF" - } - }, - showFirstLabel: true, - min: 0, - crosshair: { - snap: false - }, - height: "50%", - top: "50%" - } - ], - xAxis: { - type: "datetime", - lineWidth: 1, - lineColor: colors[theme].axisLineColor, - labels: { - style: { - color: colors[theme].axisLabelsColor - } - }, - title: { - text: null - }, - plotLines: [], - min: - this.props.zoom === "all" - ? null - : new Date().getTime() - 1000 * this.props.zoom - } - }; - - // Set up/down colors on volume series - if (colorByPoint) { - config.plotOptions.column.colorByPoint = true; - config.plotOptions.column.colors = volumeColors; - } - - // Add plotline if defined - // if (this.props.plotLine) { - // config.xAxis.plotLines.push({ - // color: "red", - // id: "plot_line", - // dashStyle: "longdashdot", - // value: this.props.plotLine, - // width: 1, - // zIndex: 5 - // }); - // } - - // Fix the height if defined, if not use offsetHeight - if (this.props.height) { - config.chart.height = - this.props.height + 20 * currentIndicator.length; - } else if (this.state.offsetHeight) { - config.chart.height = this.state.offsetHeight; - } - - // Add onClick eventlistener if defined - if (this.props.onClick) { - config.chart.events = { - click: this.props.onClick - }; - } - - let boxHeight = 20; - - return ( -
    -
    -
    - -
    -
    - - -
    -
    - + -
    -
    -
    - {!priceSeriesData.length ? ( - - - - ) : null} -
    - {priceSeriesData && volumeData ? ( - - ) : null} -
    -
    -
    - ); - } -} - -PriceChart.defaultProps = { - flat_bids: [], - flat_asks: [], - orders: {}, - quoteSymbol: "", - baseSymbol: "" -}; - -PriceChart.propTypes = { - flat_bids: PropTypes.array.isRequired, - flat_asks: PropTypes.array.isRequired, - orders: PropTypes.object.isRequired, - baseSymbol: PropTypes.string.isRequired, - quoteSymbol: PropTypes.string.isRequired -}; - -export default PriceChart; diff --git a/app/components/Exchange/PriceChartD3.jsx b/app/components/Exchange/PriceChartD3.jsx deleted file mode 100644 index 0463775bc2..0000000000 --- a/app/components/Exchange/PriceChartD3.jsx +++ /dev/null @@ -1,1185 +0,0 @@ -import React from "react"; -import {format} from "d3-format"; -import {timeFormat} from "d3-time-format"; -import Translate from "react-translate-component"; -import { - ChartCanvas, - Chart, - series, - scale, - coordinates, - tooltip, - axes, - indicator, - helper, - interactive -} from "react-stockcharts"; - -const { - CandlestickSeries, - BarSeries, - LineSeries, - AreaSeries, - BollingerSeries, - MACDSeries -} = series; -const {XAxis, YAxis} = axes; -const {fitWidth} = helper; -const {discontinuousTimeScaleProvider} = scale; -const {EdgeIndicator} = coordinates; -const {ema, sma, macd, bollingerBand} = indicator; -const { - CrossHairCursor, - MouseCoordinateX, - MouseCoordinateY, - CurrentCoordinate -} = coordinates; -const {FibonacciRetracement, TrendLine} = interactive; -const { - OHLCTooltip, - MovingAverageTooltip, - BollingerBandTooltip, - MACDTooltip -} = tooltip; -import colors from "assets/colors"; -import {cloneDeep} from "lodash"; -import utils from "common/utils"; -import cnames from "classnames"; -import counterpart from "counterpart"; -import Icon from "../Icon/Icon"; - -class CandleStickChartWithZoomPan extends React.Component { - constructor(props) { - super(); - - const timeFormatter = timeFormat("%Y-%m-%d %H:%M"); - const {volumeFormat, priceFormat} = this._getFormats(props); - this.state = { - enableTrendLine: false, - enableFib: false, - tools: [], - timeFormatter, - volumeFormat, - priceFormat, - margin: {left: 75, right: 75, top: 20, bottom: 30}, - calculators: this._getCalculators(props) - }; - - this.onTrendLineComplete = this.onTrendLineComplete.bind(this); - this.onFibComplete = this.onFibComplete.bind(this); - this.onKeyPress = this.onKeyPress.bind(this); - } - - componentDidMount() { - document.addEventListener("keyup", this.onKeyPress, { - capture: false, - passive: true - }); - } - componentWillUnmount() { - document.removeEventListener("keyup", this.onKeyPress); - } - - _getFormats(props = this.props) { - const pricePrecision = props.base.get("precision"); - const volumePrecision = props.quote.get("precision"); - const priceFormat = format( - `.${ - props.latest && props.latest.full && props.latest.full >= 0.8 - ? 2 - : Math.min(6, pricePrecision) - }f` - ); - const volumeFormat = format(`.${Math.min(3, volumePrecision)}s`); - return {priceFormat, volumeFormat}; - } - - onTrendLineComplete() { - this.setState({ - enableTrendLine: false - }); - } - - onFibComplete() { - this.setState({ - enableFib: false - }); - } - - onKeyPress(e) { - const tools = cloneDeep(this.state.tools); - const ref = this.refs[tools[tools.length - 1]]; - var keyCode = e.which; - switch (keyCode) { - case 46: { - // DEL - if (ref) ref.removeLast(); - tools.pop(); - this.setState({tools}); - break; - } - case 27: { - // ESC - if (ref) ref.terminate(); - try { - // modal uses escape event as well, and this line throws an exception - this.setState({ - [enableFib]: false - }); - } catch (e) {} - break; - } - } - } - - componentWillReceiveProps(np) { - if (np.base !== this.props.base || np.quote !== this.props.quote) { - this.setState(this._getFormats(np)); - } - - let tools = cloneDeep(this.state.tools); - if (np.tools && np.tools.trendline) { - this.setState({enableTrendLine: true}); - tools.push("enableTrendLine"); - } - if (np.tools && np.tools.fib) { - this.setState({enableFib: true}); - tools.push("enableFib"); - } - this.setState({tools}); - - if ( - !utils.are_equal_shallow(np.indicators, this.props.indicators) || - !utils.are_equal_shallow( - np.indicatorSettings, - this.props.indicatorSettings - ) - ) { - this.setState({calculators: this._getCalculators(np)}); - } - } - - _getThemeColors(props = this.props) { - return colors[props.theme]; - } - - _getCalculators(props = this.props) { - const {positiveColor, negativeColor} = this._getThemeColors(props); - const {indicatorSettings} = props; - const calculators = {}; - - calculators.sma = sma() - .windowSize(parseInt(indicatorSettings["sma"], 10)) - .sourcePath("close") - .stroke("#1f77b4") - .fill("#1f77b4") - .merge((d, c) => { - d.sma = c; - }) - .accessor(d => d.sma); - - calculators.ema1 = ema() - .windowSize(parseInt(indicatorSettings["ema1"], 10)) - .merge((d, c) => { - d.ema1 = c; - }) - .accessor(d => d.ema1); - - calculators.ema2 = ema() - .windowSize(parseInt(indicatorSettings["ema2"], 10)) - .merge((d, c) => { - d.ema2 = c; - }) - .accessor(d => d.ema2); - - calculators.smaVolume = sma() - .windowSize(parseInt(indicatorSettings["smaVolume"], 10)) - .sourcePath("volume") - .merge((d, c) => { - d.smaVolume = c; - }) - .stroke("#1f77b4") - .fill("#1f77b4") - .accessor(d => d.smaVolume); - - calculators.bb = bollingerBand() - .merge((d, c) => { - d.bb = c; - }) - .accessor(d => d.bb); - - calculators.macd = macd() - .fast(12) - .slow(26) - .signal(9) - .stroke({macd: negativeColor, signal: positiveColor}) - .merge((d, c) => { - d.macd = c; - }) - .accessor(d => d.macd); - - return calculators; - } - - _renderVolumeChart(chartMultiplier) { - const {height, indicators} = this.props; - const {timeFormatter, volumeFormat, calculators} = this.state; - const { - axisLineColor, - volumeColor, - indicatorLineColor - } = this._getThemeColors(); - - return ( - d.volume, calculators.smaVolume.accessor()]} - height={height * 0.2} - origin={(w, h) => [0, h - chartMultiplier * height * 0.2]} - > - {indicators.macd ? null : ( - - )} - - - {indicators.macd ? null : ( - - )} - - - - - d.volume} fill={volumeColor} /> - {indicators.smaVolume ? ( - - ) : null} - - {indicators.smaVolume ? ( - - ) : null} - d.volume} - fill={volumeColor} - /> - - d.volume} - displayFormat={volumeFormat} - fill="#0F0F0F" - /> - d.volume} - displayFormat={volumeFormat} - fill="#0F0F0F" - /> - - {indicators.smaVolume ? ( - - ) : null} - {indicators.smaVolume ? ( - - ) : null} - - ); - } - - _renderCandleStickChart(chartMultiplier, maCalcs, last) { - const {height, width, showVolumeChart, indicators} = this.props; - const { - timeFormatter, - volumeFormat, - priceFormat, - margin, - enableTrendLine, - enableFib, - calculators - } = this.state; - const { - positiveColor, - negativeColor, - strokeColor, - axisLineColor, - indicatorLineColor - } = this._getThemeColors(); - - let gridWidth = width - margin.left - margin.right; - - let showGrid = true; - let yGrid = showGrid - ? {innerTickSize: -1 * gridWidth, tickStrokeOpacity: 0.1} - : {}; - - return ( - [d.high, d.low], - calculators.ema1.accessor(), - calculators.ema2.accessor(), - calculators.sma.accessor() - ]} - padding={{top: 10, bottom: 20}} - > - {indicators.macd || showVolumeChart ? null : ( - - )} - - - {indicators.macd || showVolumeChart ? null : ( - - )} - - - - - - - d.close > d.open ? positiveColor : negativeColor - } - fill={d => - d.close > d.open ? positiveColor : negativeColor - } - stroke={d => - Math.abs(d.close - d.open) <= last.high / 200 - ? strokeColor || "#000" - : "#000" - } - opacity={0.8} - /> - {indicators.bb ? ( - - ) : null} - - {indicators.sma ? ( - - ) : null} - {indicators.ema1 ? ( - - ) : null} - {indicators.ema2 ? ( - - ) : null} - - {indicators.sma ? ( - - ) : null} - {indicators.ema1 ? ( - - ) : null} - {indicators.ema2 ? ( - - ) : null} - - d.close} - displayFormat={priceFormat} - fill={d => - d.close > d.open ? positiveColor : negativeColor - } - /> - d.close} - displayFormat={priceFormat} - fill={d => - d.close > d.open ? positiveColor : negativeColor - } - /> - - - - {maCalcs.length ? ( - - ) : null} - - {indicators.bb ? ( - - ) : null} - - [d.high, d.low]} - onComplete={this.onTrendLineComplete} - stroke={axisLineColor} - fontStroke={axisLineColor} - /> - - - - ); - } - - render() { - const { - width, - priceData, - height, - ratio, - theme, - zoom, - indicators, - showVolumeChart, - enableChartClamp - } = this.props; - const { - timeFormatter, - enableFib, - enableTrendLine, - margin, - calculators - } = this.state; - const themeColors = colors[theme]; - const {axisLineColor, indicatorLineColor} = themeColors; - let chartMultiplier = showVolumeChart ? 1 : 0; // Used to adjust the height of the charts and their positioning - // if (indicators.bb) calc.push(bb); - - // Indicator calculators - let calc = [], - maCalcs = [], - tooltipIncludes = ["sma", "ema1", "ema2", "smaVolume"]; - - // if (showVolumeChart) maCalcs.push(calculators["smaVolume"]); - - for (let i in indicators) { - if (indicators[i]) { - // Don't add volume indicators if the volume chart is off - if ( - i.toLowerCase().indexOf("volume") !== -1 && - !showVolumeChart - ) - continue; - // Add active calculators - calc.push(calculators[i]); - // Add calculators needing tooltips - if (tooltipIncludes.indexOf(i) !== -1) - maCalcs.push(calculators[i]); - } - } - if (indicators["macd"]) chartMultiplier++; - - const filterDate = new Date(new Date().getTime() - zoom * 1000); - const filteredData = - zoom === "all" - ? priceData - : priceData.filter(a => { - return a.date > filterDate; - }); - const last = filteredData[filteredData.length - 1] || {high: 1}; - return ( - d.date} - xScaleProvider={discontinuousTimeScaleProvider} - xExtents={[ - filteredData[0].date, - filteredData[filteredData.length - 1].date - ]} - type="hybrid" - className="ps-child no-overflow Stockcharts__wrapper ps-must-propagate" - drawMode={enableTrendLine || enableFib} - > - > - {showVolumeChart ? ( - this._renderVolumeChart(chartMultiplier) - ) : ( - - )} - {this._renderCandleStickChart(chartMultiplier, maCalcs, last)} - {indicators.macd ? ( - [ - 0, - h - - (chartMultiplier - (showVolumeChart ? 1 : 0)) * - height * - 0.2 - ]} - padding={{top: 40, bottom: 10}} - > - - - - - - - - - - ) : ( - - ) /* Need to return an empty element here, null triggers an error */} - - - ); - } -} - -CandleStickChartWithZoomPan = fitWidth(CandleStickChartWithZoomPan); -export default class Wrapper extends React.Component { - constructor() { - super(); - - this.state = { - dropdowns: { - indicators: false, - tools: false, - settings: false - } - }; - - this._onInputHeight = this._onInputHeight.bind(this); - this._listener = this._listener.bind(this); - } - - shouldComponentUpdate(np, ns) { - if (!np.marketReady && !this.props.marketReady) return false; - if (!np.priceData.length && !this.props.priceData.length) return false; - return ( - !utils.are_equal_shallow(np.priceData, this.props.priceData) || - !utils.are_equal_shallow(np.indicators, this.props.indicators) || - !utils.are_equal_shallow( - np.indicatorSettings, - this.props.indicatorSettings - ) || - !utils.are_equal_shallow(np.tools, this.props.tools) || - !utils.are_equal_shallow(ns, this.state) || - np.height !== this.props.height || - np.chartHeight !== this.props.chartHeight || - np.width !== this.props.width || - np.leftOrderBook !== this.props.leftOrderBook || - np.zoom !== this.props.zoom || - np.showVolumeChart !== this.props.showVolumeChart || - np.enableChartClamp !== this.props.enableChartClamp - ); - } - - componentDidUpdate(prevProps) { - if (prevProps.leftOrderBook !== this.props.leftOrderBook) { - if (this.refs.FitWidth) this.refs.FitWidth.handleWindowResize(); - } - } - - componentWillUnmount() { - document.removeEventListener("click", this._listener); - } - - _toggleTools(key) { - this._resetDropdowns(); - this.props.onChangeTool(key); - this.forceUpdate(); - } - - _changeSettings(payload, e) { - e.persist(); - e.stopPropagation(); - e.nativeEvent.stopImmediatePropagation(); - } - - _onInputHeight(e) { - const val = e.target.value; - this.props.onChangeChartHeight({value: parseInt(val, 10)}); - } - - _toggleDropdown(key, e) { - e.stopPropagation(); - const {dropdowns} = this.state; - let newState = {}; - for (let k in this.state.dropdowns) { - if (k === key) newState[k] = !dropdowns[k]; - else newState[k] = false; - } - if (newState[key]) { - document.addEventListener("click", this._listener, { - capture: false, - passive: true - }); - } - this.setState({dropdowns: newState}); - } - - _listener() { - this._resetDropdowns(); - document.removeEventListener("click", this._listener); - } - - _stopPropagation(e) { - e.stopPropagation(); - e.nativeEvent.stopImmediatePropagation(); - } - - _resetDropdowns() { - let dropdowns = {}; - for (let key in this.state.dropdowns) { - dropdowns[key] = false; - } - this.setState({dropdowns}); - } - - render() { - const { - currentPeriod, - buckets, - bucketSize, - indicators, - indicatorSettings - } = this.props; - const {dropdowns} = this.state; - - // Lower bar - let bucketText = function(size) { - if (size === "all") { - return counterpart.translate("exchange.zoom_all"); - } else if (size < 60) { - return size + "s"; - } else if (size < 3600) { - return size / 60 + "m"; - } else if (size < 86400) { - return size / 3600 + "h"; - } else if (size < 604800) { - return size / 86400 + "d"; - } else if (size < 2592000) { - return size / 604800 + "w"; - } else { - return size / 2592000 + "m"; - } - }; - - let bucketOptions = buckets - .filter(bucket => { - return bucket > 60 * 4; - }) - .map(bucket => { - return ( -
    - {bucketText(bucket)} -
    - ); - }); - - let oneHour = 3600, - oneDay = oneHour * 24; - let zoomPeriods = [ - oneHour * 6, - oneHour * 48, - oneHour * 48 * 2, - oneHour * 24 * 7, - oneDay * 14, - oneDay * 30, - oneDay * 30 * 3, - "all" - ]; - - let zoomOptions = zoomPeriods.map(period => { - return ( -
    - {bucketText(period)} -
    - ); - }); - - /* Indicators dropdown */ - const indicatorOptionsVolume = []; - const indicatorOptionsPrice = Object.keys(indicators) - .map(i => { - let hasSetting = i in indicatorSettings; - let settingInput = hasSetting ? ( -
    -
    - : -
    - -
    - ) : null; - - if (i.toLowerCase().indexOf("volume") !== -1) { - if (!this.props.showVolumeChart) return null; - indicatorOptionsVolume.push( -
  • - -
    - -
    - {settingInput} -
  • - ); - } else { - return ( -
  • - -
    - -
    - {settingInput} -
  • - ); - } - }) - .filter(a => !!a); - - /* Tools dropdown */ - const toolsOptions = Object.keys(this.props.tools).map(i => { - return ( -
  • -
    - -
    -
  • - ); - }); - - /* Tools dropdown */ - const settingsOptions = ["volume", "height", "clamp_chart"].map(i => { - let content; - switch (i) { - case "height": { - content = ( -
  • -
    -
    - : -
    -
    -
    - -
    -
  • - ); - break; - } - - case "volume": { - content = ( -
  • - -
    - -
    -
  • - ); - break; - } - - case "clamp_chart": { - content = ( -
  • - -
    - -
    -
  • - ); - break; - } - - default: { - content =
  • TBD
  • ; - } - } - return content; - }); - - if (!this.props.priceData.length) { - return ( -
    -
    - -
    -
    - ); - } - - const translator = require("counterpart"); - - return ( -
    - -
    -
      - {/* Chart controls */} -
    • - - - : - - {zoomOptions} - -
    • -
    • - - - : - - {bucketOptions} - -
    • - -
    • -
      - -
      - {dropdowns.indicators ? ( -
      -
        -
      • - -
      • - {indicatorOptionsPrice} - - {indicatorOptionsVolume.length ? ( -
      • - -
      • - ) : null} - {indicatorOptionsVolume} -
      -
      - ) : null} -
    • - -
    • -
      - -
      - {dropdowns.tools ? ( -
      -
        {toolsOptions}
      -
      - ) : null} -
    • - -
    • -
      - -
      - {dropdowns.settings ? ( -
      -
        {settingsOptions}
      -
      - ) : null} -
    • -
    -
    -
    - ); - } -} diff --git a/app/components/Exchange/TradingViewPriceChart.jsx b/app/components/Exchange/TradingViewPriceChart.jsx index eaaf66b1a7..46ee366dc4 100644 --- a/app/components/Exchange/TradingViewPriceChart.jsx +++ b/app/components/Exchange/TradingViewPriceChart.jsx @@ -41,7 +41,7 @@ export default class TradingViewPriceChart extends React.Component { }/charting_library/`, datafeed: dataFeed, container_id: "tv_chart", - charts_storage_url: "http://saveload.tradingview.com", + charts_storage_url: "https://saveload.tradingview.com", charts_storage_api_version: "1.1", client_id: "tradingview.com", user_id: "public_user_id", @@ -58,11 +58,12 @@ export default class TradingViewPriceChart extends React.Component { "scalesProperties.lineColor": themeColors.axisLineColor, "scalesProperties.textColor": themeColors.textColor }, - theme: props.theme, // don't think this does anything yet - custom_css_url: "custom-css.css", - enabled_features: ["study_templates"], + custom_css_url: props.theme + ".css", + enabled_features: [ + "study_templates", + "keep_left_toolbar_visible_on_small_screens" + ], disabled_features: [ - "use_localstorage_for_settings", "header_saveload", "symbol_info", "symbol_search_hot_key", diff --git a/app/components/Explorer/Accounts.jsx b/app/components/Explorer/Accounts.jsx index 181565094d..2fb77c2738 100644 --- a/app/components/Explorer/Accounts.jsx +++ b/app/components/Explorer/Accounts.jsx @@ -1,6 +1,6 @@ import React from "react"; import PropTypes from "prop-types"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Immutable from "immutable"; import Translate from "react-translate-component"; import AccountActions from "actions/AccountActions"; diff --git a/app/components/Explorer/AccountsContainer.jsx b/app/components/Explorer/AccountsContainer.jsx index 2ca36140af..d2c9bc15b5 100644 --- a/app/components/Explorer/AccountsContainer.jsx +++ b/app/components/Explorer/AccountsContainer.jsx @@ -2,11 +2,10 @@ import React from "react"; import AccountStore from "stores/AccountStore"; import AltContainer from "alt-container"; import Accounts from "./Accounts"; -import Explorer from "./Explorer"; class AccountsContainer extends React.Component { render() { - let content = ( + return ( ); - - return ; } } diff --git a/app/components/Explorer/Assets.jsx b/app/components/Explorer/Assets.jsx index 49cc16f08f..86f097b00f 100644 --- a/app/components/Explorer/Assets.jsx +++ b/app/components/Explorer/Assets.jsx @@ -2,7 +2,7 @@ import React from "react"; import PropTypes from "prop-types"; import AssetActions from "actions/AssetActions"; import SettingsActions from "actions/SettingsActions"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Immutable from "immutable"; import Translate from "react-translate-component"; import LinkToAccountById from "../Utility/LinkToAccountById"; diff --git a/app/components/Explorer/AssetsContainer.jsx b/app/components/Explorer/AssetsContainer.jsx index 5c53083f37..79faaa1676 100644 --- a/app/components/Explorer/AssetsContainer.jsx +++ b/app/components/Explorer/AssetsContainer.jsx @@ -3,11 +3,10 @@ import AssetStore from "stores/AssetStore"; import SettingsStore from "stores/SettingsStore"; import AltContainer from "alt-container"; import Assets from "./Assets"; -import Explorer from "./Explorer"; class AssetsContainer extends React.Component { render() { - let content = ( + return ( ); - - return ; } } diff --git a/app/components/Explorer/Blocks.jsx b/app/components/Explorer/Blocks.jsx index 73f67411da..6c3b08f51c 100644 --- a/app/components/Explorer/Blocks.jsx +++ b/app/components/Explorer/Blocks.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import BlockchainActions from "actions/BlockchainActions"; import Translate from "react-translate-component"; import {FormattedDate} from "react-intl"; @@ -513,7 +513,7 @@ class Blocks extends React.Component {
    - +
    @@ -531,7 +531,7 @@ class Blocks extends React.Component { }} ref="operations" > - +
    {transactions}
    @@ -558,7 +558,7 @@ class Blocks extends React.Component { }} ref="blocks" > - +
    ]","i"),be=/checked\s*(?:[^=]|=\s*.checked.)/i,_e=/\/(java|ecma)script/i,we=/^\s*",""],legend:[1,"
    ","
    "],thead:[1,"
    diff --git a/app/components/Explorer/BlocksContainer.jsx b/app/components/Explorer/BlocksContainer.jsx index b90c117d1c..6250231440 100644 --- a/app/components/Explorer/BlocksContainer.jsx +++ b/app/components/Explorer/BlocksContainer.jsx @@ -2,11 +2,10 @@ import React from "react"; import BlockchainStore from "stores/BlockchainStore"; import AltContainer from "alt-container"; import Blocks from "./Blocks"; -import Explorer from "./Explorer"; class BlocksContainer extends React.Component { render() { - let content = ( + return ( ); - - return ; } } diff --git a/app/components/Explorer/CommitteeMembers.jsx b/app/components/Explorer/CommitteeMembers.jsx index 22fb6775bb..a442eec772 100644 --- a/app/components/Explorer/CommitteeMembers.jsx +++ b/app/components/Explorer/CommitteeMembers.jsx @@ -9,21 +9,16 @@ import Translate from "react-translate-component"; import {connect} from "alt-react"; import SettingsActions from "actions/SettingsActions"; import SettingsStore from "stores/SettingsStore"; -import Explorer from "./Explorer"; -import PropTypes from "prop-types"; +import {withRouter} from "react-router-dom"; class CommitteeMemberCard extends React.Component { static propTypes = { committee_member: ChainTypes.ChainAccount.isRequired }; - static contextTypes = { - router: PropTypes.object.isRequired - }; - _onCardClick(e) { e.preventDefault(); - this.context.router.push( + this.props.history.push( `/account/${this.props.committee_member.get("name")}` ); } @@ -74,19 +69,16 @@ class CommitteeMemberCard extends React.Component { } } CommitteeMemberCard = BindToChainState(CommitteeMemberCard); +CommitteeMemberCard = withRouter(CommitteeMemberCard); class CommitteeMemberRow extends React.Component { static propTypes = { committee_member: ChainTypes.ChainAccount.isRequired }; - static contextTypes = { - router: PropTypes.object.isRequired - }; - _onRowClick(e) { e.preventDefault(); - this.context.router.push( + this.props.history.push( `/account/${this.props.committee_member.get("name")}` ); } @@ -126,6 +118,7 @@ class CommitteeMemberRow extends React.Component { } } CommitteeMemberRow = BindToChainState(CommitteeMemberRow); +CommitteeMemberRow = withRouter(CommitteeMemberRow); class CommitteeMemberList extends React.Component { static propTypes = { @@ -365,7 +358,7 @@ class CommitteeMembers extends React.Component { } } - let content = ( + return (
    @@ -421,8 +414,6 @@ class CommitteeMembers extends React.Component {
    ); - - return ; } } CommitteeMembers = BindToChainState(CommitteeMembers); diff --git a/app/components/Explorer/Explorer.jsx b/app/components/Explorer/Explorer.jsx index c1aecd8171..17c0090deb 100644 --- a/app/components/Explorer/Explorer.jsx +++ b/app/components/Explorer/Explorer.jsx @@ -1,18 +1,14 @@ import React from "react"; import {Tabs, Tab} from "../Utility/Tabs"; -import PropTypes from "prop-types"; +import Witnesses from "./Witnesses"; +import CommitteeMembers from "./CommitteeMembers"; +import FeesContainer from "../Blockchain/FeesContainer"; +import BlocksContainer from "./BlocksContainer"; +import AssetsContainer from "./AssetsContainer"; +import AccountsContainer from "./AccountsContainer"; +import MarketsContainer from "../Exchange/MarketsContainer"; class Explorer extends React.Component { - static propTypes = { - tab: PropTypes.string, - content: PropTypes.object - }; - - static defaultProps = { - tab: "blocks", - content: null - }; - constructor(props) { super(props); @@ -21,54 +17,64 @@ class Explorer extends React.Component { { name: "blocks", link: "/explorer/blocks", - translate: "explorer.blocks.title" + translate: "explorer.blocks.title", + content: BlocksContainer }, { name: "assets", link: "/explorer/assets", - translate: "explorer.assets.title" + translate: "explorer.assets.title", + content: AssetsContainer }, { name: "accounts", link: "/explorer/accounts", - translate: "explorer.accounts.title" + translate: "explorer.accounts.title", + content: AccountsContainer }, { name: "witnesses", link: "/explorer/witnesses", - translate: "explorer.witnesses.title" + translate: "explorer.witnesses.title", + content: Witnesses }, { name: "committee_members", link: "/explorer/committee-members", - translate: "explorer.committee_members.title" + translate: "explorer.committee_members.title", + content: CommitteeMembers }, { name: "markets", link: "/explorer/markets", - translate: "markets.title" + translate: "markets.title", + content: MarketsContainer }, - {name: "fees", link: "/explorer/fees", translate: "fees.title"} + { + name: "fees", + link: "/explorer/fees", + translate: "fees.title", + content: FeesContainer + } ] }; } render() { - let defaultActiveTab = this.state.tabs.findIndex( - t => t.name === this.props.tab - ); + let {tab} = this.props.match.params; + let defaultActiveTab = this.state.tabs.findIndex(t => t.name === tab); let tabs = []; for (var i = 0; i < this.state.tabs.length; i++) { let currentTab = this.state.tabs[i]; - let tabContent = defaultActiveTab == i ? this.props.content : null; + let TabContent = currentTab.content; let isLinkTo = defaultActiveTab == i ? "" : currentTab.link; tabs.push( - {tabContent} + ); } @@ -77,7 +83,7 @@ class Explorer extends React.Component { ; - - return ; - } -} - -export default FeesContainer; diff --git a/app/components/Explorer/MarketsContainer.jsx b/app/components/Explorer/MarketsContainer.jsx deleted file mode 100644 index 92b0a366a5..0000000000 --- a/app/components/Explorer/MarketsContainer.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react"; -import Explorer from "./Explorer"; -import RealMarketsContainer from "../Exchange/MarketsContainer"; - -class MarketsContainer extends React.Component { - render() { - let content = ; - - return ; - } -} - -export default MarketsContainer; diff --git a/app/components/Explorer/Witnesses.jsx b/app/components/Explorer/Witnesses.jsx index 8eb8eb82f2..f784f196ae 100644 --- a/app/components/Explorer/Witnesses.jsx +++ b/app/components/Explorer/Witnesses.jsx @@ -11,8 +11,7 @@ import {connect} from "alt-react"; import SettingsActions from "actions/SettingsActions"; import SettingsStore from "stores/SettingsStore"; import classNames from "classnames"; -import Explorer from "./Explorer"; -import PropTypes from "prop-types"; +import {withRouter} from "react-router-dom"; require("./witnesses.scss"); @@ -21,13 +20,9 @@ class WitnessCard extends React.Component { witness: ChainTypes.ChainAccount.isRequired }; - static contextTypes = { - router: PropTypes.object.isRequired - }; - _onCardClick(e) { e.preventDefault(); - this.context.router.push(`/account/${this.props.witness.get("name")}`); + this.props.history.push(`/account/${this.props.witness.get("name")}`); } render() { @@ -104,19 +99,16 @@ class WitnessCard extends React.Component { } } WitnessCard = BindToChainState(WitnessCard); +WitnessCard = withRouter(WitnessCard); class WitnessRow extends React.Component { static propTypes = { witness: ChainTypes.ChainAccount.isRequired }; - static contextTypes = { - router: PropTypes.object.isRequired - }; - _onRowClick(e) { e.preventDefault(); - this.context.router.push(`/account/${this.props.witness.get("name")}`); + this.props.history.push(`/account/${this.props.witness.get("name")}`); } // componentWillUnmount() { @@ -180,6 +172,7 @@ class WitnessRow extends React.Component { } } WitnessRow = BindToChainState(WitnessRow); +WitnessRow = withRouter(WitnessRow); class WitnessList extends React.Component { static propTypes = { @@ -436,7 +429,7 @@ class Witnesses extends React.Component { ); } - let content = ( + return (
    @@ -570,7 +563,6 @@ class Witnesses extends React.Component {
    ); - return ; } } Witnesses = BindToChainState(Witnesses); diff --git a/app/components/Forms/AccountNameInput.jsx b/app/components/Forms/AccountNameInput.jsx index 6ce9a70d76..645ad72f1c 100644 --- a/app/components/Forms/AccountNameInput.jsx +++ b/app/components/Forms/AccountNameInput.jsx @@ -159,7 +159,7 @@ class AccountNameInput extends React.Component { id="username" type="text" ref="input" - autoComplete="off" + autoComplete="username" placeholder={null} onChange={this.handleChange} onKeyDown={this.onKeyDown} diff --git a/app/components/Forms/PasswordInput.jsx b/app/components/Forms/PasswordInput.jsx index f9bb611ce7..6f84725488 100644 --- a/app/components/Forms/PasswordInput.jsx +++ b/app/components/Forms/PasswordInput.jsx @@ -179,11 +179,11 @@ class PasswordInput extends Component { ? 0 : null }} - id="password" + id="current-password" name="password" type="password" ref="password" - autoComplete="off" + autoComplete="current-password" onChange={this.handleChange} onKeyDown={this.onKeyDown} /> @@ -220,7 +220,7 @@ class PasswordInput extends Component { name="confirm_password" type="password" ref="confirm_password" - autoComplete="off" + autoComplete="confirm-password" onChange={this.handleChange} /> {confirmMatch ? ( diff --git a/app/components/Help.jsx b/app/components/Help.jsx index d047f88910..001073c3c7 100644 --- a/app/components/Help.jsx +++ b/app/components/Help.jsx @@ -4,9 +4,10 @@ import {toPairs} from "lodash-es"; class Help extends React.Component { render() { - let path = toPairs(this.props.params) + let path = toPairs(this.props.match.params) .map(p => p[1]) .join("/"); + return (
    diff --git a/app/components/InitError.jsx b/app/components/InitError.jsx index d164bf1606..d92ff27eb6 100644 --- a/app/components/InitError.jsx +++ b/app/components/InitError.jsx @@ -83,10 +83,7 @@ class InitError extends React.Component {

    - +
    @@ -124,20 +121,20 @@ class InitError extends React.Component {
  • - +
    {this.props.rpc_connection_status === "open" ? ( ) : ( )} @@ -151,7 +148,7 @@ class InitError extends React.Component { className="button outline" onClick={this.onReloadClick} > - +
    { - if (!err) { - if (this.unlisten && this.state.active !== newState.pathname) { - this.setState({ - active: newState.pathname - }); - } + this.unlisten = this.props.history.listen(newState => { + if (this.unlisten && this.state.active !== newState.pathname) { + this.setState({ + active: newState.pathname + }); } }); } @@ -167,7 +159,7 @@ class Header extends React.Component { }); } - this.context.router.push(route); + this.props.history.push(route); this._closeDropdown(); } @@ -208,10 +200,10 @@ class Header extends React.Component { _accountClickHandler(account_name, e) { e.preventDefault(); ZfApi.publish("account_drop_down", "close"); - if (this.context.location.pathname.indexOf("/account/") !== -1) { - let currentPath = this.context.location.pathname.split("/"); + if (this.props.location.pathname.indexOf("/account/") !== -1) { + let currentPath = this.props.location.pathname.split("/"); currentPath[2] = account_name; - this.context.router.push(currentPath.join("/")); + this.props.history.push(currentPath.join("/")); } if (account_name !== this.props.currentAccount) { AccountActions.setCurrentAccount.defer(account_name); @@ -225,16 +217,8 @@ class Header extends React.Component { }); this._closeDropdown(); } - // this.onClickUser(account_name, e); } - // onClickUser(account, e) { - // e.stopPropagation(); - // e.preventDefault(); - // - // this.context.router.push(`/account/${account}/overview`); - // } - _toggleAccountDropdownMenu() { // prevent state toggling if user cannot have multiple accounts @@ -314,12 +298,14 @@ class Header extends React.Component { let maxHeight = Math.max(40, height - 67 - 36) + "px"; const a = ChainStore.getAccount(currentAccount); + const showAccountLinks = !!a; const isMyAccount = !a ? false : AccountStore.isMyAccount(a) || (passwordLogin && currentAccount === passwordAccount); const isContact = this.props.contacts.has(currentAccount); const enableDepositWithdraw = + !!a && Apis.instance() && Apis.instance().chain_id && Apis.instance().chain_id.substr(0, 8) === "4018d784"; @@ -1253,7 +1239,7 @@ class Header extends React.Component {
  • ) : null} - {!isMyAccount ? ( + {!isMyAccount && showAccountLinks ? (
  • +
  • - {!hasLocalWallet && ( + {showAccountLinks ? (
  • - )} + ) : null} )}
    diff --git a/app/components/Layout/MobileMenu.jsx b/app/components/Layout/MobileMenu.jsx deleted file mode 100644 index 1a9fab7c62..0000000000 --- a/app/components/Layout/MobileMenu.jsx +++ /dev/null @@ -1,203 +0,0 @@ -import React from "react"; -import Panel from "react-foundation-apps/src/panel"; -import Trigger from "react-foundation-apps/src/trigger"; -import {Link} from "react-router/es"; -import ZfApi from "react-foundation-apps/src/utils/foundation-api"; -import Translate from "react-translate-component"; -import AccountStore from "stores/AccountStore"; -import {connect} from "alt-react"; -import WalletUnlockStore from "stores/WalletUnlockStore"; -import WalletManagerStore from "stores/WalletManagerStore"; -import SettingsStore from "stores/SettingsStore"; -import {Apis} from "bitsharesjs-ws"; - -class MobileMenu extends React.Component { - constructor() { - super(); - this.state = {}; - } - - static contextTypes = { - router: PropTypes.object - }; - - onClick() { - ZfApi.publish("mobile-menu", "close"); - } - - _onNavigate(route, e) { - e.preventDefault(); - this.context.router.push(route); - ZfApi.publish("mobile-menu", "close"); - } - - render() { - let {id, currentAccount, myActiveAccounts, myAccounts} = this.props; - let accounts = null; - - if (myActiveAccounts.size > 1) { - accounts = myActiveAccounts - .sort((a, b) => { - if (a > b) return 1; - if (a < b) return -1; - return 0; - }) - .map(a => { - return ( -
  • - {a} -
  • - ); - }); - } else if (myActiveAccounts.size === 1) { - accounts = ( -
  • - - - -
  • - ); - } - - let linkToAccountOrDashboard; - if (myActiveAccounts.size > 0) - linkToAccountOrDashboard = ( - - - - ); - else - linkToAccountOrDashboard = ( - Create Account - ); - - let tradeLink = this.props.lastMarket ? ( - - - - ) : ( - - - - ); - - return ( - -
    - - × - -
    -
      -
    • {linkToAccountOrDashboard}
    • -
    • - - - -
    • - {myActiveAccounts.size === 0 ? null : ( -
    • {tradeLink}
    • - )} - {currentAccount && - myAccounts.indexOf(currentAccount) !== -1 ? ( -
    • - - - -
    • - ) : null} -
    • - - - -
    • -
    • - - - -
    • -
    -
    - -
    -
    - -
    -
      {accounts}
    -
    -
    -
    - ); - } -} - -MobileMenu = connect(MobileMenu, { - listenTo() { - return [ - AccountStore, - WalletUnlockStore, - WalletManagerStore, - SettingsStore - ]; - }, - getProps() { - const chainID = Apis.instance().chain_id; - return { - myActiveAccounts: AccountStore.getState().myActiveAccounts, - currentAccount: AccountStore.getState().currentAccount, - locked: WalletUnlockStore.getState().locked, - current_wallet: WalletManagerStore.getState().current_wallet, - lastMarket: SettingsStore.getState().viewSettings.get( - `lastMarket${chainID ? "_" + chainID.substr(0, 8) : ""}` - ), - myAccounts: AccountStore.getMyAccounts() - }; - } -}); - -export default class WidthWrapper extends React.Component { - constructor() { - super(); - - let width = window && window.innerWidth; - this.state = { - visible: width <= 640 - }; - - this._checkWidth = this._checkWidth.bind(this); - } - - componentDidMount() { - window.addEventListener("resize", this._checkWidth, { - capture: false, - passive: true - }); - } - - componentWillUnmount() { - window.removeEventListener("resize", this._checkWidth); - } - - _checkWidth() { - let width = window && window.innerWidth; - let visible = width <= 640; - if (visible !== this.state.visible) { - this.setState({visible}); - } - } - - render() { - if (!this.state.visible) return null; - return ; - } -} diff --git a/app/components/LoadingIndicator.jsx b/app/components/LoadingIndicator.jsx index ab2d16a51c..5f0ab23501 100644 --- a/app/components/LoadingIndicator.jsx +++ b/app/components/LoadingIndicator.jsx @@ -78,7 +78,7 @@ class LoadingIndicator extends React.Component { {this.props.loadingText && (
    {this.props.loadingText}
    diff --git a/app/components/LoginSelector.jsx b/app/components/LoginSelector.jsx index c4ee2d5d8b..2dce59278f 100644 --- a/app/components/LoginSelector.jsx +++ b/app/components/LoginSelector.jsx @@ -1,7 +1,7 @@ import React from "react"; import {connect} from "alt-react"; import AccountStore from "stores/AccountStore"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Translate from "react-translate-component"; import TranslateWithLinks from "./Utility/TranslateWithLinks"; import {isIncognito} from "feature_detect"; @@ -11,6 +11,9 @@ import WalletUnlockActions from "actions/WalletUnlockActions"; import ActionSheet from "react-foundation-apps/src/action-sheet"; import SettingsStore from "stores/SettingsStore"; import IntlActions from "actions/IntlActions"; +import CreateAccount from "./Account/CreateAccount"; +import CreateAccountPassword from "./Account/CreateAccountPassword"; +import {Route} from "react-router-dom"; const FlagImage = ({flag, width = 50, height = 50}) => { return ( @@ -33,22 +36,22 @@ class LoginSelector extends React.Component { }; } - componentDidUpdate() { - const myAccounts = AccountStore.getMyAccounts(); - - // use ChildCount to make sure user is on /create-account page except /create-account/* - // to prevent redirect when user just registered and need to make backup of wallet or password - const childCount = React.Children.count(this.props.children); - - // do redirect to portfolio if user already logged in - if ( - this.props.router && - Array.isArray(myAccounts) && - myAccounts.length !== 0 && - childCount === 0 - ) - this.props.router.push("/account/" + this.props.currentAccount); - } + // componentDidUpdate() { + // const myAccounts = AccountStore.getMyAccounts(); + + // use ChildCount to make sure user is on /create-account page except /create-account/* + // to prevent redirect when user just registered and need to make backup of wallet or password + // const childCount = React.Children.count(this.props.children); + + // do redirect to portfolio if user already logged in + // if ( + // this.props.history && + // Array.isArray(myAccounts) && + // myAccounts.length !== 0 && + // childCount === 0 + // ) + // this.props.history.push("/account/" + this.props.currentAccount); + // } componentWillMount() { isIncognito(incognito => { @@ -57,14 +60,12 @@ class LoginSelector extends React.Component { } onSelect(route) { - this.props.router.push("/create-account/" + route); + this.props.history.push("/create-account/" + route); } render() { const translator = require("counterpart"); - const childCount = React.Children.count(this.props.children); - const flagDropdown = ( @@ -120,104 +121,108 @@ class LoginSelector extends React.Component {
    - {childCount == 0 ? null : ( -
    - -
    - )} - {childCount == 1 ? null : ( -
    - - +
    + +
    -
    -
    -
    - {flagDropdown} -
    +
    + + + +
    +
    +
    + {flagDropdown}
    - )} - - {!!childCount ? null : ( -
    - - - - - { - SettingsActions.changeSetting({ - setting: "passwordLogin", - value: true - }); - WalletUnlockActions.unlock.defer(); - }} - > - - -
    - )} - - {!!childCount ? null : ( -
    -
    - -
    -
    - )} +
    + +
    + + + + + { + SettingsActions.changeSetting.defer({ + setting: "passwordLogin", + value: true + }); + WalletUnlockActions.unlock().catch( + () => {} + ); + }} + > + + +
    + +
    +
    + +
    +
    - {this.props.children} + +
    diff --git a/app/components/Modal/BorrowModal.jsx b/app/components/Modal/BorrowModal.jsx index 46932f073b..f0c58bb6dd 100755 --- a/app/components/Modal/BorrowModal.jsx +++ b/app/components/Modal/BorrowModal.jsx @@ -20,6 +20,7 @@ import HelpContent from "../Utility/HelpContent"; import Immutable from "immutable"; import {ChainStore} from "bitsharesjs/es"; import {List} from "immutable"; +import Icon from "../Icon/Icon"; /** * Given an account and an asset id, render a modal allowing modification of a margin position for that asset @@ -139,6 +140,11 @@ class BorrowModalContent extends React.Component { ZfApi.publish(this.props.modalId, "close"); } + toggleLockedCR(e) { + e.preventDefault(); + this.setState({lockedCR: !this.state.lockedCR ? true : false}) + } + _onBorrowChange(e) { let feed_price = this._getFeedPrice(); let amount = e.amount.replace(/,/g, ""); @@ -191,18 +197,25 @@ class BorrowModalContent extends React.Component { target.value = target.value.replace(/[^0-9.]/g, ""); } - // Catch initial decimal input - if (target.value.charAt(0) == ".") { - target.value = "0."; - } - let ratio = target.value; + let short_amount; + let collateral; - let newState = { - short_amount: this.state.short_amount, - collateral: (this.state.short_amount / feed_price * ratio).toFixed( + if(this.state.lockedCR) { + short_amount = (this.state.collateral * feed_price / ratio).toFixed( this.props.backing_asset.get("precision") - ), + ); + collateral = this.state.collateral; + } else { + short_amount = this.state.short_amount; + collateral = (this.state.short_amount / feed_price * ratio).toFixed( + this.props.backing_asset.get("precision") + ) + } + + let newState = { + short_amount: short_amount, + collateral: collateral, collateral_ratio: ratio }; @@ -743,6 +756,9 @@ class BorrowModalContent extends React.Component { ) : null}
    + + +
    + + +
    - - + +

    @@ -38,7 +35,7 @@ export default class BrowserSupportModal extends React.Component { >

    - +
    diff --git a/app/components/Modal/SendModal.jsx b/app/components/Modal/SendModal.jsx index d08062794d..9a71fc4251 100644 --- a/app/components/Modal/SendModal.jsx +++ b/app/components/Modal/SendModal.jsx @@ -24,10 +24,6 @@ import classnames from "classnames"; import PropTypes from "prop-types"; class SendModal extends React.Component { - static contextTypes = { - router: PropTypes.object - }; - constructor(props) { super(props); this.state = this.getInitialState(props); @@ -507,11 +503,6 @@ class SendModal extends React.Component { this.setState({propose_account}); } - onProposeTooltip() { - this.onClose(); - this.context.router.push("/help/accounts/proposed"); - } - render() { let { propose, @@ -798,16 +789,6 @@ class SendModal extends React.Component { scroll_length={2} />
    - {/*
    - - - - -
    - -
    -
    */}
    diff --git a/app/components/News.jsx b/app/components/News.jsx index 5bcdf1be13..26d8ab183c 100644 --- a/app/components/News.jsx +++ b/app/components/News.jsx @@ -173,11 +173,6 @@ class News extends React.Component {
    -
    -
    - -
    -
    {isWrong && } {isLoading ? : null} diff --git a/app/components/Page404/Page404.jsx b/app/components/Page404/Page404.jsx index 972e54852d..89a91a9578 100644 --- a/app/components/Page404/Page404.jsx +++ b/app/components/Page404/Page404.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router"; +import {Link} from "react-router-dom"; import {connect} from "alt-react"; import SettingsStore from "stores/SettingsStore"; import Translate from "react-translate-component"; diff --git a/app/components/Settings/AccessSettings.jsx b/app/components/Settings/AccessSettings.jsx index a29a9e35eb..eb1315407a 100644 --- a/app/components/Settings/AccessSettings.jsx +++ b/app/components/Settings/AccessSettings.jsx @@ -5,7 +5,7 @@ import SettingsStore from "stores/SettingsStore"; import {settingsAPIs} from "../../api/apiConfig"; import willTransitionTo from "../../routerTransition"; // import {routerTransitioner} from "../../routerTransition"; -import {withRouter} from "react-router/es"; +import {withRouter} from "react-router-dom"; import {connect} from "alt-react"; import cnames from "classnames"; import Icon from "../Icon/Icon"; @@ -39,12 +39,7 @@ class ApiNode extends React.Component { }); setTimeout( function() { - willTransitionTo( - this.props.router, - this.props.router.replace, - () => {}, - false - ); + willTransitionTo(false); }.bind(this), 50 ); diff --git a/app/components/Settings/AccountsSettings.jsx b/app/components/Settings/AccountsSettings.jsx index 3679fb08da..d6997aadb5 100644 --- a/app/components/Settings/AccountsSettings.jsx +++ b/app/components/Settings/AccountsSettings.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import AccountStore from "stores/AccountStore"; import AccountActions from "actions/AccountActions"; import {connect} from "alt-react"; diff --git a/app/components/Settings/Settings.jsx b/app/components/Settings/Settings.jsx index 6782b6eb55..c442ef0cd5 100644 --- a/app/components/Settings/Settings.jsx +++ b/app/components/Settings/Settings.jsx @@ -13,21 +13,15 @@ import ResetSettings from "./ResetSettings"; import BackupSettings from "./BackupSettings"; import AccessSettings from "./AccessSettings"; import {set} from "lodash-es"; -import PropTypes from "prop-types"; class Settings extends React.Component { - static contextTypes = { - router: PropTypes.object.isRequired - }; - constructor(props) { super(); - let menuEntries = this._getMenuEntries(props); let activeSetting = 0; - let tabIndex = !!props.params.tab - ? menuEntries.indexOf(props.params.tab) + let tabIndex = !!props.match.params.tab + ? menuEntries.indexOf(props.match.params.tab) : props.viewSettings.get("activeSetting", 0); if (tabIndex >= 0) activeSetting = tabIndex; @@ -57,8 +51,8 @@ class Settings extends React.Component { } componentDidUpdate(prevProps) { - if (prevProps.params.tab !== this.props.params.tab) { - this._onChangeMenu(this.props.params.tab); + if (prevProps.match.params.tab !== this.props.match.params.tab) { + this._onChangeMenu(this.props.match.params.tab); } } @@ -239,7 +233,7 @@ class Settings extends React.Component { } _redirectToEntry(entry) { - this.context.router.push("/settings/" + entry); + this.props.history.push("/settings/" + entry); } _onChangeMenu(entry) { diff --git a/app/components/Transfer/Transfer.jsx b/app/components/Transfer/Transfer.jsx index 18b6618fc4..077024b016 100644 --- a/app/components/Transfer/Transfer.jsx +++ b/app/components/Transfer/Transfer.jsx @@ -21,12 +21,13 @@ import { import {debounce, isNaN} from "lodash-es"; import classnames from "classnames"; import {Asset} from "common/MarketClasses"; +import queryString from "query-string"; class Transfer extends React.Component { constructor(props) { super(props); let state = Transfer.getInitialState(); - let {query} = this.props.location; + let query = queryString.parse(props.location.search) || {}; if (query.from) { state.from_name = query.from; diff --git a/app/components/Utility/AssetName.jsx b/app/components/Utility/AssetName.jsx index 54554b02bb..4cd28586da 100644 --- a/app/components/Utility/AssetName.jsx +++ b/app/components/Utility/AssetName.jsx @@ -30,6 +30,7 @@ class AssetName extends React.Component { render() { let {replace, asset, noPrefix, customClass, noTip} = this.props; + if (!asset) return null; const name = asset.get("symbol"); const isBitAsset = asset.has("bitasset"); const isPredMarket = @@ -55,19 +56,19 @@ class AssetName extends React.Component { optional = realPrefix || includeBitAssetDescription ? counterpart.translate( - "gateway.assets." + - (hasBitPrefix - ? "bit" - : realPrefix - .replace(".", "") - .toLowerCase()), - { - asset: name, - backed: includeBitAssetDescription - ? desc.main - : replacedName - } - ) + "gateway.assets." + + (hasBitPrefix + ? "bit" + : realPrefix + .replace(".", "") + .toLowerCase()), + { + asset: name, + backed: includeBitAssetDescription + ? desc.main + : replacedName + } + ) : ""; } catch (e) {} if (isBitAsset && name === "CNY") { @@ -85,13 +86,13 @@ class AssetName extends React.Component { ? null : `
    ${upperCasePrefix || ""}${replacedName.toUpperCase()}
    ${ - includeBitAssetDescription - ? "" - : "
    " + + includeBitAssetDescription + ? "" + : "
    " + (desc.short ? desc.short : desc.main || "") - }${ - !isBitAsset || includeBitAssetDescription ? optional : "" - }
    `; + }${ + !isBitAsset || includeBitAssetDescription ? optional : "" + }
    `; return (
    p && p !== "#"); if (path.length === 0) return false; let route = "/" + path.join("/"); - this.props.router.push(route); + this.props.history.push(route); return false; } @@ -112,7 +112,6 @@ class HelpContent extends React.Component { render() { let locale = this.props.locale || counterpart.getLocale() || "en"; - if (!HelpData[locale]) { console.error( `missing locale '${locale}' help files, rolling back to 'en'` @@ -161,7 +160,16 @@ class HelpContent extends React.Component { } if (this.props.section) { - value = value[this.props.section]; + /* The previously used remarkable-loader parsed the md properly as an object, the new one does not */ + for (let key in value) { + if (!!key.match(this.props.section)) { + value = key.replace( + new RegExp("^" + this.props.section + ","), + "" + ); + break; + } + } } if (!value) { diff --git a/app/components/Utility/LinkToAccountById.jsx b/app/components/Utility/LinkToAccountById.jsx index 5466044548..2066d4bc68 100644 --- a/app/components/Utility/LinkToAccountById.jsx +++ b/app/components/Utility/LinkToAccountById.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import ChainTypes from "./ChainTypes"; import BindToChainState from "./BindToChainState"; import PropTypes from "prop-types"; diff --git a/app/components/Utility/LinkToAssetById.jsx b/app/components/Utility/LinkToAssetById.jsx index dafff5a3df..6c658570ec 100644 --- a/app/components/Utility/LinkToAssetById.jsx +++ b/app/components/Utility/LinkToAssetById.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import AssetWrapper from "./AssetWrapper"; import AssetName from "./AssetName"; diff --git a/app/components/Utility/MarketLink.jsx b/app/components/Utility/MarketLink.jsx index 6b628b0a44..50ff912543 100644 --- a/app/components/Utility/MarketLink.jsx +++ b/app/components/Utility/MarketLink.jsx @@ -1,5 +1,5 @@ import React from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import ChainTypes from "./ChainTypes"; import AssetWrapper from "./AssetWrapper"; import AssetName from "./AssetName"; diff --git a/app/components/Utility/Tabs.jsx b/app/components/Utility/Tabs.jsx index 9daa6bfe36..75d6f0e15f 100644 --- a/app/components/Utility/Tabs.jsx +++ b/app/components/Utility/Tabs.jsx @@ -1,11 +1,11 @@ import React from "react"; import PropTypes from "prop-types"; -import Translate from "react-translate-component"; import cnames from "classnames"; import {connect} from "alt-react"; import SettingsActions from "actions/SettingsActions"; import SettingsStore from "stores/SettingsStore"; import counterpart from "counterpart"; +import {withRouter} from "react-router-dom"; /** * Renders a tab layout, handling switching and optionally persists the currently open tab using the SettingsStore @@ -115,10 +115,6 @@ class Tabs extends React.Component { style: {} }; - static contextTypes = { - router: PropTypes.object.isRequired - }; - constructor(props) { super(); this.state = { @@ -165,8 +161,7 @@ class Tabs extends React.Component { // Persist current tab if desired if (isLinkTo !== "") { - this.context.router.push(isLinkTo); - return; + this.props.history.push(isLinkTo); } if (this.props.setting) { @@ -274,4 +269,6 @@ Tabs = connect(Tabs, { } }); +Tabs = withRouter(Tabs); + export {Tabs, Tab}; diff --git a/app/components/Utility/TranslateWithLinks.jsx b/app/components/Utility/TranslateWithLinks.jsx index 4107886508..d582d4bd6a 100644 --- a/app/components/Utility/TranslateWithLinks.jsx +++ b/app/components/Utility/TranslateWithLinks.jsx @@ -3,7 +3,7 @@ import counterpart from "counterpart"; import utils from "common/utils"; import LinkToAccountById from "../Utility/LinkToAccountById"; import LinkToAssetById from "../Utility/LinkToAssetById"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import FormattedAsset from "../Utility/FormattedAsset"; import FormattedPrice from "../Utility/FormattedPrice"; import AssetName from "../Utility/AssetName"; diff --git a/app/components/Wallet/Backup.jsx b/app/components/Wallet/Backup.jsx index e9d4486549..be66cc7c0c 100644 --- a/app/components/Wallet/Backup.jsx +++ b/app/components/Wallet/Backup.jsx @@ -1,6 +1,6 @@ import React, {Component} from "react"; import PropTypes from "prop-types"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import {FormattedDate} from "react-intl"; import {connect} from "alt-react"; import WalletActions from "actions/WalletActions"; diff --git a/app/components/Wallet/Brainkey.jsx b/app/components/Wallet/Brainkey.jsx index 3d762c768d..37e4822063 100644 --- a/app/components/Wallet/Brainkey.jsx +++ b/app/components/Wallet/Brainkey.jsx @@ -67,7 +67,7 @@ class ViewBrainkey extends Component { } ViewBrainkey = connect(ViewBrainkey, connectObject); -class BrainkeyAccounts { +class BrainkeyAccounts extends React.Component { static propTypes = { accounts: ChainTypes.ChainAccountsList.isRequired }; diff --git a/app/components/Wallet/ExistingAccount.jsx b/app/components/Wallet/ExistingAccount.jsx index bf1ece1964..7175e2c007 100644 --- a/app/components/Wallet/ExistingAccount.jsx +++ b/app/components/Wallet/ExistingAccount.jsx @@ -1,9 +1,13 @@ import React, {Component} from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import {connect} from "alt-react"; import WalletManagerStore from "stores/WalletManagerStore"; -import BalanceClaimActive from "components/Wallet/BalanceClaimActive"; +import BalanceClaimActive from "./BalanceClaimActive"; import Translate from "react-translate-component"; +import {Switch, Route} from "react-router-dom"; +import Brainkey from "./Brainkey"; +import ImportKeys from "./ImportKeys"; +import {BackupRestore} from "./Backup"; const connectObject = { listenTo() { @@ -37,6 +41,33 @@ class ExistingAccount extends Component { )}
    + + + + + + + {this.props.children}
    @@ -97,4 +128,5 @@ class ExistingAccountOptions extends Component { } ExistingAccountOptions = connect(ExistingAccountOptions, connectObject); -export {ExistingAccount, ExistingAccountOptions}; +export default ExistingAccount; +export {ExistingAccountOptions}; diff --git a/app/components/Wallet/PasswordConfirm.jsx b/app/components/Wallet/PasswordConfirm.jsx index 9b96b67e08..8856813856 100644 --- a/app/components/Wallet/PasswordConfirm.jsx +++ b/app/components/Wallet/PasswordConfirm.jsx @@ -27,8 +27,38 @@ export default class PasswordConfirm extends Component { } } + formChange(event) { + let key = + event.target.id === "current-password" ? "password" : "confirm"; + let state = {}; + state[key] = event.target.value; + this.setState(state, this.validate); + } + + validate(state = this.state) { + let {password, confirm} = state; + confirm = confirm.trim(); + password = password.trim(); + + let errors = Immutable.Map(); + // Don't report until typing begins + if (password.length !== 0 && password.length < 8) + errors = errors.set( + "password_length", + "Password must be 8 characters or more" + ); + + // Don't report it until the confirm is populated + if (password !== "" && confirm !== "" && password !== confirm) + errors = errors.set("password_match", "Passwords do not match"); + + let valid = password.length >= 8 && password === confirm; + this.setState({errors, valid}); + this.props.onValid(valid ? password : null); + } + render() { - var {password, confirm, valid, errors} = this.state; + const {password, confirm, errors} = this.state; let {newPassword} = this.props; let tabIndex = 1; @@ -43,10 +73,11 @@ export default class PasswordConfirm extends Component {
    @@ -60,9 +91,10 @@ export default class PasswordConfirm extends Component {
    @@ -77,33 +109,4 @@ export default class PasswordConfirm extends Component {
    ); } - - formChange(event) { - var state = this.state; - state[event.target.id] = event.target.value; - this.setState(state); - this.validate(state); - } - - validate(state) { - var {password, confirm} = state; - confirm = confirm.trim(); - password = password.trim(); - - var errors = Immutable.Map(); - // Don't report until typing begins - if (password.length !== 0 && password.length < 8) - errors = errors.set( - "password_length", - "Password must be 8 characters or more" - ); - - // Don't report it until the confirm is populated - if (password !== "" && confirm !== "" && password !== confirm) - errors = errors.set("password_match", "Passwords do not match"); - - var valid = password.length >= 8 && password === confirm; - this.setState({errors, valid}); - this.props.onValid(valid ? password : null); - } } diff --git a/app/components/Wallet/WalletChangePassword.jsx b/app/components/Wallet/WalletChangePassword.jsx index c2ac2d8505..ffab65ddc6 100644 --- a/app/components/Wallet/WalletChangePassword.jsx +++ b/app/components/Wallet/WalletChangePassword.jsx @@ -1,5 +1,5 @@ import React, {Component} from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Translate from "react-translate-component"; import notify from "actions/NotificationActions"; import cname from "classnames"; @@ -147,7 +147,8 @@ class WalletPassword extends Component { "wallet.current_pass" )} type="password" - id="password" + id="current-password" + autoComplete="current-password" onChange={this.formChange.bind(this)} value={this.state.password} /> diff --git a/app/components/Wallet/WalletCreate.jsx b/app/components/Wallet/WalletCreate.jsx index caa1f1bb3c..003b5ec92e 100644 --- a/app/components/Wallet/WalletCreate.jsx +++ b/app/components/Wallet/WalletCreate.jsx @@ -1,5 +1,5 @@ import React, {Component} from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import Translate from "react-translate-component"; import BrainkeyInput from "components/Wallet/BrainkeyInput"; import PasswordConfirm from "components/Wallet/PasswordConfirm"; @@ -40,8 +40,8 @@ class CreateNewWallet extends Component { } onPassword(valid_password) { - this.state.valid_password = valid_password; - this.setState({valid_password}, this.validate); + if (valid_password !== this.state.valid_password) + this.setState({valid_password}, this.validate); } onCustomBrainkey() { @@ -49,7 +49,6 @@ class CreateNewWallet extends Component { } onBrainkey(brnkey) { - this.state.brnkey = brnkey; this.setState({brnkey}, this.validate); } diff --git a/app/components/Wallet/WalletManager.jsx b/app/components/Wallet/WalletManager.jsx index ef3a70639e..10a1246492 100644 --- a/app/components/Wallet/WalletManager.jsx +++ b/app/components/Wallet/WalletManager.jsx @@ -1,5 +1,5 @@ import React, {Component} from "react"; -import {Link} from "react-router/es"; +import {Link} from "react-router-dom"; import {connect} from "alt-react"; import WalletActions from "actions/WalletActions"; import BackupActions from "actions/BackupActions"; @@ -7,6 +7,14 @@ import WalletManagerStore from "stores/WalletManagerStore"; import Translate from "react-translate-component"; import cname from "classnames"; import counterpart from "counterpart"; +import {Switch, Route} from "react-router-dom"; +import {ExistingAccountOptions} from "./ExistingAccount"; +import ImportKeys from "./ImportKeys"; +import BalanceClaimActive from "./BalanceClaimActive"; +import WalletChangePassword from "./WalletChangePassword"; +import {WalletCreate} from "./WalletCreate"; +import {BackupCreate, BackupRestore} from "./Backup"; +import BackupBrainkey from "./BackupBrainkey"; const connectObject = { listenTo() { @@ -66,7 +74,63 @@ class WalletManager extends Component { />
    - {this.props.children} + + + + + + + + + + + + +
    @@ -135,7 +199,7 @@ class WalletOptions extends Component { Dummy
    - +
    @@ -153,7 +217,7 @@ class WalletOptions extends Component { {has_wallet ? ( - +
    @@ -161,14 +225,14 @@ class WalletOptions extends Component { ) : null} {has_wallet ? ( - +
    ) : null} - +
    @@ -178,14 +242,14 @@ class WalletOptions extends Component { {has_wallet ?
    : null} - +
    {has_wallet ? ( - +
    @@ -193,7 +257,7 @@ class WalletOptions extends Component { ) : null} {has_wallet ? ( - +
    @@ -269,7 +333,7 @@ class ChangeActiveWallet extends Component { - +
    @@ -439,4 +503,5 @@ class WalletDelete extends Component { } WalletDelete = connect(WalletDelete, connectObject); -export {WalletManager, WalletOptions, ChangeActiveWallet, WalletDelete}; +export default WalletManager; +export {WalletOptions, ChangeActiveWallet, WalletDelete}; diff --git a/app/components/Wallet/WalletUnlockModal.jsx b/app/components/Wallet/WalletUnlockModal.jsx index 3e3427c895..6543117e2f 100644 --- a/app/components/Wallet/WalletUnlockModal.jsx +++ b/app/components/Wallet/WalletUnlockModal.jsx @@ -33,13 +33,9 @@ import { KeyFileLabel } from "./WalletUnlockModalLib"; import {backupName} from "common/backupUtils"; -import PropTypes from "prop-types"; +import {withRouter} from "react-router-dom"; class WalletUnlockModal extends React.Component { - static contextTypes = { - router: PropTypes.object - }; - constructor(props) { super(props); this.state = this.initialState(props); @@ -79,6 +75,7 @@ class WalletUnlockModal extends React.Component { } shouldComponentUpdate(np, ns) { + if (this.state.isOpen && !ns.isOpen) return false; return ( !utils.are_equal_shallow(np, this.props) || !utils.are_equal_shallow(ns, this.state) @@ -248,7 +245,7 @@ class WalletUnlockModal extends React.Component { closeRedirect = path => { WalletUnlockActions.cancel(); - this.context.router.push(path); + this.props.history.push(path); }; handleCreateWallet = () => this.closeRedirect("/create-account/wallet"); @@ -343,8 +340,7 @@ class WalletUnlockModal extends React.Component { passwordLogin, modalId, currentWallet, - walletNames, - dbWallet + walletNames } = this.props; const { walletSelected, @@ -352,7 +348,8 @@ class WalletUnlockModal extends React.Component { passwordError, customError, accountName, - stopAskingForBackup + stopAskingForBackup, + isOpen } = this.state; const noWalletNames = !(walletNames.size > 0); @@ -374,106 +371,115 @@ class WalletUnlockModal extends React.Component { modalHeader="header.unlock_short" leftHeader > -
    - - {passwordLogin ? ( -
    - - {}} - size={60} - hideImage - placeholder=" " - useHR - labelClass="login-label" - reserveErrorSpace - /> - -
    - ) : ( -
    -
    - + + {passwordLogin ? ( +
    + + {}} + size={60} + hideImage + placeholder=" " + useHR + labelClass="login-label" + reserveErrorSpace + /> + -
    - {walletSelected ? ( - + ) : ( +
    +
    + - ) : ( -
    - {restoringBackup || noWalletNames ? ( - - ) : ( - - )} - {noLocalWallet && ( - - )} -
    - )} +
    + {walletSelected ? ( + + ) : ( +
    + {restoringBackup || + noWalletNames ? ( + + ) : ( + + )} + {noLocalWallet && ( + + )} +
    + )} +
    +
    - + {this.shouldShowBackupWarning() && ( + -
    - )} - - {this.shouldShowBackupWarning() && ( - - )} - - + + )} ); } @@ -483,6 +489,8 @@ WalletUnlockModal.defaultProps = { modalId: "unlock_wallet_modal2" }; +WalletUnlockModal = withRouter(WalletUnlockModal); + class WalletUnlockModalContainer extends React.Component { render() { return ( diff --git a/app/components/Wallet/WalletUnlockModalLib.jsx b/app/components/Wallet/WalletUnlockModalLib.jsx index 0db914f25f..75b35e6c7d 100644 --- a/app/components/Wallet/WalletUnlockModalLib.jsx +++ b/app/components/Wallet/WalletUnlockModalLib.jsx @@ -41,6 +41,7 @@ export class StyledUpload extends React.Component { onClick={stopPropagation} onChange={this.props.onFileChosen} ref="input" + accept=".bin" /> ); @@ -114,6 +115,7 @@ export class CustomPasswordInput extends React.Component { name="password" id="password" type="password" + autoComplete="current-password" />
    ); diff --git a/app/electron_imports.js b/app/electron_imports.js deleted file mode 100644 index b1b8ba4159..0000000000 --- a/app/electron_imports.js +++ /dev/null @@ -1,55 +0,0 @@ -import DashboardPage from "./components/Dashboard/DashboardPage"; -import DashboardAccountsOnly from "./components/Dashboard/DashboardAccountsOnly"; -import Witnesses from "./components/Explorer/Witnesses"; -import CommitteeMembers from "./components/Explorer/CommitteeMembers"; -import FeesContainer from "./components/Blockchain/FeesContainer"; -import BlocksContainer from "./components/Explorer/BlocksContainer"; -import AssetsContainer from "./components/Explorer/AssetsContainer"; -import AccountsContainer from "./components/Explorer/AccountsContainer"; -import Explorer from "components/Explorer/Explorer"; -import AccountPage from "./components/Account/AccountPage"; -import AccountOverview from "./components/Account/AccountOverview"; -import AccountAssets from "./components/Account/AccountAssets"; -import {AccountAssetCreate} from "./components/Account/AccountAssetCreate"; -import AccountAssetUpdate from "./components/Account/AccountAssetUpdate"; -import AccountMembership from "./components/Account/AccountMembership"; -import AccountVesting from "./components/Account/AccountVesting"; -import AccountDepositWithdraw from "./components/Account/AccountDepositWithdraw"; -import AccountPermissions from "./components/Account/AccountPermissions"; -import AccountWhitelist from "./components/Account/AccountWhitelist"; -import AccountVoting from "./components/Account/AccountVoting"; -import AccountOrders from "./components/Account/AccountOrders"; -import ExchangeContainer from "./components/Exchange/ExchangeContainer"; -import MarketsContainer from "./components/Exchange/MarketsContainer"; -import Transfer from "./components/Transfer/Transfer"; -import SettingsContainer from "./components/Settings/SettingsContainer"; -import BlockContainer from "./components/Blockchain/BlockContainer"; -import Asset from "./components/Blockchain/Asset"; -import CreateAccount from "./components/Account/CreateAccount"; -import CreateAccountPassword from "./components/Account/CreateAccountPassword"; -import LoginSelector from "./components/LoginSelector"; -import { - ExistingAccount, - ExistingAccountOptions -} from "./components/Wallet/ExistingAccount"; -import { - WalletCreate, - CreateWalletFromBrainkey -} from "./components/Wallet/WalletCreate"; -import ImportKeys from "./components/Wallet/ImportKeys"; -import Invoice from "./components/Transfer/Invoice"; -import {BackupCreate, BackupRestore} from "./components/Wallet/Backup"; -import WalletChangePassword from "./components/Wallet/WalletChangePassword"; -import { - WalletManager, - WalletOptions, - ChangeActiveWallet, - WalletDelete -} from "./components/Wallet/WalletManager"; -import BalanceClaimActive from "./components/Wallet/BalanceClaimActive"; -import BackupBrainkey from "./components/Wallet/BackupBrainkey"; -import Brainkey from "./components/Wallet/Brainkey"; -import Help from "./components/Help"; -import InitError from "./components/InitError"; -import CreateWorker from "./components/Account/CreateWorker"; -import News from "./components/News"; diff --git a/app/index-dev.js b/app/index-dev.js deleted file mode 100644 index 084237e9bc..0000000000 --- a/app/index-dev.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from "react"; -import ReactDOM from "react-dom"; -// import utils from "./dl_cli_index"; -// if (window) { -// window.$utils = utils; -// } -/* -* Routes-dev is only needed for react hot reload, as this does not work with -* the async routes defined in Routes.jsx. Any changes to the routes must be kept -* synchronized between the two files -*/ -import Routes from "./Routes-dev"; - -// require("./components/Utility/Prototypes"); // Adds a .equals method to Array for use in shouldComponentUpdate - -const rootEl = document.getElementById("content"); -const render = () => { - ReactDOM.render(, rootEl); -}; -render(); - -// if (module.hot) { -// module.hot.accept("./Routes-dev.jsx", () => { -// const NextApp = require("./Routes-dev").default; -// ReactDOM.render( -// , -// document.getElementById("content") -// ); -// }); -// } diff --git a/app/index.js b/app/index.js index 433d1cfe6b..dbdc8d508a 100644 --- a/app/index.js +++ b/app/index.js @@ -1,23 +1,9 @@ import React from "react"; import ReactDOM from "react-dom"; -import {Router, browserHistory, hashHistory} from "react-router/es"; -/* -* Routes-dev is only needed for react hot reload, as this does not work with -* the async routes defined in Routes.jsx. Any changes to the routes must be kept -* synchronized between the two files -*/ -import routes from "./Routes"; - -// require("./components/Utility/Prototypes"); // Adds a .equals method to Array for use in shouldComponentUpdate - -/* -* Electron does not support browserHistory, so we need to use hashHistory. -* The same is true for servers without configuration options, such as Github Pages -*/ -const history = __HASH_HISTORY__ ? hashHistory : browserHistory; +import AppInit from "./AppInit"; const rootEl = document.getElementById("content"); const render = () => { - ReactDOM.render(, rootEl); + ReactDOM.render(, rootEl); }; render(); diff --git a/app/lib/common/utils.js b/app/lib/common/utils.js index 07e11609df..6176f53694 100644 --- a/app/lib/common/utils.js +++ b/app/lib/common/utils.js @@ -1,4 +1,5 @@ var numeral = require("numeral"); +import {is} from "immutable"; let id_regex = /\b\d+\.\d+\.(\d+)\b/; @@ -212,24 +213,20 @@ var Utils = { } } if (typeof a === "string" && typeof b === "string") { - return a !== b; + return a === b; } + if (a && a.toJS && b && b.toJS) return a === b; for (var key in a) { - if (!(key in b) || a[key] !== b[key]) { + if ((a.hasOwnProperty(key) && !(key in b)) || a[key] !== b[key]) { return false; } } for (var key in b) { - if (!(key in a) || a[key] !== b[key]) { + if ((b.hasOwnProperty(key) && !(key in a)) || a[key] !== b[key]) { return false; } } - if ( - (a === null && b === undefined) || - (b === null && a === undefined) - ) { - return false; - } + return true; }, @@ -423,7 +420,9 @@ var Utils = { let prefix = isBitAsset ? "bit" - : toReplace[i] ? toReplace[i].toLowerCase() : null; + : toReplace[i] + ? toReplace[i].toLowerCase() + : null; return { name, diff --git a/app/routerTransition.js b/app/routerTransition.js index 9dfea28d4e..696f964b4e 100644 --- a/app/routerTransition.js +++ b/app/routerTransition.js @@ -43,116 +43,95 @@ class RouterTransitioner { this.willTransitionToInProgress = false; - /* Store all current callbacks here */ - this.callbacks = []; - } - - /** - * Is used to call all current callbacks once willTransitionTo or any of the - * other methods has finished. It is necessary to fix a react-router bug using - * hash-history, where the onEnter is called twice due to redirect from "/" to "/#/" - * This messes up the init chain completely - */ - _callCallbacks() { - this.willTransitionToInProgress = false; - this.callbacks.forEach(cb => { - cb(); - }); - this.callbacks = []; + this._transitionDone = this._transitionDone.bind(this); } /** * Is called once when router is initialized, and then if a connection error occurs or user manually * switches nodes * - * @param nextState argument as given by Route onEnter - * @param replaceState argument as given by Route onEnter * @param callback argument as given by Route onEnter * @param appInit true when called via router, false false when node is manually selected in access settings - * @returns {*} + * @returns {Promise} */ - willTransitionTo(nextState, replaceState, callback, appInit = true) { - this.callbacks.push(callback); + willTransitionTo(appInit = true) { if (this.willTransitionToInProgress) return; this.willTransitionToInProgress = true; - // console.log( - // new Date().getTime(), - // "nextState", - // nextState.location, - // "replaceState", - // replaceState, - // "callback", - // callback, - // "appInit", - // appInit, - // "willTransitionToInProgress", - // this.willTransitionToInProgress - // ); - - // Bypass the app init chain for the migration path which is only used at bitshares.org/wallet - if (__DEPRECATED__) { - ChainConfig.setChainId(chainIds.MAIN_NET); - let dbPromise = iDB.init_instance(this._getIndexDBImpl()) - .init_promise; - return dbPromise.then(() => { - Promise.all([ - WalletDb.loadDbData().then(() => { - // console.log("wallet init done"); - this._callCallbacks(); - }), - WalletManagerStore.init() - ]); - }); - } - - // on init-error dont attempt connecting - if (nextState.location.pathname === "/init-error") { - return this._callCallbacks(); - } - - // dict of apiServer url as key and the latency as value - const apiLatencies = SettingsStore.getState().apiLatencies; - let latenciesEstablished = Object.keys(apiLatencies).length > 0; - let latencyChecks = ss.get("latencyChecks", 1); - if (latencyChecks >= 5) { - // every x connect attempts we refresh the api latency list - // automtically - ss.set("latencyChecks", 0); - latenciesEstablished = false; - } else { - // otherwise increase the counter - if (appInit) ss.set("latencyChecks", latencyChecks + 1); - } - - let urls = this._getNodesToConnectTo(false, apiLatencies); - - // set auto selection flag - this._autoSelection = - SettingsStore.getSetting("apiServer").indexOf( - "fake.automatic-selection" - ) !== -1; + return new Promise((resolve, reject) => { + // Bypass the app init chain for the migration path which is only used at bitshares.org/wallet + if (__DEPRECATED__) { + ChainConfig.setChainId(chainIds.MAIN_NET); + let dbPromise = iDB.init_instance(this._getIndexDBImpl()) + .init_promise; + return dbPromise.then(() => { + Promise.all([ + WalletDb.loadDbData().then(() => { + // console.log("wallet init done"); + this._transitionDone(resolve); + }), + WalletManagerStore.init() + ]); + }); + } - this._initConnectionManager(urls); + // dict of apiServer url as key and the latency as value + const apiLatencies = SettingsStore.getState().apiLatencies; + let latenciesEstablished = Object.keys(apiLatencies).length > 0; + + let latencyChecks = ss.get("latencyChecks", 1); + if (latencyChecks >= 5) { + // every x connect attempts we refresh the api latency list + // automtically + ss.set("latencyChecks", 0); + latenciesEstablished = false; + } else { + // otherwise increase the counter + if (appInit) ss.set("latencyChecks", latencyChecks + 1); + } - if (!latenciesEstablished || Object.keys(apiLatencies).length < 10) { - this.doLatencyUpdate(true) - .then( - this._initiateConnection.bind( - this, - nextState, - replaceState, - appInit + let urls = this._getNodesToConnectTo(false, apiLatencies); + + // set auto selection flag + this._autoSelection = + SettingsStore.getSetting("apiServer").indexOf( + "fake.automatic-selection" + ) !== -1; + + this._initConnectionManager(urls); + + if ( + !latenciesEstablished || + Object.keys(apiLatencies).length < 10 + ) { + this.doLatencyUpdate(true) + .then( + this._initiateConnection.bind( + this, + appInit, + resolve, + reject + ) ) - ) - .catch(err => { - console.log("catch doLatency", err); - }); - } else { - this._initiateConnection(nextState, replaceState, appInit); - } + .catch(err => { + console.log("catch doLatency", err); + }); + } else { + this._initiateConnection(appInit, resolve, reject); + } + }); } + /** + * Updates the latency of all target nodes + * + * @param refresh boolean true reping all existing nodes + * @private + */ + _transitionDone(resolveOrReject) { + resolveOrReject(); + this.willTransitionToInProgress = false; + } /** * Updates the latency of all target nodes * @@ -201,7 +180,14 @@ class RouterTransitioner { url: connectionString, urls: urls, closeCb: this._onConnectionClose.bind(this), - optionalApis: {enableOrders: true} + optionalApis: {enableOrders: true}, + urlChangeCallback: url => { + console.log("fallback to new url:", url); + SettingsActions.changeSetting({ + setting: "activeNode", + value: url + }); + } }); } @@ -385,12 +371,10 @@ class RouterTransitioner { /** * Does the actual connection to the node, with fallback if appInit, otherwise attempts reconnect * - * @param nextState see willTransitionTo - * @param replaceState see willTransitionTo * @param appInit see willTransitionTo * @private */ - _initiateConnection(nextState, replaceState, appInit) { + _initiateConnection(appInit, resolve, reject) { if (this._autoSelection) { this._connectionManager.url = this._connectionManager.urls[0]; console.log("auto selecting to " + this._connectionManager.url); @@ -409,7 +393,7 @@ class RouterTransitioner { value: this._connectionManager.url }); } - this._onConnect(nextState, replaceState); + this._onConnect(resolve, reject); }) .catch(error => { console.error( @@ -418,16 +402,11 @@ class RouterTransitioner { new Error().stack ); if (error.name === "InvalidStateError") { - if (__ELECTRON__) { - replaceState("/"); - } else { - alert( - "Can't access local storage.\nPlease make sure your browser is not in private/incognito mode." - ); - } + alert( + "Can't access local storage.\nPlease make sure your browser is not in private/incognito mode." + ); } else { - replaceState("/init-error"); - this._callCallbacks(); + this._transitionDone(reject); } }); } else { @@ -439,7 +418,7 @@ class RouterTransitioner { value: "" }); } - this._attemptReconnect(nextState, replaceState); + this._attemptReconnect(resolve, reject); } } @@ -447,12 +426,10 @@ class RouterTransitioner { * Reconnect on error * * @param failingNodeUrl string url of node that failed - * @param nextState see willTransitionTo - * @param replaceState see willTransitionTo * @param err exception that occured * @private */ - _onResetError(failingNodeUrl, nextState, replaceState, err) { + _onResetError(failingNodeUrl, err) { console.error("onResetError:", err, failingNodeUrl); this.willTransitionToInProgress = false; this._oldChain = "old"; @@ -464,36 +441,24 @@ class RouterTransitioner { autoDismiss: 10 }); return Apis.close().then(() => { - return this.willTransitionTo( - nextState, - replaceState, - () => {}, // callback is already stored in this.callbacks - true - ); + return this.willTransitionTo(true); }); } /** * Resets the api and attempts a reconnect * - * @param nextState see willTransitionTo - * @param replaceState see willTransitionTo * @private */ - _attemptReconnect(nextState, replaceState) { + _attemptReconnect(resolve, reject) { this._oldChain = "old"; Apis.reset(this._connectionManager.url, true, undefined, { enableOrders: true }).then(instance => { instance.init_promise - .then(this._onConnect.bind(this, nextState, replaceState)) + .then(this._onConnect.bind(this, resolve, reject)) .catch( - this._onResetError.bind( - this, - this._connectionManager.url, - nextState, - replaceState - ) + this._onResetError.bind(this, this._connectionManager.url) ); }); } @@ -501,14 +466,15 @@ class RouterTransitioner { /** * Called when a connection has been established * - * @param nextState see willTransitionTo - * @param replaceState see willTransitionTo * @returns * @private */ - _onConnect(nextState, replaceState) { + _onConnect(resolve, reject) { // console.log(new Date().getTime(), "routerTransition onConnect", caller, "_connectInProgress", _connectInProgress); - if (this._connectInProgress) return this._callCallbacks(); + if (this._connectInProgress) { + console.error("MULTIPLE CONNECT IN PROGRESS"); + return; + } this._connectInProgress = true; if (Apis.instance()) { if (!Apis.instance().orders_api()) @@ -546,9 +512,8 @@ class RouterTransitioner { } } catch (err) { console.error("db init error:", err); - replaceState("/init-error"); this._connectInProgress = false; - return this._callCallbacks(); + return this._transitionDone(reject); } return Promise.all([dbPromise, SettingsStore.init()]) @@ -562,18 +527,6 @@ class RouterTransitioner { return AccountRefsStore.loadDbData(); }), WalletDb.loadDbData() - .then(() => { - // if (!WalletDb.getWallet() && nextState.location.pathname === "/") { - // replaceState("/"); - // } - if ( - nextState.location.pathname.indexOf( - "/auth/" - ) === 0 - ) { - replaceState("/"); - } - }) .then(() => { if (chainChanged) { AccountStore.reset(); @@ -589,7 +542,7 @@ class RouterTransitioner { "----- WalletDb.willTransitionTo error ----->", error ); - replaceState("/init-error"); + this._transitionDone(reject); }), WalletManagerStore.init() ]).then(() => { @@ -598,15 +551,14 @@ class RouterTransitioner { setting: "activeNode", value: this._connectionManager.url }); - this._callCallbacks(); + this._transitionDone(resolve); }); }); }) .catch(err => { console.error(err); - replaceState("/init-error"); this._connectInProgress = false; - this._callCallbacks(); + this._transitionDone(reject); }); } } diff --git a/app/stores/MarketsStore.js b/app/stores/MarketsStore.js index afa6448af7..eaed8c5179 100644 --- a/app/stores/MarketsStore.js +++ b/app/stores/MarketsStore.js @@ -61,7 +61,6 @@ class MarketsStore { call: 0 }; this.priceData = []; - this.volumeData = []; this.pendingCreateLimitOrders = []; this.activeMarket = null; this.quoteAsset = null; @@ -754,15 +753,10 @@ class MarketsStore { } _priceChart() { - // let volumeData = []; let prices = []; let open, high, low, close, volume; - // let addTime = (time, i, bucketSize) => { - // return time + i * bucketSize * 1000; - // }; - for (let i = 0; i < this.priceHistory.length; i++) { let current = this.priceHistory[i]; if (!/Z$/.test(current.key.open)) { @@ -875,88 +869,9 @@ class MarketsStore { } prices.push({time: date.getTime(), open, high, low, close, volume}); - // volumeData.push([date.getTime(), volume]); } - // max buckets returned is 200, if we get less, fill in the gaps starting at the first data point - // let priceLength = prices.length; - // if (priceLength > 0 && priceLength < 200) { - // let now = new Date(); - // let firstDate = prices[0].date; - // ensure there's a final entry close to the current time - // let i = 1; - // while (addTime(prices[0].time, i, this.bucketSize) < now) { - // i++; - // } - // let finalDate = addTime(prices[0].time, i - 1, this.bucketSize); - // if (prices[priceLength - 1].date !== finalDate) { - // if (priceLength === 1) { - // prices.push({ - // time: addTime(finalDate, -1, this.bucketSize), - // open: prices[0].close, - // high: prices[0].close, - // low: prices[0].close, - // close: prices[0].close, - // volume: 0 - // }); - // prices.push({ - // time: finalDate, - // open: prices[0].close, - // high: prices[0].close, - // low: prices[0].close, - // close: prices[0].close, - // volume: 0 - // }); - // volumeData.push([ - // addTime(finalDate, -1, this.bucketSize), - // 0 - // ]); - // } else { - // prices.push({ - // time: finalDate, - // open: prices[priceLength - 1].close, - // high: prices[priceLength - 1].close, - // low: prices[priceLength - 1].close, - // close: prices[priceLength - 1].close, - // volume: 0 - // }); - // } - // volumeData.push([finalDate, 0]); - // } - - // Loop over the data and fill in any blank time periods - // for (let ii = 0; ii < prices.length - 1; ii++) { - // // If next date is beyond one bucket up - // if ( - // prices[ii + 1].time !== - // addTime(prices[ii].time, 1, this.bucketSize) - // ) { - // // Break if next date is beyond now - // if ( - // addTime(prices[ii].time, 1, this.bucketSize) > - // now - // ) { - // break; - // } - // - // prices.splice(ii + 1, 0, { - // time: addTime(prices[ii].time, 1, this.bucketSize), - // open: prices[ii].close, - // high: prices[ii].close, - // low: prices[ii].close, - // close: prices[ii].close, - // volume: 0 - // }); - // volumeData.splice(ii + 1, 0, [ - // addTime(prices[ii].time, 1, this.bucketSize), - // 0 - // ]); - // } - // } - // } - this.priceData = prices; - // this.volumeData = volumeData; this._notifySubscriber("subscribeBars"); } diff --git a/app/stores/SettingsStore.js b/app/stores/SettingsStore.js index 1377b97751..8679cb0dec 100644 --- a/app/stores/SettingsStore.js +++ b/app/stores/SettingsStore.js @@ -246,7 +246,13 @@ class SettingsStore { "OPEN.ZEC", "OPEN.WAVES", "OPEN.ZRX", - "OPEN.NEO" + "OPEN.NEO", + "OPEN.XRP", + "OPEN.XMR", + "RUDEX.BTC", + "RUDEX.ETH", + "RUDEX.DGB", + "RUDEX.EOS" ], markets_39f5e2ed: [ // TESTNET diff --git a/appveyor.yml b/appveyor.yml index 377869179d..9dcf8902e1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,8 +10,6 @@ install: build: off platform: - x64 -cache: - - node_modules -> appveyor.yml& before_package: echo Before package after_test: diff --git a/build.sh b/build.sh index 300b837359..57856191b0 100755 --- a/build.sh +++ b/build.sh @@ -1,9 +1,22 @@ cd $TRAVIS_BUILD_DIR unamestr=`uname` +echo TRAVIS_BRANCH=$TRAVIS_BRANCH +## Set a branch variable so we can detect the current branch in webpack if we're in staging or develop branch +if [ $unamestr = 'Linux' ] && [ $TRAVIS_BRANCH = 'staging' ] +then + export BRANCH=$TRAVIS_BRANCH +fi +if [ $unamestr = 'Linux' ] && [ $TRAVIS_BRANCH = 'develop' ] && [ -z $TRAVIS_PULL_REQUEST_BRANCH ] +then + export BRANCH=$TRAVIS_BRANCH +fi + +## Build the hash wallet if wer're on Linux if [ "$unamestr" == 'Linux' ] then npm run build-hash fi +## Build the binaries if this is a release tag if [ $TRAVIS_TAG ] then npm run-script package diff --git a/charting_library/charting_library.min.js b/charting_library/charting_library.min.js index 96994a0889..39538b9b81 100644 --- a/charting_library/charting_library.min.js +++ b/charting_library/charting_library.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.12 (internal id 7580da73 @ 2018-05-14 05:13:04.428607)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.12 (internal id 630b704a @ 2018-06-06 02:16:11.305509)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/charting_library/static/base.scss b/charting_library/static/base.scss new file mode 100644 index 0000000000..0727aabf45 --- /dev/null +++ b/charting_library/static/base.scss @@ -0,0 +1,638 @@ +// main colors + +$primary-background: #383838 !default; +$primary-border-color: #535353 !default; +$primary-background-active: $primary-border-color !default; + +$primary-text-color: #bababa !default; +$primary-text-color-active: #059cce !default; + +$layout-top-button-border-color: $primary-border-color !default; + +$button-success-color: #fff !default; +$button-success-border: $primary-text-color-active !default; +$button-success-background: $primary-text-color-active !default; + +$button-default-color: $primary-text-color !default; +$button-default-border: $primary-background-active !default; +$button-default-background: $primary-background-active !default; + +$button-cancel-color: $primary-text-color !default; +$button-cancel-border: $primary-background-active !default; +$button-cancel-background: $primary-background-active !default; + +$primary-btn-color: $primary-text-color !default; +$primary-btn-background: #262626 !default; +$primary-btn-background-active: #2d2d2d !default; +$primary-btn-border-active: $primary-background-active !default; + +$icon-light-color: $primary-text-color !default; +$icon-light-color-active: $primary-text-color-active !default; + +.chart-page .chart-container { + border: none; +} + +.header-chart-panel .group { + margin: 1px 0; +} + +/*Header buttons background color */ +.header-chart-panel .button, +.symbol-search-dialog .symbol-block input, +input.symbol-edit, +.favored-list-container span { + background: #9e9e9e21; + border: none; +} + +.header-chart-panel .button.disabled { + background: #9e9e9e21; + border: none; + opacity: 50%; +} + +/* Disabled features background color */ +.feature-no-touch .header-chart-panel .button.disabled:active, +.feature-touch .header-chart-panel .button.disabled:active, +.header-chart-panel .button.disabled, +.header-chart-panel .button.disabled.active { + /*background: red;*/ +} + +/* Small close button */ +.tv-close-panel { + display: none; + z-index: 999; +} + +.tv-close-panel.top { + bottom: -15px; + background: $primary-background; + border-color: $primary-background; + margin-left: -5px; + height: 8px; +} + +.tv-close-panel.top:after { + display: block; + content: ""; + position: absolute; + width: 0; + height: 0; + border-style: solid; + border-width: 0 5px 4px 5px; + border-color: transparent transparent $icon-light-color transparent; + top: 2px; + left: 50%; + margin-left: -5px; +} + +.favored-list-container span { + color: $icon-light-color; +} + +//.header-chart-panel-content .group svg { +// fill: #bababa; +//} + +//.header-chart-panel .button, .apply-common-tooltip { +// background-color: #262626 !important; +//} + +//.header-chart-panel .intervals-container .interval-dialog-button { +// border-right-color: #383838; +//} + +//.header-chart-panel .header-group-indicators .study-template-widget .submenu{ +// border-left-color: #383838; +//} + +.on-widget .getimage .icon { + fill: $icon-light-color !important; +} + +.pane-legend { + margin-top: 12px; + margin-left: 12px; +} + +.layout__area--top { + .header-chart-panel-sizer { + height: 42px !important; + .header-chart-panel-content { + padding: 5px !important; + background: $primary-background; + + .button, .apply-common-tooltip { + border: 1px solid $layout-top-button-border-color !important; + background-color: $primary-btn-background; + } + + // template button border + .favored-list-container .submenu { + border-color: $primary-background; + } + + } + } + + // header buttons + .apply-common-tooltip { + cursor: pointer; + + color: $primary-btn-color !important; + + svg { + fill: $primary-btn-color !important; + } + + i { + background-color: $primary-btn-color !important; + } + + &:hover { + background-color: $primary-btn-background-active; + &:before { + border-color: transparent !important; + } + + color: $icon-light-color-active !important; + + svg { + fill: $icon-light-color-active !important; + } + + i { + background-color: $icon-light-color-active !important; + } + } + } + + // study-template header button + + .study-template-widget { + .apply-common-tooltip { + border: 0 !important; + margin-left: 1px; + .tv-caret { + margin-left: 7px; + } + } + } + + // chart-style-widget header button + + .chart-style-widget { + .apply-common-tooltip { + margin-left: 1px; + .tv-caret { + margin-left: 7px; + } + } + } + + // header group intervals + .header-group-intervals { + margin-right: 2px; + .interval-dialog-button { + margin: 0 1px; + border-right: none !important; + } + .tv-caret { + margin-left: 7px; + } + } +} + +// dropdown list styling when user click on some dropdown btn + +.charts-popup-list { + border: none; + background-color: $primary-background; + + .special { + color: $primary-text-color-active !important; + background-color: $primary-background-active !important; + } + + .item, span { + color: $primary-text-color !important; + + //hover state + &:hover { + color: $primary-text-color-active !important; + + background: $primary-background-active !important; + + span { + color: $primary-text-color-active !important; + } + } + + //active state + &.active { + color: $icon-light-color-active !important; + + background-color: $primary-background-active; + } + + } + + .separator { + border-color: $primary-border-color; + } + +} + +/* buttons */ + +.tv-button--default { + color: $button-default-color; + border-color: $button-default-border; + background-color: $button-default-background; + &:hover { + color: $button-default-color; + border-color: lighten($button-default-border, 20%) !important; + background-color: lighten($button-default-background, 20%) !important; + } +} + +.tv-button--success { + color: $button-success-color; + border-color: $button-success-border; + background-color: $button-success-background; + &:hover { + color: $button-success-color; + border-color: lighten($button-success-border, 20%) !important; + background-color: lighten($button-success-background, 20%) !important; + } +} + +/* dialogs */ + +.tv-dialog { + + background-color: $primary-background; + + color: $primary-text-color; + + .js-reset-button, .js-dialog__close { + svg { + fill: $primary-text-color; + } + } + + .tv-dialog__title { + color: $primary-text-color + } + + .tv-dialog__section--title { + border-color: $primary-border-color; + } + + .tv-search-row { + border-color: $primary-border-color; + input { + background-color: $primary-background; + color: $primary-text-color; + } + } + + .tv-insert-study-item { + &:hover { + color: $primary-text-color-active; + background-color: $primary-background-active; + } + } + + .tv-text { + color: $primary-text-color; + p { + color: $primary-text-color; + } + } + + // when user clicks on save template as + .tv-control-input { + color: $primary-text-color; + background-color: $primary-background; + } + + .tv-dropdown__body { + background-color: $primary-background !important; + } + + .tv-autocomplete__dropdown-item { + color: $primary-text-color; + background-color: $primary-background !important; + &:hover { + color: $primary-text-color-active; + } + } +} + +._tv-dialog { + border-color: $primary-background-active; + background-color: $primary-background; + + * { + color: $primary-text-color; + } + + .tv-tabs { + &:before { + background-color: $primary-border-color; + } + } + + input { + border-color: $primary-border-color !important; + background-color: $primary-background; + + color: $primary-text-color !important; + } + + a { + color: $primary-text-color !important; + &:hover { + color: $primary-text-color-active !important; + } + } + + label { + color: $primary-text-color; + } + + /* buttons */ + + .dialog-buttons { + ._tv-button.tv-left { + color: $button-default-color !important; + border-color: $button-default-border !important; + background-color: $button-default-background !important; + &:hover { + color: $button-default-color !important; + border-color: lighten($button-default-border, 20%) !important; + background-color: lighten($button-default-background, 20%) !important; + } + } + ._tv-button.ok { + color: $button-success-color !important; + border-color: $button-success-border !important; + background-color: $button-success-background !important; + &:hover { + color: $button-success-color !important; + border-color: lighten($button-success-border, 20%) !important; + background-color: lighten($button-success-background, 20%) !important; + } + } + ._tv-button.cancel { + color: $button-cancel-color !important; + border-color: $button-cancel-border !important; + background-color: $button-cancel-background !important; + &:hover { + color: $button-cancel-color !important; + border-color: lighten($button-cancel-border, 20%) !important; + background-color: lighten($button-cancel-background, 20%) !important; + } + } + } + + /* select */ + .tv-select-container.dialog { + cursor: pointer; + background-color: $primary-background !important; + color: $primary-text-color !important; + border-color: $primary-border-color !important; + + .sbOptions { + li, a { + background-color: $primary-background; + color: $primary-text-color; + &:hover { + background-color: $primary-background-active; + color: $primary-text-color-active; + } + } + } + + .sbToggle, .sbSelector { + cursor: pointer; + } + } + + /* input number */ + .ticker.tv-text-input.inset.dialog { + background-color: $primary-background; + color: $primary-text-color; + border-color: $primary-border-color; + } + .tv-ticker { + background-color: $primary-background; + color: $primary-text-color; + .tv-ticker__btn { + svg { + fill: $primary-text-color; + } + background-color: $primary-background; + border-color: $primary-border-color; + } + } + /* end input number */ + + /* color picker */ + .colorpicker-widget.tvcolorpicker-widget { + border-color: $primary-border-color !important; + } + + /* custom-select (line selector) */ + .custom-select { + .switcher { + cursor: pointer; + background-color: $primary-background !important; + border-color: $primary-border-color !important; + &:hover { + border-color: $primary-border-color !important; + &:before { + border-color: $primary-border-color !important; + } + } + } + .items { + background-color: $primary-background !important; + border-color: $primary-border-color !important; + .item { + background-color: $primary-background !important; + &.selected { + background-color: $primary-background-active !important; + } + &:hover { + background-color: $primary-background-active !important; + } + } + } + } + + /* font-size selector */ + .tv-select-container-fontsize { + border-color: $primary-border-color !important; + ul { + border-color: $primary-border-color !important; + } + } + +} + +/* end dialogs*/ + +/* bottom control bar */ +.chart-controls-bar { + .apply-common-tooltip { + color: $primary-text-color !important; + &:hover { + background-color: transparent !important; + color: $primary-text-color-active !important; + } + } +} + +/* go to dialog */ + +[class|=dialog] { + background-color: $primary-background; + [class|=header] { + color: $primary-text-color; + border-color: $primary-border-color; + [class|=close] { + svg { + fill: $primary-text-color + } + &:hover { + svg { + fill: $primary-text-color-active; + } + } + } + } + [class|=body] { + input { + color: $primary-text-color !important; + background-color: $primary-background !important; + border-color: $primary-border-color !important; + } + } +} + + +.layout__area--left { + [class|=separator] { + background-color: $primary-border-color; + } + [class|=inner] { + background: $primary-background; + [class|=buttonIcon] { + color: $primary-text-color; + } + [class|=button] { + &:hover { + svg { + fill: $primary-text-color-active !important; + } + } + } + span { + svg { + fill: $icon-light-color; + } + } + [class|=isActive] { + span { + svg { + fill: $icon-light-color-active; + } + } + } + } +} + +.tv-floating-toolbar { + border-color: $primary-border-color; + background-color: $primary-background; + + .tv-grouped-floating-toolbar__sub-widget { + transition: none; + border-color: $primary-border-color; + background-color: $primary-background; + &:hover { + border-color: $primary-border-color !important; + background-color: $primary-background !important; + } + } + + .tv-floating-toolbar__content { + background-color: $primary-background !important; + + .tv-floating-toolbar__widget { + background-color: $primary-background !important; + border-color: $primary-border-color; + + .apply-common-tooltip { + background-color: $primary-background !important; + } + } + + } + + &.tv-linetool-properties-toolbar { + .tv-linetool-properties-toolbar__color-picker { + svg { + fill: $primary-background; + .bg { + fill: $primary-background; + } + .icon { + fill: $primary-text-color; + } + &:hover { + .bg { + fill: $primary-background; + } + } + } + } + + .tv-linetool-properties-toolbar__icon { + svg { + path { + fill: $primary-text-color !important; + } + } + } + } +} + +/* dropdown menu when click on some items + on left side menu +*/ + +[class|=menuWrap] { + [class|=menu] { + background-color: $primary-background !important; + [class|=item] { + cursor: pointer; + color: $primary-text-color; + background-color: $primary-background !important; + [class|=labelRow] { + color: $primary-text-color !important; + } + &:hover { + color: $primary-text-color-active; + background-color: $primary-background-active !important; + [class|=labelRow] { + color: $primary-text-color-active !important; + } + } + } + } +} \ No newline at end of file diff --git a/charting_library/static/bundles/go-to-date-dialog-impl.1e876e63af6d26496269.js b/charting_library/static/bundles/go-to-date-dialog-impl.5faeb6b7a961fd527d9b.js similarity index 98% rename from charting_library/static/bundles/go-to-date-dialog-impl.1e876e63af6d26496269.js rename to charting_library/static/bundles/go-to-date-dialog-impl.5faeb6b7a961fd527d9b.js index 69496f01be..3bf4fde867 100644 --- a/charting_library/static/bundles/go-to-date-dialog-impl.1e876e63af6d26496269.js +++ b/charting_library/static/bundles/go-to-date-dialog-impl.5faeb6b7a961fd527d9b.js @@ -1,7 +1,7 @@ webpackJsonp([6],{108:function(e,t,n){"use strict";function o(e){return t=function(t){function n(e,n){var o=t.call(this,e,n)||this;return o._getWrappedComponent=function(e){o._instance=e},o}return r.__extends(n,t),n.prototype.componentDidMount=function(){this._instance.componentWillEnter&&this.context.lifecycleProvider.registerWillEnterCb(this._instance.componentWillEnter.bind(this._instance)),this._instance.componentDidEnter&&this.context.lifecycleProvider.registerDidEnterCb(this._instance.componentDidEnter.bind(this._instance)),this._instance.componentWillLeave&&this.context.lifecycleProvider.registerWillLeaveCb(this._instance.componentWillLeave.bind(this._instance)),this._instance.componentDidLeave&&this.context.lifecycleProvider.registerDidLeaveCb(this._instance.componentDidLeave.bind(this._instance))},n.prototype.render=function(){return i.createElement(e,r.__assign({},this.props,{ref:this._getWrappedComponent}),this.props.children)},n}(i.PureComponent),t.displayName="Lifecycle Consumer",t.contextTypes={lifecycleProvider:s.object},t;var t}var r,i,s,a;Object.defineProperty(t,"__esModule",{value:!0}),r=n(5),i=n(2),s=n(86),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(i.PureComponent),t.LifecycleConsumer=a,t.makeTransitionGroupLifecycleConsumer=o},153:function(e,t){e.exports={body:"body-1yAIljnK-"}},154:function(e,t){e.exports={footer:"footer-AwxgkLHY-"}},155:function(e,t){e.exports={header:"header-2Hz0Lxou-",close:"close-3H_MMLbw-"}},156:function(e,t){e.exports={message:"message-1CYdTy_T-",error:"error-1u_m-Ehm-"}},157:function(e,t){e.exports={dialog:"dialog-13-QRYuG-",rounded:"rounded-1GLivxii-",shadowed:"shadowed-30OTTAts-"}},182:function(e,t,n){"use strict";function o(e){return r.createElement("div",{className:i.body,ref:e.reference},e.children)}var r,i;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(153),t.Body=o},183:function(e,t,n){"use strict";var o,r,i,s;Object.defineProperty(t,"__esModule",{value:!0}),o=n(185),t.Header=o.Header,r=n(184),t.Footer=r.Footer,i=n(182),t.Body=i.Body,s=n(186),t.Message=s.Message},184:function(e,t,n){"use strict";function o(e){return r.createElement("div",{className:i.footer,ref:e.reference},e.children)}var r,i;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(154),t.Footer=o},185:function(e,t,n){"use strict";function o(e){return r.createElement("div",{className:i.header,"data-dragg-area":!0,ref:e.reference},e.children,r.createElement(a.Icon,{className:i.close,icon:s,onClick:e.onClose}))}var r,i,s,a;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(155),s=n(109),a=n(77),t.Header=o},186:function(e,t,n){"use strict";function o(e){var t,n;return e.text?t=r.createElement("span",null,e.text):e.html&&(t=r.createElement("span",{dangerouslySetInnerHTML:{__html:e.html}})),n=i.message,e.isError&&(n+=" "+i.error),r.createElement(s.CSSTransitionGroup,{transitionName:"message",transitionEnterTimeout:c.dur,transitionLeaveTimeout:c.dur},t?r.createElement("div",{className:n,key:"0" },r.createElement(a.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:e.onClickOutside},t)):null)}var r,i,s,a,c;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(156),s=n(46),a=n(107),c=n(28),t.Message=o},187:function(e,t,n){"use strict";function o(e){var t,n=e.rounded,o=void 0===n||n,a=e.shadowed,c=void 0===a||a,u=e.className,l=void 0===u?"":u,d=s(i.dialog,(t={},t[l]=!!l,t[i.rounded]=o,t[i.shadowed]=c,t[i.animated]=i.animated,t)),p={bottom:e.bottom,left:e.left,maxWidth:e.width,right:e.right,top:e.top,zIndex:e.zIndex};return r.createElement("div",{className:d,ref:e.reference,style:p,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onClick:e.onClick},e.children)}var r,i,s;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(157),s=n(26),t.Dialog=o},188:function(e,t,n){"use strict";function o(){d=document.createElement("div"),document.body.appendChild(d),i()}function r(e,t){p.getItems().forEach(function(n){n!==t&&m.emitEvent(e+":"+n)})}function i(e){a.render(s.createElement(c.TransitionGroup,{component:"div"},Array.from(f.values())),d,e)}var s,a,c,u,l,d,p,h,m,f;Object.defineProperty(t,"__esModule",{value:!0}),s=n(2),a=n(55),c=n(46),u=n(110),l=function(){function e(){this._storage=[]}return e.prototype.add=function(e){this._storage.push(e)},e.prototype.remove=function(e){this._storage=this._storage.filter(function(t){return e!==t})},e.prototype.getIndex=function(e){return this._storage.findIndex(function(t){return e===t})},e.prototype.toTop=function(e){this.remove(e),this.add(e)},e.prototype.has=function(e){return this._storage.includes(e)},e.prototype.getItems=function(){return this._storage},e}(),t.EVENTS={ZindexUpdate:"ZindexUpdate"},p=new l,h=150,m=new u,f=new Map,function(e){function n(e){p.has(e)||(p.add(e),r(t.EVENTS.ZindexUpdate,e))}function o(e){p.remove(e),f.delete(e)}function s(e){return p.getIndex(e)+h}function a(e,t,n){f.set(e,t),i(n)}function c(e,t){o(e),i(t)}function u(){return m}e.registerWindow=n,e.unregisterWindow=o,e.getZindex=s,e.renderWindow=a,e.removeWindow=c,e.getStream=u}(t.OverlapManager||(t.OverlapManager={})),o()},189:function(e,t,n){"use strict";function o(e){return t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.componentWillEnter=function(e){this.props.beforeOpen?this.props.beforeOpen(e):e()},n.prototype.componentDidEnter=function(){this.props.afterOpen&&this.props.afterOpen()},n.prototype.componentWillLeave=function(e){this.props.beforeClose?this.props.beforeClose(e):e()},n.prototype.componentDidLeave=function(){this.props.afterClose&&this.props.afterClose()},n.prototype.render=function(){return s.createElement(e,i.__assign({},this.props))},n}(s.PureComponent),t.displayName="OverlapLifecycle("+(e.displayName||"Component")+")",t;var t}function r(e){var t,n=u.makeTransitionGroupLifecycleProvider(l.makeTransitionGroupLifecycleConsumer(o(e)));return t=function(e){function t(t){var n=e.call(this,t)||this;return n._onZIndexUpdate=function(){ n.props.isOpened&&("parent"===n.props.root?n.forceUpdate():n._renderWindow(n.props))},n._uuid=d.guid(),n._zIndexUpdateEvent=c.EVENTS.ZindexUpdate+":"+n._uuid,n}return i.__extends(t,e),t.prototype.componentDidMount=function(){this._subscribe()},t.prototype.componentWillUnmount=function(){this._unsubscribe(),c.OverlapManager.removeWindow(this._uuid)},t.prototype.componentWillReceiveProps=function(e){"parent"!==this.props.root&&this._renderWindow(e)},t.prototype.render=function(){return"parent"===this.props.root?s.createElement(a.TransitionGroup,{component:"div"},this._createContent(this.props)):null},t.prototype._renderWindow=function(e){c.OverlapManager.renderWindow(this._uuid,this._createContent(e))},t.prototype._createContent=function(e){return e.isOpened?(c.OverlapManager.registerWindow(this._uuid),s.createElement(n,i.__assign({},e,{key:this._uuid,zIndex:c.OverlapManager.getZindex(this._uuid)}),e.children)):(c.OverlapManager.unregisterWindow(this._uuid),null)},t.prototype._subscribe=function(){c.OverlapManager.getStream().on(this._zIndexUpdateEvent,this._onZIndexUpdate)},t.prototype._unsubscribe=function(){c.OverlapManager.getStream().off(this._zIndexUpdateEvent,this._onZIndexUpdate)},t}(s.PureComponent),t.displayName="Overlapable("+(e.displayName||"Component")+")",t}var i,s,a,c,u,l,d;Object.defineProperty(t,"__esModule",{value:!0}),i=n(5),s=n(2),a=n(46),c=n(188),u=n(191),l=n(108),d=n(64),t.makeOverlapable=r},191:function(e,t,n){"use strict";function o(e){return t=function(t){function n(e){var n=t.call(this,e)||this;return n._registerWillEnterCb=function(e){n._willEnter.push(e)},n._registerDidEnterCb=function(e){n._didEnter.push(e)},n._registerWillLeaveCb=function(e){n._willLeave.push(e)},n._registerDidLeaveCb=function(e){n._didLeave.push(e)},n._willEnter=[],n._didEnter=[],n._willLeave=[],n._didLeave=[],n}return r.__extends(n,t),n.prototype.getChildContext=function(){return{lifecycleProvider:{registerWillEnterCb:this._registerWillEnterCb,registerDidEnterCb:this._registerDidEnterCb,registerWillLeaveCb:this._registerWillLeaveCb,registerDidLeaveCb:this._registerDidLeaveCb}}},n.prototype.componentWillEnter=function(e){var t=this._willEnter.map(function(e){return new Promise(function(t){e(t)})});Promise.all(t).then(e)},n.prototype.componentDidEnter=function(){this._didEnter.forEach(function(e){e()})},n.prototype.componentWillLeave=function(e){var t=this._willLeave.map(function(e){return new Promise(function(t){e(t)})});Promise.all(t).then(e)},n.prototype.componentDidLeave=function(){this._didLeave.forEach(function(e){e()})},n.prototype.render=function(){return i.createElement(e,r.__assign({},this.props),this.props.children)},n}(i.PureComponent),t.displayName="Lifecycle Provider",t.childContextTypes={lifecycleProvider:s.object},t;var t}var r,i,s;Object.defineProperty(t,"__esModule",{value:!0}),r=n(5),i=n(2),s=n(86),t.makeTransitionGroupLifecycleProvider=o},201:function(e,t){e.exports={inputWrapper:"inputWrapper-23iUt2Ae-",textInput:"textInput-3hvomQp9-",error:"error-2ydrzcvg-",success:"success-2y4Cbw_L-", -xsmall:"xsmall-2Dz_yiDV-",small:"small-3g0mV7FW-",large:"large-CZ_w52Xn-",iconed:"iconed-2X3rffL9-",inputIcon:"inputIcon-nJhQLYdg-",clearable:"clearable-3HVD9v3B-",clearIcon:"clearIcon-UZyPhrkf-",grouped:"grouped-2xS7_jZ2-"}},255:function(e,t){e.exports={loader:"loader-1aihbDEL-",warning:"warning-1sksz0Rq-",danger:"danger-1jVFBwRj-",xsmall:"xsmall-1XIYvP4K-",disabled:"disabled-2jaDvv_v-",button:"button-2jCWN5M1-",hiddenText:"hiddenText-13D-S4nC-",secondary:"secondary-2H-Jwmir-",small:"small-2fwP8rrU-",base:"base-2PiGQ3aT-",active:"active-3Eem2fUt-",ghost:"ghost-2xkVjo4o-",success:"success-13aJxw0L-",large:"large-1a-qmr37-",growable:"growable-S0qQuxEB-",link:"link-1v4pOPj2-",grouped:"grouped-3T2Y_EXg-",text:"text-1d01iK8L-",secondaryScript:"secondaryScript-3pO7_bSM-",withPadding:"withPadding-UPhHkA1c-",primary:"primary-nwbhr-QZ-"}},256:function(e,t){e.exports={dialog:"dialog-2MaUXXMw-",dragging:"dragging-3oeGgbIQ-"}},257:function(e,t){e.exports={loader:"loader-3q6az1FO-",item:"item-I1y2jPt8-","tv-button-loader":"tv-button-loader-or3q47Bu-",black:"black-29_3FgL9-",white:"white-PhPAMkPg-"}},258:function(e,t){e.exports={calendar:"calendar-31T-f8xW-",header:"header-1IspLgQG-",title:"title-165i_Hrv-",switchBtn:"switchBtn-3TukPHdl-",prev:"prev-x9isN-kp-",next:"next-34HZFkxR-",month:"month-2hQY5F0z-",weekdays:"weekdays-uTDB6j1H-",weeks:"weeks-2XtkuRel-",week:"week-5_tvG-8b-",day:"day-1IQ3pxmF-",disabled:"disabled-3CCvhen1-",selected:"selected-1HN89txM-",currentDay:"currentDay-3Ojny1au-",otherMonth:"otherMonth-3Wqk07bY-"}},259:function(e,t){e.exports={clock:"clock-24NOooZu-",header:"header-2zhGNKci-",number:"number-2B8nA4rf-",active:"active-p8XQNXmZ-",body:"body-1lkcbofs-",clockFace:"clockFace-ratNcUJ8-",face:"face-2S_dz-Lt-",inner:"inner-1O9iOFrM-",hand:"hand-14LdqePA-",knob:"knob-3OZv5WLP-",centerDot:"centerDot-1Fru2d4j-"}},322:function(e,t,n){"use strict";function o(e){switch(e){case"default":return u.base;case"primary":return u.primary;case"secondary":return u.secondary;case"secondary-script":return u.secondaryScript;case"success":return u.success;case"warning":return u.warning;case"danger":return u.danger;case"link":return u.link;default:return""}}function r(e){switch(e){case"xsmall":return u.xsmall;case"small":return u.small;case"large":return u.large;default:return""}}function i(e){switch(e){case"ghost":return u.ghost;default:return""}}function s(e){var t,n=e.active,s=void 0===n||n,h=e.children,m=e.className,f=void 0===m?"":m,_=e.disabled,v=void 0!==_&&_,g=e.grouped,y=void 0!==g&&g,w=e.growable,E=void 0!==w&&w,M=e.id,b=void 0===M?0:M,C=e.onClick,k=e.reference,x=e.size,D=e.theme,S=e.type,P=void 0===S?"default":S,T=e.loading,N=void 0!==T&&T,L=e.withPadding,O=void 0===L||L,H=e.title,I=void 0===H?"":H,W=e.disabledClassName,z=e.tabIndex,j=void 0===z?0:z,F=e.component,V=void 0===F?"button":F,R=e.target,Y=void 0===R?"":R,G=e.href,U=void 0===G?"":G,B=c((t={},t[f]=!!f,t[u.button]=!0,t[u.active]=s&&!v,t[W||u.disabled]=v,t[u.grouped]=y,t[u.growable]=E,t[u.withPadding]=O,t[r(x)]=!!x,t[i(D)]=!!D,t[o(P)]=!0, +xsmall:"xsmall-2Dz_yiDV-",small:"small-3g0mV7FW-",large:"large-CZ_w52Xn-",iconed:"iconed-2X3rffL9-",inputIcon:"inputIcon-nJhQLYdg-",clearable:"clearable-3HVD9v3B-",clearIcon:"clearIcon-UZyPhrkf-",grouped:"grouped-2xS7_jZ2-"}},255:function(e,t){e.exports={ghost:"ghost-2xkVjo4o-",primary:"primary-nwbhr-QZ-",success:"success-13aJxw0L-",danger:"danger-1jVFBwRj-",warning:"warning-1sksz0Rq-",secondary:"secondary-2H-Jwmir-",button:"button-2jCWN5M1-",withPadding:"withPadding-UPhHkA1c-",hiddenText:"hiddenText-13D-S4nC-",text:"text-1d01iK8L-",loader:"loader-1aihbDEL-",base:"base-2PiGQ3aT-",secondaryScript:"secondaryScript-3pO7_bSM-",link:"link-1v4pOPj2-",xsmall:"xsmall-1XIYvP4K-",small:"small-2fwP8rrU-",large:"large-1a-qmr37-",grouped:"grouped-3T2Y_EXg-",growable:"growable-S0qQuxEB-",active:"active-3Eem2fUt-",disabled:"disabled-2jaDvv_v-"}},256:function(e,t){e.exports={dialog:"dialog-2MaUXXMw-",dragging:"dragging-3oeGgbIQ-"}},257:function(e,t){e.exports={loader:"loader-3q6az1FO-",item:"item-I1y2jPt8-","tv-button-loader":"tv-button-loader-or3q47Bu-",black:"black-29_3FgL9-",white:"white-PhPAMkPg-"}},258:function(e,t){e.exports={calendar:"calendar-31T-f8xW-",header:"header-1IspLgQG-",title:"title-165i_Hrv-",switchBtn:"switchBtn-3TukPHdl-",prev:"prev-x9isN-kp-",next:"next-34HZFkxR-",month:"month-2hQY5F0z-",weekdays:"weekdays-uTDB6j1H-",weeks:"weeks-2XtkuRel-",week:"week-5_tvG-8b-",day:"day-1IQ3pxmF-",disabled:"disabled-3CCvhen1-",selected:"selected-1HN89txM-",currentDay:"currentDay-3Ojny1au-",otherMonth:"otherMonth-3Wqk07bY-"}},259:function(e,t){e.exports={clock:"clock-24NOooZu-",header:"header-2zhGNKci-",number:"number-2B8nA4rf-",active:"active-p8XQNXmZ-",body:"body-1lkcbofs-",clockFace:"clockFace-ratNcUJ8-",face:"face-2S_dz-Lt-",inner:"inner-1O9iOFrM-",hand:"hand-14LdqePA-",knob:"knob-3OZv5WLP-",centerDot:"centerDot-1Fru2d4j-"}},322:function(e,t,n){"use strict";function o(e){switch(e){case"default":return u.base;case"primary":return u.primary;case"secondary":return u.secondary;case"secondary-script":return u.secondaryScript;case"success":return u.success;case"warning":return u.warning;case"danger":return u.danger;case"link":return u.link;default:return""}}function r(e){switch(e){case"xsmall":return u.xsmall;case"small":return u.small;case"large":return u.large;default:return""}}function i(e){switch(e){case"ghost":return u.ghost;default:return""}}function s(e){var t,n=e.active,s=void 0===n||n,h=e.children,m=e.className,f=void 0===m?"":m,_=e.disabled,v=void 0!==_&&_,g=e.grouped,y=void 0!==g&&g,w=e.growable,E=void 0!==w&&w,M=e.id,b=void 0===M?0:M,C=e.onClick,k=e.reference,x=e.size,D=e.theme,S=e.type,P=void 0===S?"default":S,T=e.loading,N=void 0!==T&&T,L=e.withPadding,O=void 0===L||L,H=e.title,I=void 0===H?"":H,W=e.disabledClassName,z=e.tabIndex,j=void 0===z?0:z,F=e.component,V=void 0===F?"button":F,R=e.target,Y=void 0===R?"":R,G=e.href,U=void 0===G?"":G,B=c((t={},t[f]=!!f,t[u.button]=!0,t[u.active]=s&&!v,t[W||u.disabled]=v,t[u.grouped]=y,t[u.growable]=E,t[u.withPadding]=O,t[r(x)]=!!x,t[i(D)]=!!D,t[o(P)]=!0, t)),A="default"===P?"black":"white",X=a.createElement("span",{key:"1",className:u.text},h);return N&&(X=a.createElement("span",{key:"2",className:u.loader},a.createElement(d.Loader,{color:A}))),a.createElement(l.CSSTransitionGroup,{component:V,tabIndex:j,transitionEnterTimeout:p.dur,transitionLeaveTimeout:p.dur,transitionName:"body",className:B,disabled:v,key:b,onClick:N?void 0:C,ref:k,title:I,target:Y,href:U},a.createElement("span",{className:u.hiddenText},h),X)}var a,c,u,l,d,p;Object.defineProperty(t,"__esModule",{value:!0}),a=n(2),c=n(26),u=n(255),l=n(46),d=n(327),p=n(28),t.Button=s},323:function(e,t){"use strict";function n(e,t,n){return e+t>n&&(e=n-t),e<0&&(e=0),e}function o(e){return{x:e.pageX,y:e.pageY}}function r(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=this;this._drag=null,this._onMouseDragStart=function(e){e.preventDefault(),n._dragStart(o(e))},this._onTouchDragStart=function(e){n._dragStart(r(e))},this._onMouseDragMove=function(e){n._dragMove(o(e))},this._onTouchDragMove=function(e){e.preventDefault(),n._dragMove(r(e))},this._onDragStop=function(){n._drag=null,n._header.classList.remove("dragging")},this._dialog=e,this._header=t,t.addEventListener("mousedown",this._onMouseDragStart),t.addEventListener("touchstart",this._onTouchDragStart),document.addEventListener("mousemove",this._onMouseDragMove),document.addEventListener("touchmove",this._onTouchDragMove),document.addEventListener("mouseup",this._onDragStop),document.addEventListener("touchend",this._onDragStop)}return e.prototype.destroy=function(){this._header.removeEventListener("mousedown",this._onMouseDragStart),this._header.removeEventListener("touchstart",this._onTouchDragStart),document.removeEventListener("mousemove",this._onMouseDragMove),document.removeEventListener("touchmove",this._onTouchDragMove),document.removeEventListener("mouseup",this._onDragStop),document.removeEventListener("touchend",this._onDragStop)},e.prototype._dragStart=function(e){var t=this._dialog.getBoundingClientRect();this._drag={startX:e.x,startY:e.y,dialogX:t.left,dialogY:t.top},this._dialog.style.left=t.left+"px",this._dialog.style.top=t.top+"px",this._header.classList.add("dragging")},e.prototype._dragMove=function(e){var t,n;this._drag&&(t=e.x-this._drag.startX,n=e.y-this._drag.startY,this._moveDialog(this._drag.dialogX+t,this._drag.dialogY+n))},e.prototype._moveDialog=function(e,t){var o=this._dialog.getBoundingClientRect();this._dialog.style.left=n(e,o.width,window.innerWidth)+"px",this._dialog.style.top=n(t,o.height,window.innerHeight)+"px"},e}();t.DragHandler=i},324:function(e,t,n){"use strict";var o,r,i,s,a,c,u,l,d,p,h;Object.defineProperty(t,"__esModule",{value:!0}),o=n(5),r=n(2),i=n(187),s=n(189),a=n(108),c=n(107),u=n(256),l=n(323),d=n(325),p=n(26),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._setDialog=function(e){e&&(t._dialog=e)},t}return o.__extends(t,e),t.prototype.render=function(){return r.createElement("span",{ style:{zIndex:this.props.zIndex}},r.createElement(c.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:this.props.onClickOutside},r.createElement(i.Dialog,o.__assign({},this.props,{reference:this._setDialog,className:p(u.dialog,this.props.className)}),this.props.children)))},t.prototype.componentDidMount=function(){if(this._dialog){var e=this._dialog.querySelector("[data-dragg-area]");e&&(this._drag=new l.DragHandler(this._dialog,e)),this._resize=new d.ResizeHandler(this._dialog)}},t.prototype.componentWillEnter=function(e){this._resize&&this._resize.position(),e()},t.prototype.componentWillUnmount=function(){this._drag&&this._drag.destroy(),this._resize&&this._resize.destroy()},t}(r.PureComponent),t.PopupDialog=s.makeOverlapable(a.makeTransitionGroupLifecycleConsumer(h))},325:function(e,t){"use strict";function n(e,t,n){return e+t>n&&(e=n-t),e<0&&(e=0),e}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this._onResizeThrottled=requestAnimationFrame.bind(null,this._onResize.bind(this)),this._dialog=e,this._initialHeight=e.style.height,window.addEventListener("resize",this._onResizeThrottled)}return e.prototype.position=function(){var e,t=this._dialog.getBoundingClientRect(),n=window.innerWidth/2-t.width/2;this._dialog.style.left=n+"px",e=window.innerHeight/2-t.height/2,this._dialog.style.top=e+"px"},e.prototype.destroy=function(){window.removeEventListener("resize",this._onResizeThrottled)},e.prototype._onResize=function(){var e,t=this._dialog.getBoundingClientRect(),o=n(t.left,t.width,window.innerWidth);o!==t.left&&(this._dialog.style.left=o+"px"),e=n(t.top,t.height,window.innerHeight),e!==t.top&&(this._dialog.style.top=e+"px"),this._dialog.style.height=window.innerHeightwindow.innerWidth?e.style.right="0":e.style.right="auto"}},n._onChange=function(){var e=n._input.value;n.setState({value:e}),n.props.onType(n.props.isValid(e)?e:null)},n._onKeyDown=function(e){n.props.onHidePicker()},n._onKeyPress=function(e){if(e.charCode){var t=String.fromCharCode(e.charCode);n.props.inputRegex.test(t)||e.preventDefault()}},n._onKeyUp=function(e){var t,o;8!==e.keyCode&&(t=n._input.value,(o=n.props.fixValue(t))!==t&&n.setState({value:o}))},n.state={value:t.value},n}return o.__extends(t,e),t.prototype.componentWillReceiveProps=function(e){e.value!==this.props.value&&this.setState({value:e.value})},t.prototype.render=function(){var e,t=this,n=c(p.inputIcon,(e={},e[p.disabled]=this.props.disabled,e));return r.createElement("div",{className:p.pickerInput},r.createElement(s.CommonTextInput,{value:this.state.value,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onChange:this._onChange,onFocus:this.props.onShowPicker,onClick:this.props.onShowPicker,reference:function(e){return t._input=e},rightComponent:r.createElement(i.Icon,{icon:this.props.icon,className:n,onClick:this.props.disabled?void 0:this.props.onShowPicker}), diff --git a/charting_library/static/bundles/lazy-jquery-ui.8a95a81e0b032b2d76df.js b/charting_library/static/bundles/lazy-jquery-ui.1803178846ddad426aeb.js similarity index 100% rename from charting_library/static/bundles/lazy-jquery-ui.8a95a81e0b032b2d76df.js rename to charting_library/static/bundles/lazy-jquery-ui.1803178846ddad426aeb.js diff --git a/charting_library/static/bundles/library.77596ca6783cb5996d22.js b/charting_library/static/bundles/library.19c99ed5d0307c67f071.js similarity index 100% rename from charting_library/static/bundles/library.77596ca6783cb5996d22.js rename to charting_library/static/bundles/library.19c99ed5d0307c67f071.js diff --git a/charting_library/static/bundles/take-chart-image-dialog-impl.d8f49fce300496653730.js b/charting_library/static/bundles/take-chart-image-dialog-impl.5ae42a6bc17c617b055f.js similarity index 97% rename from charting_library/static/bundles/take-chart-image-dialog-impl.d8f49fce300496653730.js rename to charting_library/static/bundles/take-chart-image-dialog-impl.5ae42a6bc17c617b055f.js index 152e0948f5..8f9732dd6e 100644 --- a/charting_library/static/bundles/take-chart-image-dialog-impl.d8f49fce300496653730.js +++ b/charting_library/static/bundles/take-chart-image-dialog-impl.5ae42a6bc17c617b055f.js @@ -1,7 +1,7 @@ webpackJsonp([2],{108:function(e,t,n){"use strict";function o(e){return t=function(t){function n(e,n){var o=t.call(this,e,n)||this;return o._getWrappedComponent=function(e){o._instance=e},o}return r.__extends(n,t),n.prototype.componentDidMount=function(){this._instance.componentWillEnter&&this.context.lifecycleProvider.registerWillEnterCb(this._instance.componentWillEnter.bind(this._instance)),this._instance.componentDidEnter&&this.context.lifecycleProvider.registerDidEnterCb(this._instance.componentDidEnter.bind(this._instance)),this._instance.componentWillLeave&&this.context.lifecycleProvider.registerWillLeaveCb(this._instance.componentWillLeave.bind(this._instance)),this._instance.componentDidLeave&&this.context.lifecycleProvider.registerDidLeaveCb(this._instance.componentDidLeave.bind(this._instance))},n.prototype.render=function(){return i.createElement(e,r.__assign({},this.props,{ref:this._getWrappedComponent}),this.props.children)},n}(i.PureComponent),t.displayName="Lifecycle Consumer",t.contextTypes={lifecycleProvider:a.object},t;var t}var r,i,a,s;Object.defineProperty(t,"__esModule",{value:!0}),r=n(5),i=n(2),a=n(86),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(i.PureComponent),t.LifecycleConsumer=s,t.makeTransitionGroupLifecycleConsumer=o},153:function(e,t){e.exports={body:"body-1yAIljnK-"}},154:function(e,t){e.exports={footer:"footer-AwxgkLHY-"}},155:function(e,t){e.exports={header:"header-2Hz0Lxou-",close:"close-3H_MMLbw-"}},156:function(e,t){e.exports={message:"message-1CYdTy_T-",error:"error-1u_m-Ehm-"}},157:function(e,t){e.exports={dialog:"dialog-13-QRYuG-",rounded:"rounded-1GLivxii-",shadowed:"shadowed-30OTTAts-"}},182:function(e,t,n){"use strict";function o(e){return r.createElement("div",{className:i.body,ref:e.reference},e.children)}var r,i;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(153),t.Body=o},183:function(e,t,n){"use strict";var o,r,i,a;Object.defineProperty(t,"__esModule",{value:!0}),o=n(185),t.Header=o.Header,r=n(184),t.Footer=r.Footer,i=n(182),t.Body=i.Body,a=n(186),t.Message=a.Message},184:function(e,t,n){"use strict";function o(e){return r.createElement("div",{className:i.footer,ref:e.reference},e.children)}var r,i;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(154),t.Footer=o},185:function(e,t,n){"use strict";function o(e){return r.createElement("div",{className:i.header,"data-dragg-area":!0,ref:e.reference},e.children,r.createElement(s.Icon,{className:i.close,icon:a,onClick:e.onClose}))}var r,i,a,s;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(155),a=n(109),s=n(77),t.Header=o},186:function(e,t,n){"use strict";function o(e){var t,n;return e.text?t=r.createElement("span",null,e.text):e.html&&(t=r.createElement("span",{dangerouslySetInnerHTML:{__html:e.html}})),n=i.message,e.isError&&(n+=" "+i.error),r.createElement(a.CSSTransitionGroup,{transitionName:"message",transitionEnterTimeout:c.dur,transitionLeaveTimeout:c.dur},t?r.createElement("div",{className:n,key:"0" },r.createElement(s.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:e.onClickOutside},t)):null)}var r,i,a,s,c;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(156),a=n(46),s=n(107),c=n(28),t.Message=o},187:function(e,t,n){"use strict";function o(e){var t,n=e.rounded,o=void 0===n||n,s=e.shadowed,c=void 0===s||s,l=e.className,u=void 0===l?"":l,p=a(i.dialog,(t={},t[u]=!!u,t[i.rounded]=o,t[i.shadowed]=c,t[i.animated]=i.animated,t)),d={bottom:e.bottom,left:e.left,maxWidth:e.width,right:e.right,top:e.top,zIndex:e.zIndex};return r.createElement("div",{className:p,ref:e.reference,style:d,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onClick:e.onClick},e.children)}var r,i,a;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(157),a=n(26),t.Dialog=o},188:function(e,t,n){"use strict";function o(){p=document.createElement("div"),document.body.appendChild(p),i()}function r(e,t){d.getItems().forEach(function(n){n!==t&&f.emitEvent(e+":"+n)})}function i(e){s.render(a.createElement(c.TransitionGroup,{component:"div"},Array.from(h.values())),p,e)}var a,s,c,l,u,p,d,m,f,h;Object.defineProperty(t,"__esModule",{value:!0}),a=n(2),s=n(55),c=n(46),l=n(110),u=function(){function e(){this._storage=[]}return e.prototype.add=function(e){this._storage.push(e)},e.prototype.remove=function(e){this._storage=this._storage.filter(function(t){return e!==t})},e.prototype.getIndex=function(e){return this._storage.findIndex(function(t){return e===t})},e.prototype.toTop=function(e){this.remove(e),this.add(e)},e.prototype.has=function(e){return this._storage.includes(e)},e.prototype.getItems=function(){return this._storage},e}(),t.EVENTS={ZindexUpdate:"ZindexUpdate"},d=new u,m=150,f=new l,h=new Map,function(e){function n(e){d.has(e)||(d.add(e),r(t.EVENTS.ZindexUpdate,e))}function o(e){d.remove(e),h.delete(e)}function a(e){return d.getIndex(e)+m}function s(e,t,n){h.set(e,t),i(n)}function c(e,t){o(e),i(t)}function l(){return f}e.registerWindow=n,e.unregisterWindow=o,e.getZindex=a,e.renderWindow=s,e.removeWindow=c,e.getStream=l}(t.OverlapManager||(t.OverlapManager={})),o()},189:function(e,t,n){"use strict";function o(e){return t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.componentWillEnter=function(e){this.props.beforeOpen?this.props.beforeOpen(e):e()},n.prototype.componentDidEnter=function(){this.props.afterOpen&&this.props.afterOpen()},n.prototype.componentWillLeave=function(e){this.props.beforeClose?this.props.beforeClose(e):e()},n.prototype.componentDidLeave=function(){this.props.afterClose&&this.props.afterClose()},n.prototype.render=function(){return a.createElement(e,i.__assign({},this.props))},n}(a.PureComponent),t.displayName="OverlapLifecycle("+(e.displayName||"Component")+")",t;var t}function r(e){var t,n=l.makeTransitionGroupLifecycleProvider(u.makeTransitionGroupLifecycleConsumer(o(e)));return t=function(e){function t(t){var n=e.call(this,t)||this;return n._onZIndexUpdate=function(){ n.props.isOpened&&("parent"===n.props.root?n.forceUpdate():n._renderWindow(n.props))},n._uuid=p.guid(),n._zIndexUpdateEvent=c.EVENTS.ZindexUpdate+":"+n._uuid,n}return i.__extends(t,e),t.prototype.componentDidMount=function(){this._subscribe()},t.prototype.componentWillUnmount=function(){this._unsubscribe(),c.OverlapManager.removeWindow(this._uuid)},t.prototype.componentWillReceiveProps=function(e){"parent"!==this.props.root&&this._renderWindow(e)},t.prototype.render=function(){return"parent"===this.props.root?a.createElement(s.TransitionGroup,{component:"div"},this._createContent(this.props)):null},t.prototype._renderWindow=function(e){c.OverlapManager.renderWindow(this._uuid,this._createContent(e))},t.prototype._createContent=function(e){return e.isOpened?(c.OverlapManager.registerWindow(this._uuid),a.createElement(n,i.__assign({},e,{key:this._uuid,zIndex:c.OverlapManager.getZindex(this._uuid)}),e.children)):(c.OverlapManager.unregisterWindow(this._uuid),null)},t.prototype._subscribe=function(){c.OverlapManager.getStream().on(this._zIndexUpdateEvent,this._onZIndexUpdate)},t.prototype._unsubscribe=function(){c.OverlapManager.getStream().off(this._zIndexUpdateEvent,this._onZIndexUpdate)},t}(a.PureComponent),t.displayName="Overlapable("+(e.displayName||"Component")+")",t}var i,a,s,c,l,u,p;Object.defineProperty(t,"__esModule",{value:!0}),i=n(5),a=n(2),s=n(46),c=n(188),l=n(191),u=n(108),p=n(64),t.makeOverlapable=r},191:function(e,t,n){"use strict";function o(e){return t=function(t){function n(e){var n=t.call(this,e)||this;return n._registerWillEnterCb=function(e){n._willEnter.push(e)},n._registerDidEnterCb=function(e){n._didEnter.push(e)},n._registerWillLeaveCb=function(e){n._willLeave.push(e)},n._registerDidLeaveCb=function(e){n._didLeave.push(e)},n._willEnter=[],n._didEnter=[],n._willLeave=[],n._didLeave=[],n}return r.__extends(n,t),n.prototype.getChildContext=function(){return{lifecycleProvider:{registerWillEnterCb:this._registerWillEnterCb,registerDidEnterCb:this._registerDidEnterCb,registerWillLeaveCb:this._registerWillLeaveCb,registerDidLeaveCb:this._registerDidLeaveCb}}},n.prototype.componentWillEnter=function(e){var t=this._willEnter.map(function(e){return new Promise(function(t){e(t)})});Promise.all(t).then(e)},n.prototype.componentDidEnter=function(){this._didEnter.forEach(function(e){e()})},n.prototype.componentWillLeave=function(e){var t=this._willLeave.map(function(e){return new Promise(function(t){e(t)})});Promise.all(t).then(e)},n.prototype.componentDidLeave=function(){this._didLeave.forEach(function(e){e()})},n.prototype.render=function(){return i.createElement(e,r.__assign({},this.props),this.props.children)},n}(i.PureComponent),t.displayName="Lifecycle Provider",t.childContextTypes={lifecycleProvider:a.object},t;var t}var r,i,a;Object.defineProperty(t,"__esModule",{value:!0}),r=n(5),i=n(2),a=n(86),t.makeTransitionGroupLifecycleProvider=o},201:function(e,t){e.exports={inputWrapper:"inputWrapper-23iUt2Ae-",textInput:"textInput-3hvomQp9-",error:"error-2ydrzcvg-",success:"success-2y4Cbw_L-", -xsmall:"xsmall-2Dz_yiDV-",small:"small-3g0mV7FW-",large:"large-CZ_w52Xn-",iconed:"iconed-2X3rffL9-",inputIcon:"inputIcon-nJhQLYdg-",clearable:"clearable-3HVD9v3B-",clearIcon:"clearIcon-UZyPhrkf-",grouped:"grouped-2xS7_jZ2-"}},233:function(e,t,n){"use strict";function o(e,t,n){function o(e){p||(p=document.createElement("div"),document.body.appendChild(p)),l.render(c.createElement(u.TakeSnapshotModal,e),p)}function r(){o({isOpened:!1})}void 0===t&&(t={}),a.trackEvent("GUI","Get image button");var p;o({isOpened:!1}),i.takeSnapshot(e,function(i){var a,c;n&&n(i),a="",a=s.enabled("charting_library_base")?(t.snapshotUrl?"":"https://www.tradingview.com/x/")+i:window.location.protocol+"//"+window.location.host+"/x/"+i+"/",c=e.activeChartWidget.value().symbolProperty().value(),o({isOpened:!0,onClose:r,imageUrl:a,symbol:c})},function(){o({isOpened:!0,onClose:r,error:window.t("URL cannot be received")})},{onWidget:e.onWidget,snapshotUrl:t.snapshotUrl}),o({isOpened:!0,onClose:r})}function r(e,t,n){i.takeSnapshot(e,function(e){n&&n(e)},function(){console.warn(window.t("Error while trying to create snapshot."))},{snapshotUrl:t.snapshotUrl})}var i,a,s,c,l,u;Object.defineProperty(t,"__esModule",{value:!0}),n(23),i=n(435),a=n(48),s=n(7),c=n(2),l=n(55),u=n(1106),t.getImageOfChart=o,t.getImageOfChartSilently=r},255:function(e,t){e.exports={loader:"loader-1aihbDEL-",warning:"warning-1sksz0Rq-",danger:"danger-1jVFBwRj-",xsmall:"xsmall-1XIYvP4K-",disabled:"disabled-2jaDvv_v-",button:"button-2jCWN5M1-",hiddenText:"hiddenText-13D-S4nC-",secondary:"secondary-2H-Jwmir-",small:"small-2fwP8rrU-",base:"base-2PiGQ3aT-",active:"active-3Eem2fUt-",ghost:"ghost-2xkVjo4o-",success:"success-13aJxw0L-",large:"large-1a-qmr37-",growable:"growable-S0qQuxEB-",link:"link-1v4pOPj2-",grouped:"grouped-3T2Y_EXg-",text:"text-1d01iK8L-",secondaryScript:"secondaryScript-3pO7_bSM-",withPadding:"withPadding-UPhHkA1c-",primary:"primary-nwbhr-QZ-"}},257:function(e,t){e.exports={loader:"loader-3q6az1FO-",item:"item-I1y2jPt8-","tv-button-loader":"tv-button-loader-or3q47Bu-",black:"black-29_3FgL9-",white:"white-PhPAMkPg-"}},322:function(e,t,n){"use strict";function o(e){switch(e){case"default":return l.base;case"primary":return l.primary;case"secondary":return l.secondary;case"secondary-script":return l.secondaryScript;case"success":return l.success;case"warning":return l.warning;case"danger":return l.danger;case"link":return l.link;default:return""}}function r(e){switch(e){case"xsmall":return l.xsmall;case"small":return l.small;case"large":return l.large;default:return""}}function i(e){switch(e){case"ghost":return l.ghost;default:return""}}function a(e){ +xsmall:"xsmall-2Dz_yiDV-",small:"small-3g0mV7FW-",large:"large-CZ_w52Xn-",iconed:"iconed-2X3rffL9-",inputIcon:"inputIcon-nJhQLYdg-",clearable:"clearable-3HVD9v3B-",clearIcon:"clearIcon-UZyPhrkf-",grouped:"grouped-2xS7_jZ2-"}},233:function(e,t,n){"use strict";function o(e,t,n){function o(e){p||(p=document.createElement("div"),document.body.appendChild(p)),l.render(c.createElement(u.TakeSnapshotModal,e),p)}function r(){o({isOpened:!1})}void 0===t&&(t={}),a.trackEvent("GUI","Get image button");var p;o({isOpened:!1}),i.takeSnapshot(e,function(i){var a,c;n&&n(i),a="",a=s.enabled("charting_library_base")?(t.snapshotUrl?"":"https://www.tradingview.com/x/")+i:window.location.protocol+"//"+window.location.host+"/x/"+i+"/",c=e.activeChartWidget.value().symbolProperty().value(),o({isOpened:!0,onClose:r,imageUrl:a,symbol:c})},function(){o({isOpened:!0,onClose:r,error:window.t("URL cannot be received")})},{onWidget:e.onWidget,snapshotUrl:t.snapshotUrl}),o({isOpened:!0,onClose:r})}function r(e,t,n){i.takeSnapshot(e,function(e){n&&n(e)},function(){console.warn(window.t("Error while trying to create snapshot."))},{snapshotUrl:t.snapshotUrl})}var i,a,s,c,l,u;Object.defineProperty(t,"__esModule",{value:!0}),n(23),i=n(435),a=n(48),s=n(7),c=n(2),l=n(55),u=n(1106),t.getImageOfChart=o,t.getImageOfChartSilently=r},255:function(e,t){e.exports={ghost:"ghost-2xkVjo4o-",primary:"primary-nwbhr-QZ-",success:"success-13aJxw0L-",danger:"danger-1jVFBwRj-",warning:"warning-1sksz0Rq-",secondary:"secondary-2H-Jwmir-",button:"button-2jCWN5M1-",withPadding:"withPadding-UPhHkA1c-",hiddenText:"hiddenText-13D-S4nC-",text:"text-1d01iK8L-",loader:"loader-1aihbDEL-",base:"base-2PiGQ3aT-",secondaryScript:"secondaryScript-3pO7_bSM-",link:"link-1v4pOPj2-",xsmall:"xsmall-1XIYvP4K-",small:"small-2fwP8rrU-",large:"large-1a-qmr37-",grouped:"grouped-3T2Y_EXg-",growable:"growable-S0qQuxEB-",active:"active-3Eem2fUt-",disabled:"disabled-2jaDvv_v-"}},257:function(e,t){e.exports={loader:"loader-3q6az1FO-",item:"item-I1y2jPt8-","tv-button-loader":"tv-button-loader-or3q47Bu-",black:"black-29_3FgL9-",white:"white-PhPAMkPg-"}},322:function(e,t,n){"use strict";function o(e){switch(e){case"default":return l.base;case"primary":return l.primary;case"secondary":return l.secondary;case"secondary-script":return l.secondaryScript;case"success":return l.success;case"warning":return l.warning;case"danger":return l.danger;case"link":return l.link;default:return""}}function r(e){switch(e){case"xsmall":return l.xsmall;case"small":return l.small;case"large":return l.large;default:return""}}function i(e){switch(e){case"ghost":return l.ghost;default:return""}}function a(e){ var t,n=e.active,a=void 0===n||n,m=e.children,f=e.className,h=void 0===f?"":f,v=e.disabled,g=void 0!==v&&v,y=e.grouped,_=void 0!==y&&y,b=e.growable,w=void 0!==b&&b,E=e.id,C=void 0===E?0:E,x=e.onClick,k=e.reference,O=e.size,P=e.theme,M=e.type,L=void 0===M?"default":M,N=e.loading,I=void 0!==N&&N,T=e.withPadding,W=void 0===T||T,U=e.title,j=void 0===U?"":U,S=e.disabledClassName,D=e.tabIndex,A=void 0===D?0:D,z=e.component,V=void 0===z?"button":z,B=e.target,G=void 0===B?"":B,H=e.href,Z=void 0===H?"":H,F=c((t={},t[h]=!!h,t[l.button]=!0,t[l.active]=a&&!g,t[S||l.disabled]=g,t[l.grouped]=_,t[l.growable]=w,t[l.withPadding]=W,t[r(O)]=!!O,t[i(P)]=!!P,t[o(L)]=!0,t)),R="default"===L?"black":"white",Y=s.createElement("span",{key:"1",className:l.text},m);return I&&(Y=s.createElement("span",{key:"2",className:l.loader},s.createElement(p.Loader,{color:R}))),s.createElement(u.CSSTransitionGroup,{component:V,tabIndex:A,transitionEnterTimeout:d.dur,transitionLeaveTimeout:d.dur,transitionName:"body",className:F,disabled:g,key:C,onClick:I?void 0:x,ref:k,title:j,target:G,href:Z},s.createElement("span",{className:l.hiddenText},m),Y)}var s,c,l,u,p,d;Object.defineProperty(t,"__esModule",{value:!0}),s=n(2),c=n(26),l=n(255),u=n(46),p=n(327),d=n(28),t.Button=a},326:function(e,t,n){"use strict";function o(e){var t,n=e.className,o=e.icon,p=e.clearable,d=e.onClear,m=e.size,f=r.__rest(e,["className","icon","clearable","onClear","size"]),h=a(l.inputWrapper,(t={},t[n]=!!n,t[l.iconed]=!!o,t[l.clearable]=p,t));return i.createElement(u,r.__assign({theme:l,className:h,leftComponent:o?i.createElement(s.Icon,{key:"inputIcon",icon:o,className:l.inputIcon}):void 0,rightComponent:p?i.createElement(s.Icon,{className:l.clearIcon,icon:c,key:"clearIcon",onClick:d}):void 0,sizeMode:m},f))}var r,i,a,s,c,l,u;Object.defineProperty(t,"__esModule",{value:!0}),r=n(5),i=n(2),a=n(26),s=n(77),c=n(331),l=n(201),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e,t,n,o,s=this.props,c=s.theme,l=s.error,u=s.success,p=s.sizeMode,d=s.leftComponent,m=s.rightComponent,f=s.grouped,h=s.fontSize,v=s.reference,g=s.className,y=r.__rest(s,["theme","error","success","sizeMode","leftComponent","rightComponent","grouped","fontSize","reference","className"]),_={fontSize:h},b=a(c.textInput,(n={},n[c.error]=l,n[c.success]=u,n[c[p]]=!!p,n)),w=a(c.inputWrapper,(o={},o[g]=!!g,o[c.grouped]=f,o)),E=[],C=i.createElement("input",r.__assign({ref:v,className:b,key:"textInput",style:_},y));return d&&(e={className:a(c.leftComponent,d.props.className),key:"leftComponent"},E.push(i.cloneElement(d,e))),E.push(C),m&&(t={className:a(c.leftComponent,m.props.className),key:"rightComponent"},E.push(i.cloneElement(m,t))),i.createElement("div",{className:w},E)},t}(i.PureComponent),t.CommonTextInput=u,t.TextInput=o},327:function(e,t,n){"use strict";function o(e){var t,n=e.color,o=void 0===n?"black":n,l=a(c.item,(t={},t[c[o]]=!!o,t));return r.createElement(i.CSSTransitionGroup,{transitionName:"loader",transitionAppear:!0, transitionAppearTimeout:2*s.dur,transitionEnter:!1,transitionLeave:!1},r.createElement("span",{className:c.loader},r.createElement("span",{className:l}),r.createElement("span",{className:l}),r.createElement("span",{className:l})))}var r,i,a,s,c;Object.defineProperty(t,"__esModule",{value:!0}),r=n(2),i=n(46),a=n(26),s=n(28),c=n(257),t.Loader=o},660:function(e,t){e.exports={modal:"modal-2zD2ALtD-",content:"content-2CGvrzwk-",form:"form-bYALUAA--",copyForm:"copyForm-11zYGUUD-",copyBtn:"copyBtn-15A10th9-",actions:"actions-3V3KnGhD-",link:"link-2LhR6WUZ-",socials:"socials-3Rpn-Ob0-"}},663:function(e,t){e.exports={modal:"modal-3RDUwmY4-",backdrop:"backdrop-21zUnyPe-",animated:"animated-1bktBs9g-",notAnimated:"notAnimated-1-OJgr7K-"}},1074:function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a,s,c,l,u,p,d,m;Object.defineProperty(t,"__esModule",{value:!0}),a=Object.assign||function(e){var t,n,o;for(t=1;t=0===n})}function l(e){var t=ce.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){return xt.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function p(e,t){if(1===t.nodeType&&xt.hasData(e)){var n,r,o,i=xt._data(e),a=xt._data(t,i),s=i.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,o=s[n].length;r0){if("border"!==n)for(;o").appendTo(t),r=n.css("display");n.remove(),"none"!==r&&""!==r||(ct||(ct=bt.createElement("iframe"),ct.frameBorder=ct.width=ct.height=0),t.appendChild(ct),lt&&ct.createElement||(lt=(ct.contentWindow||ct.contentDocument).document,lt.write((xt.support.boxModel?"":"")+""),lt.close()),n=lt.createElement(e),lt.body.appendChild(n),r=xt.css(n,"display"),t.removeChild(ct)),ut[e]=r}return ut[e]}function D(e){return xt.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}var P,A,L,I,j,R,F,U,H,Y,W,B,V,q,z,$,G,K,X,Q,J,Z,ee,te,ne,re,oe,ie,ae,se,ue,ce,le,fe,pe,de,he,me,ge,ye,ve,be,_e,we,xe,Ce,Te,ke,Ee,Se,Me,Oe,Ne,De,Pe,Ae,Le,Ie,je,Re,Fe,Ue,He,Ye,We,Be,Ve,qe,ze,$e,Ge,Ke,Xe,Qe,Je,Ze,et,tt,nt,rt,ot,it,at,st,ut,ct,lt,ft,pt,dt,ht,mt,gt,yt,vt,bt=window.document,_t=window.navigator,wt=window.location,xt=function(){function e(){if(!i.isReady){try{bt.documentElement.doScroll("left")}catch(t){return void setTimeout(e,1)}i.ready()}}var t,n,r,o,i=function(e,n){return new i.fn.init(e,n,t) },a=window.jQuery,s=window.$,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,c=/\S/,l=/^\s+/,f=/\s+$/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,d=/^[\],:{}\s]*$/,h=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,m=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g=/(?:^|:|,)(?:\s*\[)+/g,y=/(webkit)[ \/]([\w.]+)/,v=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,_=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/gi,x=/^-ms-/,C=function(e,t){return(t+"").toUpperCase()},T=_t.userAgent,k=Object.prototype.toString,E=Object.prototype.hasOwnProperty,S=Array.prototype.push,M=Array.prototype.slice,O=String.prototype.trim,N=Array.prototype.indexOf,D={};return i.fn=i.prototype={constructor:i,init:function(e,t,n){var r,o,a,s;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!t&&bt.body)return this.context=bt,this[0]=bt.body,this.selector=e,this.length=1,this;if("string"==typeof e){if(!(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:u.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1])return t=t instanceof i?t[0]:t,s=t?t.ownerDocument||t:bt,a=p.exec(e),a?i.isPlainObject(t)?(e=[bt.createElement(a[1])],i.fn.attr.call(e,t,!0)):e=[s.createElement(a[1])]:(a=i.buildFragment([r[1]],[s]),e=(a.cacheable?i.clone(a.fragment):a.fragment).childNodes),i.merge(this,e);if((o=bt.getElementById(r[2]))&&o.parentNode){if(o.id!==r[2])return n.find(e);this.length=1,this[0]=o}return this.context=bt,this.selector=e,this}return i.isFunction(e)?n.ready(e):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),i.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return M.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return i.isArray(e)?S.apply(r,e):i.merge(r,e),r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return i.each(this,e,t)},ready:function(e){return i.bindReady(),r.add(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(M.apply(this,arguments),"slice",M.call(arguments).join(","))},map:function(e){return this.pushStack(i.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:S,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var e,t,n,r,o,a,s=arguments[0]||{},u=1,c=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},u=2),"object"==typeof s||i.isFunction(s)||(s={}),c===u&&(s=this,--u);u0?this.on(t,null,e,n):this.trigger(t)},xt.attrFn&&(xt.attrFn[t]=!0),K.test(t)&&(xt.event.fixHooks[t]=xt.event.keyHooks),X.test(t)&&(xt.event.fixHooks[t]=xt.event.mouseHooks)}),function(){function e(e,t,n,r,o,i){var a,s,u,c;for(a=0,s=r.length;a0){l=c;break}c=c[e]}o[s]=l}}var n,r,o,i,a,s,u,c,l,f,p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),h=0,m=Object.prototype.toString,g=!1,y=!0,v=/\\/g,b=/\r\n/g,_=/\W/;[0,0].sort(function(){return y=!1,0}),n=function(e,t,r,a){var s,c,l,d,h,g,y,v,b,_,w,x,C;if(r=r||[],t=t||bt,s=t,1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return r;_=!0,w=n.isXML(t),x=[],C=e;do{if(p.exec(""),(c=p.exec(C))&&(C=c[3],x.push(c[1]),c[2])){h=c[3];break}}while(c) ;if(x.length>1&&i.exec(e))if(2===x.length&&o.relative[x[0]])l=f(x[0]+x[1],t,a);else for(l=o.relative[x[0]]?[t]:n(x.shift(),t);x.length;)e=x.shift(),o.relative[e]&&(e+=x.shift()),l=f(e,l,a);else if(!a&&x.length>1&&9===t.nodeType&&!w&&o.match.ID.test(x[0])&&!o.match.ID.test(x[x.length-1])&&(g=n.find(x.shift(),t,w),t=g.expr?n.filter(g.expr,g.set)[0]:g.set[0]),t)for(g=a?{expr:x.pop(),set:u(a)}:n.find(x.pop(),1!==x.length||"~"!==x[0]&&"+"!==x[0]||!t.parentNode?t:t.parentNode,w),l=g.expr?n.filter(g.expr,g.set):g.set,x.length>0?d=u(l):_=!1;x.length;)y=x.pop(),v=y,o.relative[y]?v=x.pop():y="",null==v&&(v=t),o.relative[y](d,v,w);else d=x=[];if(d||(d=l),d||n.error(y||e),"[object Array]"===m.call(d))if(_)if(t&&1===t.nodeType)for(b=0;null!=d[b];b++)d[b]&&(!0===d[b]||1===d[b].nodeType&&n.contains(t,d[b]))&&r.push(l[b]);else for(b=0;null!=d[b];b++)d[b]&&1===d[b].nodeType&&r.push(l[b]);else r.push.apply(r,d);else u(d,r);return h&&(n(h,s,r,a),n.uniqueSort(r)),r},n.uniqueSort=function(e){if(c&&(g=y,e.sort(c),g))for(var t=1;t0},n.find=function(e,t,n){var r,i,a,s,u,c;if(!e)return[];for(i=0,a=o.order.length;i":function(e,t){var r,o,i="string"==typeof t,a=0,s=e.length;if(i&&!_.test(t))for(t=t.toLowerCase();a=0)?n||r.push(a):n&&(t[s]=!1));return!1},ID:function(e){return e[1].replace(v,"")},TAG:function(e,t){return e[1].replace(v,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||n.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&n.error(e[0]);return e[0]=h++,e},ATTR:function(e,t,n,r,i,a){var s=e[1]=e[1].replace(v,"");return!a&&o.attrMap[s]&&(e[1]=o.attrMap[s]),e[4]=(e[4]||e[5]||"").replace(v,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,r,i,a){if("not"===e[1]){if(!((p.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var s=n.filter(e[3],t,r,!0^a);return r||i.push.apply(i,s),!1}e[3]=n(e[3],null,null,t)}else if(o.match.POS.test(e[0])||o.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return!1===e.disabled&&"hidden"!==e.type},disabled:function(e){return!0===e.disabled},checked:function(e){return!0===e.checked},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,r){return!!n(r[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type -;return"input"===e.nodeName.toLowerCase()&&"text"===n&&(t===n||null===t)},radio:function(e){return"input"===e.nodeName.toLowerCase()&&"radio"===e.type},checkbox:function(e){return"input"===e.nodeName.toLowerCase()&&"checkbox"===e.type},file:function(e){return"input"===e.nodeName.toLowerCase()&&"file"===e.type},password:function(e){return"input"===e.nodeName.toLowerCase()&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"submit"===e.type},image:function(e){return"input"===e.nodeName.toLowerCase()&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,n,r){return t===r.length-1},even:function(e,t){return t%2==0},odd:function(e,t){return t%2==1},lt:function(e,t,n){return tn[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,i,a){var s,u,c,l=t[1],f=o.filters[l];if(f)return f(e,i,t,a);if("contains"===l)return(e.textContent||e.innerText||r([e])||"").indexOf(t[3])>=0;if("not"===l){for(s=t[3],u=0,c=s.length;u=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var r=t[1],i=n.attr?n.attr(e,r):o.attrHandle[r]?o.attrHandle[r](e):null!=e[r]?e[r]:e.getAttribute(r),a=i+"",s=t[2],u=t[4];return null==i?"!="===s:!s&&n.attr?null!=i:"="===s?a===u:"*="===s?a.indexOf(u)>=0:"~="===s?(" "+a+" ").indexOf(u)>=0:u?"!="===s?a!==u:"^="===s?0===a.indexOf(u):"$="===s?a.substr(a.length-u.length)===u:"|="===s&&(a===u||a.substr(0,u.length+1)===u+"-"):a&&!1!==i},POS:function(e,t,n,r){var i=t[2],a=o.setFilters[i];if(a)return a(e,n,t,r)}}},i=o.match.POS,a=function(e,t){return"\\"+(t-0+1)};for(s in o.match)o.match[s]=RegExp(o.match[s].source+"(?![^\\[]*\\])(?![^\\(]*\\))"),o.leftMatch[s]=RegExp("(^(?:.|\\r|\\n)*?)"+o.match[s].source.replace(/\\(\d+)/g,a));o.match.globalPOS=i,u=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{ +;return"input"===e.nodeName.toLowerCase()&&"text"===n&&(t===n||null===t)},radio:function(e){return"input"===e.nodeName.toLowerCase()&&"radio"===e.type},checkbox:function(e){return"input"===e.nodeName.toLowerCase()&&"checkbox"===e.type},file:function(e){return"input"===e.nodeName.toLowerCase()&&"file"===e.type},password:function(e){return"input"===e.nodeName.toLowerCase()&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"submit"===e.type},image:function(e){return"input"===e.nodeName.toLowerCase()&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,n,r){return t===r.length-1},even:function(e,t){return t%2==0},odd:function(e,t){return t%2==1},lt:function(e,t,n){return tn[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,i,a){var s,u,c,l=t[1],f=o.filters[l];if(f)return f(e,i,t,a);if("contains"===l)return(e.textContent||e.innerText||r([e])||"").indexOf(t[3])>=0;if("not"===l){for(s=t[3],u=0,c=s.length;u=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var r=t[1],i=n.attr?n.attr(e,r):o.attrHandle[r]?o.attrHandle[r](e):null!=e[r]?e[r]:e.getAttribute(r),a=i+"",s=t[2],u=t[4];return null==i?"!="===s:!s&&n.attr?null!=i:"="===s?a===u:"*="===s?a.indexOf(u)>=0:"~="===s?(" "+a+" ").indexOf(u)>=0:u?"!="===s?a!==u:"^="===s?0===a.indexOf(u):"$="===s?a.substr(a.length-u.length)===u:"|="===s&&(a===u||a.substr(0,u.length+1)===u+"-"):a&&!1!==i},POS:function(e,t,n,r){var i=t[2],a=o.setFilters[i];if(a)return a(e,n,t,r)}}},i=o.match.POS,a=function(e,t){return"\\"+(t-0+1)};for(s in o.match)o.match[s]=RegExp(o.match[s].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[s]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[s].source.replace(/\\(\d+)/g,a));o.match.globalPOS=i,u=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{ Array.prototype.slice.call(bt.documentElement.childNodes,0)[0].nodeType}catch(e){u=function(e,t){var n,r=0,o=t||[];if("[object Array]"===m.call(e))Array.prototype.push.apply(o,e);else if("number"==typeof e.length)for(n=e.length;r",n.insertBefore(e,n.firstChild),bt.getElementById(t)&&(o.find.ID=function(e,t,n){if(void 0!==t.getElementById&&!n){var r=t.getElementById(e[1]);return r?r.id===e[1]||void 0!==r.getAttributeNode&&r.getAttributeNode("id").nodeValue===e[1]?[r]:void 0:[]}},o.filter.ID=function(e,t){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),n.removeChild(e),n=e=null}(),function(){var e=bt.createElement("div");e.appendChild(bt.createComment("")),e.getElementsByTagName("*").length>0&&(o.find.TAG=function(e,t){var n,r,o=t.getElementsByTagName(e[1]);if("*"===e[1]){for(n=[],r=0;o[r];r++)1===o[r].nodeType&&n.push(o[r]);o=n}return o}),e.innerHTML="",e.firstChild&&void 0!==e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(o.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),bt.querySelectorAll&&function(){var e,t=n,r=bt.createElement("div");if(r.innerHTML="

    ",!r.querySelectorAll||0!==r.querySelectorAll(".TEST").length){n=function(e,r,i,a){var s,c,l,f,p,d,h;if(r=r||bt,!a&&!n.isXML(r)){if((s=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e))&&(1===r.nodeType||9===r.nodeType)){if(s[1])return u(r.getElementsByTagName(e),i);if(s[2]&&o.find.CLASS&&r.getElementsByClassName)return u(r.getElementsByClassName(s[2]),i)}if(9===r.nodeType){if("body"===e&&r.body)return u([r.body],i);if(s&&s[3]){if(!(c=r.getElementById(s[3]))||!c.parentNode)return u([],i);if(c.id===s[3])return u([c],i)}try{return u(r.querySelectorAll(e),i)}catch(e){}}else if(1===r.nodeType&&"object"!==r.nodeName.toLowerCase()){l=r,f=r.getAttribute("id"),p=f||"__sizzle__",d=r.parentNode,h=/^\s*[+~]/.test(e),f?p=p.replace(/'/g,"\\$&"):r.setAttribute("id",p),h&&d&&(r=r.parentNode);try{if(!h||d)return u(r.querySelectorAll("[id='"+p+"'] "+e),i)}catch(e){}finally{f||l.removeAttribute("id")}}}return t(e,r,i,a)};for(e in t)n[e]=t[e];r=null}}(), function(){var e,t,r=bt.documentElement,i=r.matchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.msMatchesSelector;if(i){e=!i.call(bt.createElement("div"),"div"),t=!1;try{i.call(bt.documentElement,"[test!='']:sizzle")}catch(e){t=!0}n.matchesSelector=function(r,a){if(a=a.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!n.isXML(r))try{if(t||!o.match.PSEUDO.test(a)&&!/!=/.test(a)){var s=i.call(r,a);if(s||!e||r.document&&11!==r.document.nodeType)return s}}catch(e){}return n(a,null,null,[r]).length>0}}}(),function(){var e=bt.createElement("div");e.innerHTML="
    ",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(o.order.splice(1,0,"CLASS"),o.find.CLASS=function(e,t,n){if(void 0!==t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null))}(),bt.documentElement.contains?n.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:bt.documentElement.compareDocumentPosition?n.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:n.contains=function(){return!1},n.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName},f=function(e,t,r){for(var i,a,s,u=[],c="",l=t.nodeType?[t]:t;i=o.match.PSEUDO.exec(e);)c+=i[0],e=e.replace(o.match.PSEUDO,"");for(e=o.relative[e]?e+"*":e,a=0,s=l.length;a0)for(i=o;i=0:xt.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r,o,i,a=[],s=this[0];if(xt.isArray(e)){for(o=1;s&&s.ownerDocument&&s!==t;){for(n=0;n-1:xt.find.matchesSelector(s,e)){a.push(s);break}if(!(s=s.parentNode)||!s.ownerDocument||s===t||11===s.nodeType)break}return a=a.length>1?xt.unique(a):a, this.pushStack(a,"closest",e)},index:function(e){return e?"string"==typeof e?xt.inArray(this[0],xt(e)):xt.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?xt(e,t):xt.makeArray(e&&e.nodeType?[e]:e),r=xt.merge(this.get(),n);return this.pushStack(u(n[0])||u(r[0])?r:xt.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),xt.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xt.dir(e,"parentNode")},parentsUntil:function(e,t,n){return xt.dir(e,"parentNode",n)},next:function(e){return xt.nth(e,2,"nextSibling")},prev:function(e){return xt.nth(e,2,"previousSibling")},nextAll:function(e){return xt.dir(e,"nextSibling")},prevAll:function(e){return xt.dir(e,"previousSibling")},nextUntil:function(e,t,n){return xt.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return xt.dir(e,"previousSibling",n)},siblings:function(e){return xt.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return xt.sibling(e.firstChild)},contents:function(e){return xt.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:xt.makeArray(e.childNodes)}},function(e,t){xt.fn[e]=function(n,r){var o=xt.map(this,t,n);return ne.test(e)||(r=n),r&&"string"==typeof r&&(o=xt.filter(r,o)),o=this.length>1&&!ue[e]?xt.unique(o):o,(this.length>1||oe.test(r))&&re.test(e)&&(o=o.reverse()),this.pushStack(o,e,ae.call(arguments).join(","))}}),xt.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?xt.find.matchesSelector(t[0],e)?[t[0]]:[]:xt.find.matches(e,t)},dir:function(e,t,n){for(var r=[],o=e[t];o&&9!==o.nodeType&&(void 0===n||1!==o.nodeType||!xt(o).is(n));)1===o.nodeType&&r.push(o),o=o[t];return r},nth:function(e,t,n,r){t=t||1;for(var o=0;e&&(1!==e.nodeType||++o!==t);e=e[n]);return e},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),ce="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",le=/ jQuery\d+="(?:\d+|null)"/g,fe=/^\s+/,pe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,de=/<([\w:]+)/,he=/
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},Ce=l(bt),xe.optgroup=xe.option,xe.tbody=xe.tfoot=xe.colgroup=xe.caption=xe.thead,xe.th=xe.td,xt.support.htmlSerialize||(xe._default=[1,"div
    ","
    "]),xt.fn.extend({text:function(e){return xt.access(this,function(e){ @@ -38,7 +38,7 @@ function ye(e,t,n,r,o){var i,a=6+o-r,s=se(e,0,1+a),u=s.getUTCDay();return uthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ge(){var e,t;return void 0!==this._isDSTShifted?this._isDSTShifted:(e={},h(e,this),e=Me(e),e._a?(t=e._isUTC?c(e._a):De(e._a),this._isDSTShifted=this.isValid()&&b(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted)}function Ke(){return!this._isUTC}function Xe(){return this._isUTC}function Qe(){return this._isUTC&&0===this._offset}function Je(e,t){var n,r,o,i=e,a=null;return je(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(i={},t?i[t]=e:i.milliseconds=e):(a=Xn.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:v(a[po])*n,h:v(a[ho])*n,m:v(a[mo])*n,s:v(a[go])*n,ms:v(a[yo])*n}):(a=Qn.exec(e))?(n="-"===a[1]?-1:1,i={y:Ze(a[2],n),M:Ze(a[3],n),d:Ze(a[4],n),h:Ze(a[5],n),m:Ze(a[6],n),s:Ze(a[7],n),w:Ze(a[8],n) }):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=tt(De(i.from),De(i.to)),i={},i.ms=o.milliseconds,i.M=o.months),r=new Ie(i),je(e)&&s(e,"_locale")&&(r._locale=e._locale),r}function Ze(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function et(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function tt(e,t){var n;return t=Ue(t,e),e.isBefore(t)?n=et(e,t):(n=et(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function nt(e,t){return function(n,r){var o,i;return null===r||isNaN(+r)||(re(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),i=n,n=r,r=i),n="string"==typeof n?+n:n,o=Je(n,r),rt(this,o,e),this}}function rt(e,n,r,o){var i=n._milliseconds,a=n._days,s=n._months;o=null==o||o,i&&e._d.setTime(+e._d+i*r),a&&P(e,"Date",D(e,"Date")+a*r),s&&Q(e,D(e,"Month")+s*r),o&&t.updateOffset(e,a||s)}function ot(e,t){var n=e||De(),r=Ue(n,this).startOf("day"),o=this.diff(r,"days",!0),i=o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse";return this.format(t&&t[i]||this.localeData().calendar(i,this,De(n)))}function it(){return new m(this)}function at(e,t){return t=M(void 0!==t?t:"millisecond"),"millisecond"===t?(e=g(e)?e:De(e),+this>+e):(g(e)?+e:+De(e))<+this.clone().startOf(t)}function st(e,t){var n;return t=M(void 0!==t?t:"millisecond"),"millisecond"===t?(e=g(e)?e:De(e),+this<+e):(n=g(e)?+e:+De(e),+this.clone().endOf(t)11?n?"pm":"PM":n?"am":"AM"}function Xt(e,t){t[yo]=v(1e3*("0."+e))}function Qt(){return this._isUTC?"UTC":""}function Jt(){return this._isUTC?"Coordinated Universal Time":""}function Zt(e){return De(1e3*e)}function en(){return De.apply(null,arguments).parseZone()} -function tn(e,t,n){var r=this._calendar[e];return"function"==typeof r?r.call(t,n):r}function nn(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function rn(){return this._invalidDate}function on(e){return this._ordinal.replace("%d",e)}function an(e){return e}function sn(e,t,n,r){var o=this._relativeTime[n];return"function"==typeof o?o(e,t,n,r):o.replace(/%d/i,e)}function un(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)}function cn(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=RegExp(this._ordinalParse.source+"|\\d{1,2}")}function ln(e,t,n,r){var o=E(),i=c().set(r,t);return o[n](i,e)}function fn(e,t,n,r,o){var i,a;if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return ln(e,t,n,o);for(a=[],i=0;i=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*wn(Tn(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=y(i/1e3),u.seconds=e%60,t=y(e/60),u.minutes=t%60,n=y(t/60),u.hours=n%24,a+=y(n/24),o=y(Cn(a)),s+=o,a-=wn(Tn(o)),r=y(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Cn(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function kn(e){var t,n,r=this._milliseconds;if("month"===(e=M(e))||"year"===e)return t=this._days+r/864e5,n=this._months+Cn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Tn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw Error("Unknown unit "+e)}}function En(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function Sn(e){return function(){return this.as(e)}}function Mn(e){return e=M(e),this[e+"s"]()}function On(e){return function(){return this._data[e]}}function Nn(){return y(this.days()/7)}function Dn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function Pn(e,t,n){ +function tn(e,t,n){var r=this._calendar[e];return"function"==typeof r?r.call(t,n):r}function nn(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function rn(){return this._invalidDate}function on(e){return this._ordinal.replace("%d",e)}function an(e){return e}function sn(e,t,n,r){var o=this._relativeTime[n];return"function"==typeof o?o(e,t,n,r):o.replace(/%d/i,e)}function un(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)}function cn(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ln(e,t,n,r){var o=E(),i=c().set(r,t);return o[n](i,e)}function fn(e,t,n,r,o){var i,a;if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return ln(e,t,n,o);for(a=[],i=0;i=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*wn(Tn(s)+a),a=0,s=0),u.milliseconds=i%1e3,e=y(i/1e3),u.seconds=e%60,t=y(e/60),u.minutes=t%60,n=y(t/60),u.hours=n%24,a+=y(n/24),o=y(Cn(a)),s+=o,a-=wn(Tn(o)),r=y(s/12),s%=12,u.days=a,u.months=s,u.years=r,this}function Cn(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function kn(e){var t,n,r=this._milliseconds;if("month"===(e=M(e))||"year"===e)return t=this._days+r/864e5,n=this._months+Cn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Tn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw Error("Unknown unit "+e)}}function En(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function Sn(e){return function(){return this.as(e)}}function Mn(e){return e=M(e),this[e+"s"]()}function On(e){return function(){return this._data[e]}}function Nn(){return y(this.days()/7)}function Dn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function Pn(e,t,n){ var r=Je(e).abs(),o=jr(r.as("s")),i=jr(r.as("m")),a=jr(r.as("h")),s=jr(r.as("d")),u=jr(r.as("M")),c=jr(r.as("y")),l=o0,l[4]=n,Dn.apply(null,l)}function An(e,t){return void 0!==Rr[e]&&(void 0===t?Rr[e]:(Rr[e]=t,!0))}function Ln(e){var t=this.localeData(),n=Pn(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function In(){var e,t,n,r,o,i,a,s,u=Fr(this._milliseconds)/1e3,c=Fr(this._days),l=Fr(this._months),f=y(u/60),p=y(f/60);return u%=60,f%=60,e=y(l/12),l%=12,t=e,n=l,r=c,o=p,i=f,a=u,s=this.asSeconds(),s?(s<0?"-":"")+"P"+(t?t+"Y":"")+(n?n+"M":"")+(r?r+"D":"")+(o||i||a?"T":"")+(o?o+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"}var jn,Rn,Fn,Un,Hn,Yn,Wn,Bn,Vn,qn,zn,$n,Gn,Kn,Xn,Qn,Jn,Zn,er,tr,nr,rr,or,ir,ar,sr,ur,cr,lr,fr,pr,dr,hr,mr,gr,yr,vr,br,_r,wr,xr,Cr,Tr,kr,Er,Sr,Mr,Or,Nr,Dr,Pr,Ar,Lr,Ir,jr,Rr,Fr,Ur,Hr=t.momentProperties=[],Yr=!1,Wr={},Br={},Vr=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,qr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,zr={},$r={},Gr=/\d/,Kr=/\d\d/,Xr=/\d{3}/,Qr=/\d{4}/,Jr=/[+-]?\d{6}/,Zr=/\d\d?/,eo=/\d{1,3}/,to=/\d{1,4}/,no=/[+-]?\d{1,6}/,ro=/\d+/,oo=/[+-]?\d+/,io=/Z|[+-]\d\d:?\d\d/gi,ao=/[+-]?\d+(\.\d{1,3})?/,so=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,uo={},co={},lo=0,fo=1,po=2,ho=3,mo=4,go=5,yo=6;for(I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),S("month","M"),Y("M",Zr),Y("MM",Zr,Kr),Y("MMM",so),Y("MMMM",so),V(["M","MM"],function(e,t){t[fo]=v(e)-1}),V(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[fo]=o:f(n).invalidMonth=e}),Fn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Un="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Hn={},t.suppressDeprecationWarnings=!1,Yn=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Wn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],Bn=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Vn=/^\/?Date\((\-?\d+)/i,t.createFromInputFallback=ne("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"), I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),S("year","y"),Y("Y",oo),Y("YY",Zr,Kr),Y("YYYY",to,Qr),Y("YYYYY",no,Jr),Y("YYYYYY",no,Jr),V(["YYYYY","YYYYYY"],lo),V("YYYY",function(e,n){n[lo]=2===e.length?t.parseTwoDigitYear(e):v(e)}),V("YY",function(e,n){n[lo]=t.parseTwoDigitYear(e)}),t.parseTwoDigitYear=function(e){return v(e)+(v(e)>68?1900:2e3)},qn=N("FullYear",!1),I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),S("week","w"),S("isoWeek","W"),Y("w",Zr),Y("ww",Zr,Kr),Y("W",Zr),Y("WW",Zr,Kr),q(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=v(e)}),zn={dow:0,doy:6},I("DDD",["DDDD",3],"DDDo","dayOfYear"),S("dayOfYear","DDD"),Y("DDD",eo),Y("DDDD",Xr),V(["DDD","DDDD"],function(e,t,n){n._dayOfYear=v(e)}),t.ISO_8601=function(){},$n=ne("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=De.apply(null,arguments);return ethis?this:e}),Re("Z",":"),Re("ZZ",""),Y("Z",io),Y("ZZ",io),V(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Fe(e)}),Kn=/([\+\-]|\d\d)/gi,t.updateOffset=function(){},Xn=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Qn=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,Je.fn=Ie.prototype,Jn=nt(1,"add"),Zn=nt(-1,"subtract"),t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",er=ne("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)}),I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Dt("gggg","weekYear"),Dt("ggggg","weekYear"),Dt("GGGG","isoWeekYear"),Dt("GGGGG","isoWeekYear"),S("weekYear","gg"),S("isoWeekYear","GG"),Y("G",oo),Y("g",oo),Y("GG",Zr,Kr),Y("gg",Zr,Kr),Y("GGGG",to,Qr),Y("gggg",to,Qr),Y("GGGGG",no,Jr),Y("ggggg",no,Jr),q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=v(e)}),q(["gg","GG"],function(e,n,r,o){n[o]=t.parseTwoDigitYear(e)}),I("Q",0,0,"quarter"),S("quarter","Q"),Y("Q",Gr),V("Q",function(e,t){t[fo]=3*(v(e)-1)}),I("D",["DD",2],"Do","date"),S("date","D"),Y("D",Zr),Y("DD",Zr,Kr),Y("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),V(["D","DD"],po),V("Do",function(e,t){t[po]=v(e.match(Zr)[0],10)}),tr=N("Date",!0),I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),S("day","d"),S("weekday","e"),S("isoWeekday","E"),Y("d",Zr),Y("e",Zr),Y("E",Zr),Y("dd",so),Y("ddd",so),Y("dddd",so),q(["dd","ddd","dddd"],function(e,t,n){var r=n._locale.weekdaysParse(e);null!=r?t.d=r:f(n).invalidWeekday=e}), q(["d","e","E"],function(e,t,n,r){t[r]=v(e)}),nr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),or="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),I("H",["HH",2],0,"hour"),I("h",["hh",2],0,function(){return this.hours()%12||12}),zt("a",!0),zt("A",!1),S("hour","h"),Y("a",$t),Y("A",$t),Y("H",Zr),Y("h",Zr),Y("HH",Zr,Kr),Y("hh",Zr,Kr),V(["H","HH"],ho),V(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),V(["h","hh"],function(e,t,n){t[ho]=v(e),f(n).bigHour=!0}),ir=/[ap]\.?m?\.?/i,ar=N("Hours",!0),I("m",["mm",2],0,"minute"),S("minute","m"),Y("m",Zr),Y("mm",Zr,Kr),V(["m","mm"],mo),sr=N("Minutes",!1),I("s",["ss",2],0,"second"),S("second","s"),Y("s",Zr),Y("ss",Zr,Kr),V(["s","ss"],go),ur=N("Seconds",!1),I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),S("millisecond","ms"),Y("S",eo,Gr),Y("SS",eo,Kr),Y("SSS",eo,Xr),cr="SSSS";cr.length<=9;cr+="S")Y(cr,ro);for(cr="S";cr.length<=9;cr+="S")V(cr,Xt);return lr=N("Milliseconds",!1),I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName"),fr=m.prototype,fr.add=Jn,fr.calendar=ot,fr.clone=it,fr.diff=lt,fr.endOf=xt,fr.format=ht,fr.from=mt,fr.fromNow=gt,fr.to=yt,fr.toNow=vt,fr.get=A,fr.invalidAt=Nt,fr.isAfter=at,fr.isBefore=st,fr.isBetween=ut,fr.isSame=ct,fr.isValid=Mt,fr.lang=er,fr.locale=bt,fr.localeData=_t,fr.max=Gn,fr.min=$n,fr.parsingFlags=Ot,fr.set=A,fr.startOf=wt,fr.subtract=Zn,fr.toArray=Et,fr.toObject=St,fr.toDate=kt,fr.toISOString=dt,fr.toJSON=dt,fr.toString=pt,fr.unix=Tt,fr.valueOf=Ct,fr.year=qn,fr.isLeapYear=le,fr.weekYear=At,fr.isoWeekYear=Lt,fr.quarter=fr.quarters=Rt,fr.month=J,fr.daysInMonth=Z,fr.week=fr.weeks=me,fr.isoWeek=fr.isoWeeks=ge,fr.weeksInYear=jt,fr.isoWeeksInYear=It,fr.date=tr,fr.day=fr.days=Bt,fr.weekday=Vt,fr.isoWeekday=qt,fr.dayOfYear=ve,fr.hour=fr.hours=ar,fr.minute=fr.minutes=sr,fr.second=fr.seconds=ur,fr.millisecond=fr.milliseconds=lr,fr.utcOffset=Ye,fr.utc=Be,fr.local=Ve,fr.parseZone=qe,fr.hasAlignedHourOffset=ze,fr.isDST=$e,fr.isDSTShifted=Ge,fr.isLocal=Ke,fr.isUtcOffset=Xe,fr.isUtc=Qe,fr.isUTC=Qe,fr.zoneAbbr=Qt,fr.zoneName=Jt,fr.dates=ne("dates accessor is deprecated. Use date instead.",tr),fr.months=ne("months accessor is deprecated. Use month instead",J),fr.years=ne("years accessor is deprecated. Use year instead",qn),fr.zone=ne("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",We),pr=fr,dr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},hr={LTS:"h:mm:ss A",LT:"h:mm A", diff --git a/charting_library/static/custom-css.css b/charting_library/static/custom-css.css deleted file mode 100644 index 448d2a3ff4..0000000000 --- a/charting_library/static/custom-css.css +++ /dev/null @@ -1,35 +0,0 @@ -.chart-page .chart-container { - border: none; -} - -.header-chart-panel .group { - margin: 1px 0; -} - -/*Header buttons background color */ -.header-chart-panel .button, -.symbol-search-dialog .symbol-block input, -input.symbol-edit, -.favored-list-container span -{ - background: #9e9e9e21; - border: none; -} - -.header-chart-panel .button.disabled { - background: #9e9e9e21; - border: none; - opacity: 50%; -} - -/* Disabled features background color */ -.feature-no-touch .header-chart-panel .button.disabled:active, -.feature-touch .header-chart-panel .button.disabled:active, -.header-chart-panel .button.disabled, -.header-chart-panel .button.disabled.active { - /*background: red;*/ -} - -/* Small close button */ -.tv-close-panel { -} diff --git a/charting_library/static/darkTheme.css b/charting_library/static/darkTheme.css new file mode 100644 index 0000000000..c8778c65ba --- /dev/null +++ b/charting_library/static/darkTheme.css @@ -0,0 +1,357 @@ +.chart-page .chart-container { + border: none; } + +.header-chart-panel .group { + margin: 1px 0; } + +/*Header buttons background color */ +.header-chart-panel .button, +.symbol-search-dialog .symbol-block input, +input.symbol-edit, +.favored-list-container span { + background: #9e9e9e21; + border: none; } + +.header-chart-panel .button.disabled { + background: #9e9e9e21; + border: none; + opacity: 50%; } + +/* Disabled features background color */ +.feature-no-touch .header-chart-panel .button.disabled:active, +.feature-touch .header-chart-panel .button.disabled:active, +.header-chart-panel .button.disabled, +.header-chart-panel .button.disabled.active { + /*background: red;*/ } + +/* Small close button */ +.tv-close-panel { + display: none; + z-index: 999; } + +.tv-close-panel.top { + bottom: -15px; + background: #383838; + border-color: #383838; + margin-left: -5px; + height: 8px; } + +.tv-close-panel.top:after { + display: block; + content: ""; + position: absolute; + width: 0; + height: 0; + border-style: solid; + border-width: 0 5px 4px 5px; + border-color: transparent transparent #bababa transparent; + top: 2px; + left: 50%; + margin-left: -5px; } + +.favored-list-container span { + color: #bababa; } + +.on-widget .getimage .icon { + fill: #bababa !important; } + +.pane-legend { + margin-top: 12px; + margin-left: 12px; } + +.layout__area--top .header-chart-panel-sizer { + height: 42px !important; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content { + padding: 5px !important; + background: #383838; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .button, .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .apply-common-tooltip { + border: 1px solid #383838 !important; + background-color: #262626; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .favored-list-container .submenu { + border-color: #383838; } + +.layout__area--top .apply-common-tooltip { + cursor: pointer; + color: #bababa !important; } + .layout__area--top .apply-common-tooltip svg { + fill: #bababa !important; } + .layout__area--top .apply-common-tooltip i { + background-color: #bababa !important; } + .layout__area--top .apply-common-tooltip:hover { + background-color: #2d2d2d; + color: #059cce !important; } + .layout__area--top .apply-common-tooltip:hover:before { + border-color: transparent !important; } + .layout__area--top .apply-common-tooltip:hover svg { + fill: #059cce !important; } + .layout__area--top .apply-common-tooltip:hover i { + background-color: #059cce !important; } + +.layout__area--top .study-template-widget .apply-common-tooltip { + border: 0 !important; + margin-left: 1px; } + .layout__area--top .study-template-widget .apply-common-tooltip .tv-caret { + margin-left: 7px; } + +.layout__area--top .chart-style-widget .apply-common-tooltip { + margin-left: 1px; } + .layout__area--top .chart-style-widget .apply-common-tooltip .tv-caret { + margin-left: 7px; } + +.layout__area--top .header-group-intervals { + margin-right: 2px; } + .layout__area--top .header-group-intervals .interval-dialog-button { + margin: 0 1px; + border-right: none !important; } + .layout__area--top .header-group-intervals .tv-caret { + margin-left: 7px; } + +.charts-popup-list { + border: none; + background-color: #383838; } + .charts-popup-list .special { + color: #059cce !important; + background-color: #535353 !important; } + .charts-popup-list .item, .charts-popup-list span { + color: #bababa !important; } + .charts-popup-list .item:hover, .charts-popup-list span:hover { + color: #059cce !important; + background: #535353 !important; } + .charts-popup-list .item:hover span, .charts-popup-list span:hover span { + color: #059cce !important; } + .charts-popup-list .item.active, .charts-popup-list span.active { + color: #059cce !important; + background-color: #535353; } + .charts-popup-list .separator { + border-color: #535353; } + +/* buttons */ +.tv-button--default { + color: #bababa; + border-color: #535353; + background-color: #535353; } + .tv-button--default:hover { + color: #bababa; + border-color: #868686 !important; + background-color: #868686 !important; } + +.tv-button--success { + color: #fff; + border-color: #059cce; + background-color: #059cce; } + .tv-button--success:hover { + color: #fff; + border-color: #3fccfa !important; + background-color: #3fccfa !important; } + +/* dialogs */ +.tv-dialog { + background-color: #383838; + color: #bababa; } + .tv-dialog .js-reset-button svg, .tv-dialog .js-dialog__close svg { + fill: #bababa; } + .tv-dialog .tv-dialog__title { + color: #bababa; } + .tv-dialog .tv-dialog__section--title { + border-color: #535353; } + .tv-dialog .tv-search-row { + border-color: #535353; } + .tv-dialog .tv-search-row input { + background-color: #383838; + color: #bababa; } + .tv-dialog .tv-insert-study-item:hover { + color: #059cce; + background-color: #535353; } + .tv-dialog .tv-text { + color: #bababa; } + .tv-dialog .tv-text p { + color: #bababa; } + .tv-dialog .tv-control-input { + color: #bababa; + background-color: #383838; } + .tv-dialog .tv-dropdown__body { + background-color: #383838 !important; } + .tv-dialog .tv-autocomplete__dropdown-item { + color: #bababa; + background-color: #383838 !important; } + .tv-dialog .tv-autocomplete__dropdown-item:hover { + color: #059cce; } + +._tv-dialog { + border-color: #535353; + background-color: #383838; + /* buttons */ + /* select */ + /* input number */ + /* end input number */ + /* color picker */ + /* custom-select (line selector) */ + /* font-size selector */ } + ._tv-dialog * { + color: #bababa; } + ._tv-dialog .tv-tabs:before { + background-color: #535353; } + ._tv-dialog input { + border-color: #535353 !important; + background-color: #383838; + color: #bababa !important; } + ._tv-dialog a { + color: #bababa !important; } + ._tv-dialog a:hover { + color: #059cce !important; } + ._tv-dialog label { + color: #bababa; } + ._tv-dialog .dialog-buttons ._tv-button.tv-left { + color: #bababa !important; + border-color: #535353 !important; + background-color: #535353 !important; } + ._tv-dialog .dialog-buttons ._tv-button.tv-left:hover { + color: #bababa !important; + border-color: #868686 !important; + background-color: #868686 !important; } + ._tv-dialog .dialog-buttons ._tv-button.ok { + color: #fff !important; + border-color: #059cce !important; + background-color: #059cce !important; } + ._tv-dialog .dialog-buttons ._tv-button.ok:hover { + color: #fff !important; + border-color: #3fccfa !important; + background-color: #3fccfa !important; } + ._tv-dialog .dialog-buttons ._tv-button.cancel { + color: #bababa !important; + border-color: #535353 !important; + background-color: #535353 !important; } + ._tv-dialog .dialog-buttons ._tv-button.cancel:hover { + color: #bababa !important; + border-color: #868686 !important; + background-color: #868686 !important; } + ._tv-dialog .tv-select-container.dialog { + cursor: pointer; + background-color: #383838 !important; + color: #bababa !important; + border-color: #535353 !important; } + ._tv-dialog .tv-select-container.dialog .sbOptions li, ._tv-dialog .tv-select-container.dialog .sbOptions a { + background-color: #383838; + color: #bababa; } + ._tv-dialog .tv-select-container.dialog .sbOptions li:hover, ._tv-dialog .tv-select-container.dialog .sbOptions a:hover { + background-color: #535353; + color: #059cce; } + ._tv-dialog .tv-select-container.dialog .sbToggle, ._tv-dialog .tv-select-container.dialog .sbSelector { + cursor: pointer; } + ._tv-dialog .ticker.tv-text-input.inset.dialog { + background-color: #383838; + color: #bababa; + border-color: #535353; } + ._tv-dialog .tv-ticker { + background-color: #383838; + color: #bababa; } + ._tv-dialog .tv-ticker .tv-ticker__btn { + background-color: #383838; + border-color: #535353; } + ._tv-dialog .tv-ticker .tv-ticker__btn svg { + fill: #bababa; } + ._tv-dialog .colorpicker-widget.tvcolorpicker-widget { + border-color: #535353 !important; } + ._tv-dialog .custom-select .switcher { + cursor: pointer; + background-color: #383838 !important; + border-color: #535353 !important; } + ._tv-dialog .custom-select .switcher:hover { + border-color: #535353 !important; } + ._tv-dialog .custom-select .switcher:hover:before { + border-color: #535353 !important; } + ._tv-dialog .custom-select .items { + background-color: #383838 !important; + border-color: #535353 !important; } + ._tv-dialog .custom-select .items .item { + background-color: #383838 !important; } + ._tv-dialog .custom-select .items .item.selected { + background-color: #535353 !important; } + ._tv-dialog .custom-select .items .item:hover { + background-color: #535353 !important; } + ._tv-dialog .tv-select-container-fontsize { + border-color: #535353 !important; } + ._tv-dialog .tv-select-container-fontsize ul { + border-color: #535353 !important; } + +/* end dialogs*/ +/* bottom control bar */ +.chart-controls-bar .apply-common-tooltip { + color: #bababa !important; } + .chart-controls-bar .apply-common-tooltip:hover { + background-color: transparent !important; + color: #059cce !important; } + +/* go to dialog */ +[class|=dialog] { + background-color: #383838; } + [class|=dialog] [class|=header] { + color: #bababa; + border-color: #535353; } + [class|=dialog] [class|=header] [class|=close] svg { + fill: #bababa; } + [class|=dialog] [class|=header] [class|=close]:hover svg { + fill: #059cce; } + [class|=dialog] [class|=body] input { + color: #bababa !important; + background-color: #383838 !important; + border-color: #535353 !important; } + +.layout__area--left [class|=separator] { + background-color: #535353; } + +.layout__area--left [class|=inner] { + background: #383838; } + .layout__area--left [class|=inner] [class|=buttonIcon] { + color: #bababa; } + .layout__area--left [class|=inner] [class|=button]:hover svg { + fill: #059cce !important; } + .layout__area--left [class|=inner] span svg { + fill: #bababa; } + .layout__area--left [class|=inner] [class|=isActive] span svg { + fill: #059cce; } + +.tv-floating-toolbar { + border-color: #535353; + background-color: #383838; } + .tv-floating-toolbar .tv-grouped-floating-toolbar__sub-widget { + transition: none; + border-color: #535353; + background-color: #383838; } + .tv-floating-toolbar .tv-grouped-floating-toolbar__sub-widget:hover { + border-color: #535353 !important; + background-color: #383838 !important; } + .tv-floating-toolbar .tv-floating-toolbar__content { + background-color: #383838 !important; } + .tv-floating-toolbar .tv-floating-toolbar__content .tv-floating-toolbar__widget { + background-color: #383838 !important; + border-color: #535353; } + .tv-floating-toolbar .tv-floating-toolbar__content .tv-floating-toolbar__widget .apply-common-tooltip { + background-color: #383838 !important; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg { + fill: #383838; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg .bg { + fill: #383838; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg .icon { + fill: #bababa; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg:hover .bg { + fill: #383838; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__icon svg path { + fill: #bababa !important; } + +/* dropdown menu when click on some items + on left side menu +*/ +[class|=menuWrap] [class|=menu] { + background-color: #383838 !important; } + [class|=menuWrap] [class|=menu] [class|=item] { + cursor: pointer; + color: #bababa; + background-color: #383838 !important; } + [class|=menuWrap] [class|=menu] [class|=item] [class|=labelRow] { + color: #bababa !important; } + [class|=menuWrap] [class|=menu] [class|=item]:hover { + color: #059cce; + background-color: #535353 !important; } + [class|=menuWrap] [class|=menu] [class|=item]:hover [class|=labelRow] { + color: #059cce !important; } diff --git a/charting_library/static/darkTheme.scss b/charting_library/static/darkTheme.scss new file mode 100644 index 0000000000..c58e5c59c2 --- /dev/null +++ b/charting_library/static/darkTheme.scss @@ -0,0 +1,32 @@ +// main colors + +$primary-background: #383838; +$primary-border-color: #535353; +$primary-background-active: $primary-border-color; + +$layout-top-button-border-color: $primary-background; + +$primary-text-color: #bababa; +$primary-text-color-active: #059cce; + +$button-success-color: #fff; +$button-success-border: $primary-text-color-active; +$button-success-background: $primary-text-color-active; + +$button-default-color: $primary-text-color; +$button-default-border: $primary-background-active; +$button-default-background: $primary-background-active; + +$button-cancel-color: $primary-text-color; +$button-cancel-border: $primary-background-active; +$button-cancel-background: $primary-background-active; + +$primary-btn-color: $primary-text-color; +$primary-btn-background: #262626; +$primary-btn-background-active: #2d2d2d; +$primary-btn-border-active: $primary-background-active; + +$icon-light-color: $primary-text-color; +$icon-light-color-active: $primary-text-color-active; + +@import "base"; \ No newline at end of file diff --git a/charting_library/static/lightTheme.css b/charting_library/static/lightTheme.css new file mode 100644 index 0000000000..61cc735809 --- /dev/null +++ b/charting_library/static/lightTheme.css @@ -0,0 +1,357 @@ +.chart-page .chart-container { + border: none; } + +.header-chart-panel .group { + margin: 1px 0; } + +/*Header buttons background color */ +.header-chart-panel .button, +.symbol-search-dialog .symbol-block input, +input.symbol-edit, +.favored-list-container span { + background: #9e9e9e21; + border: none; } + +.header-chart-panel .button.disabled { + background: #9e9e9e21; + border: none; + opacity: 50%; } + +/* Disabled features background color */ +.feature-no-touch .header-chart-panel .button.disabled:active, +.feature-touch .header-chart-panel .button.disabled:active, +.header-chart-panel .button.disabled, +.header-chart-panel .button.disabled.active { + /*background: red;*/ } + +/* Small close button */ +.tv-close-panel { + display: none; + z-index: 999; } + +.tv-close-panel.top { + bottom: -15px; + background: #eee; + border-color: #eee; + margin-left: -5px; + height: 8px; } + +.tv-close-panel.top:after { + display: block; + content: ""; + position: absolute; + width: 0; + height: 0; + border-style: solid; + border-width: 0 5px 4px 5px; + border-color: transparent transparent #656565 transparent; + top: 2px; + left: 50%; + margin-left: -5px; } + +.favored-list-container span { + color: #656565; } + +.on-widget .getimage .icon { + fill: #656565 !important; } + +.pane-legend { + margin-top: 12px; + margin-left: 12px; } + +.layout__area--top .header-chart-panel-sizer { + height: 42px !important; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content { + padding: 5px !important; + background: #eee; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .button, .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .apply-common-tooltip { + border: 1px solid #e0e0e0 !important; + background-color: #eee; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .favored-list-container .submenu { + border-color: #eee; } + +.layout__area--top .apply-common-tooltip { + cursor: pointer; + color: #656565 !important; } + .layout__area--top .apply-common-tooltip svg { + fill: #656565 !important; } + .layout__area--top .apply-common-tooltip i { + background-color: #656565 !important; } + .layout__area--top .apply-common-tooltip:hover { + background-color: #edeeec; + color: #059cce !important; } + .layout__area--top .apply-common-tooltip:hover:before { + border-color: transparent !important; } + .layout__area--top .apply-common-tooltip:hover svg { + fill: #059cce !important; } + .layout__area--top .apply-common-tooltip:hover i { + background-color: #059cce !important; } + +.layout__area--top .study-template-widget .apply-common-tooltip { + border: 0 !important; + margin-left: 1px; } + .layout__area--top .study-template-widget .apply-common-tooltip .tv-caret { + margin-left: 7px; } + +.layout__area--top .chart-style-widget .apply-common-tooltip { + margin-left: 1px; } + .layout__area--top .chart-style-widget .apply-common-tooltip .tv-caret { + margin-left: 7px; } + +.layout__area--top .header-group-intervals { + margin-right: 2px; } + .layout__area--top .header-group-intervals .interval-dialog-button { + margin: 0 1px; + border-right: none !important; } + .layout__area--top .header-group-intervals .tv-caret { + margin-left: 7px; } + +.charts-popup-list { + border: none; + background-color: #eee; } + .charts-popup-list .special { + color: #059cce !important; + background-color: #eee !important; } + .charts-popup-list .item, .charts-popup-list span { + color: #656565 !important; } + .charts-popup-list .item:hover, .charts-popup-list span:hover { + color: #059cce !important; + background: #eee !important; } + .charts-popup-list .item:hover span, .charts-popup-list span:hover span { + color: #059cce !important; } + .charts-popup-list .item.active, .charts-popup-list span.active { + color: #059cce !important; + background-color: #eee; } + .charts-popup-list .separator { + border-color: #e0e0e0; } + +/* buttons */ +.tv-button--default { + color: #656565; + border-color: #eee; + background-color: #eee; } + .tv-button--default:hover { + color: #656565; + border-color: white !important; + background-color: white !important; } + +.tv-button--success { + color: #fff; + border-color: #059cce; + background-color: #059cce; } + .tv-button--success:hover { + color: #fff; + border-color: #3fccfa !important; + background-color: #3fccfa !important; } + +/* dialogs */ +.tv-dialog { + background-color: #eee; + color: #656565; } + .tv-dialog .js-reset-button svg, .tv-dialog .js-dialog__close svg { + fill: #656565; } + .tv-dialog .tv-dialog__title { + color: #656565; } + .tv-dialog .tv-dialog__section--title { + border-color: #e0e0e0; } + .tv-dialog .tv-search-row { + border-color: #e0e0e0; } + .tv-dialog .tv-search-row input { + background-color: #eee; + color: #656565; } + .tv-dialog .tv-insert-study-item:hover { + color: #059cce; + background-color: #eee; } + .tv-dialog .tv-text { + color: #656565; } + .tv-dialog .tv-text p { + color: #656565; } + .tv-dialog .tv-control-input { + color: #656565; + background-color: #eee; } + .tv-dialog .tv-dropdown__body { + background-color: #eee !important; } + .tv-dialog .tv-autocomplete__dropdown-item { + color: #656565; + background-color: #eee !important; } + .tv-dialog .tv-autocomplete__dropdown-item:hover { + color: #059cce; } + +._tv-dialog { + border-color: #eee; + background-color: #eee; + /* buttons */ + /* select */ + /* input number */ + /* end input number */ + /* color picker */ + /* custom-select (line selector) */ + /* font-size selector */ } + ._tv-dialog * { + color: #656565; } + ._tv-dialog .tv-tabs:before { + background-color: #e0e0e0; } + ._tv-dialog input { + border-color: #e0e0e0 !important; + background-color: #eee; + color: #656565 !important; } + ._tv-dialog a { + color: #656565 !important; } + ._tv-dialog a:hover { + color: #059cce !important; } + ._tv-dialog label { + color: #656565; } + ._tv-dialog .dialog-buttons ._tv-button.tv-left { + color: #656565 !important; + border-color: #eee !important; + background-color: #eee !important; } + ._tv-dialog .dialog-buttons ._tv-button.tv-left:hover { + color: #656565 !important; + border-color: white !important; + background-color: white !important; } + ._tv-dialog .dialog-buttons ._tv-button.ok { + color: #fff !important; + border-color: #059cce !important; + background-color: #059cce !important; } + ._tv-dialog .dialog-buttons ._tv-button.ok:hover { + color: #fff !important; + border-color: #3fccfa !important; + background-color: #3fccfa !important; } + ._tv-dialog .dialog-buttons ._tv-button.cancel { + color: #656565 !important; + border-color: #eee !important; + background-color: #eee !important; } + ._tv-dialog .dialog-buttons ._tv-button.cancel:hover { + color: #656565 !important; + border-color: white !important; + background-color: white !important; } + ._tv-dialog .tv-select-container.dialog { + cursor: pointer; + background-color: #eee !important; + color: #656565 !important; + border-color: #e0e0e0 !important; } + ._tv-dialog .tv-select-container.dialog .sbOptions li, ._tv-dialog .tv-select-container.dialog .sbOptions a { + background-color: #eee; + color: #656565; } + ._tv-dialog .tv-select-container.dialog .sbOptions li:hover, ._tv-dialog .tv-select-container.dialog .sbOptions a:hover { + background-color: #eee; + color: #059cce; } + ._tv-dialog .tv-select-container.dialog .sbToggle, ._tv-dialog .tv-select-container.dialog .sbSelector { + cursor: pointer; } + ._tv-dialog .ticker.tv-text-input.inset.dialog { + background-color: #eee; + color: #656565; + border-color: #e0e0e0; } + ._tv-dialog .tv-ticker { + background-color: #eee; + color: #656565; } + ._tv-dialog .tv-ticker .tv-ticker__btn { + background-color: #eee; + border-color: #e0e0e0; } + ._tv-dialog .tv-ticker .tv-ticker__btn svg { + fill: #656565; } + ._tv-dialog .colorpicker-widget.tvcolorpicker-widget { + border-color: #e0e0e0 !important; } + ._tv-dialog .custom-select .switcher { + cursor: pointer; + background-color: #eee !important; + border-color: #e0e0e0 !important; } + ._tv-dialog .custom-select .switcher:hover { + border-color: #e0e0e0 !important; } + ._tv-dialog .custom-select .switcher:hover:before { + border-color: #e0e0e0 !important; } + ._tv-dialog .custom-select .items { + background-color: #eee !important; + border-color: #e0e0e0 !important; } + ._tv-dialog .custom-select .items .item { + background-color: #eee !important; } + ._tv-dialog .custom-select .items .item.selected { + background-color: #eee !important; } + ._tv-dialog .custom-select .items .item:hover { + background-color: #eee !important; } + ._tv-dialog .tv-select-container-fontsize { + border-color: #e0e0e0 !important; } + ._tv-dialog .tv-select-container-fontsize ul { + border-color: #e0e0e0 !important; } + +/* end dialogs*/ +/* bottom control bar */ +.chart-controls-bar .apply-common-tooltip { + color: #656565 !important; } + .chart-controls-bar .apply-common-tooltip:hover { + background-color: transparent !important; + color: #059cce !important; } + +/* go to dialog */ +[class|=dialog] { + background-color: #eee; } + [class|=dialog] [class|=header] { + color: #656565; + border-color: #e0e0e0; } + [class|=dialog] [class|=header] [class|=close] svg { + fill: #656565; } + [class|=dialog] [class|=header] [class|=close]:hover svg { + fill: #059cce; } + [class|=dialog] [class|=body] input { + color: #656565 !important; + background-color: #eee !important; + border-color: #e0e0e0 !important; } + +.layout__area--left [class|=separator] { + background-color: #e0e0e0; } + +.layout__area--left [class|=inner] { + background: #eee; } + .layout__area--left [class|=inner] [class|=buttonIcon] { + color: #656565; } + .layout__area--left [class|=inner] [class|=button]:hover svg { + fill: #059cce !important; } + .layout__area--left [class|=inner] span svg { + fill: #656565; } + .layout__area--left [class|=inner] [class|=isActive] span svg { + fill: #059cce; } + +.tv-floating-toolbar { + border-color: #e0e0e0; + background-color: #eee; } + .tv-floating-toolbar .tv-grouped-floating-toolbar__sub-widget { + transition: none; + border-color: #e0e0e0; + background-color: #eee; } + .tv-floating-toolbar .tv-grouped-floating-toolbar__sub-widget:hover { + border-color: #e0e0e0 !important; + background-color: #eee !important; } + .tv-floating-toolbar .tv-floating-toolbar__content { + background-color: #eee !important; } + .tv-floating-toolbar .tv-floating-toolbar__content .tv-floating-toolbar__widget { + background-color: #eee !important; + border-color: #e0e0e0; } + .tv-floating-toolbar .tv-floating-toolbar__content .tv-floating-toolbar__widget .apply-common-tooltip { + background-color: #eee !important; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg { + fill: #eee; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg .bg { + fill: #eee; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg .icon { + fill: #656565; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg:hover .bg { + fill: #eee; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__icon svg path { + fill: #656565 !important; } + +/* dropdown menu when click on some items + on left side menu +*/ +[class|=menuWrap] [class|=menu] { + background-color: #eee !important; } + [class|=menuWrap] [class|=menu] [class|=item] { + cursor: pointer; + color: #656565; + background-color: #eee !important; } + [class|=menuWrap] [class|=menu] [class|=item] [class|=labelRow] { + color: #656565 !important; } + [class|=menuWrap] [class|=menu] [class|=item]:hover { + color: #059cce; + background-color: #eee !important; } + [class|=menuWrap] [class|=menu] [class|=item]:hover [class|=labelRow] { + color: #059cce !important; } diff --git a/charting_library/static/lightTheme.scss b/charting_library/static/lightTheme.scss new file mode 100644 index 0000000000..37a97fe4f1 --- /dev/null +++ b/charting_library/static/lightTheme.scss @@ -0,0 +1,30 @@ +// main colors + +$primary-background: #eee; +$primary-border-color: #e0e0e0; +$primary-background-active: #eee; + +$primary-text-color: #656565; +$primary-text-color-active: #059cce; + +$button-success-color: #fff; +$button-success-border: $primary-text-color-active; +$button-success-background: $primary-text-color-active; + +$button-default-color: $primary-text-color; +$button-default-border: $primary-background-active; +$button-default-background: $primary-background-active; + +$button-cancel-color: $primary-text-color; +$button-cancel-border: $primary-background-active; +$button-cancel-background: $primary-background-active; + +$primary-btn-color: $primary-text-color; +$primary-btn-background: $primary-background; +$primary-btn-background-active: #edeeec; +$primary-btn-border-active: $primary-background-active; + +$icon-light-color: $primary-text-color; +$icon-light-color-active: $primary-text-color-active; + +@import "base"; diff --git a/charting_library/static/midnightTheme.css b/charting_library/static/midnightTheme.css new file mode 100644 index 0000000000..31925c8bce --- /dev/null +++ b/charting_library/static/midnightTheme.css @@ -0,0 +1,357 @@ +.chart-page .chart-container { + border: none; } + +.header-chart-panel .group { + margin: 1px 0; } + +/*Header buttons background color */ +.header-chart-panel .button, +.symbol-search-dialog .symbol-block input, +input.symbol-edit, +.favored-list-container span { + background: #9e9e9e21; + border: none; } + +.header-chart-panel .button.disabled { + background: #9e9e9e21; + border: none; + opacity: 50%; } + +/* Disabled features background color */ +.feature-no-touch .header-chart-panel .button.disabled:active, +.feature-touch .header-chart-panel .button.disabled:active, +.header-chart-panel .button.disabled, +.header-chart-panel .button.disabled.active { + /*background: red;*/ } + +/* Small close button */ +.tv-close-panel { + display: none; + z-index: 999; } + +.tv-close-panel.top { + bottom: -15px; + background: #2b2e37; + border-color: #2b2e37; + margin-left: -5px; + height: 8px; } + +.tv-close-panel.top:after { + display: block; + content: ""; + position: absolute; + width: 0; + height: 0; + border-style: solid; + border-width: 0 5px 4px 5px; + border-color: transparent transparent #b6bab7 transparent; + top: 2px; + left: 50%; + margin-left: -5px; } + +.favored-list-container span { + color: #b6bab7; } + +.on-widget .getimage .icon { + fill: #b6bab7 !important; } + +.pane-legend { + margin-top: 12px; + margin-left: 12px; } + +.layout__area--top .header-chart-panel-sizer { + height: 42px !important; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content { + padding: 5px !important; + background: #2b2e37; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .button, .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .apply-common-tooltip { + border: 1px solid #2b2e37 !important; + background-color: #1d212d; } + .layout__area--top .header-chart-panel-sizer .header-chart-panel-content .favored-list-container .submenu { + border-color: #2b2e37; } + +.layout__area--top .apply-common-tooltip { + cursor: pointer; + color: #b6bab7 !important; } + .layout__area--top .apply-common-tooltip svg { + fill: #b6bab7 !important; } + .layout__area--top .apply-common-tooltip i { + background-color: #b6bab7 !important; } + .layout__area--top .apply-common-tooltip:hover { + background-color: #272b3c; + color: #059cce !important; } + .layout__area--top .apply-common-tooltip:hover:before { + border-color: transparent !important; } + .layout__area--top .apply-common-tooltip:hover svg { + fill: #059cce !important; } + .layout__area--top .apply-common-tooltip:hover i { + background-color: #059cce !important; } + +.layout__area--top .study-template-widget .apply-common-tooltip { + border: 0 !important; + margin-left: 1px; } + .layout__area--top .study-template-widget .apply-common-tooltip .tv-caret { + margin-left: 7px; } + +.layout__area--top .chart-style-widget .apply-common-tooltip { + margin-left: 1px; } + .layout__area--top .chart-style-widget .apply-common-tooltip .tv-caret { + margin-left: 7px; } + +.layout__area--top .header-group-intervals { + margin-right: 2px; } + .layout__area--top .header-group-intervals .interval-dialog-button { + margin: 0 1px; + border-right: none !important; } + .layout__area--top .header-group-intervals .tv-caret { + margin-left: 7px; } + +.charts-popup-list { + border: none; + background-color: #2b2e37; } + .charts-popup-list .special { + color: #059cce !important; + background-color: #373e47 !important; } + .charts-popup-list .item, .charts-popup-list span { + color: #b6bab7 !important; } + .charts-popup-list .item:hover, .charts-popup-list span:hover { + color: #059cce !important; + background: #373e47 !important; } + .charts-popup-list .item:hover span, .charts-popup-list span:hover span { + color: #059cce !important; } + .charts-popup-list .item.active, .charts-popup-list span.active { + color: #059cce !important; + background-color: #373e47; } + .charts-popup-list .separator { + border-color: #373e47; } + +/* buttons */ +.tv-button--default { + color: #b6bab7; + border-color: #373e47; + background-color: #373e47; } + .tv-button--default:hover { + color: #b6bab7; + border-color: #647080 !important; + background-color: #647080 !important; } + +.tv-button--success { + color: #fff; + border-color: #059cce; + background-color: #059cce; } + .tv-button--success:hover { + color: #fff; + border-color: #3fccfa !important; + background-color: #3fccfa !important; } + +/* dialogs */ +.tv-dialog { + background-color: #2b2e37; + color: #b6bab7; } + .tv-dialog .js-reset-button svg, .tv-dialog .js-dialog__close svg { + fill: #b6bab7; } + .tv-dialog .tv-dialog__title { + color: #b6bab7; } + .tv-dialog .tv-dialog__section--title { + border-color: #373e47; } + .tv-dialog .tv-search-row { + border-color: #373e47; } + .tv-dialog .tv-search-row input { + background-color: #2b2e37; + color: #b6bab7; } + .tv-dialog .tv-insert-study-item:hover { + color: #059cce; + background-color: #373e47; } + .tv-dialog .tv-text { + color: #b6bab7; } + .tv-dialog .tv-text p { + color: #b6bab7; } + .tv-dialog .tv-control-input { + color: #b6bab7; + background-color: #2b2e37; } + .tv-dialog .tv-dropdown__body { + background-color: #2b2e37 !important; } + .tv-dialog .tv-autocomplete__dropdown-item { + color: #b6bab7; + background-color: #2b2e37 !important; } + .tv-dialog .tv-autocomplete__dropdown-item:hover { + color: #059cce; } + +._tv-dialog { + border-color: #373e47; + background-color: #2b2e37; + /* buttons */ + /* select */ + /* input number */ + /* end input number */ + /* color picker */ + /* custom-select (line selector) */ + /* font-size selector */ } + ._tv-dialog * { + color: #b6bab7; } + ._tv-dialog .tv-tabs:before { + background-color: #373e47; } + ._tv-dialog input { + border-color: #373e47 !important; + background-color: #2b2e37; + color: #b6bab7 !important; } + ._tv-dialog a { + color: #b6bab7 !important; } + ._tv-dialog a:hover { + color: #059cce !important; } + ._tv-dialog label { + color: #b6bab7; } + ._tv-dialog .dialog-buttons ._tv-button.tv-left { + color: #b6bab7 !important; + border-color: #373e47 !important; + background-color: #373e47 !important; } + ._tv-dialog .dialog-buttons ._tv-button.tv-left:hover { + color: #b6bab7 !important; + border-color: #647080 !important; + background-color: #647080 !important; } + ._tv-dialog .dialog-buttons ._tv-button.ok { + color: #fff !important; + border-color: #059cce !important; + background-color: #059cce !important; } + ._tv-dialog .dialog-buttons ._tv-button.ok:hover { + color: #fff !important; + border-color: #3fccfa !important; + background-color: #3fccfa !important; } + ._tv-dialog .dialog-buttons ._tv-button.cancel { + color: #b6bab7 !important; + border-color: #373e47 !important; + background-color: #373e47 !important; } + ._tv-dialog .dialog-buttons ._tv-button.cancel:hover { + color: #b6bab7 !important; + border-color: #647080 !important; + background-color: #647080 !important; } + ._tv-dialog .tv-select-container.dialog { + cursor: pointer; + background-color: #2b2e37 !important; + color: #b6bab7 !important; + border-color: #373e47 !important; } + ._tv-dialog .tv-select-container.dialog .sbOptions li, ._tv-dialog .tv-select-container.dialog .sbOptions a { + background-color: #2b2e37; + color: #b6bab7; } + ._tv-dialog .tv-select-container.dialog .sbOptions li:hover, ._tv-dialog .tv-select-container.dialog .sbOptions a:hover { + background-color: #373e47; + color: #059cce; } + ._tv-dialog .tv-select-container.dialog .sbToggle, ._tv-dialog .tv-select-container.dialog .sbSelector { + cursor: pointer; } + ._tv-dialog .ticker.tv-text-input.inset.dialog { + background-color: #2b2e37; + color: #b6bab7; + border-color: #373e47; } + ._tv-dialog .tv-ticker { + background-color: #2b2e37; + color: #b6bab7; } + ._tv-dialog .tv-ticker .tv-ticker__btn { + background-color: #2b2e37; + border-color: #373e47; } + ._tv-dialog .tv-ticker .tv-ticker__btn svg { + fill: #b6bab7; } + ._tv-dialog .colorpicker-widget.tvcolorpicker-widget { + border-color: #373e47 !important; } + ._tv-dialog .custom-select .switcher { + cursor: pointer; + background-color: #2b2e37 !important; + border-color: #373e47 !important; } + ._tv-dialog .custom-select .switcher:hover { + border-color: #373e47 !important; } + ._tv-dialog .custom-select .switcher:hover:before { + border-color: #373e47 !important; } + ._tv-dialog .custom-select .items { + background-color: #2b2e37 !important; + border-color: #373e47 !important; } + ._tv-dialog .custom-select .items .item { + background-color: #2b2e37 !important; } + ._tv-dialog .custom-select .items .item.selected { + background-color: #373e47 !important; } + ._tv-dialog .custom-select .items .item:hover { + background-color: #373e47 !important; } + ._tv-dialog .tv-select-container-fontsize { + border-color: #373e47 !important; } + ._tv-dialog .tv-select-container-fontsize ul { + border-color: #373e47 !important; } + +/* end dialogs*/ +/* bottom control bar */ +.chart-controls-bar .apply-common-tooltip { + color: #b6bab7 !important; } + .chart-controls-bar .apply-common-tooltip:hover { + background-color: transparent !important; + color: #059cce !important; } + +/* go to dialog */ +[class|=dialog] { + background-color: #2b2e37; } + [class|=dialog] [class|=header] { + color: #b6bab7; + border-color: #373e47; } + [class|=dialog] [class|=header] [class|=close] svg { + fill: #b6bab7; } + [class|=dialog] [class|=header] [class|=close]:hover svg { + fill: #059cce; } + [class|=dialog] [class|=body] input { + color: #b6bab7 !important; + background-color: #2b2e37 !important; + border-color: #373e47 !important; } + +.layout__area--left [class|=separator] { + background-color: #373e47; } + +.layout__area--left [class|=inner] { + background: #2b2e37; } + .layout__area--left [class|=inner] [class|=buttonIcon] { + color: #b6bab7; } + .layout__area--left [class|=inner] [class|=button]:hover svg { + fill: #059cce !important; } + .layout__area--left [class|=inner] span svg { + fill: #b6bab7; } + .layout__area--left [class|=inner] [class|=isActive] span svg { + fill: #059cce; } + +.tv-floating-toolbar { + border-color: #373e47; + background-color: #2b2e37; } + .tv-floating-toolbar .tv-grouped-floating-toolbar__sub-widget { + transition: none; + border-color: #373e47; + background-color: #2b2e37; } + .tv-floating-toolbar .tv-grouped-floating-toolbar__sub-widget:hover { + border-color: #373e47 !important; + background-color: #2b2e37 !important; } + .tv-floating-toolbar .tv-floating-toolbar__content { + background-color: #2b2e37 !important; } + .tv-floating-toolbar .tv-floating-toolbar__content .tv-floating-toolbar__widget { + background-color: #2b2e37 !important; + border-color: #373e47; } + .tv-floating-toolbar .tv-floating-toolbar__content .tv-floating-toolbar__widget .apply-common-tooltip { + background-color: #2b2e37 !important; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg { + fill: #2b2e37; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg .bg { + fill: #2b2e37; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg .icon { + fill: #b6bab7; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__color-picker svg:hover .bg { + fill: #2b2e37; } + .tv-floating-toolbar.tv-linetool-properties-toolbar .tv-linetool-properties-toolbar__icon svg path { + fill: #b6bab7 !important; } + +/* dropdown menu when click on some items + on left side menu +*/ +[class|=menuWrap] [class|=menu] { + background-color: #2b2e37 !important; } + [class|=menuWrap] [class|=menu] [class|=item] { + cursor: pointer; + color: #b6bab7; + background-color: #2b2e37 !important; } + [class|=menuWrap] [class|=menu] [class|=item] [class|=labelRow] { + color: #b6bab7 !important; } + [class|=menuWrap] [class|=menu] [class|=item]:hover { + color: #059cce; + background-color: #373e47 !important; } + [class|=menuWrap] [class|=menu] [class|=item]:hover [class|=labelRow] { + color: #059cce !important; } diff --git a/charting_library/static/midnightTheme.scss b/charting_library/static/midnightTheme.scss new file mode 100644 index 0000000000..a24250124f --- /dev/null +++ b/charting_library/static/midnightTheme.scss @@ -0,0 +1,32 @@ +// main colors + +$primary-background: #2b2e37; +$primary-border-color: #373e47; +$primary-background-active: $primary-border-color; + +$layout-top-button-border-color: $primary-background; + +$primary-text-color: #b6bab7; +$primary-text-color-active: #059cce; + +$button-success-color: #fff; +$button-success-border: $primary-text-color-active; +$button-success-background: $primary-text-color-active; + +$button-default-color: $primary-text-color; +$button-default-border: $primary-background-active; +$button-default-background: $primary-background-active; + +$button-cancel-color: $primary-text-color; +$button-cancel-border: $primary-background-active; +$button-cancel-background: $primary-background-active; + +$primary-btn-color: $primary-text-color; +$primary-btn-background: #1d212d; +$primary-btn-background-active: #272b3c; +$primary-btn-border-active: $primary-background-active; + +$icon-light-color: $primary-text-color; +$icon-light-color-active: $primary-text-color-active; + +@import "base"; \ No newline at end of file diff --git a/charting_library/static/tv-chart.7580da73a91e1354cb09.html b/charting_library/static/tv-chart.630b704a2b9d0eaf1593.html similarity index 93% rename from charting_library/static/tv-chart.7580da73a91e1354cb09.html rename to charting_library/static/tv-chart.630b704a2b9d0eaf1593.html index f143904877..4aab824727 100644 --- a/charting_library/static/tv-chart.7580da73a91e1354cb09.html +++ b/charting_library/static/tv-chart.630b704a2b9d0eaf1593.html @@ -1 +1 @@ -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index bcf288aad8..0c4b1bf678 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,15 +1,21 @@ # This script clones an existing gh-pages repository and pushes updates # from the newly compiled version into github. # The GITHUB_TOKEN for authentication is stored in the encrypted -# variable in .travis.yml +# variable in .travis.yml. + +# The script assumes final releases are tagged +# using [2-9].[0-9].[0-9]{6} format, for example 2.0.180629 +# Staging releases should always end in -rcx, using the following format: +# .+-rc[1-9]$ -# Clone Repo ############ -#echo "Cloning wallet repo" unamestr=`uname` -echo $unamestr -echo $TRAVIS_TAG -if [[ "$unamestr" == 'Linux' && -n $TRAVIS_TAG ]] +echo unamestr=$unamestr +echo TRAVIS_TAG=$TRAVIS_TAG +echo TRAVIS_BRANCH=$TRAVIS_BRANCH +echo TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH + +if [[ "$unamestr" == 'Linux' && -n $TRAVIS_TAG && $TRAVIS_BRANCH =~ [2-9]\.[0-9]\.[0-9]{6}$ ]] then ## wallet.bitshares.org subdomain (independent repo) echo "Pushing new wallet subdomain repo" @@ -24,11 +30,9 @@ then git push fi -echo $TRAVIS_BRANCH -echo $TRAVIS_PULL_REQUEST -if [ $unamestr = 'Linux' ] && [ $TRAVIS_BRANCH = 'staging' ] && [ -z $TRAVIS_PULL_REQUEST_BRANCH ] +if [[ "$unamestr" == 'Linux' && -n $TRAVIS_TAG && $TRAVIS_BRANCH =~ .+-rc[1-9]$ ]] then - ## wallet.bitshares.org subdomain (independent repo) + ## staging.bitshares.org subdomain (independent repo) echo "Pushing new staging subdomain repo" git clone https://github.com:${GITHUB_TOKEN}@github.com/${STAGING_REPO} $TRAVIS_BUILD_DIR/staging.bitshares.org cd $TRAVIS_BUILD_DIR/staging.bitshares.org @@ -36,12 +40,20 @@ then git checkout ./CNAME cp -Rv $TRAVIS_BUILD_DIR/build/hash-history/* . git add -A - git commit -a -m "Update staging by Travis: v$TRAVIS_TAG" + git commit -a -m "Update staging by Travis on new commit" git push fi - -if [[ "$unamestr" == 'Linux' && "$TRAVIS_BRANCH" === "staging"]] +if [ $unamestr = 'Linux' ] && [ $TRAVIS_BRANCH = 'develop' ] && [ -z $TRAVIS_PULL_REQUEST_BRANCH ] then - echo "It works" + ## develop.bitshares.org subdomain (independent repo) + echo "Pushing new develop subdomain repo" + git clone https://github.com:${GITHUB_TOKEN}@github.com/${DEVELOP_REPO} $TRAVIS_BUILD_DIR/develop.bitshares.org + cd $TRAVIS_BUILD_DIR/develop.bitshares.org + rm -rf ./* + git checkout ./CNAME + cp -Rv $TRAVIS_BUILD_DIR/build/hash-history/* . + git add -A + git commit -a -m "Update develop by Travis on new commit" + git push fi diff --git a/package-lock.json b/package-lock.json index e19726cc9a..263812839a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -646,6 +646,67 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "antd": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/antd/-/antd-3.6.2.tgz", + "integrity": "sha512-07WTy/Ed7ZAMzEfWPvpLz3aQclubxMdJ4FBpWBX5u+gIOXdm2J+E1EUTDZFo1s6n2u/lq9e1UAwlgANJT1UJqg==", + "requires": { + "array-tree-filter": "^2.0.0", + "babel-runtime": "6.x", + "classnames": "~2.2.0", + "create-react-class": "^15.6.0", + "css-animation": "^1.2.5", + "dom-closest": "^0.2.0", + "enquire.js": "^2.1.1", + "intersperse": "^1.0.0", + "lodash": "^4.17.5", + "moment": "^2.19.3", + "omit.js": "^1.0.0", + "prop-types": "^15.5.7", + "raf": "^3.4.0", + "rc-animate": "^2.4.1", + "rc-calendar": "~9.6.0", + "rc-cascader": "~0.13.0", + "rc-checkbox": "~2.1.5", + "rc-collapse": "~1.9.0", + "rc-dialog": "~7.1.0", + "rc-dropdown": "~2.1.0", + "rc-editor-mention": "^1.0.2", + "rc-form": "^2.1.0", + "rc-input-number": "~4.0.0", + "rc-menu": "~7.0.2", + "rc-notification": "~3.1.1", + "rc-pagination": "~1.16.1", + "rc-progress": "~2.2.2", + "rc-rate": "~2.4.0", + "rc-select": "~8.0.7", + "rc-slider": "~8.6.0", + "rc-steps": "~3.1.0", + "rc-switch": "~1.6.0", + "rc-table": "~6.1.0", + "rc-tabs": "~9.2.0", + "rc-time-picker": "~3.3.0", + "rc-tooltip": "~3.7.0", + "rc-tree": "~1.8.0", + "rc-tree-select": "~1.12.0", + "rc-upload": "~2.4.0", + "rc-util": "^4.0.4", + "react-lazy-load": "^3.0.12", + "react-slick": "~0.23.1", + "shallowequal": "^1.0.1", + "warning": "~4.0.1" + }, + "dependencies": { + "warning": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.1.tgz", + "integrity": "sha512-rAVtTNZw+cQPjvGp1ox0XC5Q2IBFyqoqh+QII4J/oguyu83Bax1apbo2eqB8bHRS+fqYUBagys6lqUoVwKSmXQ==", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, "any-observable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", @@ -755,6 +816,11 @@ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", "dev": true }, + "array-tree-filter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-2.1.0.tgz", + "integrity": "sha512-4ROwICNlNw/Hqa9v+rk5h22KjmzB1JGTMVKP2AKJBOCgb0yL0ASf0+YvCcLNNwquOHNX48jkeZIJ3a+oOQqKcw==" + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -865,6 +931,14 @@ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" }, + "async-validator": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.2.tgz", + "integrity": "sha1-t3WXIm6WJC+NUxwNRq4pX2JCK6Q=", + "requires": { + "babel-runtime": "6.x" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2213,13 +2287,150 @@ "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==", "dev": true }, + "bitshares-ui-style-guide": { + "version": "git+https://github.com/bitshares/bitshares-ui-style-guide.git#8c20d1a266ec8f1b36377589ea28711f79cfbd1b", + "from": "git+https://github.com/bitshares/bitshares-ui-style-guide.git", + "requires": { + "antd": "^3.4.1", + "cross-env": "5.1.4", + "normalize.css": "^8.0.0", + "prop-types": "^15.6.1", + "react": "16.2.0", + "react-datepicker": "^1.4.1", + "react-datepicker2": "^1.0.0-alpha1", + "react-dom": "16.2.0", + "react-hot-loader": "4.0.0", + "react-router-dom": "4.2.2" + }, + "dependencies": { + "cross-env": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.4.tgz", + "integrity": "sha512-Mx8mw6JWhfpYoEk7PGvHxJMLQwQHORAs8+2bX+C1lGQ4h3GkDb1zbzC2Nw85YH9ZQMlO0BHZxMacgrfPmMFxbg==", + "requires": { + "cross-spawn": "^5.1.0", + "is-windows": "^1.0.0" + } + }, + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + } + }, + "history": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", + "integrity": "sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA==", + "requires": { + "invariant": "^2.2.1", + "loose-envify": "^1.2.0", + "resolve-pathname": "^2.2.0", + "value-equal": "^0.4.0", + "warning": "^3.0.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "requires": { + "isarray": "0.0.1" + } + }, + "react": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.2.0.tgz", + "integrity": "sha512-ZmIomM7EE1DvPEnSFAHZn9Vs9zJl5A9H7el0EGTE6ZbW9FKe/14IYAlPbC8iH25YarEQxZL+E8VW7Mi7kfQrDQ==", + "requires": { + "fbjs": "^0.8.16", + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.0" + } + }, + "react-dom": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.2.0.tgz", + "integrity": "sha512-zpGAdwHVn9K0091d+hr+R0qrjoJ84cIBFL2uU60KvWBPfZ7LPSrfqviTxGHWN0sjPZb2hxWzMexwrvJdKePvjg==", + "requires": { + "fbjs": "^0.8.16", + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.0" + } + }, + "react-hot-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.0.0.tgz", + "integrity": "sha512-TxgvDJj/EuY05VXyPBYSWuGVGNd2g0K6WJxaOwjgAl1/1Hqni1BmMXnw6k/DGYeB1prh0jpB1N1x15ZEVytSSw==", + "requires": { + "fast-levenshtein": "^2.0.6", + "global": "^4.3.0", + "hoist-non-react-statics": "^2.5.0", + "prop-types": "^15.6.0", + "shallowequal": "^1.0.2" + } + }, + "react-router": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", + "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", + "requires": { + "history": "^4.7.2", + "hoist-non-react-statics": "^2.5.0", + "invariant": "^2.2.4", + "loose-envify": "^1.3.1", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.1", + "warning": "^4.0.1" + }, + "dependencies": { + "warning": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.1.tgz", + "integrity": "sha512-rAVtTNZw+cQPjvGp1ox0XC5Q2IBFyqoqh+QII4J/oguyu83Bax1apbo2eqB8bHRS+fqYUBagys6lqUoVwKSmXQ==", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, + "react-router-dom": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.2.2.tgz", + "integrity": "sha512-cHMFC1ZoLDfEaMFoKTjN7fry/oczMgRt5BKfMAkTu5zEuJvUiPp1J8d0eXSVTnBh6pxlbdqDhozunOOLtmKfPA==", + "requires": { + "history": "^4.7.2", + "invariant": "^2.2.2", + "loose-envify": "^1.3.1", + "prop-types": "^15.5.4", + "react-router": "^4.2.0", + "warning": "^3.0.0" + } + } + } + }, "bitsharesjs": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/bitsharesjs/-/bitsharesjs-1.7.6.tgz", - "integrity": "sha512-ltGnNTkDN3beBPZ/0BQLpNdnxNBXivVekduQje58dIp/RImxMahOPpErJl9KG4Nv9IWjhuHJutZhb9A8NEvHAQ==", + "version": "1.7.10", + "resolved": "https://registry.npmjs.org/bitsharesjs/-/bitsharesjs-1.7.10.tgz", + "integrity": "sha512-VFXV5PvIUF0XnP0uuHbB9U3YDeGwERvgwH56UnqzmrBXLZiMIuijjLdY2iMLhOZfQF/NbKjEUOvpBEjw0cSCmg==", "requires": { "bigi": "1.4.2", - "bitsharesjs-ws": "^1.5.2", + "bitsharesjs-ws": "1.5.4", "bs58": "4.0.1", "bytebuffer": "5.0.1", "create-hash": "1.2.0", @@ -2234,9 +2445,9 @@ } }, "bitsharesjs-ws": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/bitsharesjs-ws/-/bitsharesjs-ws-1.5.2.tgz", - "integrity": "sha512-cFCNBGfJbf+TCmHbQiUyXRAulAFOQbhonSz0/GYEiE8ynF64EfXhs7XAExEyAnRMKGkttT+x2oR1+LT/ljAfzQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/bitsharesjs-ws/-/bitsharesjs-ws-1.5.4.tgz", + "integrity": "sha512-34JYCgcEwJzA6L8EBIJ4SNAkiWy8vj3OrJHw6/OHYr4+ARctgkpDeHoPms0j6zqV4cIkR5X4RZdctnsm0aNH9Q==", "requires": { "babel-plugin-add-module-exports": "^0.2.1", "ws": "4.1.0" @@ -3983,110 +4194,6 @@ "es5-ext": "^0.10.9" } }, - "d3-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.1.tgz", - "integrity": "sha512-CyINJQ0SOUHojDdFDH4JEM0552vCR1utGyLHegJHyYH0JyCpSeTPxi4OBqHMA2jJZq4NH782LtaJWBImqI/HBw==" - }, - "d3-collection": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.4.tgz", - "integrity": "sha1-NC39EoN8kJdPM/HMCnha6lcNzcI=" - }, - "d3-color": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.2.0.tgz", - "integrity": "sha512-dmL9Zr/v39aSSMnLOTd58in2RbregCg4UtGyUArvEKTTN6S3HKEy+ziBWVYo9PTzRyVW+pUBHUtRKz0HYX+SQg==" - }, - "d3-dispatch": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.3.tgz", - "integrity": "sha1-RuFJHqqbWMNY/OW+TovtYm54cfg=" - }, - "d3-force": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.1.0.tgz", - "integrity": "sha512-2HVQz3/VCQs0QeRNZTYb7GxoUCeb6bOzMp/cGcLa87awY9ZsPvXOGeZm0iaGBjXic6I1ysKwMn+g+5jSAdzwcg==", - "requires": { - "d3-collection": "1", - "d3-dispatch": "1", - "d3-quadtree": "1", - "d3-timer": "1" - } - }, - "d3-format": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.3.0.tgz", - "integrity": "sha512-ycfLEIzHVZC3rOvuBOKVyQXSiUyCDjeAPIj9n/wugrr+s5AcTQC2Bz6aKkubG7rQaQF0SGW/OV4UEJB9nfioFg==" - }, - "d3-interpolate": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.2.0.tgz", - "integrity": "sha512-zLvTk8CREPFfc/2XglPQriAsXkzoRDAyBzndtKJWrZmHw7kmOWHNS11e40kPTd/oGk8P5mFJW5uBbcFQ+ybxyA==", - "requires": { - "d3-color": "1" - } - }, - "d3-path": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.5.tgz", - "integrity": "sha1-JB6xhJvZ6egCHA0KeZ+KDo5EF2Q=" - }, - "d3-quadtree": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.3.tgz", - "integrity": "sha1-rHmH4+I/6AWpkPKOG1DTj8uCJDg=" - }, - "d3-scale": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-1.0.7.tgz", - "integrity": "sha512-KvU92czp2/qse5tUfGms6Kjig0AhHOwkzXG0+PqIJB3ke0WUv088AHMZI0OssO9NCkXt4RP8yju9rpH8aGB7Lw==", - "requires": { - "d3-array": "^1.2.0", - "d3-collection": "1", - "d3-color": "1", - "d3-format": "1", - "d3-interpolate": "1", - "d3-time": "1", - "d3-time-format": "2" - } - }, - "d3-selection": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.3.0.tgz", - "integrity": "sha512-qgpUOg9tl5CirdqESUAu0t9MU/t3O9klYfGfyKsXEmhyxyzLpzpeh08gaxBUTQw1uXIOkr/30Ut2YRjSSxlmHA==" - }, - "d3-shape": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.2.0.tgz", - "integrity": "sha1-RdAVOPBkuv0F6j1tLLdI/YxB93c=", - "requires": { - "d3-path": "1" - } - }, - "d3-time": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-1.0.8.tgz", - "integrity": "sha512-YRZkNhphZh3KcnBfitvF3c6E0JOFGikHZ4YqD+Lzv83ZHn1/u6yGenRU1m+KAk9J1GnZMnKcrtfvSktlA1DXNQ==" - }, - "d3-time-format": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.1.1.tgz", - "integrity": "sha512-8kAkymq2WMfzW7e+s/IUNAtN/y3gZXGRrdGfo6R8NKPAA85UBTxZg5E61bR6nLwjPjj4d3zywSQe1CkYLPFyrw==", - "requires": { - "d3-time": "1" - } - }, - "d3-timer": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.7.tgz", - "integrity": "sha512-vMZXR88XujmG/L5oB96NNKH5lCWwiLM/S2HyyAQLcjWJCloK5shxta4CwOFYLZoY3AWX73v8Lgv4cCAdWtRmOA==" - }, - "d3fc-rebind": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/d3fc-rebind/-/d3fc-rebind-4.1.1.tgz", - "integrity": "sha1-cMjWtj/uY9uzy1d8aHMt7VNfmzI=" - }, "dargs": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-5.1.0.tgz", @@ -4160,8 +4267,7 @@ "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, "decompress-response": { "version": "3.3.0", @@ -4438,15 +4544,45 @@ } }, "dom-align": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.6.7.tgz", - "integrity": "sha512-FrHttKVCqdHaDyVjygY+8kRhcNOJEdvAkc2ltppJUz71ekgpzIOuLgsOIKVqzdETI2EocmW2DzF+uP365qcR5Q==" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.7.0.tgz", + "integrity": "sha512-1W9FPVDQjq0hauchk+AhImFhFnTKj6wa5THY1kuxZbN5SvZXhYMlpwqBpO+7J4Lzae+Hyt0DO9zWp/dTywfuQg==" + }, + "dom-closest": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-closest/-/dom-closest-0.2.0.tgz", + "integrity": "sha1-69n5HRvyLo1vR3h2u80+yQIWwM8=", + "requires": { + "dom-matches": ">=1.0.1" + } + }, + "dom-converter": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.1.4.tgz", + "integrity": "sha1-pF71cnuJDJv/5tfIduexnLDhfzs=", + "dev": true, + "requires": { + "utila": "~0.3" + }, + "dependencies": { + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } }, "dom-helpers": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==" }, + "dom-matches": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-matches/-/dom-matches-2.0.0.tgz", + "integrity": "sha1-0nKLQWqHUzmA6wibhI0lPPI6dYw=" + }, "dom-scroll-into-view": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dom-scroll-into-view/-/dom-scroll-into-view-1.0.1.tgz", @@ -4479,8 +4615,7 @@ "dom-walk": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", - "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=", - "dev": true + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" }, "domain-browser": { "version": "1.2.0", @@ -4543,6 +4678,37 @@ "integrity": "sha1-3vHxyl1gWdJKdm5YeULCEQbOEnU=", "dev": true }, + "draft-js": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/draft-js/-/draft-js-0.10.5.tgz", + "integrity": "sha512-LE6jSCV9nkPhfVX2ggcRLA4FKs6zWq9ceuO/88BpXdNCS7mjRTgs0NsV6piUCJX9YxMsB9An33wnkMmU2sD2Zg==", + "requires": { + "fbjs": "^0.8.15", + "immutable": "~3.7.4", + "object-assign": "^4.1.0" + }, + "dependencies": { + "fbjs": { + "version": "0.8.17", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz", + "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=", + "requires": { + "core-js": "^1.0.0", + "isomorphic-fetch": "^2.1.1", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.18" + } + }, + "immutable": { + "version": "3.7.6", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz", + "integrity": "sha1-E7TTyxK++hVIKib+Gy665kAHHks=" + } + } + }, "duplexer3": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", @@ -5368,6 +5534,11 @@ "es5-ext": "~0.10.14" } }, + "eventlistener": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/eventlistener/-/eventlistener-0.0.1.tgz", + "integrity": "sha1-7Suqu4UiJ68rz4iRUscsY8pTLrg=" + }, "events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", @@ -5597,18 +5768,6 @@ } } }, - "extract-text-webpack-plugin": { - "version": "4.0.0-beta.0", - "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-4.0.0-beta.0.tgz", - "integrity": "sha512-Hypkn9jUTnFr0DpekNam53X47tXn3ucY08BQumv7kdGgeVUBLq3DJHJTi6HNxv4jl9W+Skxjz9+RnK0sJyqqjA==", - "dev": true, - "requires": { - "async": "^2.4.1", - "loader-utils": "^1.1.0", - "schema-utils": "^0.4.5", - "webpack-sources": "^1.1.0" - } - }, "extract-zip": { "version": "1.6.7", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz", @@ -5953,8 +6112,7 @@ "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "fastparse": { "version": "1.1.1", @@ -8997,7 +9155,6 @@ "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", - "dev": true, "requires": { "min-document": "^2.19.0", "process": "~0.5.1" @@ -9006,8 +9163,7 @@ "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", - "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=", - "dev": true + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" } } }, @@ -9127,6 +9283,11 @@ "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", "dev": true }, + "hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=" + }, "handlebars": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", @@ -9216,6 +9377,37 @@ } } }, + "handlebars-loader": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/handlebars-loader/-/handlebars-loader-1.7.0.tgz", + "integrity": "sha512-tfS3n+PrDB2gnDnrx0/DGvdb4wF4JqV7CEiVof3RymOIWYrcmD+ZiaXTlZ/f7fZ7+aQPEv6JRG0HS7nTlyvGlQ==", + "dev": true, + "requires": { + "async": "~0.2.10", + "fastparse": "^1.0.0", + "loader-utils": "1.0.x", + "object-assign": "^4.1.0" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "loader-utils": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.0.4.tgz", + "integrity": "sha1-E/Vhl/FSOjBYkSSLTHJEVAhIQmw=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0" + } + } + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -9390,17 +9582,6 @@ "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-6.1.0.tgz", "integrity": "sha512-YZotALyZD1xJixB8pNOKqBpmxV/NrOpMHQ3l7/CMB1hn5U7KRSviaeyv8/1MT7/rTgEFPOW85mdaFKFr2EfeAw==" }, - "history": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/history/-/history-3.3.0.tgz", - "integrity": "sha1-/O3M6PEpdTcVRdc1RhAzV5ptrpw=", - "requires": { - "invariant": "^2.2.1", - "loose-envify": "^1.2.0", - "query-string": "^4.2.2", - "warning": "^3.0.0" - } - }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -9503,6 +9684,35 @@ "uglify-js": "3.3.x" } }, + "html-webpack-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz", + "integrity": "sha1-sBq71yOsqqeze2r0SS69oD2d03s=", + "dev": true, + "requires": { + "html-minifier": "^3.2.3", + "loader-utils": "^0.2.16", + "lodash": "^4.17.3", + "pretty-error": "^2.0.2", + "tapable": "^1.0.0", + "toposort": "^1.0.0", + "util.promisify": "1.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", + "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", + "dev": true, + "requires": { + "big.js": "^3.1.3", + "emojis-list": "^2.0.0", + "json5": "^0.5.0", + "object-assign": "^4.0.1" + } + } + } + }, "htmlparser2": { "version": "3.8.3", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", @@ -9856,6 +10066,11 @@ "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", "dev": true }, + "intersperse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/intersperse/-/intersperse-1.0.0.tgz", + "integrity": "sha1-8lYfsc/vn1J3zDNHoiiGtDUaUYE=" + }, "intl": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/intl/-/intl-1.2.5.tgz", @@ -10114,6 +10329,11 @@ "xtend": "^4.0.0" } }, + "is-negative-zero": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", + "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=" + }, "is-npm": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", @@ -10515,11 +10735,6 @@ "is-object": "^1.0.1" } }, - "jalaali-js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/jalaali-js/-/jalaali-js-0.2.0.tgz", - "integrity": "sha1-EJazxyD8dOPdKt96b8AepPu0uhw=" - }, "jdenticon": { "version": "git+https://github.com/cryptonomex/jdenticon.git#5107872e12c645dcfd1e9efbe963a9bd54fd2e48", "from": "git+https://github.com/cryptonomex/jdenticon.git" @@ -12291,17 +12506,9 @@ "dev": true }, "lodash.debounce": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-3.1.1.tgz", - "integrity": "sha1-gSIRw3ipTMKdWqTjNGzwv846ffU=", - "requires": { - "lodash._getnative": "^3.0.0" - } - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=" + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, "lodash.isarguments": { "version": "3.1.0", @@ -12373,12 +12580,9 @@ } }, "lodash.throttle": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-3.0.4.tgz", - "integrity": "sha1-vE9HH7Mo5Nb9xt8rPTyvET8Pick=", - "requires": { - "lodash.debounce": "^3.0.0" - } + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" }, "lodash.uniq": { "version": "4.5.0", @@ -12874,11 +13078,30 @@ "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", - "dev": true, "requires": { "dom-walk": "^0.1.0" } }, + "mini-css-extract-plugin": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz", + "integrity": "sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "webpack-sources": "^1.1.0" + } + }, + "mini-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mini-store/-/mini-store-1.1.0.tgz", + "integrity": "sha512-/Ou2jdD7/CDyJBjHnpRuc8aehh2WHxBpUpVvVHn0XhvLHk35YOiUlOYhX55NX00/e4phr1F3aNnhWKkGMqLUfQ==", + "requires": { + "hoist-non-react-statics": "^2.3.1", + "prop-types": "^15.6.0", + "shallowequal": "^1.0.2" + } + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -13012,15 +13235,6 @@ "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==" }, - "moment-jalaali": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/moment-jalaali/-/moment-jalaali-0.6.1.tgz", - "integrity": "sha1-RQBDiVyMj31ms4yG4YhNzgWQaWU=", - "requires": { - "jalaali-js": "^0.2.0", - "moment": "^2.12.0" - } - }, "moment-timezone": { "version": "0.5.17", "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.17.tgz", @@ -13512,8 +13726,25 @@ "prepend-http": "^1.0.0", "query-string": "^4.1.0", "sort-keys": "^1.0.0" + }, + "dependencies": { + "query-string": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", + "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "dev": true, + "requires": { + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + } + } } }, + "normalize.css": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.0.tgz", + "integrity": "sha512-iXcbM3NWr0XkNyfiSBsoPezi+0V92P9nj84yVV1/UZxRUrGczgX/X91KMAGM0omWLY2+2Q1gKD/XRn4gQRDB2A==" + }, "notifyjs": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/notifyjs/-/notifyjs-3.0.0.tgz", @@ -13710,6 +13941,14 @@ "has": "^1.0.1" } }, + "omit.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/omit.js/-/omit.js-1.0.0.tgz", + "integrity": "sha512-O1rwbvEfAdhtonTv+v6IQeMOKTi/wlHcXpI3hehyPDlujkjSBQC6Vtzg0mdy+v2KVDmuPf7hAbHlTBM6q1bUHQ==", + "requires": { + "babel-runtime": "^6.23.0" + } + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -14147,8 +14386,7 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pify": { "version": "3.0.0", @@ -14226,6 +14464,11 @@ "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", "dev": true }, + "popper.js": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.3.tgz", + "integrity": "sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU=" + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -14930,10 +15173,20 @@ "meow": "^3.1.0" } }, - "pretty-format": { - "version": "22.4.3", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.3.tgz", - "integrity": "sha512-S4oT9/sT6MN7/3COoOy+ZJeA92VmOnveLHgrwBE3Z1W5N9S2A1QGNYiE1z75DAENbJrXXUb+OWXhpJcg05QKQQ==", + "pretty-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", + "integrity": "sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=", + "dev": true, + "requires": { + "renderkid": "^2.0.1", + "utila": "~0.4" + } + }, + "pretty-format": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.3.tgz", + "integrity": "sha512-S4oT9/sT6MN7/3COoOy+ZJeA92VmOnveLHgrwBE3Z1W5N9S2A1QGNYiE1z75DAENbJrXXUb+OWXhpJcg05QKQQ==", "dev": true, "requires": { "ansi-regex": "^3.0.0", @@ -15230,12 +15483,19 @@ "dev": true }, "query-string": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.1.0.tgz", + "integrity": "sha512-pNB/Gr8SA8ff8KpUFM36o/WFAlthgaThka5bV19AD9PNTH20Pwq5Zxodif2YyHwrctp6SkL4GqlOot0qR/wGaw==", "requires": { - "object-assign": "^4.1.0", - "strict-uri-encode": "^1.0.0" + "decode-uri-component": "^0.2.0", + "strict-uri-encode": "^2.0.0" + }, + "dependencies": { + "strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" + } } }, "querystring": { @@ -15250,6 +15510,14 @@ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, + "raf": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.0.tgz", + "integrity": "sha512-pDP/NMRAXoTfrhCfyfSEwJAKLaxBU9eApMeBPB1TkDouZmvPerIClV8lTAd+uF8ZiTaVl69e1FCxQrAd/VTjGw==", + "requires": { + "performance-now": "^2.1.0" + } + }, "randomatic": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz", @@ -15371,12 +15639,12 @@ } }, "rc-align": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-2.3.6.tgz", - "integrity": "sha512-sB9HpuyMZg5Yy+iIkraPv7/5uaMdUVpfitGFO5aOKKFE/rcEpWunaZdYjvTpPBHUsBrrEn/7qs/klD1YQPIQhA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-2.4.1.tgz", + "integrity": "sha512-rKl7lFhpCVH/nmELrHRzqMGRRmIpUDO93tmXRzRrWjTfpMwpz94NA+zEXk+ZLKQc+sYP+CAcdoF65Wq6FUAH/A==", "requires": { "babel-runtime": "^6.26.0", - "dom-align": "1.x", + "dom-align": "^1.7.0", "prop-types": "^15.5.8", "rc-util": "^4.0.4", "shallowequal": "^1.0.2" @@ -15392,6 +15660,523 @@ "prop-types": "15.x" } }, + "rc-calendar": { + "version": "9.6.2", + "resolved": "https://registry.npmjs.org/rc-calendar/-/rc-calendar-9.6.2.tgz", + "integrity": "sha512-RtWav1aeYEFiFWxc0toYga06orrw3229qwDSsQu4RcaS7+swja14+nxOpWCMic7K2AakBZh4OfJ/ZEdCMvHewQ==", + "requires": { + "babel-runtime": "6.x", + "classnames": "2.x", + "create-react-class": "^15.5.2", + "moment": "2.x", + "prop-types": "^15.5.8", + "rc-trigger": "^2.2.0", + "rc-util": "^4.1.1" + }, + "dependencies": { + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + }, + "dependencies": { + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + } + } + } + } + }, + "rc-cascader": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/rc-cascader/-/rc-cascader-0.13.1.tgz", + "integrity": "sha512-gbv7eEm3WY2Zhnyb2cLnCz+Zd8s4H5DKPQWLN5J1gCZioprW8uj9X5RPaScizb6HAO03sYsue2YRB+nNI8DrYg==", + "requires": { + "array-tree-filter": "^1.0.0", + "prop-types": "^15.5.8", + "rc-trigger": "^2.2.0", + "rc-util": "^4.0.4", + "shallow-equal": "^1.0.0" + }, + "dependencies": { + "array-tree-filter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-tree-filter/-/array-tree-filter-1.0.1.tgz", + "integrity": "sha1-CorR7v04zoiFhjL5zAQj12NOTV0=" + }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + } + } + } + }, + "rc-checkbox": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/rc-checkbox/-/rc-checkbox-2.1.5.tgz", + "integrity": "sha512-WXKnZV6ipS3Jsmd7mVenVUQf+ictgWZW0RqiH+7MeYdzGj/SL4g/S6MZgRdgzaBS2tGBCp4bvhGcyZLns6uQxw==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "2.x", + "prop-types": "15.x", + "rc-util": "^4.0.4" + } + }, + "rc-collapse": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/rc-collapse/-/rc-collapse-1.9.2.tgz", + "integrity": "sha512-mdKU10GPops0jaPtYlTxoOVK6yDO8dDnqaXR8dQjZ6dcXrKZhD9cS10E4wZgtKCPBR3LMhLXNEMr9l82RLj94w==", + "requires": { + "classnames": "2.x", + "css-animation": "1.x", + "prop-types": "^15.5.6", + "rc-animate": "2.x" + } + }, + "rc-dialog": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/rc-dialog/-/rc-dialog-7.1.7.tgz", + "integrity": "sha512-gyqLRlY6LmM3glE/DWi4HcY47GKJuyq8H6w1tVcqieVWA+fKLlQmlpQI/g17vzFcYbguMlkEqImSxp6oF6qRSw==", + "requires": { + "babel-runtime": "6.x", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + } + }, + "rc-dropdown": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc-dropdown/-/rc-dropdown-2.1.2.tgz", + "integrity": "sha512-vdt2JH6gP16B5UupbWk4WGe4t4okg6tZtCKShTm47yQpgk0jpw67aS8MWUVYxtgZChgYrvF4Q/uAgAx6vdetIg==", + "requires": { + "babel-runtime": "^6.26.0", + "prop-types": "^15.5.8", + "rc-trigger": "^2.2.2", + "react-lifecycles-compat": "^3.0.2" + }, + "dependencies": { + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + } + } + } + }, + "rc-editor-core": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/rc-editor-core/-/rc-editor-core-0.8.6.tgz", + "integrity": "sha512-6M4C0qLTf/UvQA0XNb8BWlb5+tZ5LCZKc9Hs0oH6Fn+18XMRILYiUKBCdLObaj0LVeq5vhq+zra9sjfqBEguHQ==", + "requires": { + "babel-runtime": "^6.26.0", + "classnames": "^2.2.5", + "draft-js": "^0.10.0", + "immutable": "^3.7.4", + "lodash": "^4.16.5", + "prop-types": "^15.5.8", + "setimmediate": "^1.0.5" + } + }, + "rc-editor-mention": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/rc-editor-mention/-/rc-editor-mention-1.1.7.tgz", + "integrity": "sha512-5z9OX8gxh76oD8kx0Hi2fTZEyrmrfDo35ouFgpFrhB3H1L+WY4yvi1yUUZJG1uAxq/3Hlhnet4AFy1SnepinyQ==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "^2.2.5", + "dom-scroll-into-view": "^1.2.0", + "draft-js": "~0.10.0", + "prop-types": "^15.5.8", + "rc-animate": "^2.3.0", + "rc-editor-core": "~0.8.3" + }, + "dependencies": { + "dom-scroll-into-view": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/dom-scroll-into-view/-/dom-scroll-into-view-1.2.1.tgz", + "integrity": "sha1-6PNnMt0ImwIBqI14Fdw/iObWbH4=" + } + } + }, + "rc-form": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/rc-form/-/rc-form-2.2.0.tgz", + "integrity": "sha512-W3fct0JFyLHBOiWfLByJKLoB82tuPGvSsJ5V4pm6RRJ+ehofpvOIA5nmgKpPyosg3EfC9rx32rJrEK0fidnaRw==", + "requires": { + "async-validator": "1.x", + "babel-runtime": "6.x", + "create-react-class": "^15.5.3", + "dom-scroll-into-view": "1.x", + "hoist-non-react-statics": "^2.3.1", + "lodash": "^4.17.4", + "warning": "^3.0.0" + } + }, + "rc-hammerjs": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/rc-hammerjs/-/rc-hammerjs-0.6.9.tgz", + "integrity": "sha512-4llgWO3RgLyVbEqUdGsDfzUDqklRlQW5VEhE3x35IvhV+w//VPRG34SBavK3D2mD/UaLKaohgU41V4agiftC8g==", + "requires": { + "babel-runtime": "6.x", + "hammerjs": "^2.0.8", + "prop-types": "^15.5.9" + } + }, + "rc-input-number": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/rc-input-number/-/rc-input-number-4.0.7.tgz", + "integrity": "sha512-iij0JPOZMHGJMq9nwpVk8/rgTcbMy++9ePChZF6vYH7JO5rHtLohHy5GGWY2HjhNai+EB8/46USFhKKCq0TzPQ==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.0", + "is-negative-zero": "^2.0.0", + "prop-types": "^15.5.7", + "rmc-feedback": "^2.0.0" + } + }, + "rc-menu": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/rc-menu/-/rc-menu-7.0.5.tgz", + "integrity": "sha512-VG8Ncjb4UuklxZvk/u3gN4vU8xuJF5WJfdLQIVWB3fu01lnMZF8adN1YWWvpftM0t9zGEppDkNGumZFKmx0WGA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "2.x", + "dom-scroll-into-view": "1.x", + "mini-store": "^1.1.0", + "prop-types": "^15.5.6", + "rc-animate": "2.x", + "rc-trigger": "^2.3.0", + "rc-util": "^4.1.0" + }, + "dependencies": { + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + }, + "dependencies": { + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + } + } + } + } + }, + "rc-notification": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/rc-notification/-/rc-notification-3.1.1.tgz", + "integrity": "sha512-70a/qR3SRnYr728H0viEyv8QtLjWzUb3kTZV96yqU/Ro5jWSF/Q3qK7dRGEuyfqjWyGVEuTCyiKNu/qAp26m9g==", + "requires": { + "babel-runtime": "6.x", + "classnames": "2.x", + "prop-types": "^15.5.8", + "rc-animate": "2.x", + "rc-util": "^4.0.4" + } + }, + "rc-pagination": { + "version": "1.16.4", + "resolved": "https://registry.npmjs.org/rc-pagination/-/rc-pagination-1.16.4.tgz", + "integrity": "sha512-ZxwO3g/Wk49aaXW/pqWx9Nxw0SxQHRYeV0TAfbIVugTkd/0ZMj+GNTvWGmDMmLvA5AD0M3z9sIRtfyiGXEPWxg==", + "requires": { + "babel-runtime": "6.x", + "prop-types": "^15.5.7" + } + }, + "rc-progress": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/rc-progress/-/rc-progress-2.2.5.tgz", + "integrity": "sha1-5h0FRL+dQgjlujL8UJYhWef5UqM=", + "requires": { + "babel-runtime": "6.x", + "prop-types": "^15.5.8" + } + }, + "rc-rate": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/rc-rate/-/rc-rate-2.4.0.tgz", + "integrity": "sha512-gYHxaXqObiIw1ekRS8tq2YUKpTGL/Q9LxMdSCXZS++d5bVsmmTCZUvJFKEt0IfLb19sZtxCaQvwanzNpqaxY7Q==", + "requires": { + "babel-runtime": "^6.26.0", + "classnames": "^2.2.5", + "prop-types": "^15.5.8", + "rc-util": "^4.3.0" + } + }, + "rc-select": { + "version": "8.0.12", + "resolved": "https://registry.npmjs.org/rc-select/-/rc-select-8.0.12.tgz", + "integrity": "sha512-1zygrSeAWqg0s6VHYmXgDFkOMVLxm4Ab5plqBHbB2VGROAFHnyiGHr+NMQKJLQ9M9rcEpyPe9gR7itPIVTlVCw==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "2.x", + "component-classes": "1.x", + "dom-scroll-into-view": "1.x", + "prop-types": "^15.5.8", + "rc-animate": "2.x", + "rc-menu": "^7.0.2", + "rc-trigger": "^2.2.0", + "rc-util": "^4.0.4", + "react-lifecycles-compat": "^3.0.2", + "warning": "^3.0.0" + }, + "dependencies": { + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + }, + "dependencies": { + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + } + } + } + } + }, + "rc-slider": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-8.6.1.tgz", + "integrity": "sha512-6DoLW5pWR8K/7Z55E5wKZGGa22HFY6LB4Z0PegzSXrQ/RqUHm9hFHRA3FYCuPOsg/Zsi+SgGPvzC2P/I/YZ6Lg==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.5", + "prop-types": "^15.5.4", + "rc-tooltip": "^3.7.0", + "rc-util": "^4.0.4", + "shallowequal": "^1.0.1", + "warning": "^3.0.0" + } + }, + "rc-steps": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/rc-steps/-/rc-steps-3.1.1.tgz", + "integrity": "sha512-oon2VdAHWrZmkB07MUMhq7k2IazFmtOi+6CCPn1ao3ZJ/89/aArP9/3pDQBm88FBQBcDh1E04kSHufbdY1kxfw==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "^2.2.3", + "lodash": "^4.17.5", + "prop-types": "^15.5.7" + } + }, + "rc-switch": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/rc-switch/-/rc-switch-1.6.0.tgz", + "integrity": "sha512-tlnYj92N/PxFLWJObATgSPYWESCFTUtdFjDRbCJFvSd4j2a8IFLz20X/5d3OTnFtf7DcxLTa/aGIPmsI3mFn3g==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "^2.2.1", + "prop-types": "^15.5.6" + } + }, + "rc-table": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-6.1.13.tgz", + "integrity": "sha512-kEQhJsyutMbe0F0GHNkZsLSJYBhZbj+4kEEWFTzC7NwVwLTTyLJd7F/aTB6ojoooPnTg/AaVMoqxQw6ihM/yyA==", + "requires": { + "babel-runtime": "6.x", + "component-classes": "^1.2.6", + "lodash": "^4.17.5", + "mini-store": "^1.0.2", + "prop-types": "^15.5.8", + "rc-util": "^4.0.4", + "react-lifecycles-compat": "^3.0.2", + "shallowequal": "^1.0.2", + "warning": "^3.0.0" + } + }, + "rc-tabs": { + "version": "9.2.5", + "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-9.2.5.tgz", + "integrity": "sha512-pUFHtpmoQjBRN7JWYlYWS+d2cwIlo+dgMD5J7+czyVThYhhbmdi/3ZbaRU6txuQfK3to4S6e31hJSD+wXcQU4w==", + "requires": { + "babel-runtime": "6.x", + "classnames": "2.x", + "create-react-class": "15.x", + "lodash": "^4.17.5", + "prop-types": "15.x", + "rc-hammerjs": "~0.6.0", + "rc-util": "^4.0.4", + "warning": "^3.0.0" + } + }, + "rc-time-picker": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/rc-time-picker/-/rc-time-picker-3.3.1.tgz", + "integrity": "sha512-iCo6Fs6Bp/HjjSvdA+nv/yJEWSe+vDyunV57uVzZkW+4QDQ+BOvZGGwJcfL407u/eP1QKmeljZN8Iu3KjdKIGg==", + "requires": { + "babel-runtime": "6.x", + "classnames": "2.x", + "moment": "2.x", + "prop-types": "^15.5.8", + "rc-trigger": "^2.2.0" + }, + "dependencies": { + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + }, + "dependencies": { + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + } + } + } + } + }, + "rc-tooltip": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-3.7.2.tgz", + "integrity": "sha512-vsF29ohlfgr7lEP12aJ5j4U/4hzqSBYjWQo8I09re+q95v1o4nDjH1q/B3qFkf9aml2FbgdkJw9KYz/zXUgApA==", + "requires": { + "babel-runtime": "6.x", + "prop-types": "^15.5.8", + "rc-trigger": "^2.2.2" + }, + "dependencies": { + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + }, + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + } + } + } + }, + "rc-tree": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-1.8.3.tgz", + "integrity": "sha512-rtQPaHzaVu2u+CYOuxi0vyk+307DNDgYzEJPBDFcqXevVXe52PovCdY+zSoyG4g9lqgEhS/izyM5fmvQRMYMkw==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "2.x", + "prop-types": "^15.5.8", + "rc-animate": "2.x", + "rc-util": "^4.0.4", + "warning": "^3.0.0" + } + }, + "rc-tree-select": { + "version": "1.12.13", + "resolved": "https://registry.npmjs.org/rc-tree-select/-/rc-tree-select-1.12.13.tgz", + "integrity": "sha512-6OdmAbAj6IGb4F+klX6EZAUOFu0a7irSFPYolVMPQtWNWYcAQZNqkeiadqb/FWOBcbofZHDPDC4GGqiREo9ZOw==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "^2.2.1", + "prop-types": "^15.5.8", + "rc-animate": "^2.0.2", + "rc-tree": "~1.7.1", + "rc-trigger": "^2.2.2", + "rc-util": "^4.5.0" + }, + "dependencies": { + "rc-tree": { + "version": "1.7.11", + "resolved": "https://registry.npmjs.org/rc-tree/-/rc-tree-1.7.11.tgz", + "integrity": "sha512-Vof0KscpGA6XmWZ78rN9ul0ZzGIhjR/FrUaDgGGNgIiobxpSH3gg08C3Ae739NZ9c9a5ZuHYf/czLYfh+z5Xpg==", + "requires": { + "babel-runtime": "^6.23.0", + "classnames": "2.x", + "prop-types": "^15.5.8", + "rc-animate": "2.x", + "rc-util": "^4.0.4", + "warning": "^3.0.0" + } + }, + "rc-trigger": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.5.3.tgz", + "integrity": "sha512-geHPrEm7asNVhdDwfEv0rJIYN3rZ95M3myVk1MPdNv+qRk+9REaNT5Aez01Ia3SA35+RkR1KGF2GMp4XMyKZgA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.6", + "prop-types": "15.x", + "rc-align": "^2.4.0", + "rc-animate": "2.x", + "rc-util": "^4.4.0" + }, + "dependencies": { + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==" + } + } + } + } + }, "rc-trigger": { "version": "1.11.5", "resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-1.11.5.tgz", @@ -15405,10 +16190,31 @@ "rc-util": "4.x" } }, + "rc-upload": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/rc-upload/-/rc-upload-2.4.4.tgz", + "integrity": "sha512-EQgGSFiqZWkQ93kC997c1Uan9VgMzJvlaUQt16PrHvmHw/boUs3M/lf0GhYlmpe7YSnN0jGpMNUcENUFwDVAHA==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.5", + "prop-types": "^15.5.7", + "warning": "2.x" + }, + "dependencies": { + "warning": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/warning/-/warning-2.1.0.tgz", + "integrity": "sha1-ISINnGOvx3qMkhEeARr3Bc4MaQE=", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, "rc-util": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.5.0.tgz", - "integrity": "sha512-KYuFBBqxCFI8fb4Wva+X3fmAZpGPo4i9gTNdsVKldHVi3hrnv3VawF89CPndxfsV5QT3J+ic76X5c4erQETi1w==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.5.1.tgz", + "integrity": "sha512-PdCmHyBBodZdw6Oaikt0l+/R79IcRXpYkTrqD/Rbl4ZdoOi61t5TtEe40Q+A7rkWG5U1xjcN+h8j9H6GdtnICw==", "requires": { "add-dom-event-listener": "1.x", "babel-runtime": "6.x", @@ -15471,16 +16277,41 @@ "prop-types": "^15.5.0" } }, + "react-datepicker": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-1.5.0.tgz", + "integrity": "sha512-Neh1rz0d1QeR7KuoTiYeR6oj73DJkqt0vuNSgfMuxXEwGmz/4sPynouYGo6gdKiQbxIXBJJ/FLDLHJEr5XNThw==", + "requires": { + "classnames": "^2.2.5", + "prop-types": "^15.6.0", + "react-onclickoutside": "^6.7.1", + "react-popper": "^0.9.1" + }, + "dependencies": { + "react-onclickoutside": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.7.1.tgz", + "integrity": "sha512-p84kBqGaMoa7VYT0vZ/aOYRfJB+gw34yjpda1Z5KeLflg70HipZOT+MXQenEhdkPAABuE2Astq4zEPdMqUQxcg==" + } + } + }, "react-datepicker2": { - "version": "git+https://github.com/bitshares/react-datepicker2.git#90ddf3b1a5138b229452fe4ffe3349dbb9978b99", - "from": "git+https://github.com/bitshares/react-datepicker2.git", + "version": "git+https://github.com/bitshares/react-datepicker2.git#9d4c2c28a23c970badcf765c35c5493d5a49afde", + "from": "git+https://github.com/bitshares/react-datepicker2.git#9d4c2c28a23c970badcf765c35c5493d5a49afde", "requires": { "classnames": "^2.2.5", - "moment-jalaali": "^0.6.1", + "moment": "^2.22.2", "prop-types": "^15.6.1", "rc-trigger": "^1.9.1", "react-onclickoutside": "^5.9.0", - "react-tether": "^0.5.6" + "react-tether": "^0.6.1" + }, + "dependencies": { + "moment": { + "version": "2.22.2", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + } } }, "react-dom": { @@ -15510,11 +16341,6 @@ } } }, - "react-dom-factories": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/react-dom-factories/-/react-dom-factories-1.0.2.tgz", - "integrity": "sha1-63cFxNs2+1AbOqOP91lhaqD/luA=" - }, "react-foundation-apps": { "version": "git+https://github.com/bitshares/react-foundation-apps.git#a5f39177d4d45421c38ebad8ce4bfb44cee624ad", "from": "git+https://github.com/bitshares/react-foundation-apps.git", @@ -15602,11 +16428,29 @@ } } }, + "react-lazy-load": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/react-lazy-load/-/react-lazy-load-3.0.13.tgz", + "integrity": "sha1-OwqS0zbUPT8Nc8vm81sXBQsIuCQ=", + "requires": { + "eventlistener": "0.0.1", + "lodash.debounce": "^4.0.0", + "lodash.throttle": "^4.0.0", + "prop-types": "^15.5.8" + } + }, "react-lifecycles-compat": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", - "dev": true + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, + "react-loadable": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/react-loadable/-/react-loadable-5.4.0.tgz", + "integrity": "sha512-HAFWL3aLB9dQA6OfGr7ACDNn/mv8jPUmBvXqrhJZfZgRhZysyNW8RupvGUbeGkTO+9frH1LTdJmKWphZENhlJg==", + "requires": { + "prop-types": "^15.5.0" + } }, "react-notification-system": { "version": "0.2.17", @@ -15627,16 +16471,41 @@ } }, "react-popover": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/react-popover/-/react-popover-0.4.18.tgz", - "integrity": "sha512-zT52g7vcjcEoq8kzDF9GWFC4P2ORM6NKkqR5T6FHwNsbnyiWz9AIUFxF2eRkYiUDhJXr35DFMWywpFo+ALJluw==", + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/react-popover/-/react-popover-0.5.7.tgz", + "integrity": "sha512-3eOHnTe8c7UOonSCMWa32nZefn/cn+iLkxNeHQXhxjpX+aPqkKrWssAmAemyVxKZuUkXb5CvHvj99TfLvcq9Zw==", "requires": { - "create-react-class": "^15.5.3", "css-vendor": "^0.3.1", "debug": "^2.6.8", "lodash.throttle": "^3.0.3", - "prop-types": "^15.5.10", - "react-dom-factories": "^1.0.0" + "prop-types": "^15.5.10" + }, + "dependencies": { + "lodash.debounce": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-3.1.1.tgz", + "integrity": "sha1-gSIRw3ipTMKdWqTjNGzwv846ffU=", + "requires": { + "lodash._getnative": "^3.0.0" + } + }, + "lodash.throttle": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-3.0.4.tgz", + "integrity": "sha1-vE9HH7Mo5Nb9xt8rPTyvET8Pick=", + "requires": { + "lodash.debounce": "^3.0.0" + } + } + } + }, + "react-popper": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-0.9.5.tgz", + "integrity": "sha1-AqJO8+7DOvnlToNYq3DrDjMe3QU=", + "requires": { + "popper.js": "^1.14.1", + "prop-types": "^15.6.1" } }, "react-qr-reader": { @@ -15659,18 +16528,104 @@ "json2mq": "^0.2.0" } }, - "react-router": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-3.2.1.tgz", - "integrity": "sha512-SXkhC0nr3G0ltzVU07IN8jYl0bB6FsrDIqlLC9dK3SITXqyTJyM7yhXlUqs89w3Nqi5OkXsfRUeHX+P874HQrg==", + "react-router-dom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.3.1.tgz", + "integrity": "sha512-c/MlywfxDdCp7EnB7YfPMOfMD3tOtIjrQlj/CKfNMBxdmpJP8xcz5P/UAFn3JbnQCNUxsHyVVqllF9LhgVyFCA==", "requires": { - "create-react-class": "^15.5.1", - "history": "^3.0.0", - "hoist-non-react-statics": "^2.3.1", - "invariant": "^2.2.1", - "loose-envify": "^1.2.0", - "prop-types": "^15.5.6", - "warning": "^3.0.0" + "history": "^4.7.2", + "invariant": "^2.2.4", + "loose-envify": "^1.3.1", + "prop-types": "^15.6.1", + "react-router": "^4.3.1", + "warning": "^4.0.1" + }, + "dependencies": { + "history": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/history/-/history-4.7.2.tgz", + "integrity": "sha512-1zkBRWW6XweO0NBcjiphtVJVsIQ+SXF29z9DVkceeaSLVMFXHool+fdCZD4spDCfZJCILPILc3bm7Bc+HRi0nA==", + "requires": { + "invariant": "^2.2.1", + "loose-envify": "^1.2.0", + "resolve-pathname": "^2.2.0", + "value-equal": "^0.4.0", + "warning": "^3.0.0" + }, + "dependencies": { + "warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", + "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "requires": { + "isarray": "0.0.1" + } + }, + "react-router": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz", + "integrity": "sha512-yrvL8AogDh2X42Dt9iknk4wF4V8bWREPirFfS9gLU1huk6qK41sg7Z/1S81jjTrGHxa3B8R3J6xIkDAA6CVarg==", + "requires": { + "history": "^4.7.2", + "hoist-non-react-statics": "^2.5.0", + "invariant": "^2.2.4", + "loose-envify": "^1.3.1", + "path-to-regexp": "^1.7.0", + "prop-types": "^15.6.1", + "warning": "^4.0.1" + } + }, + "warning": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.1.tgz", + "integrity": "sha512-rAVtTNZw+cQPjvGp1ox0XC5Q2IBFyqoqh+QII4J/oguyu83Bax1apbo2eqB8bHRS+fqYUBagys6lqUoVwKSmXQ==", + "requires": { + "loose-envify": "^1.0.0" + } + } + } + }, + "react-scroll": { + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/react-scroll/-/react-scroll-1.7.9.tgz", + "integrity": "sha512-baTwyz2FxaZWZ/4yEAWQEGE4CMZzGj/AjvLu/x4xmAisFgSAq3D0QED3deI6D4zeJTSEmeuy8Hm01IS+IDbKIg==", + "requires": { + "lodash.throttle": "^4.1.1", + "prop-types": "^15.5.8" + }, + "dependencies": { + "lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" + } + } + }, + "react-slick": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/react-slick/-/react-slick-0.23.1.tgz", + "integrity": "sha512-vn4E+JeTUrjRgXDEV0QEiWo3fNdB6Lg/e8eMYSh3OjuadqYBsgn0OfbqNxVJs7cv1VmSKm14razHEbpRFP/mvw==", + "requires": { + "classnames": "^2.2.5", + "enquire.js": "^2.1.6", + "json2mq": "^0.2.0", + "lodash.debounce": "^4.0.8", + "resize-observer-polyfill": "^1.5.0" } }, "react-sticky-table": { @@ -15682,32 +16637,13 @@ "element-resize-event": "^2.0.9" } }, - "react-stockcharts": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/react-stockcharts/-/react-stockcharts-0.6.1.tgz", - "integrity": "sha1-C96srE54YBN5gg6cWzxtG2g3qRI=", - "requires": { - "d3-array": "^1.0.2", - "d3-collection": "^1.0.2", - "d3-force": "^1.0.4", - "d3-format": "^1.0.2", - "d3-scale": "^1.0.4", - "d3-selection": "^1.0.3", - "d3-shape": "^1.0.4", - "d3-time-format": "^2.0.3", - "d3fc-rebind": "^4.1.1", - "debug": "^2.6.0", - "lodash.flattendeep": "^4.4.0", - "save-svg-as-png": "^1.0.3" - } - }, "react-tether": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/react-tether/-/react-tether-0.5.7.tgz", - "integrity": "sha1-QY6mEEG2W5WCcUeEibcaNXLwFCI=", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/react-tether/-/react-tether-0.6.1.tgz", + "integrity": "sha512-/1o2d77RyL78S1IjS1+yGMTKSldYMBVtu4H20zNIC9eAGsgA/KMxdLRcE3k32wj4TWCsVMPDnxeTokHuVWNLag==", "requires": { "prop-types": "^15.5.8", - "tether": "^1.3.7" + "tether": "^1.4.3" } }, "react-tooltip": { @@ -16102,6 +17038,95 @@ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, + "renderkid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.1.tgz", + "integrity": "sha1-iYyr/Ivt5Le5ETWj/9Mj5YwNsxk=", + "dev": true, + "requires": { + "css-select": "^1.1.0", + "dom-converter": "~0.1", + "htmlparser2": "~3.3.0", + "strip-ansi": "^3.0.0", + "utila": "~0.3" + }, + "dependencies": { + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dev": true, + "requires": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "domhandler": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz", + "integrity": "sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "htmlparser2": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz", + "integrity": "sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.1", + "domutils": "1.1", + "readable-stream": "1.0" + }, + "dependencies": { + "domutils": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz", + "integrity": "sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=", + "dev": true, + "requires": { + "domelementtype": "1" + } + } + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "utila": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.3.3.tgz", + "integrity": "sha1-1+jn1+MJEHCSsF+NloiCTWM6QiY=", + "dev": true + } + } + }, "repeat-element": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", @@ -16211,6 +17236,11 @@ "resolve-from": "^1.0.0" } }, + "resize-observer-polyfill": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.0.tgz", + "integrity": "sha512-M2AelyJDVR/oLnToJLtuDJRBBWUGUvvGigj1411hXhAdyFWqMaqHp7TixW3FpiLuVaikIcR1QL+zqoJoZlOgpg==" + }, "resolve": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", @@ -16253,6 +17283,11 @@ "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", "dev": true }, + "resolve-pathname": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-2.2.0.tgz", + "integrity": "sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg==" + }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -16311,6 +17346,15 @@ "inherits": "^2.0.1" } }, + "rmc-feedback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rmc-feedback/-/rmc-feedback-2.0.0.tgz", + "integrity": "sha512-5PWOGOW7VXks/l3JzlOU9NIxRpuaSS8d9zA3UULUCuTKnpwBHNvv1jSJzxgbbCQeYzROWUpgKI4za3X4C/mKmQ==", + "requires": { + "babel-runtime": "6.x", + "classnames": "^2.2.5" + } + }, "rsvp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", @@ -16798,11 +17842,6 @@ "pify": "^3.0.0" } }, - "save-svg-as-png": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/save-svg-as-png/-/save-svg-as-png-1.4.2.tgz", - "integrity": "sha512-7PyFQ5InTJoU9yeB0EigaOldjx0W+P+Rc6WM/6ExYfB9aPC4fnAeV8ElF5Q0Z7C1Iw2+4CZtPX9a/juYR7vk9Q==" - }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -17025,6 +18064,11 @@ } } }, + "shallow-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.0.0.tgz", + "integrity": "sha1-UI0YOLPeWQq4dXsBGyXkMJAJRfc=" + }, "shallowequal": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.0.2.tgz", @@ -17481,7 +18525,8 @@ "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", - "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true }, "string-convert": { "version": "0.2.1", @@ -18040,6 +19085,12 @@ } } }, + "toposort": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", + "integrity": "sha1-LmhELZ9k7HILjMieZEOsbKqVACk=", + "dev": true + }, "tough-cookie": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", @@ -18592,6 +19643,12 @@ "object.getownpropertydescriptors": "^2.0.3" } }, + "utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=", + "dev": true + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -18629,6 +19686,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "value-equal": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.4.0.tgz", + "integrity": "sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw==" + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/package.json b/package.json index f191fcf9d5..734e61c8ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "BitShares2-light", - "version": "2.0.180526", + "version": "2.0.180629", "description": "Advanced wallet interface for the BitShares financial blockchain.", "homepage": "https://github.com/bitshares/bitshares-ui", "author": "Sigve Kvalsvik ", @@ -132,7 +132,8 @@ "alt-container": "^1.0.0", "alt-react": "git+https://github.com/bitshares/react.git", "bignumber.js": "^4.0.0", - "bitsharesjs": "^1.7.6", + "bitshares-ui-style-guide": "git+https://github.com/bitshares/bitshares-ui-style-guide.git", + "bitsharesjs": "^1.7.10", "browser-locale": "^1.0.3", "classnames": "^2.2.1", "cookies-js": "^1.2.1", @@ -159,22 +160,24 @@ "perfect-scrollbar": "git+https://github.com/bitshares/perfect-scrollbar.git", "prop-types": "^15.6.1", "qrcode.react": "^0.7.1", + "query-string": "^6.1.0", "react": "^16.3.2", "react-autocomplete": "^1.7.2", "react-clipboard.js": "^1.0.1", - "react-datepicker2": "git+https://github.com/bitshares/react-datepicker2.git", + "react-datepicker2": "git+https://github.com/bitshares/react-datepicker2.git#9d4c2c28a23c970badcf765c35c5493d5a49afde", "react-dom": "^16.3.2", "react-foundation-apps": "git+https://github.com/bitshares/react-foundation-apps.git", "react-highcharts": "^16.0", "react-interpolate-component": "^0.12.0", "react-intl": "^2.4.0", "react-json-inspector": "^7.1.1", + "react-loadable": "^5.4.0", "react-notification-system": "^0.2.16", - "react-popover": "^0.4.6", + "react-popover": "^0.5.7", "react-qr-reader": "^2.1.0", "react-responsive-mixin": "^0.4.0", - "react-router": "^3.0.2", - "react-stockcharts": "^0.6.1", + "react-router-dom": "^4.3.1", + "react-scroll": "^1.7.9", "react-tooltip": "^3.2.2", "react-transition-group": "^1.2.0", "react-translate-component": "^0.15.1", @@ -211,14 +214,16 @@ "eslint-plugin-react": "^5.2.2", "express": "^4.14.0", "express-history-api-fallback": "^2.1.0", - "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "^1.1.11", "fs-jetpack": "^1.3.0", "git-rev-sync": "^1.12.0", + "handlebars-loader": "^1.7.0", "html-loader": "^0.5.5", + "html-webpack-plugin": "^3.2.0", "husky": "^0.14.3", "jest-cli": "^22.4.4", "markdown-loader": "^2.0.2", + "mini-css-extract-plugin": "^0.4.0", "mocha": "^5.1.1", "node-libs-browser": "^1.0.0", "node-sass": "^4.9.0", diff --git a/server.js b/server.js index 8af1426d1b..1914900167 100644 --- a/server.js +++ b/server.js @@ -34,8 +34,20 @@ app.use( app.use(hotMiddleware(compiler)); -app.get("*", function(req, res) { - res.sendFile(path.join(__dirname, "app/assets/index-dev.html")); +// app.get("*", function(req, res) { +// res.sendFile(path.join(__dirname, "app/assets/index.html")); +// }); + +app.use("*", function(req, res, next) { + var filename = path.join(compiler.outputPath, "index.html"); + compiler.outputFileSystem.readFile(filename, function(err, result) { + if (err) { + return next(err); + } + res.set("content-type", "text/html"); + res.send(result); + res.end(); + }); }); var options = { diff --git a/webpack.config.js b/webpack.config.js index e288b92d33..81b8d8a10d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,20 +1,20 @@ var path = require("path"); var webpack = require("webpack"); -var ExtractTextPlugin = require("extract-text-webpack-plugin"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); var Clean = require("clean-webpack-plugin"); var git = require("git-rev-sync"); require("es6-promise").polyfill(); const CopyWebpackPlugin = require("copy-webpack-plugin"); var locales = require("./app/assets/locales"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); /* * For staging builds, set the version to the latest commit hash, for * production set it to the package version */ +let branch = !!process.env.BRANCH ? process.env.BRANCH : git.branch(); var __VERSION__ = - git.branch() === "staging" - ? git.short() - : require("./package.json").version; + branch === "develop" ? git.short() : require("./package.json").version; // BASE APP DIR var root_dir = path.resolve(__dirname); @@ -68,7 +68,15 @@ module.exports = function(env) { const localeRegex = new RegExp(regexString); var plugins = [ - new webpack.optimize.OccurrenceOrderPlugin(), + new HtmlWebpackPlugin({ + template: "!!handlebars-loader!app/assets/index.hbs", + templateParameters: { + title: "BitShares " + __VERSION__, + INCLUDE_BASE: !!env.prod && !env.hash, + PRODUCTION: !!env.prod, + ELECTRON: !!env.electron + } + }), new webpack.DefinePlugin({ APP_VERSION: JSON.stringify(__VERSION__), __ELECTRON__: !!env.electron, @@ -112,26 +120,29 @@ module.exports = function(env) { var cleanDirectories = [outputPath]; // WRAP INTO CSS FILE - const extractCSS = new ExtractTextPlugin("app.css"); - cssLoaders = ExtractTextPlugin.extract({ - fallback: "style-loader", - use: [ - {loader: "css-loader"}, - { - loader: "postcss-loader" + cssLoaders = [ + {loader: MiniCssExtractPlugin.loader}, + {loader: "css-loader"}, + { + loader: "postcss-loader", + options: { + minimize: true, + debug: false } - ] - }); - scssLoaders = ExtractTextPlugin.extract({ - fallback: "style-loader", - use: [ - {loader: "css-loader"}, - { - loader: "postcss-loader" - }, - {loader: "sass-loader", options: {outputStyle: "expanded"}} - ] - }); + } + ]; + scssLoaders = [ + {loader: MiniCssExtractPlugin.loader}, + {loader: "css-loader"}, + { + loader: "postcss-loader", + options: { + minimize: true, + debug: false + } + }, + {loader: "sass-loader", options: {outputStyle: "expanded"}} + ]; // PROD PLUGINS plugins.push(new Clean(cleanDirectories, {root: root_dir})); @@ -140,15 +151,12 @@ module.exports = function(env) { __DEV__: false }) ); - plugins.push(extractCSS); plugins.push( - new webpack.LoaderOptionsPlugin({ - minimize: true, - debug: false + new MiniCssExtractPlugin({ + filename: "[name].[contenthash].css" }) ); } else { - // plugins.push(new webpack.optimize.OccurenceOrderPlugin()); plugins.push( new webpack.DefinePlugin({ "process.env": {NODE_ENV: JSON.stringify("development")}, @@ -196,17 +204,36 @@ module.exports = function(env) { : [ "webpack-hot-middleware/client", "react-hot-loader/patch", - path.resolve(root_dir, "app/Main-dev.js") + path.resolve(root_dir, "app/Main.js") ] }, output: { publicPath: env.prod ? "" : "/", path: outputPath, - filename: "[name].js", + filename: env.prod ? "[name].[chunkhash].js" : "[name].js", + chunkFilename: env.prod ? "[name].[chunkhash].js" : "[name].js", pathinfo: !env.prod, sourceMapFilename: "[name].js.map" }, - devtool: env.noUgly || !env.prod ? "eval" : "none", + optimization: { + splitChunks: { + cacheGroups: { + styles: { + name: "styles", + test: /\.css$/, + chunks: "all", + enforce: true + }, + vendor: { + name: "vendor", + test: /node_modules/, + chunks: "initial", + enforce: true + } + } + } + }, + devtool: env.noUgly || !env.prod ? "cheap-module-source-map" : "none", module: { rules: [ { @@ -216,8 +243,7 @@ module.exports = function(env) { path.join( root_dir, "node_modules/react-foundation-apps" - ), - path.join(root_dir, "node_modules/react-stockcharts") + ) ], use: [ {