diff --git a/package.json b/package.json index 29a478a462..f22074079f 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,9 @@ }, "devDependencies": { "@babel/core": "^7.2.2", - "@polkadot/dev-react": "^0.23.3", - "@polkadot/ts": "^0.1.44", - "autoprefixer": "^9.4.3", + "@polkadot/dev-react": "^0.23.7", + "@polkadot/ts": "^0.1.47", + "autoprefixer": "^9.4.4", "empty": "^0.10.1", "gh-pages": "^2.0.1", "postcss": "^7.0.7", diff --git a/packages/app-accounts/src/Backup.tsx b/packages/app-accounts/src/Backup.tsx index 15a5553a8f..ed8e150acc 100644 --- a/packages/app-accounts/src/Backup.tsx +++ b/packages/app-accounts/src/Backup.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-accounts/src/ChangePass.tsx b/packages/app-accounts/src/ChangePass.tsx index 8adedddac3..a867e086b8 100644 --- a/packages/app-accounts/src/ChangePass.tsx +++ b/packages/app-accounts/src/ChangePass.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-accounts/src/Creator.tsx b/packages/app-accounts/src/Creator.tsx index 6cf726acec..f639714c8b 100644 --- a/packages/app-accounts/src/Creator.tsx +++ b/packages/app-accounts/src/Creator.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-accounts/src/Editor.tsx b/packages/app-accounts/src/Editor.tsx index ed9bdc01a4..baec38d6a9 100644 --- a/packages/app-accounts/src/Editor.tsx +++ b/packages/app-accounts/src/Editor.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-accounts/src/Forgetting.tsx b/packages/app-accounts/src/Forgetting.tsx index 7519cbe95d..4efb3d7d63 100644 --- a/packages/app-accounts/src/Forgetting.tsx +++ b/packages/app-accounts/src/Forgetting.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-accounts/src/Restore.tsx b/packages/app-accounts/src/Restore.tsx index cefcb5e45f..086a2d375e 100644 --- a/packages/app-accounts/src/Restore.tsx +++ b/packages/app-accounts/src/Restore.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-accounts/src/bipWorker.ts b/packages/app-accounts/src/bipWorker.ts index 4aaaa98b33..fce40620cd 100644 --- a/packages/app-accounts/src/bipWorker.ts +++ b/packages/app-accounts/src/bipWorker.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-accounts/src/index.css b/packages/app-accounts/src/index.css index fb89fa0d18..c3c3677012 100644 --- a/packages/app-accounts/src/index.css +++ b/packages/app-accounts/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-accounts authors & contributors +/* Copyright 2017-2019 @polkadot/app-accounts authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-accounts/src/index.tsx b/packages/app-accounts/src/index.tsx index 6f3d30a0cf..fc019d93f1 100644 --- a/packages/app-accounts/src/index.tsx +++ b/packages/app-accounts/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -12,7 +12,7 @@ import './index.css'; import React from 'react'; import accountObservable from '@polkadot/ui-keyring/observable/accounts'; import { Tabs } from '@polkadot/ui-app/index'; -import { withMulti, withObservableBase } from '@polkadot/ui-react-rx/with/index'; +import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; import Creator from './Creator'; import Editor from './Editor'; @@ -131,5 +131,5 @@ class AccountsApp extends React.PureComponent { export default withMulti( AccountsApp, translate, - withObservableBase(accountObservable.subject, { propName: 'allAccounts' }) + withObservable(accountObservable.subject, { propName: 'allAccounts' }) ); diff --git a/packages/app-accounts/src/translate.ts b/packages/app-accounts/src/translate.ts index bedf459ed3..d18e80fb82 100644 --- a/packages/app-accounts/src/translate.ts +++ b/packages/app-accounts/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-addresses/src/Creator.tsx b/packages/app-addresses/src/Creator.tsx index 55955c3785..669c02a6f9 100644 --- a/packages/app-addresses/src/Creator.tsx +++ b/packages/app-addresses/src/Creator.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-addresses authors & contributors +// Copyright 2017-2019 @polkadot/app-addresses authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-addresses/src/Editor.tsx b/packages/app-addresses/src/Editor.tsx index 1333498cbf..583f832679 100644 --- a/packages/app-addresses/src/Editor.tsx +++ b/packages/app-addresses/src/Editor.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-addresses authors & contributors +// Copyright 2017-2019 @polkadot/app-addresses authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-addresses/src/Forgetting.tsx b/packages/app-addresses/src/Forgetting.tsx index 4e82c55231..45f638fdce 100644 --- a/packages/app-addresses/src/Forgetting.tsx +++ b/packages/app-addresses/src/Forgetting.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// Copyright 2017-2019 @polkadot/app-accounts authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-addresses/src/index.css b/packages/app-addresses/src/index.css index d262c23656..82f5d9672c 100644 --- a/packages/app-addresses/src/index.css +++ b/packages/app-addresses/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-addresses authors & contributors +/* Copyright 2017-2019 @polkadot/app-addresses authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-addresses/src/index.tsx b/packages/app-addresses/src/index.tsx index c721221fb4..4968ff24d6 100644 --- a/packages/app-addresses/src/index.tsx +++ b/packages/app-addresses/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-addresses authors & contributors +// Copyright 2017-2019 @polkadot/app-addresses authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -12,7 +12,7 @@ import React from 'react'; import addressObservable from '@polkadot/ui-keyring/observable/addresses'; import Tabs, { TabItem } from '@polkadot/ui-app/Tabs'; -import { withMulti, withObservableBase } from '@polkadot/ui-react-rx/with/index'; +import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; import Creator from './Creator'; import Editor from './Editor'; @@ -128,5 +128,5 @@ class AddressesApp extends React.PureComponent { export default withMulti( AddressesApp, translate, - withObservableBase(addressObservable.subject, { propName: 'allAddresses' }) + withObservable(addressObservable.subject, { propName: 'allAddresses' }) ); diff --git a/packages/app-addresses/src/translate.ts b/packages/app-addresses/src/translate.ts index 3f1f311455..6c14e89952 100644 --- a/packages/app-addresses/src/translate.ts +++ b/packages/app-addresses/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-addresses authors & contributors +// Copyright 2017-2019 @polkadot/app-addresses authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-democracy/package.json b/packages/app-democracy/package.json index 98ed73c7f2..5e2d73b620 100644 --- a/packages/app-democracy/package.json +++ b/packages/app-democracy/package.json @@ -11,8 +11,8 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/keyring": "^0.33.27", - "@polkadot/storage": "^0.35.19", + "@polkadot/keyring": "^0.33.30", + "@polkadot/storage": "^0.37.6", "@polkadot/ui-react-rx": "^0.21.17" } } diff --git a/packages/app-democracy/src/Item.tsx b/packages/app-democracy/src/Item.tsx index 82ad770cc8..0fa94e7841 100644 --- a/packages/app-democracy/src/Item.tsx +++ b/packages/app-democracy/src/Item.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-democracy/src/Proposal.tsx b/packages/app-democracy/src/Proposal.tsx index 392899c04d..0b6a0e22f3 100644 --- a/packages/app-democracy/src/Proposal.tsx +++ b/packages/app-democracy/src/Proposal.tsx @@ -1,46 +1,48 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; -import { RxProposal, RxProposalDeposits } from '@polkadot/api-observable/classes'; import BN from 'bn.js'; import React from 'react'; +import { AccountId, Balance, Proposal } from '@polkadot/types'; +import { Tuple, Vector } from '@polkadot/types/codec'; import { AddressMini, Labelled, Static } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import { balanceFormat } from '@polkadot/ui-react-rx/util/index'; import Item from './Item'; import translate from './translate'; type Props = I18nProps & { - proposalDeposits?: RxProposalDeposits, + query_democracy_depositOf?: Tuple, idNumber: BN, - value: RxProposal + value: Tuple }; -class Proposal extends React.PureComponent { +class ProposalDisplay extends React.PureComponent { render () { const { idNumber, value } = this.props; return ( ); } private renderExtra () { - const { proposalDeposits, t } = this.props; + const { query_democracy_depositOf, t } = this.props; - if (!proposalDeposits) { + if (!query_democracy_depositOf) { return null; } - const { balance, addresses } = proposalDeposits; + const balance = query_democracy_depositOf[0] as Balance; + const addresses = query_democracy_depositOf[1] as Vector; return (
@@ -72,7 +74,7 @@ class Proposal extends React.PureComponent { } export default withMulti( - Proposal, + ProposalDisplay, translate, - withObservable('proposalDeposits', { paramProp: 'idNumber' }) + withCall('query.democracy.depositOf', { paramProp: 'idNumber' }) ); diff --git a/packages/app-democracy/src/Proposals.tsx b/packages/app-democracy/src/Proposals.tsx index 44f9ff766a..3c35ced582 100644 --- a/packages/app-democracy/src/Proposals.tsx +++ b/packages/app-democracy/src/Proposals.tsx @@ -1,18 +1,18 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; -import { RxProposal } from '@polkadot/api-observable/classes'; import React from 'react'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { Tuple } from '@polkadot/types/codec'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import Proposal from './Proposal'; import translate from './translate'; type Props = I18nProps & { - publicProposals?: Array + query_democracy_publicProps?: Array }; class Proposals extends React.PureComponent { @@ -30,9 +30,9 @@ class Proposals extends React.PureComponent { } private renderProposals () { - const { publicProposals, t } = this.props; + const { query_democracy_publicProps, t } = this.props; - if (!publicProposals || !publicProposals.length) { + if (!query_democracy_publicProps || !query_democracy_publicProps.length) { return (
{t('proposals.none', { @@ -42,10 +42,10 @@ class Proposals extends React.PureComponent { ); } - return publicProposals.map((proposal) => ( + return query_democracy_publicProps.map((proposal) => ( )); @@ -55,5 +55,5 @@ class Proposals extends React.PureComponent { export default withMulti( Proposals, translate, - withObservable('publicProposals') + withCall('query.democracy.publicProps') ); diff --git a/packages/app-democracy/src/Referendum.tsx b/packages/app-democracy/src/Referendum.tsx index a2c0b98037..e2c2e0829e 100644 --- a/packages/app-democracy/src/Referendum.tsx +++ b/packages/app-democracy/src/Referendum.tsx @@ -1,17 +1,17 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; import { RawParam } from '@polkadot/ui-app/Params/types'; -import { RxReferendumVote } from '@polkadot/api-observable/types'; +import { DerivedReferendumVote } from '@polkadot/ui-react-rx/derive/types'; import BN from 'bn.js'; import React from 'react'; import { ReferendumInfo } from '@polkadot/types'; import { Chart, Static } from '@polkadot/ui-app/index'; import VoteThreshold from '@polkadot/ui-app/Params/Param/VoteThreshold'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import { balanceFormat, numberFormat } from '@polkadot/ui-react-rx/util/index'; import settings from '@polkadot/ui-settings'; @@ -27,8 +27,8 @@ const COLORS_NAY = settings.uiTheme === 'substrate' : ['#d75ea1', '#e189ba']; type Props = I18nProps & { - bestNumber?: BN, - democracyReferendumVoters?: Array, + derive_chain_bestNumber?: BN, + derive_democracy_referendumVotesFor?: Array, idNumber: BN, value: ReferendumInfo }; @@ -58,13 +58,13 @@ class Referendum extends React.PureComponent { }; } - static getDerivedStateFromProps ({ democracyReferendumVoters }: Props, prevState: State): State | null { - if (!democracyReferendumVoters) { + static getDerivedStateFromProps ({ derive_democracy_referendumVotesFor }: Props, prevState: State): State | null { + if (!derive_democracy_referendumVotesFor) { return null; } - const newState: State = democracyReferendumVoters.reduce((state, { balance, vote }) => { - if (vote.valueOf() === true) { + const newState: State = derive_democracy_referendumVotesFor.reduce((state, { balance, vote }) => { + if (vote.ltn(0)) { state.voteCountYay++; state.votedYay = state.votedYay.add(balance); } else { @@ -93,9 +93,9 @@ class Referendum extends React.PureComponent { } render () { - const { bestNumber, idNumber, value } = this.props; + const { derive_chain_bestNumber, idNumber, value } = this.props; - if (!bestNumber || value.end.sub(bestNumber).lten(0)) { + if (!derive_chain_bestNumber || value.end.sub(derive_chain_bestNumber).lten(0)) { return null; } @@ -112,9 +112,9 @@ class Referendum extends React.PureComponent { } private renderExtra () { - const { bestNumber, t, value: { end, threshold } } = this.props; + const { derive_chain_bestNumber, t, value: { end, threshold } } = this.props; - if (!bestNumber) { + if (!derive_chain_bestNumber) { return null; } @@ -129,7 +129,7 @@ class Referendum extends React.PureComponent { defaultValue: '{{remaining}} blocks remaining, ending at block #{{blockNumber}}', replace: { blockNumber: numberFormat(end), - remaining: numberFormat(end.sub(bestNumber).subn(1)) + remaining: numberFormat(end.sub(derive_chain_bestNumber).subn(1)) } })} @@ -177,6 +177,6 @@ class Referendum extends React.PureComponent { export default withMulti( Referendum, translate, - withObservable('bestNumber'), - withObservable('democracyReferendumVoters', { paramProp: 'idNumber' }) + withCall('derive.chain.bestNumber'), + withCall('derive.democracy.referendumVotesFor', { paramProp: 'idNumber' }) ); diff --git a/packages/app-democracy/src/Referendums.tsx b/packages/app-democracy/src/Referendums.tsx index b0f339f4a2..f9cdddb467 100644 --- a/packages/app-democracy/src/Referendums.tsx +++ b/packages/app-democracy/src/Referendums.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -7,15 +7,15 @@ import { I18nProps } from '@polkadot/ui-app/types'; import BN from 'bn.js'; import React from 'react'; import { ReferendumInfo } from '@polkadot/types'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import Referendum from './Referendum'; import translate from './translate'; type Props = I18nProps & { - democracyNextTally?: BN, - referendums?: Array, - referendumCount?: BN + query_democracy_nextTally?: BN, + query_democracy_referendumCount?: BN, + derive_democracy_referendums?: Array }; class Referendums extends React.PureComponent { @@ -33,11 +33,10 @@ class Referendums extends React.PureComponent { } private renderReferendums () { - const { democracyNextTally = new BN(0), referendums, referendumCount = new BN(0), t } = this.props; + const { query_democracy_nextTally, derive_democracy_referendums, query_democracy_referendumCount, t } = this.props; + const referendumCount = (query_democracy_referendumCount || new BN(0)).toNumber(); - console.error('democracyNextTally', democracyNextTally.toString(), referendums, referendumCount.toString()); - - if (!referendums || !referendums.length || referendumCount.toNumber() === democracyNextTally.toNumber()) { + if (!derive_democracy_referendums || !derive_democracy_referendums.length || (referendumCount === (query_democracy_nextTally || new BN(0)).toNumber())) { return (
{t('proposals.none', { @@ -47,9 +46,11 @@ class Referendums extends React.PureComponent { ); } - return referendums.map((referendum, index) => ( + const startIndex = referendumCount - derive_democracy_referendums.length; + + return derive_democracy_referendums.map((referendum, index) => ( @@ -60,7 +61,7 @@ class Referendums extends React.PureComponent { export default withMulti( Referendums, translate, - withObservable('referendums'), - withObservable('referendumCount'), - withObservable('democracyNextTally') + withCall('query.democracy.nextTally'), + withCall('query.democracy.referendumCount'), + withCall('derive.democracy.referendums') ); diff --git a/packages/app-democracy/src/Summary.tsx b/packages/app-democracy/src/Summary.tsx index 704ab72f06..ba9a63f7f1 100644 --- a/packages/app-democracy/src/Summary.tsx +++ b/packages/app-democracy/src/Summary.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -7,23 +7,23 @@ import { I18nProps } from '@polkadot/ui-app/types'; import BN from 'bn.js'; import React from 'react'; import { CardSummary } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import { numberFormat } from '@polkadot/ui-react-rx/util/index'; import translate from './translate'; type Props = I18nProps & { - bestNumber?: BN, - democracyLaunchPeriod?: BN, - democracyNextTally?: BN, - publicProposalCount?: BN, - referendumCount?: BN, - democracyVotingPeriod?: BN + derive_chain_bestNumber?: BN, + derive_democracy_publicPropCount?: BN, + query_democracy_launchPeriod?: BN, + query_democracy_nextTally?: BN, + query_democracy_referendumCount?: BN, + query_democracy_votingPeriod?: BN }; class Summary extends React.PureComponent { render () { - const { bestNumber = new BN(0), democracyLaunchPeriod = new BN(1), democracyNextTally = new BN(0), publicProposalCount, referendumCount = new BN(0), democracyVotingPeriod = new BN(1), t } = this.props; + const { derive_chain_bestNumber = new BN(0), query_democracy_launchPeriod, query_democracy_nextTally, derive_democracy_publicPropCount, query_democracy_referendumCount, query_democracy_votingPeriod, t } = this.props; return ( @@ -33,21 +33,21 @@ class Summary extends React.PureComponent { defaultValue: 'proposals' })} > - {numberFormat(publicProposalCount)} + {numberFormat(derive_democracy_publicPropCount)} - {numberFormat(referendumCount)} + {numberFormat(query_democracy_referendumCount)} - {numberFormat(referendumCount.sub(democracyNextTally))} + {numberFormat((query_democracy_referendumCount || new BN(0)).sub(query_democracy_nextTally || new BN(0)))}
@@ -56,8 +56,8 @@ class Summary extends React.PureComponent { defaultValue: 'voting period' })} progress={{ - value: bestNumber.mod(democracyVotingPeriod).addn(1), - total: democracyVotingPeriod + value: derive_chain_bestNumber.mod(query_democracy_votingPeriod || new BN(1)).addn(1), + total: query_democracy_votingPeriod || new BN(1) }} /> { defaultValue: 'launch period' })} progress={{ - value: bestNumber.mod(democracyLaunchPeriod).addn(1), - total: democracyLaunchPeriod + value: derive_chain_bestNumber.mod(query_democracy_launchPeriod || new BN(1)).addn(1), + total: query_democracy_launchPeriod || new BN(1) }} />
@@ -78,10 +78,10 @@ class Summary extends React.PureComponent { export default withMulti( Summary, translate, - withObservable('democracyLaunchPeriod'), - withObservable('bestNumber'), - withObservable('referendumCount'), - withObservable('democracyNextTally'), - withObservable('publicProposalCount'), - withObservable('democracyVotingPeriod') + withCall('query.democracy.launchPeriod'), + withCall('query.democracy.nextTally'), + withCall('query.democracy.publicPropCount'), + withCall('query.democracy.referendumCount'), + withCall('query.democracy.votingPeriod'), + withCall('derive.chain.bestNumber') ); diff --git a/packages/app-democracy/src/Voting.tsx b/packages/app-democracy/src/Voting.tsx index 5b5a7b395d..ad0a021eed 100644 --- a/packages/app-democracy/src/Voting.tsx +++ b/packages/app-democracy/src/Voting.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-democracy/src/VotingButtons.tsx b/packages/app-democracy/src/VotingButtons.tsx index 69c20cd3db..688f03e7eb 100644 --- a/packages/app-democracy/src/VotingButtons.tsx +++ b/packages/app-democracy/src/VotingButtons.tsx @@ -1,24 +1,23 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; import { QueueTx$ExtrinsicAdd } from '@polkadot/ui-app/Status/types'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import BN from 'bn.js'; import React from 'react'; -import Api from '@polkadot/api-observable'; -import { Extrinsic } from '@polkadot/types'; import { Button } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import translate from './translate'; -type Props = I18nProps & { +type Props = ApiProps & I18nProps & { accountId?: string, queueExtrinsic: QueueTx$ExtrinsicAdd, referendumId: BN, - accountNonce?: BN + query_system_accountNonce?: BN }; class VotingButton extends React.PureComponent { @@ -49,17 +48,15 @@ class VotingButton extends React.PureComponent { } private doVote (vote: boolean) { - const { accountId, queueExtrinsic, referendumId, accountNonce = new BN(0) } = this.props; + const { accountId, apiPromise, queueExtrinsic, referendumId, query_system_accountNonce } = this.props; if (!accountId) { return; } queueExtrinsic({ - extrinsic: new Extrinsic({ - method: Api.extrinsics.democracy.vote(referendumId, vote) - }), - accountNonce, + extrinsic: apiPromise.tx.democracy.vote(referendumId, vote ? -1 : 0), + accountNonce: query_system_accountNonce, accountId }); } @@ -76,5 +73,5 @@ class VotingButton extends React.PureComponent { export default withMulti( VotingButton, translate, - withObservable('accountNonce', { paramProp: 'accountId' }) + withCall('query.system.accountNonce', { paramProp: 'accountId' }) ); diff --git a/packages/app-democracy/src/index.css b/packages/app-democracy/src/index.css index b7dd6a0338..36140e4e7f 100644 --- a/packages/app-democracy/src/index.css +++ b/packages/app-democracy/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-democracy authors & contributors +/* Copyright 2017-2019 @polkadot/app-democracy authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-democracy/src/index.tsx b/packages/app-democracy/src/index.tsx index 4951315172..080821ce11 100644 --- a/packages/app-democracy/src/index.tsx +++ b/packages/app-democracy/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-democracy authors & contributors +// Copyright 2017-2019 @polkadot/app-democracy authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-democracy/src/translate.ts b/packages/app-democracy/src/translate.ts index 37f7298c8f..2a54d3d8fd 100644 --- a/packages/app-democracy/src/translate.ts +++ b/packages/app-democracy/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/package.json b/packages/app-explorer/package.json index ca061509fe..a38e94f9f7 100644 --- a/packages/app-explorer/package.json +++ b/packages/app-explorer/package.json @@ -11,8 +11,8 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/types": "^0.35.19", + "@polkadot/types": "^0.37.6", "@polkadot/ui-app": "^0.21.17", - "@polkadot/util-crypto": "^0.33.27" + "@polkadot/util-crypto": "^0.33.30" } } diff --git a/packages/app-explorer/src/BestHash.tsx b/packages/app-explorer/src/BestHash.tsx index bafc5ab961..541d281e5f 100644 --- a/packages/app-explorer/src/BestHash.tsx +++ b/packages/app-explorer/src/BestHash.tsx @@ -1,17 +1,35 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import { BareProps } from '@polkadot/ui-react-rx//types'; + +import React from 'react'; import { Header } from '@polkadot/types'; +import { withCall } from '@polkadot/ui-react-rx/with/index'; -import { withObservableDiv } from '@polkadot/ui-react-rx/with/index'; +type Props = BareProps & { + label?: string, + rpc_chain_subscribeNewHead?: Header +}; -const Component: React.ComponentType = withObservableDiv('subscribeNewHead')( - (header?: Header): string | undefined => - header - ? header.hash.toHex() - : undefined, - { className: 'explorer--BestHash' } -); +class BestHash extends React.PureComponent { + render () { + const { className, label = '', style, rpc_chain_subscribeNewHead } = this.props; -export default Component; + return ( +
+ {label}{ + rpc_chain_subscribeNewHead + ? rpc_chain_subscribeNewHead.hash.toHex() + : undefined + } +
+ ); + } +} + +export default withCall('rpc.chain.subscribeNewHead', {})(BestHash); diff --git a/packages/app-explorer/src/BlockByHash/BlockByHash.tsx b/packages/app-explorer/src/BlockByHash/BlockByHash.tsx index 3a611658bb..65649a27a8 100644 --- a/packages/app-explorer/src/BlockByHash/BlockByHash.tsx +++ b/packages/app-explorer/src/BlockByHash/BlockByHash.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -8,7 +8,7 @@ import { ApiProps } from '@polkadot/ui-react-rx/types'; import React from 'react'; import { AddressMini, Call } from '@polkadot/ui-app/index'; import { Extrinsic, Method, SignedBlock } from '@polkadot/types'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import { numberFormat } from '@polkadot/ui-react-rx/util/index'; import BlockHeader from '../BlockHeader'; @@ -16,19 +16,19 @@ import translate from '../translate'; import Logs from './Logs'; type Props = ApiProps & I18nProps & { - getBlock: SignedBlock, + rpc_chain_getBlock?: SignedBlock, value: string }; class BlockByHash extends React.PureComponent { render () { - const { getBlock } = this.props; + const { rpc_chain_getBlock } = this.props; - if (!getBlock || !getBlock.block) { + if (!rpc_chain_getBlock || !rpc_chain_getBlock.block) { return null; } - const { block: { header } } = getBlock; + const { block: { header } } = rpc_chain_getBlock; return [
@@ -47,8 +47,13 @@ class BlockByHash extends React.PureComponent { } private renderExtrinsics () { - const { getBlock, t } = this.props; - const { block: { extrinsics } } = getBlock; + const { rpc_chain_getBlock, t } = this.props; + + if (!rpc_chain_getBlock) { + return null; + } + + const { block: { extrinsics } } = rpc_chain_getBlock; return (
@@ -145,5 +150,5 @@ class BlockByHash extends React.PureComponent { export default withMulti( BlockByHash, translate, - withObservable('getBlock', { paramProp: 'value' }) + withCall('rpc.chain.getBlock', { paramProp: 'value' }) ); diff --git a/packages/app-explorer/src/BlockByHash/Logs.tsx b/packages/app-explorer/src/BlockByHash/Logs.tsx index e6c6fb62d8..b1db47b8e9 100644 --- a/packages/app-explorer/src/BlockByHash/Logs.tsx +++ b/packages/app-explorer/src/BlockByHash/Logs.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/src/BlockByHash/index.tsx b/packages/app-explorer/src/BlockByHash/index.tsx index 3e541aaef9..1cad5d26cc 100644 --- a/packages/app-explorer/src/BlockByHash/index.tsx +++ b/packages/app-explorer/src/BlockByHash/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/src/BlockHeader/BlockHash.tsx b/packages/app-explorer/src/BlockHeader/BlockHash.tsx index 5138c8e89b..54d46806fd 100644 --- a/packages/app-explorer/src/BlockHeader/BlockHash.tsx +++ b/packages/app-explorer/src/BlockHeader/BlockHash.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -6,25 +6,24 @@ import { I18nProps } from '@polkadot/ui-app/types'; import React from 'react'; import { Link } from 'react-router-dom'; -import jsonrpc from '@polkadot/jsonrpc'; -import { withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall } from '@polkadot/ui-react-rx/with/index'; import { BlockNumber, Hash } from '@polkadot/types'; type Props = I18nProps & { blockNumber: BlockNumber, - getBlockHash?: Hash, + rpc_chain_getBlockHash?: Hash, withLink?: boolean }; class BlockHash extends React.PureComponent { render () { - const { getBlockHash, withLink } = this.props; + const { rpc_chain_getBlockHash, withLink } = this.props; - if (!getBlockHash) { + if (!rpc_chain_getBlockHash) { return null; } - const hashHex = getBlockHash.toHex(); + const hashHex = rpc_chain_getBlockHash.toHex(); return ( withLink @@ -34,8 +33,6 @@ class BlockHash extends React.PureComponent { } } -export default withObservable('rawCall', { - params: [jsonrpc.chain.methods.getBlockHash], - paramProp: 'blockNumber', - propName: 'getBlockHash' +export default withCall('rpc.chain.getBlockHash', { + paramProp: 'blockNumber' })(BlockHash); diff --git a/packages/app-explorer/src/BlockHeader/BlockHeader.css b/packages/app-explorer/src/BlockHeader/BlockHeader.css index 542aef7343..f91b6195f7 100644 --- a/packages/app-explorer/src/BlockHeader/BlockHeader.css +++ b/packages/app-explorer/src/BlockHeader/BlockHeader.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-explorer authors & contributors +/* Copyright 2017-2019 @polkadot/app-explorer authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-explorer/src/BlockHeader/Extrinsics.tsx b/packages/app-explorer/src/BlockHeader/Extrinsics.tsx index 518013546f..27ed7e79b1 100644 --- a/packages/app-explorer/src/BlockHeader/Extrinsics.tsx +++ b/packages/app-explorer/src/BlockHeader/Extrinsics.tsx @@ -1,24 +1,24 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; import React from 'react'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import translate from '../translate'; type Props = I18nProps & { hash: Uint8Array, - getBlock: any + rpc_chain_getBlock: any }; class Extrinsics extends React.PureComponent { render () { - const { getBlock, t } = this.props; + const { rpc_chain_getBlock, t } = this.props; - if (!getBlock || !getBlock.extrinsics) { + if (!rpc_chain_getBlock || !rpc_chain_getBlock.extrinsics) { return null; } @@ -29,7 +29,7 @@ class Extrinsics extends React.PureComponent { {t('extrinsics.count', { defaultValue: '{{count}} in block', replace: { - count: getBlock.extrinsics.length + count: rpc_chain_getBlock.extrinsics.length } })} @@ -42,5 +42,5 @@ class Extrinsics extends React.PureComponent { export default withMulti( Extrinsics, translate, - withObservable('getBlock', { paramProp: 'hash' }) + withCall('rpc.chain.getBlock', { paramProp: 'hash' }) ); diff --git a/packages/app-explorer/src/BlockHeader/index.tsx b/packages/app-explorer/src/BlockHeader/index.tsx index 15df70622d..f02b01eab0 100644 --- a/packages/app-explorer/src/BlockHeader/index.tsx +++ b/packages/app-explorer/src/BlockHeader/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/src/BlockHeaders.tsx b/packages/app-explorer/src/BlockHeaders.tsx index 1b9baf913f..b07d83b747 100644 --- a/packages/app-explorer/src/BlockHeaders.tsx +++ b/packages/app-explorer/src/BlockHeaders.tsx @@ -1,11 +1,11 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { Header } from '@polkadot/types'; import React from 'react'; -import { withObservableDiv } from '@polkadot/ui-react-rx/with/index'; +import { withCall } from '@polkadot/ui-react-rx/with/index'; import BlockHeader from './BlockHeader'; @@ -13,37 +13,47 @@ export const MAX_ITEMS = 15; let blockHeaders: Array
= []; -const apiOptions = { - transform: (header: Header): Array
=> { - if (!header) { - return blockHeaders; - } - - blockHeaders = blockHeaders - .filter((old, index) => - index < MAX_ITEMS && old.blockNumber.lt(header.blockNumber) - ) - .reduce((next, header) => { - next.push(header); - - return next; - }, [header]) - .sort((a, b) => - b.blockNumber.cmp(a.blockNumber) - ); - +const transform = (header: Header): Array
=> { + if (!header) { return blockHeaders; } + + blockHeaders = blockHeaders + .filter((old, index) => + index < MAX_ITEMS && old.blockNumber.lt(header.blockNumber) + ) + .reduce((next, header) => { + next.push(header); + + return next; + }, [header]) + .sort((a, b) => + b.blockNumber.cmp(a.blockNumber) + ); + + return blockHeaders; }; -export default withObservableDiv('subscribeNewHead', apiOptions)( - (value: Array
= []) => - value.map((value) => ( - - )), - { className: 'explorer--BlockHeaders' } -); +type Props = { + headers?: Array
+}; + +class BlockHeaders extends React.PureComponent { + render () { + const { headers = [] } = this.props; + + return ( +
+ {headers.map((header) => ( + + ))} +
+ ); + } +} + +export default withCall('rpc.chain.subscribeNewHead', { propName: 'headers', transform })(BlockHeaders); diff --git a/packages/app-explorer/src/Events.tsx b/packages/app-explorer/src/Events.tsx index 586a8d9631..513d2c8905 100644 --- a/packages/app-explorer/src/Events.tsx +++ b/packages/app-explorer/src/Events.tsx @@ -1,8 +1,8 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -11,7 +11,7 @@ import { I18nProps } from '@polkadot/ui-app/types'; import React from 'react'; import { Event, EventRecord } from '@polkadot/types'; import { Event as EventDisplay } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with'; import { stringToU8a } from '@polkadot/util'; import { xxhashAsHex } from '@polkadot/util-crypto'; @@ -19,7 +19,7 @@ import { MAX_ITEMS } from './BlockHeaders'; import translate from './translate'; type Props = I18nProps & { - systemEvents?: Array + query_system_events?: Array }; type State = { @@ -37,14 +37,14 @@ class EventsDisplay extends React.PureComponent { }; } - static getDerivedStateFromProps ({ systemEvents = [] }: Props, prevState: State): State | null { - const prevEventHash = xxhashAsHex(stringToU8a(JSON.stringify(systemEvents))); + static getDerivedStateFromProps ({ query_system_events = [] }: Props, prevState: State): State | null { + const prevEventHash = xxhashAsHex(stringToU8a(JSON.stringify(query_system_events))); if (prevEventHash === prevState.prevEventHash) { return null; } - const recentEvents = systemEvents + const recentEvents = query_system_events .filter(({ event }) => event.section !== 'system' ) @@ -108,5 +108,5 @@ class EventsDisplay extends React.PureComponent { export default withMulti( EventsDisplay, translate, - withObservable('systemEvents') + withCall('query.system.events') ); diff --git a/packages/app-explorer/src/Main.tsx b/packages/app-explorer/src/Main.tsx index 44889ced42..3133d46035 100644 --- a/packages/app-explorer/src/Main.tsx +++ b/packages/app-explorer/src/Main.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/src/Query.tsx b/packages/app-explorer/src/Query.tsx index 9486b4494b..917619a43a 100644 --- a/packages/app-explorer/src/Query.tsx +++ b/packages/app-explorer/src/Query.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/src/Summary.tsx b/packages/app-explorer/src/Summary.tsx index 3fcf25349b..a292e8d826 100644 --- a/packages/app-explorer/src/Summary.tsx +++ b/packages/app-explorer/src/Summary.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/src/SummarySession.tsx b/packages/app-explorer/src/SummarySession.tsx index f5e71b8043..db79e807bd 100644 --- a/packages/app-explorer/src/SummarySession.tsx +++ b/packages/app-explorer/src/SummarySession.tsx @@ -1,24 +1,25 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; +import BN from 'bn.js'; import React from 'react'; import { BlockNumber } from '@polkadot/types'; import { CardSummary } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import translate from './translate'; type Props = I18nProps & { - eraBlockLength?: BlockNumber, - eraBlockProgress?: BlockNumber, - sessionBlockProgress?: BlockNumber, + derive_session_eraLength?: BN, + derive_session_eraProgress?: BN, + derive_session_sessionProgress?: BN, // FIXME Replaced in poc-3 // sessionBrokenValue?: BN, // sessionBrokenPercentLate?: BN, - sessionLength?: BlockNumber, + query_session_sessionLength?: BlockNumber, withBroken?: boolean, withEra?: boolean, withSession?: boolean @@ -58,7 +59,7 @@ class SummarySession extends React.PureComponent { // } private renderEra () { - const { eraBlockLength, eraBlockProgress, t, withEra = true } = this.props; + const { derive_session_eraLength, derive_session_eraProgress, t, withEra = true } = this.props; if (!withEra) { return null; @@ -71,15 +72,15 @@ class SummarySession extends React.PureComponent { defaultValue: 'era' })} progress={{ - total: eraBlockLength, - value: eraBlockProgress + total: derive_session_eraLength, + value: derive_session_eraProgress }} /> ); } private renderSession () { - const { sessionBlockProgress, sessionLength, t, withSession = true } = this.props; + const { derive_session_sessionProgress, query_session_sessionLength, t, withSession = true } = this.props; if (!withSession) { return null; @@ -92,8 +93,8 @@ class SummarySession extends React.PureComponent { defaultValue: 'session' })} progress={{ - total: sessionLength, - value: sessionBlockProgress + total: query_session_sessionLength || new BN(0), + value: derive_session_sessionProgress }} /> ); @@ -103,8 +104,8 @@ class SummarySession extends React.PureComponent { export default withMulti( SummarySession, translate, - withObservable('eraBlockLength'), - withObservable('eraBlockProgress'), - withObservable('sessionBlockProgress'), - withObservable('sessionLength') + withCall('derive.session.eraLength'), + withCall('derive.session.eraProgress'), + withCall('derive.session.sessionProgress'), + withCall('query.session.sessionLength') ); diff --git a/packages/app-explorer/src/index.css b/packages/app-explorer/src/index.css index e95c52d164..d69a76c6e8 100644 --- a/packages/app-explorer/src/index.css +++ b/packages/app-explorer/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-explorer authors & contributors +/* Copyright 2017-2019 @polkadot/app-explorer authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-explorer/src/index.tsx b/packages/app-explorer/src/index.tsx index e56d607211..d95ab323dd 100644 --- a/packages/app-explorer/src/index.tsx +++ b/packages/app-explorer/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-explorer/src/translate.ts b/packages/app-explorer/src/translate.ts index 7385cbaece..2883527f3d 100644 --- a/packages/app-explorer/src/translate.ts +++ b/packages/app-explorer/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-explorer authors & contributors +// Copyright 2017-2019 @polkadot/app-explorer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-extrinsics/package.json b/packages/app-extrinsics/package.json index 1aab237187..a7158e0bd3 100644 --- a/packages/app-extrinsics/package.json +++ b/packages/app-extrinsics/package.json @@ -11,7 +11,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/types": "^0.35.19", + "@polkadot/types": "^0.37.6", "@polkadot/ui-app": "^0.21.17", "@polkadot/ui-signer": "^0.21.17" } diff --git a/packages/app-extrinsics/src/Account.tsx b/packages/app-extrinsics/src/Account.tsx index 435f76066e..2388bd9f2a 100644 --- a/packages/app-extrinsics/src/Account.tsx +++ b/packages/app-extrinsics/src/Account.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-extrinsics/src/Extrinsic.tsx b/packages/app-extrinsics/src/Extrinsic.tsx index 07c6ccc627..f988dfb183 100644 --- a/packages/app-extrinsics/src/Extrinsic.tsx +++ b/packages/app-extrinsics/src/Extrinsic.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-extrinsics/src/Nonce.tsx b/packages/app-extrinsics/src/Nonce.tsx index 89e9fdb3c0..ee53314f38 100644 --- a/packages/app-extrinsics/src/Nonce.tsx +++ b/packages/app-extrinsics/src/Nonce.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-extrinsics/src/Params/Account.tsx b/packages/app-extrinsics/src/Params/Account.tsx index 5325860e43..c9d8fdffda 100644 --- a/packages/app-extrinsics/src/Params/Account.tsx +++ b/packages/app-extrinsics/src/Params/Account.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-extrinsics/src/Params/Call.tsx b/packages/app-extrinsics/src/Params/Call.tsx index f3f8ed54ac..f7f4ef1966 100644 --- a/packages/app-extrinsics/src/Params/Call.tsx +++ b/packages/app-extrinsics/src/Params/Call.tsx @@ -1,26 +1,35 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { Props } from '@polkadot/ui-app/Params/types'; +import { Props as BaseProps } from '@polkadot/ui-app/Params/types'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import React from 'react'; -import Api from '@polkadot/api-observable'; +import { withApi } from '@polkadot/ui-react-rx/with'; import Extrinsic from './Extrinsic'; -export default function Call ({ className, isDisabled, isError, label, onChange, style, withLabel }: Props) { - return ( - - ); +type Props = ApiProps & BaseProps; + +class Call extends React.PureComponent { + render () { + const { apiPromise, className, isDisabled, isError, label, onChange, style, withLabel } = this.props; + + return ( + + ); + } } + +export default withApi(Call); diff --git a/packages/app-extrinsics/src/Params/Extrinsic.tsx b/packages/app-extrinsics/src/Params/Extrinsic.tsx index a00cd5aafc..11d1de5a23 100644 --- a/packages/app-extrinsics/src/Params/Extrinsic.tsx +++ b/packages/app-extrinsics/src/Params/Extrinsic.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-extrinsics/src/Params/Proposal.tsx b/packages/app-extrinsics/src/Params/Proposal.tsx index 023bc3ab75..b18ccb029f 100644 --- a/packages/app-extrinsics/src/Params/Proposal.tsx +++ b/packages/app-extrinsics/src/Params/Proposal.tsx @@ -1,23 +1,26 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { Props, RawParam } from '@polkadot/ui-app/Params/types'; +import { Props as BaseProps, RawParam } from '@polkadot/ui-app/Params/types'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import React from 'react'; -import Api from '@polkadot/api-observable'; import { Proposal } from '@polkadot/types'; +import { withApi } from '@polkadot/ui-react-rx/with'; import ExtrinsicDisplay from './Extrinsic'; -export default class ProposalDisplay extends React.PureComponent { +type Props = ApiProps & BaseProps; + +class ProposalDisplay extends React.PureComponent { render () { - const { className, isDisabled, isError, label, style, withLabel } = this.props; + const { apiPromise, className, isDisabled, isError, label, style, withLabel } = this.props; return ( { }); } } + +export default withApi(ProposalDisplay); diff --git a/packages/app-extrinsics/src/Params/index.ts b/packages/app-extrinsics/src/Params/index.ts index eb5da44e63..87d9aeec54 100644 --- a/packages/app-extrinsics/src/Params/index.ts +++ b/packages/app-extrinsics/src/Params/index.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-extrinsics/src/Selection.tsx b/packages/app-extrinsics/src/Selection.tsx index 9fd48ec8e6..a353d14e52 100644 --- a/packages/app-extrinsics/src/Selection.tsx +++ b/packages/app-extrinsics/src/Selection.tsx @@ -1,22 +1,24 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import BN from 'bn.js'; import { I18nProps } from '@polkadot/ui-app/types'; import { QueueTx$ExtrinsicAdd, QueueTx$Unclog } from '@polkadot/ui-app/Status/types'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import React from 'react'; -import Api from '@polkadot/api-observable'; -import { Extrinsic, Method } from '@polkadot/types'; +import SubmittableExtrinsic from '@polkadot/api/promise/SubmittableExtrinsic'; +import { Method } from '@polkadot/types'; import { Button } from '@polkadot/ui-app/index'; +import { withApi, withMulti } from '@polkadot/ui-react-rx/with'; import Account from './Account'; import ExtrinsicDisplay from './Extrinsic'; import Nonce from './Nonce'; import translate from './translate'; -type Props = I18nProps & { +type Props = ApiProps & I18nProps & { queueExtrinsic: QueueTx$ExtrinsicAdd, queueUnclog: QueueTx$Unclog }; @@ -34,7 +36,7 @@ class Selection extends React.PureComponent { } as State; render () { - const { t } = this.props; + const { apiPromise, t } = this.props; const { isValid, accountId } = this.state; return ( @@ -48,7 +50,7 @@ class Selection extends React.PureComponent { type='account' /> { } private onQueue (isUnsigned: boolean): void { - const { queueExtrinsic } = this.props; + const { apiPromise, queueExtrinsic } = this.props; const { accountNonce, method, isValid, accountId } = this.state; if (!isValid || !method) { @@ -130,7 +132,7 @@ class Selection extends React.PureComponent { queueExtrinsic({ accountId, accountNonce, - extrinsic: new Extrinsic({ method }), + extrinsic: new SubmittableExtrinsic(apiPromise, method), isUnsigned }); } @@ -144,4 +146,8 @@ class Selection extends React.PureComponent { } } -export default translate(Selection); +export default withMulti( + Selection, + translate, + withApi +); diff --git a/packages/app-extrinsics/src/index.css b/packages/app-extrinsics/src/index.css index de86e313f0..ed0411d169 100644 --- a/packages/app-extrinsics/src/index.css +++ b/packages/app-extrinsics/src/index.css @@ -1,3 +1,3 @@ -/* Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +/* Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-extrinsics/src/index.tsx b/packages/app-extrinsics/src/index.tsx index 513a05ea52..4511471f43 100644 --- a/packages/app-extrinsics/src/index.tsx +++ b/packages/app-extrinsics/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -11,7 +11,7 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { QueueConsumer } from '@polkadot/ui-app/Status/Context'; import accountsObservable from '@polkadot/ui-keyring/observable/accounts'; -import { withMulti, withObservableBase } from '@polkadot/ui-react-rx/with/index'; +import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; import translate from './translate'; import Selection from './Selection'; @@ -57,5 +57,5 @@ export { ExtrinsicsApp }; export default withMulti( ExtrinsicsApp, translate, - withObservableBase(accountsObservable.subject, { propName: 'accountAll' }) + withObservable(accountsObservable.subject, { propName: 'accountAll' }) ); diff --git a/packages/app-extrinsics/src/translate.ts b/packages/app-extrinsics/src/translate.ts index 4579804680..f5b72d1e4d 100644 --- a/packages/app-extrinsics/src/translate.ts +++ b/packages/app-extrinsics/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-extrinsics authors & contributors +// Copyright 2017-2019 @polkadot/app-extrinsics authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-rpc/package.json b/packages/app-rpc/package.json index d133bad5d7..f8760549d8 100644 --- a/packages/app-rpc/package.json +++ b/packages/app-rpc/package.json @@ -12,7 +12,7 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/ui-app": "^0.21.17", - "@polkadot/ui-keyring": "^0.24.18", + "@polkadot/ui-keyring": "^0.24.25", "@polkadot/ui-signer": "^0.21.17" } } diff --git a/packages/app-rpc/src/Account.tsx b/packages/app-rpc/src/Account.tsx index e0ecc7d080..7296bc291c 100644 --- a/packages/app-rpc/src/Account.tsx +++ b/packages/app-rpc/src/Account.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-rpc authors & contributors +// Copyright 2017-2019 @polkadot/app-rpc authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-rpc/src/Results.tsx b/packages/app-rpc/src/Results.tsx index 27f601948d..500ee320b2 100644 --- a/packages/app-rpc/src/Results.tsx +++ b/packages/app-rpc/src/Results.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-rpc authors & contributors +// Copyright 2017-2019 @polkadot/app-rpc authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-rpc/src/index.css b/packages/app-rpc/src/index.css index 0250c878f7..2417957e3b 100644 --- a/packages/app-rpc/src/index.css +++ b/packages/app-rpc/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-rpc authors & contributors +/* Copyright 2017-2019 @polkadot/app-rpc authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-rpc/src/index.tsx b/packages/app-rpc/src/index.tsx index 1df2393d32..7dd96ef80f 100644 --- a/packages/app-rpc/src/index.tsx +++ b/packages/app-rpc/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-rpc authors & contributors +// Copyright 2017-2019 @polkadot/app-rpc authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-rpc/src/translate.ts b/packages/app-rpc/src/translate.ts index 05b8c7f9b3..790d88b143 100644 --- a/packages/app-rpc/src/translate.ts +++ b/packages/app-rpc/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-rpc authors & contributors +// Copyright 2017-2019 @polkadot/app-rpc authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-settings/package.json b/packages/app-settings/package.json index 869a041bc7..1d3e79a635 100644 --- a/packages/app-settings/package.json +++ b/packages/app-settings/package.json @@ -13,6 +13,6 @@ "@babel/runtime": "^7.2.0", "@polkadot/ui-app": "^0.21.17", "@polkadot/ui-react-rx": "^0.21.17", - "@polkadot/ui-settings": "^0.24.18" + "@polkadot/ui-settings": "^0.24.25" } } diff --git a/packages/app-settings/src/index.css b/packages/app-settings/src/index.css index 6216fd393d..9c7cc1f0ef 100644 --- a/packages/app-settings/src/index.css +++ b/packages/app-settings/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-settings authors & contributors +/* Copyright 2017-2019 @polkadot/app-settings authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-settings/src/index.tsx b/packages/app-settings/src/index.tsx index 4ba5dbd203..08d0a7eb8e 100644 --- a/packages/app-settings/src/index.tsx +++ b/packages/app-settings/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-settings authors & contributors +// Copyright 2017-2019 @polkadot/app-settings authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-settings/src/translate.ts b/packages/app-settings/src/translate.ts index 45ad71fd27..1ee800d31f 100644 --- a/packages/app-settings/src/translate.ts +++ b/packages/app-settings/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-settings authors & contributors +// Copyright 2017-2019 @polkadot/app-settings authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-staking/package.json b/packages/app-staking/package.json index ce2f2d29f3..5b716355f4 100644 --- a/packages/app-staking/package.json +++ b/packages/app-staking/package.json @@ -12,10 +12,10 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/app-explorer": "^0.21.17", - "@polkadot/keyring": "^0.33.27", - "@polkadot/storage": "^0.35.19", + "@polkadot/keyring": "^0.33.30", + "@polkadot/storage": "^0.37.6", "@polkadot/ui-app": "^0.21.17", - "@polkadot/ui-keyring": "^0.24.18", + "@polkadot/ui-keyring": "^0.24.25", "@polkadot/ui-react-rx": "^0.21.17" } } diff --git a/packages/app-staking/src/Overview/CurrentList.tsx b/packages/app-staking/src/Overview/CurrentList.tsx index 9906cd1a99..6cb57cd1ae 100644 --- a/packages/app-staking/src/Overview/CurrentList.tsx +++ b/packages/app-staking/src/Overview/CurrentList.tsx @@ -1,9 +1,9 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; -import { RxBalanceMap } from '@polkadot/api-observable/types'; +import { DerivedBalancesMap } from '@polkadot/ui-react-rx/derive/types'; import React from 'react'; import { AccountId, Balance } from '@polkadot/types'; @@ -13,7 +13,7 @@ import keyring from '@polkadot/ui-keyring'; import translate from '../translate'; type Props = I18nProps & { - balances: RxBalanceMap, + balances: DerivedBalancesMap, balanceArray: (_address: AccountId | string) => Array | undefined, current: Array, next: Array @@ -97,10 +97,10 @@ class CurrentList extends React.PureComponent { withCopy={false} withNonce={false} > - {nominators.map(({ address }) => + {nominators.map(({ accountId }) => )} diff --git a/packages/app-staking/src/Overview/Summary.tsx b/packages/app-staking/src/Overview/Summary.tsx index b67c758b57..643d3f30ec 100644 --- a/packages/app-staking/src/Overview/Summary.tsx +++ b/packages/app-staking/src/Overview/Summary.tsx @@ -1,30 +1,30 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; -import { RxBalance, RxBalanceMap } from '@polkadot/api-observable/types'; +import { DerivedBalances, DerivedBalancesMap } from '@polkadot/ui-react-rx/derive/types'; import BN from 'bn.js'; import React from 'react'; import { CardSummary } from '@polkadot/ui-app/index'; import SummarySession from '@polkadot/app-explorer/SummarySession'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import { balanceFormat } from '@polkadot/ui-react-rx/util/index'; import translate from '../translate'; type Props = I18nProps & { - balances: RxBalanceMap, + balances: DerivedBalancesMap, intentions: Array, lastLengthChange?: BN, - validatorCount?: BN, + query_staking_validatorCount?: BN, validators: Array }; class Summary extends React.PureComponent { render () { - const { className, intentions, style, t, validatorCount, validators } = this.props; + const { className, intentions, style, t, query_staking_validatorCount, validators } = this.props; return ( { defaultValue: 'validators' })} > - {validators.length}/{validatorCount ? validatorCount.toString() : '-'} + {validators.length}/{query_staking_validatorCount ? query_staking_validatorCount.toString() : '-'} { ); } - private calcIntentionsHigh (): RxBalance | null { + private calcIntentionsHigh (): DerivedBalances | null { const { balances, intentions, validators } = this.props; - return intentions.reduce((high: RxBalance | null, addr) => { + return intentions.reduce((high: DerivedBalances | null, addr) => { const balance = validators.includes(addr) || !balances[addr] ? null : balances[addr]; @@ -112,10 +112,10 @@ class Summary extends React.PureComponent { }, null); } - private calcValidatorLow (): RxBalance | null { + private calcValidatorLow (): DerivedBalances | null { const { balances, validators } = this.props; - return validators.reduce((low: RxBalance | null, addr) => { + return validators.reduce((low: DerivedBalances | null, addr) => { const balance = balances[addr] || null; if (low === null || (balance && low.stakingBalance.gt(balance.stakingBalance))) { @@ -130,5 +130,5 @@ class Summary extends React.PureComponent { export default withMulti( Summary, translate, - withObservable('validatorCount') + withCall('query.staking.validatorCount') ); diff --git a/packages/app-staking/src/Overview/index.css b/packages/app-staking/src/Overview/index.css index f300e1a3e8..a41ba2928c 100644 --- a/packages/app-staking/src/Overview/index.css +++ b/packages/app-staking/src/Overview/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-staking authors & contributors +/* Copyright 2017-2019 @polkadot/app-staking authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-staking/src/Overview/index.tsx b/packages/app-staking/src/Overview/index.tsx index c6df7387a7..293f1a9537 100644 --- a/packages/app-staking/src/Overview/index.tsx +++ b/packages/app-staking/src/Overview/index.tsx @@ -1,8 +1,8 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { RxBalanceMap } from '@polkadot/api-observable/types'; +import { DerivedBalancesMap } from '@polkadot/ui-react-rx/derive/types'; import { I18nProps } from '@polkadot/ui-app/types'; import './index.css'; @@ -14,7 +14,7 @@ import CurrentList from './CurrentList'; import Summary from './Summary'; type Props = I18nProps & { - balances: RxBalanceMap, + balances: DerivedBalancesMap, balanceArray: (_address: AccountId | string) => Array | undefined, intentions: Array, validators: Array diff --git a/packages/app-staking/src/StakeList/Account.tsx b/packages/app-staking/src/StakeList/Account.tsx index 93b1a81b5d..af484b1710 100644 --- a/packages/app-staking/src/StakeList/Account.tsx +++ b/packages/app-staking/src/StakeList/Account.tsx @@ -1,30 +1,31 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; import { QueueTx$ExtrinsicAdd } from '@polkadot/ui-app/Status/types'; -import { RxBalanceMap } from '@polkadot/api-observable/types'; +import { DerivedBalancesMap } from '@polkadot/ui-react-rx/derive/types'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import BN from 'bn.js'; import React from 'react'; -import Api from '@polkadot/api-observable'; -import { AccountId, Balance, Extrinsic, Method } from '@polkadot/types'; +import SubmittableExtrinsic from '@polkadot/api/promise/SubmittableExtrinsic'; +import { AccountId, Balance } from '@polkadot/types'; import { AddressMini, AddressSummary, Button } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import Nominating from './Nominating'; import UnnominateButton from './UnnominateButton'; import translate from '../translate'; -type Props = I18nProps & { - accountNonce?: BN, +type Props = ApiProps & I18nProps & { + query_system_accountNonce?: BN, accountId: string, - balances: RxBalanceMap, + balances: DerivedBalancesMap, balanceArray: (_address: AccountId | string) => Array | undefined, name: string, - stakingNominating?: AccountId, - stakingNominatorsFor?: Array, + query_staking_nominating?: AccountId, + query_staking_nominatorsFor?: Array, intentions: Array, isValidator: boolean, queueExtrinsic: QueueTx$ExtrinsicAdd, @@ -73,31 +74,31 @@ class Account extends React.PureComponent { } private renderNominee () { - const { stakingNominating, balanceArray } = this.props; + const { query_staking_nominating, balanceArray } = this.props; - if (!stakingNominating) { + if (!query_staking_nominating) { return null; } return ( ); } private renderNominators () { - const { stakingNominatorsFor } = this.props; + const { query_staking_nominatorsFor } = this.props; - if (!stakingNominatorsFor) { + if (!query_staking_nominatorsFor) { return null; } return (
- {stakingNominatorsFor.map((nominator) => ( + {query_staking_nominatorsFor.map((nominator) => ( { } private renderButtons () { - const { accountId, intentions, stakingNominating, t } = this.props; + const { accountId, intentions, query_staking_nominating, t } = this.props; const isIntending = intentions.includes(accountId); - const isNominating = !!stakingNominating; + const isNominating = !!query_staking_nominating; const canStake = !isIntending && !isNominating; if (canStake) { @@ -142,7 +143,7 @@ class Account extends React.PureComponent { @@ -162,12 +163,12 @@ class Account extends React.PureComponent { ); } - private send (method: Method) { - const { accountNonce, accountId, queueExtrinsic } = this.props; + private send (extrinsic: SubmittableExtrinsic) { + const { query_system_accountNonce, accountId, queueExtrinsic } = this.props; queueExtrinsic({ - extrinsic: new Extrinsic({ method }), - accountNonce: accountNonce || new BN(0), + extrinsic, + accountNonce: query_system_accountNonce, accountId }); } @@ -181,30 +182,38 @@ class Account extends React.PureComponent { } private nominate = (nominee: string) => { - this.send(Api.extrinsics.staking.nominate(nominee)); + const { apiPromise } = this.props; + + this.send(apiPromise.tx.staking.nominate(nominee)); this.toggleNominate(); } private unnominate = (index: number) => { - this.send(Api.extrinsics.staking.unnominate(index)); + const { apiPromise } = this.props; + + this.send(apiPromise.tx.staking.unnominate(index)); } private stake = () => { - this.send(Api.extrinsics.staking.stake()); + const { apiPromise } = this.props; + + this.send(apiPromise.tx.staking.stake()); } private unstake = () => { + const { apiPromise } = this.props; + const { accountId, intentions } = this.props; - this.send(Api.extrinsics.staking.unstake(intentions.indexOf(accountId))); + this.send(apiPromise.tx.staking.unstake(intentions.indexOf(accountId))); } } export default withMulti( Account, translate, - withObservable('stakingNominatorsFor', { paramProp: 'accountId' }), - withObservable('stakingNominating', { paramProp: 'accountId' }), - withObservable('accountNonce', { paramProp: 'accountId' }) + withCall('query.staking.nominatorsFor', { paramProp: 'accountId' }), + withCall('query.staking.nominating', { paramProp: 'accountId' }), + withCall('query.system.accountNonce', { paramProp: 'accountId' }) ); diff --git a/packages/app-staking/src/StakeList/Nominating.tsx b/packages/app-staking/src/StakeList/Nominating.tsx index 6a54dec5ce..2c4f779aab 100644 --- a/packages/app-staking/src/StakeList/Nominating.tsx +++ b/packages/app-staking/src/StakeList/Nominating.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-staking authors & contributors +// Copyright 2017-2019 @polkadot/ui-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-staking/src/StakeList/UnnominateButton.tsx b/packages/app-staking/src/StakeList/UnnominateButton.tsx index eff2acac22..fbba8de45b 100644 --- a/packages/app-staking/src/StakeList/UnnominateButton.tsx +++ b/packages/app-staking/src/StakeList/UnnominateButton.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -6,22 +6,22 @@ import { I18nProps } from '@polkadot/ui-app/types'; import React from 'react'; import { Button } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import translate from '../translate'; type Props = I18nProps & { accountId: string, nominating: string, - stakingNominatorsFor: Array, + query_staking_nominatorsFor: Array, onClick: (index: number) => void }; class UnnominateButton extends React.Component { render () { - const { nominating, stakingNominatorsFor, style, t } = this.props; + const { nominating, query_staking_nominatorsFor, style, t } = this.props; - if (!nominating || !stakingNominatorsFor) { + if (!nominating || !query_staking_nominatorsFor) { return null; } @@ -39,10 +39,10 @@ class UnnominateButton extends React.Component { } onClick = () => { - const { accountId, stakingNominatorsFor, onClick } = this.props; + const { accountId, query_staking_nominatorsFor, onClick } = this.props; onClick( - stakingNominatorsFor + query_staking_nominatorsFor .map((accountId) => accountId.toString() ) @@ -53,5 +53,5 @@ class UnnominateButton extends React.Component { export default withMulti( UnnominateButton, translate, - withObservable('stakingNominatorsFor', { paramProp: 'nominating' }) + withCall('query.staking.nominatorsFor', { paramProp: 'nominating' }) ); diff --git a/packages/app-staking/src/StakeList/index.css b/packages/app-staking/src/StakeList/index.css index 5c136d0f92..a031a9660a 100644 --- a/packages/app-staking/src/StakeList/index.css +++ b/packages/app-staking/src/StakeList/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-staking authors & contributors +/* Copyright 2017-2019 @polkadot/app-staking authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-staking/src/StakeList/index.tsx b/packages/app-staking/src/StakeList/index.tsx index 99175e7b0e..3a89cbe84b 100644 --- a/packages/app-staking/src/StakeList/index.tsx +++ b/packages/app-staking/src/StakeList/index.tsx @@ -1,10 +1,10 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; import { QueueProps } from '@polkadot/ui-app/Status/types'; -import { RxBalanceMap } from '@polkadot/api-observable/types'; +import { DerivedBalancesMap } from '@polkadot/ui-react-rx/derive/types'; import { AccountId, Balance } from '@polkadot/types'; import React from 'react'; @@ -15,7 +15,7 @@ import Account from './Account'; import translate from '../translate'; type Props = I18nProps & { - balances: RxBalanceMap, + balances: DerivedBalancesMap, balanceArray: (_address: AccountId | string) => Array | undefined, intentions: Array, validators: Array diff --git a/packages/app-staking/src/index.css b/packages/app-staking/src/index.css index 5a0dff8ce6..f4ce876f87 100644 --- a/packages/app-staking/src/index.css +++ b/packages/app-staking/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-staking authors & contributors +/* Copyright 2017-2019 @polkadot/app-staking authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-staking/src/index.tsx b/packages/app-staking/src/index.tsx index 5aeae43eff..32c6edf2b9 100644 --- a/packages/app-staking/src/index.tsx +++ b/packages/app-staking/src/index.tsx @@ -1,15 +1,15 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; import { ActionStatus } from '@polkadot/ui-app/Status/types'; -import { RxBalanceMap } from '@polkadot/api-observable/types'; +import { DerivedBalancesMap } from '@polkadot/ui-react-rx/derive/types'; import React from 'react'; import { AccountId, Balance } from '@polkadot/types'; import { Tabs } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import './index.css'; @@ -22,9 +22,9 @@ type Actions = 'actions' | 'overview'; type Props = I18nProps & { basePath: string, onStatusChange: (status: ActionStatus) => void, - stakingIntentions?: Array, - sessionValidators?: Array, - validatingBalances?: RxBalanceMap + query_staking_intentions?: Array, + query_session_validators?: Array, + derive_balances_validatingBalances?: DerivedBalancesMap }; type State = { @@ -51,12 +51,12 @@ class App extends React.PureComponent { }; } - static getDerivedStateFromProps ({ sessionValidators = [], stakingIntentions = [] }: Props): State { + static getDerivedStateFromProps ({ query_session_validators, query_staking_intentions }: Props): State { return { - intentions: stakingIntentions.map((accountId) => + intentions: (query_staking_intentions || []).map((accountId) => accountId.toString() ), - validators: sessionValidators.map((authorityId) => + validators: (query_session_validators || []).map((authorityId) => authorityId.toString() ) } as State; @@ -64,7 +64,7 @@ class App extends React.PureComponent { render () { const { action, intentions, validators } = this.state; - const { t, validatingBalances = {} } = this.props; + const { t, derive_balances_validatingBalances = {} } = this.props; const Component = Components[action]; const items = [ { @@ -87,7 +87,7 @@ class App extends React.PureComponent { />
{ } private balanceArray = (_address: AccountId | string): Array | undefined => { - const { validatingBalances = {} } = this.props; + const { derive_balances_validatingBalances = {} } = this.props; if (!_address) { return undefined; @@ -109,8 +109,11 @@ class App extends React.PureComponent { const address = _address.toString(); - return validatingBalances[address] - ? [validatingBalances[address].stakingBalance, validatingBalances[address].nominatedBalance] + return derive_balances_validatingBalances[address] + ? [ + derive_balances_validatingBalances[address].stakingBalance, + derive_balances_validatingBalances[address].nominatedBalance + ] : undefined; } } @@ -118,7 +121,7 @@ class App extends React.PureComponent { export default withMulti( App, translate, - withObservable('stakingIntentions'), - withObservable('sessionValidators'), - withObservable('validatingBalances', { paramProp: 'stakingIntentions' }) + withCall('query.staking.intentions'), + withCall('query.session.validators'), + withCall('derive.balances.validatingBalances', { paramProp: 'stakingIntentions' }) ); diff --git a/packages/app-staking/src/translate.ts b/packages/app-staking/src/translate.ts index 07e4a2d12d..4f82f0ab8c 100644 --- a/packages/app-staking/src/translate.ts +++ b/packages/app-staking/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-storage/src/Queries.tsx b/packages/app-storage/src/Queries.tsx index c7b240243b..19c5e8fa35 100644 --- a/packages/app-storage/src/Queries.tsx +++ b/packages/app-storage/src/Queries.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-storage/src/Query.tsx b/packages/app-storage/src/Query.tsx index 113f53d30f..54b8da0a29 100644 --- a/packages/app-storage/src/Query.tsx +++ b/packages/app-storage/src/Query.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -10,7 +10,7 @@ import React from 'react'; import { Compact } from '@polkadot/types/codec'; import { Button, Labelled } from '@polkadot/ui-app/index'; import valueToText from '@polkadot/ui-app/Params/valueToText'; -import { withObservableDiv } from '@polkadot/ui-react-rx/with/index'; +import { withCallDiv } from '@polkadot/ui-react-rx/with/index'; import { isU8a, u8aToHex, u8aToString } from '@polkadot/util'; import translate from './translate'; @@ -51,31 +51,28 @@ class Query extends React.PureComponent { const defaultProps = { className: 'ui--output' }; // render function to create an element for the query results which is plugged to the api - const fetchAndRenderHelper = withObservableDiv('rawStorage', { params: [key, ...values] }); - const pluggedComponent = fetchAndRenderHelper( + const renderHelper = withCallDiv('subscribe', { params: [key, ...values] }); + const Component = renderHelper( // By default we render a simple div node component with the query results in it (value: any) => valueToText(type, value, true, true), defaultProps ); - cache[query.id] = Query.createComponentCacheInstance(type, pluggedComponent, defaultProps, fetchAndRenderHelper); + cache[query.id] = Query.createComponent(type, Component, defaultProps, renderHelper); } return cache[id]; } - static createComponentCacheInstance (type: string, pluggedComponent: React.ComponentType, defaultProps: DefaultProps, fetchAndRenderHelper: ComponentRenderer) { + static createComponent (type: string, Component: React.ComponentType, defaultProps: DefaultProps, renderHelper: ComponentRenderer) { return { - Component: pluggedComponent, + Component, // In order to replace the default component during runtime we can provide a RenderFn to create a new 'plugged' component render: (createComponent: RenderFn) => { - return fetchAndRenderHelper( - createComponent, - defaultProps - ); + return renderHelper(createComponent, defaultProps); }, // In order to modify the parameters which are used to render the default component, we can use this method refresh: (swallowErrors: boolean, contentShorten: boolean) => { - return fetchAndRenderHelper( + return renderHelper( (value: any) => valueToText(type, value, swallowErrors, contentShorten), defaultProps ); diff --git a/packages/app-storage/src/Selection/Modules.tsx b/packages/app-storage/src/Selection/Modules.tsx index fbefdfa5e4..63fcf7cf90 100644 --- a/packages/app-storage/src/Selection/Modules.tsx +++ b/packages/app-storage/src/Selection/Modules.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -6,16 +6,17 @@ import { TypeDef, getTypeDef } from '@polkadot/types/codec'; import { StorageFunction } from '@polkadot/types/StorageKey'; import { I18nProps } from '@polkadot/ui-app/types'; import { RawParams } from '@polkadot/ui-app/Params/types'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import { PartialModuleQuery } from '../types'; import React from 'react'; -import Api from '@polkadot/api-observable'; import { Button, InputStorage, Labelled, Params } from '@polkadot/ui-app/index'; +import { withApi, withMulti } from '@polkadot/ui-react-rx/with'; import { isUndefined } from '@polkadot/util'; import translate from '../translate'; -type Props = I18nProps & { +type Props = ApiProps & I18nProps & { onAdd: (query: PartialModuleQuery) => void }; @@ -33,7 +34,9 @@ class Modules extends React.PureComponent { constructor (props: Props) { super(props); - this.defaultValue = Api.storage.timestamp.now; + const { apiPromise } = this.props; + + this.defaultValue = apiPromise.query.timestamp.now; this.state = { isValid: true, key: this.defaultValue, @@ -124,4 +127,8 @@ class Modules extends React.PureComponent { } } -export default translate(Modules); +export default withMulti( + Modules, + translate, + withApi +); diff --git a/packages/app-storage/src/Selection/Raw.tsx b/packages/app-storage/src/Selection/Raw.tsx index b4beda5512..b4d01ccbbb 100644 --- a/packages/app-storage/src/Selection/Raw.tsx +++ b/packages/app-storage/src/Selection/Raw.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-storage/src/Selection/index.tsx b/packages/app-storage/src/Selection/index.tsx index 2cbd8a6613..d95a808fb9 100644 --- a/packages/app-storage/src/Selection/index.tsx +++ b/packages/app-storage/src/Selection/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-storage/src/index.css b/packages/app-storage/src/index.css index e428cd6878..0cc84723ca 100644 --- a/packages/app-storage/src/index.css +++ b/packages/app-storage/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-storage authors & contributors +/* Copyright 2017-2019 @polkadot/app-storage authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-storage/src/index.tsx b/packages/app-storage/src/index.tsx index de2cc5a65e..52ee04b57f 100644 --- a/packages/app-storage/src/index.tsx +++ b/packages/app-storage/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-storage/src/translate.ts b/packages/app-storage/src/translate.ts index 8ee3535461..c960a8d53c 100644 --- a/packages/app-storage/src/translate.ts +++ b/packages/app-storage/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-storage/src/types.ts b/packages/app-storage/src/types.ts index 4c84c35ca2..2a9716e5f3 100644 --- a/packages/app-storage/src/types.ts +++ b/packages/app-storage/src/types.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-storage authors & contributors +// Copyright 2017-2019 @polkadot/app-storage authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-toolbox/package.json b/packages/app-toolbox/package.json index 54cb0ed8d5..016aa523cd 100644 --- a/packages/app-toolbox/package.json +++ b/packages/app-toolbox/package.json @@ -12,6 +12,6 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/ui-app": "^0.21.17", - "@polkadot/ui-keyring": "^0.24.18" + "@polkadot/ui-keyring": "^0.24.25" } } diff --git a/packages/app-toolbox/src/Hash.tsx b/packages/app-toolbox/src/Hash.tsx index 551d26a02d..7cb3bfb5b5 100644 --- a/packages/app-toolbox/src/Hash.tsx +++ b/packages/app-toolbox/src/Hash.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +// Copyright 2017-2019 @polkadot/app-toolbox authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-toolbox/src/Sign.tsx b/packages/app-toolbox/src/Sign.tsx index 74d3058c56..9c54e27436 100644 --- a/packages/app-toolbox/src/Sign.tsx +++ b/packages/app-toolbox/src/Sign.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +// Copyright 2017-2019 @polkadot/app-toolbox authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-toolbox/src/Unlock.tsx b/packages/app-toolbox/src/Unlock.tsx index 1cfe9b8658..6230cbecf2 100644 --- a/packages/app-toolbox/src/Unlock.tsx +++ b/packages/app-toolbox/src/Unlock.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +// Copyright 2017-2019 @polkadot/app-toolbox authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-toolbox/src/Verify.tsx b/packages/app-toolbox/src/Verify.tsx index 71e19908ba..7d25cda717 100644 --- a/packages/app-toolbox/src/Verify.tsx +++ b/packages/app-toolbox/src/Verify.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +// Copyright 2017-2019 @polkadot/app-toolbox authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-toolbox/src/index.css b/packages/app-toolbox/src/index.css index e2ac17be80..9e4b142516 100644 --- a/packages/app-toolbox/src/index.css +++ b/packages/app-toolbox/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +/* Copyright 2017-2019 @polkadot/app-toolbox authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-toolbox/src/index.tsx b/packages/app-toolbox/src/index.tsx index 8ee175aa1c..786356bf2f 100644 --- a/packages/app-toolbox/src/index.tsx +++ b/packages/app-toolbox/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +// Copyright 2017-2019 @polkadot/app-toolbox authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-toolbox/src/translate.ts b/packages/app-toolbox/src/translate.ts index 638c09e0dd..57167cfa19 100644 --- a/packages/app-toolbox/src/translate.ts +++ b/packages/app-toolbox/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +// Copyright 2017-2019 @polkadot/app-toolbox authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-transfer/package.json b/packages/app-transfer/package.json index 0d6eee46f8..4758079487 100644 --- a/packages/app-transfer/package.json +++ b/packages/app-transfer/package.json @@ -12,7 +12,7 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/ui-app": "^0.21.17", - "@polkadot/ui-keyring": "^0.24.18", + "@polkadot/ui-keyring": "^0.24.25", "@polkadot/ui-react-rx": "^0.21.17" } } diff --git a/packages/app-transfer/src/Fees.tsx b/packages/app-transfer/src/Fees.tsx index 54b2777d8a..fcf31817a6 100644 --- a/packages/app-transfer/src/Fees.tsx +++ b/packages/app-transfer/src/Fees.tsx @@ -1,16 +1,16 @@ -// Copyright 2017-2018 @polkadot/app-transfer authors & contributors +// Copyright 2017-2019 @polkadot/app-transfer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; -import { RxBalance, RxFees } from '@polkadot/api-observable/types'; +import { DerivedBalancesFees, DerivedBalances } from '@polkadot/ui-react-rx/derive/types'; import { Fees } from './types'; import BN from 'bn.js'; import React from 'react'; import { Balance, Extrinsic } from '@polkadot/types'; import { Static } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import { balanceFormat } from '@polkadot/ui-react-rx/util/index'; import translate from './translate'; @@ -20,10 +20,10 @@ type State = Fees; type Props = I18nProps & { accountId?: string | null, amount: BN, - balanceFrom?: RxBalance, - balanceTo?: RxBalance, + balanceFrom?: DerivedBalances, + balanceTo?: DerivedBalances, extrinsic: Extrinsic | null, - fees?: RxFees, + fees?: DerivedBalancesFees, recipientId?: string | null, onChange: (fees: Fees) => void }; @@ -32,15 +32,15 @@ const ZERO_BALANCE = { freeBalance: new Balance(0), reservedBalance: new Balance(0), votingBalance: new Balance(0) -} as RxBalance; +} as DerivedBalances; const ZERO_FEES = { - baseFee: new Balance(0), - byteFee: new Balance(0), - creationFee: new Balance(0), - existentialDeposit: new Balance(0), - transferFee: new Balance(0) -} as RxFees; + transactionBaseFee: new BN(0), + transactionByteFee: new BN(0), + creationFee: new BN(0), + existentialDeposit: new BN(0), + transferFee: new BN(0) +} as DerivedBalancesFees; const LENGTH_PUBLICKEY = 32 + 1; // publicKey + prefix const LENGTH_SIGNATURE = 64; @@ -79,9 +79,9 @@ class FeeDisplay extends React.PureComponent { : 0 ); - let txfees = fees.baseFee + let txfees = fees.transactionBaseFee .add(fees.transferFee) - .add(fees.byteFee.muln(txLength)); + .add(fees.transactionByteFee.muln(txLength)); if (balanceTo.votingBalance.isZero()) { txfees = txfees.add(fees.creationFee); @@ -194,6 +194,6 @@ class FeeDisplay extends React.PureComponent { export default withMulti( FeeDisplay, translate, - withObservable('votingBalance', { paramProp: 'accountId', propName: 'balanceFrom' }), - withObservable('votingBalance', { paramProp: 'recipientId', propName: 'balanceTo' }) + withCall('derive.balances.votingBalance', { paramProp: 'accountId', propName: 'balanceFrom' }), + withCall('derive.balances.votingBalance', { paramProp: 'recipientId', propName: 'balanceTo' }) ); diff --git a/packages/app-transfer/src/Submit.tsx b/packages/app-transfer/src/Submit.tsx index 3677fbc374..6bffe40109 100644 --- a/packages/app-transfer/src/Submit.tsx +++ b/packages/app-transfer/src/Submit.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-transfer authors & contributors +// Copyright 2017-2019 @polkadot/app-transfer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -6,17 +6,18 @@ import { I18nProps } from '@polkadot/ui-app/types'; import { QueueTx$Extrinsic, QueueTx$ExtrinsicAdd } from '@polkadot/ui-app/Status/types'; import React from 'react'; -import { Extrinsic, Index } from '@polkadot/types'; +import SubmittableExtrinsic from '@polkadot/api/promise/SubmittableExtrinsic'; +import { Index } from '@polkadot/types'; import Button from '@polkadot/ui-app/Button'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import translate from './translate'; type Props = I18nProps & { isDisabled: boolean, accountId?: string, - accountNonce?: Index, - extrinsic: Extrinsic | null, + query_system_accountNonce?: Index, + extrinsic: SubmittableExtrinsic | null, queueExtrinsic: QueueTx$ExtrinsicAdd }; @@ -39,7 +40,7 @@ class Submit extends React.PureComponent { } private onMakeTransfer = () => { - const { accountId, accountNonce, extrinsic, queueExtrinsic } = this.props; + const { accountId, query_system_accountNonce, extrinsic, queueExtrinsic } = this.props; if (!extrinsic) { return; @@ -48,7 +49,7 @@ class Submit extends React.PureComponent { queueExtrinsic({ extrinsic, accountId, - accountNonce: accountNonce || new Index(0) + accountNonce: query_system_accountNonce } as QueueTx$Extrinsic); } } @@ -56,5 +57,5 @@ class Submit extends React.PureComponent { export default withMulti( Submit, translate, - withObservable('accountNonce', { paramProp: 'accountId' }) + withCall('query.system.accountNonce', { paramProp: 'accountId' }) ); diff --git a/packages/app-transfer/src/Transfer.tsx b/packages/app-transfer/src/Transfer.tsx index c915c5767d..c3fbe7b2b8 100644 --- a/packages/app-transfer/src/Transfer.tsx +++ b/packages/app-transfer/src/Transfer.tsx @@ -1,28 +1,28 @@ -// Copyright 2017-2018 @polkadot/app-transfer authors & contributors +// Copyright 2017-2019 @polkadot/app-transfer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { BitLength, I18nProps } from '@polkadot/ui-app/types'; -import { RxFees } from '@polkadot/api-observable/types'; import { QueueProps } from '@polkadot/ui-app/Status/types'; +import { DerivedBalancesFees } from '@polkadot/ui-react-rx/derive/types'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import { Fees } from './types'; import BN from 'bn.js'; import React from 'react'; -import Api from '@polkadot/api-observable'; import { decodeAddress } from '@polkadot/keyring'; import { Extrinsic } from '@polkadot/types'; import { BitLengthOption } from '@polkadot/ui-app/constants'; import { AddressSummary, InputAddress, InputNumber } from '@polkadot/ui-app/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import { QueueConsumer } from '@polkadot/ui-app/Status/Context'; import FeeDisplay from './Fees'; import Submit from './Submit'; import translate from './translate'; -type Props = I18nProps & { - fees: RxFees +type Props = I18nProps & ApiProps & { + derive_balances_fees?: DerivedBalancesFees }; type State = { @@ -56,7 +56,7 @@ class Transfer extends React.PureComponent { } render () { - const { fees, t } = this.props; + const { derive_balances_fees, t } = this.props; const { accountId, amount, extrinsic, recipientId, txfees: { hasAvailable } } = this.state; return ( @@ -98,7 +98,7 @@ class Transfer extends React.PureComponent { className='medium' accountId={accountId} amount={amount} - fees={fees} + fees={derive_balances_fees} recipientId={recipientId} onChange={this.onChangeFees} /> @@ -142,9 +142,10 @@ class Transfer extends React.PureComponent { private nextState (newState: Partial): void { this.setState((prevState: State): State => { + const { apiPromise } = this.props; const { accountId = prevState.accountId, amount = prevState.amount, recipientId = prevState.recipientId, txfees = prevState.txfees } = newState; const extrinsic = accountId && recipientId - ? new Extrinsic({ method: Api.extrinsics.balances.transfer(recipientId, amount) }) + ? apiPromise.tx.balances.transfer(recipientId, amount) : null; return { @@ -177,5 +178,5 @@ class Transfer extends React.PureComponent { export default withMulti( Transfer, translate, - withObservable('fees', { propName: 'fees' }) + withCall('derive.balances.fees') ); diff --git a/packages/app-transfer/src/index.css b/packages/app-transfer/src/index.css index f03608c1fe..157e921f4a 100644 --- a/packages/app-transfer/src/index.css +++ b/packages/app-transfer/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-transfer authors & contributors +/* Copyright 2017-2019 @polkadot/app-transfer authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-transfer/src/index.tsx b/packages/app-transfer/src/index.tsx index 2b73194858..4396069f11 100644 --- a/packages/app-transfer/src/index.tsx +++ b/packages/app-transfer/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-transfer authors & contributors +// Copyright 2017-2019 @polkadot/app-transfer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -8,7 +8,7 @@ import { SubjectInfo } from '@polkadot/ui-keyring/observable/types'; import React from 'react'; import { Trans } from 'react-i18next'; import accountObservable from '@polkadot/ui-keyring/observable/accounts'; -import { withMulti, withObservableBase } from '@polkadot/ui-react-rx/with/index'; +import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; import './index.css'; @@ -53,5 +53,5 @@ class App extends React.PureComponent { export default withMulti( App, translate, - withObservableBase(accountObservable.subject, { propName: 'allAccounts' }) + withObservable(accountObservable.subject, { propName: 'allAccounts' }) ); diff --git a/packages/app-transfer/src/translate.ts b/packages/app-transfer/src/translate.ts index 5a78cad433..8298de9103 100644 --- a/packages/app-transfer/src/translate.ts +++ b/packages/app-transfer/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-transfer authors & contributors +// Copyright 2017-2019 @polkadot/app-transfer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-transfer/src/types.ts b/packages/app-transfer/src/types.ts index ebcfb84f24..c5fd55437d 100644 --- a/packages/app-transfer/src/types.ts +++ b/packages/app-transfer/src/types.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-toolbox authors & contributors +// Copyright 2017-2019 @polkadot/app-toolbox authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/package.json b/packages/app-vanitygen/package.json index f469c91e97..a4ad2d3942 100644 --- a/packages/app-vanitygen/package.json +++ b/packages/app-vanitygen/package.json @@ -12,7 +12,7 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/ui-app": "^0.21.17", - "@types/yargs": "^12.0.2", + "@types/yargs": "^12.0.5", "babel-plugin-module-resolver": "^3.1.1", "libsodium-wrappers": "^0.7.3", "yargs": "^12.0.5" diff --git a/packages/app-vanitygen/scripts/vanitygen.js b/packages/app-vanitygen/scripts/vanitygen.js index 9c069f9887..d819c572a3 100755 --- a/packages/app-vanitygen/scripts/vanitygen.js +++ b/packages/app-vanitygen/scripts/vanitygen.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -// Copyright 2017-2018 @polkadot/client authors & contributors +// Copyright 2017-2019 @polkadot/client authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/Match.tsx b/packages/app-vanitygen/src/Match.tsx index 4c688dfc80..e484949251 100644 --- a/packages/app-vanitygen/src/Match.tsx +++ b/packages/app-vanitygen/src/Match.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/calculate.ts b/packages/app-vanitygen/src/generator/calculate.ts index fe33f9a0a2..e8c8091cc7 100644 --- a/packages/app-vanitygen/src/generator/calculate.ts +++ b/packages/app-vanitygen/src/generator/calculate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/cli.ts b/packages/app-vanitygen/src/generator/cli.ts index bc3ab01e87..0e409f4f3d 100644 --- a/packages/app-vanitygen/src/generator/cli.ts +++ b/packages/app-vanitygen/src/generator/cli.ts @@ -1,5 +1,5 @@ #!/usr/bin/env node -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/generate.ts b/packages/app-vanitygen/src/generator/generate.ts index 3e81145d3a..99dff9bf8e 100644 --- a/packages/app-vanitygen/src/generator/generate.ts +++ b/packages/app-vanitygen/src/generator/generate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/index.ts b/packages/app-vanitygen/src/generator/index.ts index 532670a2cf..0b9163ee08 100644 --- a/packages/app-vanitygen/src/generator/index.ts +++ b/packages/app-vanitygen/src/generator/index.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/regex.ts b/packages/app-vanitygen/src/generator/regex.ts index 17f1a8a01b..061b5a1b51 100644 --- a/packages/app-vanitygen/src/generator/regex.ts +++ b/packages/app-vanitygen/src/generator/regex.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/sodium.ts b/packages/app-vanitygen/src/generator/sodium.ts index 23e385d92b..788e4eea93 100644 --- a/packages/app-vanitygen/src/generator/sodium.ts +++ b/packages/app-vanitygen/src/generator/sodium.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/sodiumKeygen.ts b/packages/app-vanitygen/src/generator/sodiumKeygen.ts index 4b99a4f1ec..e06001fa85 100644 --- a/packages/app-vanitygen/src/generator/sodiumKeygen.ts +++ b/packages/app-vanitygen/src/generator/sodiumKeygen.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/sort.ts b/packages/app-vanitygen/src/generator/sort.ts index 21081c1388..9ce7ae114d 100644 --- a/packages/app-vanitygen/src/generator/sort.ts +++ b/packages/app-vanitygen/src/generator/sort.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/generator/types.d.ts b/packages/app-vanitygen/src/generator/types.d.ts index fbcf1a1d48..9214ab7ed9 100644 --- a/packages/app-vanitygen/src/generator/types.d.ts +++ b/packages/app-vanitygen/src/generator/types.d.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/index.css b/packages/app-vanitygen/src/index.css index 00bc0a3a4e..2fa226e280 100644 --- a/packages/app-vanitygen/src/index.css +++ b/packages/app-vanitygen/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +/* Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/app-vanitygen/src/index.tsx b/packages/app-vanitygen/src/index.tsx index 619950a213..dbf2780573 100644 --- a/packages/app-vanitygen/src/index.tsx +++ b/packages/app-vanitygen/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/app-vanitygen/src/translate.ts b/packages/app-vanitygen/src/translate.ts index 07c85761ec..9a5dec82ef 100644 --- a/packages/app-vanitygen/src/translate.ts +++ b/packages/app-vanitygen/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-vanitygen authors & contributors +// Copyright 2017-2019 @polkadot/app-vanitygen authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/package.json b/packages/apps/package.json index 01a5e4ee15..07f21a2380 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -26,7 +26,7 @@ "@polkadot/app-transfer": "^0.21.17", "@polkadot/app-vanitygen": "^0.21.17", "@polkadot/ui-app": "^0.21.17", - "@polkadot/ui-assets": "^0.24.18", + "@polkadot/ui-assets": "^0.24.25", "@polkadot/ui-signer": "^0.21.17" } } diff --git a/packages/apps/src/Connecting/Connecting.css b/packages/apps/src/Connecting/Connecting.css index 0a936eb11e..06407d07d2 100644 --- a/packages/apps/src/Connecting/Connecting.css +++ b/packages/apps/src/Connecting/Connecting.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/apps authors & contributors +/* Copyright 2017-2019 @polkadot/apps authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/apps/src/Connecting/index.tsx b/packages/apps/src/Connecting/index.tsx index 5cac1ab1bc..643c84ea73 100644 --- a/packages/apps/src/Connecting/index.tsx +++ b/packages/apps/src/Connecting/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/Content/Content.css b/packages/apps/src/Content/Content.css index 6b90934831..e3b7cee2c4 100644 --- a/packages/apps/src/Content/Content.css +++ b/packages/apps/src/Content/Content.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/apps authors & contributors +/* Copyright 2017-2019 @polkadot/apps authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/apps/src/Content/NotFound.tsx b/packages/apps/src/Content/NotFound.tsx index 46c2ef4775..cb3931be55 100644 --- a/packages/apps/src/Content/NotFound.tsx +++ b/packages/apps/src/Content/NotFound.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/Content/index.tsx b/packages/apps/src/Content/index.tsx index 26a94a7e8d..4b3ece5b22 100644 --- a/packages/apps/src/Content/index.tsx +++ b/packages/apps/src/Content/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/NodeInfo.tsx b/packages/apps/src/NodeInfo.tsx index a8eed97ad0..451b2a12fb 100644 --- a/packages/apps/src/NodeInfo.tsx +++ b/packages/apps/src/NodeInfo.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -6,18 +6,14 @@ import { BareProps } from '@polkadot/ui-app/types'; import React from 'react'; -import { AccountId } from '@polkadot/types'; import { BestNumber, Chain, NodeName, NodeVersion } from '@polkadot/ui-react-rx/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; -type Props = BareProps & { - sessionValidators?: Array -}; +type Props = BareProps & {}; const pkgJson = require('../package.json'); const [major, minor, patch] = pkgJson.version.split('.'); -class NodeInfo extends React.PureComponent { +export default class NodeInfo extends React.PureComponent { render () { return (
@@ -34,11 +30,3 @@ class NodeInfo extends React.PureComponent { ); } } - -// NOTE While these are not used internally to this specific component, we are loading them -// to have them warmed-up globally. This means when accessing in other components, the values -// are already there -export default withMulti( - NodeInfo, - withObservable('sessionValidators') -); diff --git a/packages/apps/src/SideBar/Item.tsx b/packages/apps/src/SideBar/Item.tsx index 146b4ecf98..8325484a08 100644 --- a/packages/apps/src/SideBar/Item.tsx +++ b/packages/apps/src/SideBar/Item.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -11,6 +11,7 @@ import { withRouter } from 'react-router'; import { NavLink } from 'react-router-dom'; import { Icon, Menu } from '@polkadot/ui-app/index'; import { withApi, withMulti } from '@polkadot/ui-react-rx/with/index'; +import { isFunction } from '@polkadot/util'; type Props = I18nProps & ApiProps & { route: Route @@ -18,9 +19,9 @@ type Props = I18nProps & ApiProps & { class Item extends React.PureComponent { render () { - const { isApiConnected, isApiReady, route: { isApiGated, i18n, icon, name }, t } = this.props; + const { route: { i18n, icon, name }, t } = this.props; - if (isApiGated && (!isApiReady || !isApiConnected)) { + if (!this.isApiAvailable()) { return null; } @@ -36,6 +37,32 @@ class Item extends React.PureComponent { ); } + + private isApiAvailable () { + const { apiPromise, isApiConnected, isApiReady, route: { isApiGated, name, needsApi } } = this.props; + + if (isApiGated && (!isApiReady || !isApiConnected)) { + return false; + } else if (!needsApi || !needsApi.length) { + return true; + } + + const notFound = needsApi.filter((endpoint) => { + const [area, section, method] = endpoint.split('.'); + + try { + return !isFunction((apiPromise as any)[area][section][method]); + } catch (error) { + return true; + } + }); + + if (notFound.length !== 0) { + console.error(`Disabling route ${name}, API ${notFound} not available`); + } + + return notFound.length === 0; + } } export default withMulti( diff --git a/packages/apps/src/SideBar/SideBar.css b/packages/apps/src/SideBar/SideBar.css index 5d9a4398cd..cdcb222af6 100644 --- a/packages/apps/src/SideBar/SideBar.css +++ b/packages/apps/src/SideBar/SideBar.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/apps authors & contributors +/* Copyright 2017-2019 @polkadot/apps authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/apps/src/SideBar/index.tsx b/packages/apps/src/SideBar/index.tsx index 8c50ab8883..b60a31406b 100644 --- a/packages/apps/src/SideBar/index.tsx +++ b/packages/apps/src/SideBar/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/SideBar/svg.d.ts b/packages/apps/src/SideBar/svg.d.ts index 5e2fbe2e26..43f1b4414f 100644 --- a/packages/apps/src/SideBar/svg.d.ts +++ b/packages/apps/src/SideBar/svg.d.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/Status.tsx b/packages/apps/src/Status.tsx index 9e1c084238..ae3eacf53a 100644 --- a/packages/apps/src/Status.tsx +++ b/packages/apps/src/Status.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -10,7 +10,7 @@ import React from 'react'; import keyringOption from '@polkadot/ui-keyring/options'; import { EventRecord } from '@polkadot/types'; import { Status as StatusDisplay } from '@polkadot/ui-app/index'; -import { withMulti, withObservable, withObservableBase } from '@polkadot/ui-react-rx/with'; +import { withCall, withMulti, withObservable } from '@polkadot/ui-react-rx/with'; import { stringToU8a } from '@polkadot/util'; import { xxhashAsHex } from '@polkadot/util-crypto'; @@ -20,15 +20,15 @@ type Props = I18nProps & { optionsAll?: KeyringOptions, queueAction: QueueAction$Add, stqueue: Array, - systemEvents?: Array, + query_system_events?: Array, txqueue: Array }; let prevEventHash: string; class Status extends React.PureComponent { - componentDidUpdate ({ optionsAll = { account: [] as any } as KeyringOptions, queueAction, systemEvents = [], t }: Props) { - const eventHash = xxhashAsHex(stringToU8a(JSON.stringify(systemEvents))); + componentDidUpdate ({ optionsAll = { account: [] as any } as KeyringOptions, queueAction, query_system_events, t }: Props) { + const eventHash = xxhashAsHex(stringToU8a(JSON.stringify(query_system_events || []))); if (eventHash === prevEventHash) { return; @@ -38,7 +38,7 @@ class Status extends React.PureComponent { const addresses = optionsAll.account.map((account) => account.value); - systemEvents.forEach(({ event: { data, method, section } }) => { + (query_system_events || []).forEach(({ event: { data, method, section } }) => { if (section === 'balances' && method === 'Transfer') { const recipient = data[1].toString(); @@ -71,6 +71,6 @@ class Status extends React.PureComponent { export default withMulti( Status, translate, - withObservable('systemEvents'), - withObservableBase(keyringOption.optionsSubject, { propName: 'optionsAll' }) + withCall('query.system.events'), + withObservable(keyringOption.optionsSubject, { propName: 'optionsAll' }) ); diff --git a/packages/apps/src/index.css b/packages/apps/src/index.css index 421cb755c7..fa0fd7ca88 100644 --- a/packages/apps/src/index.css +++ b/packages/apps/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/apps authors & contributors +/* Copyright 2017-2019 @polkadot/apps authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/apps/src/index.tsx b/packages/apps/src/index.tsx index 4be864b380..74016ee338 100644 --- a/packages/apps/src/index.tsx +++ b/packages/apps/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/accounts.ts b/packages/apps/src/routing/accounts.ts index acb43b0935..c20a0440d6 100644 --- a/packages/apps/src/routing/accounts.ts +++ b/packages/apps/src/routing/accounts.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/addresses.ts b/packages/apps/src/routing/addresses.ts index 788eabcd3b..02dd240ef5 100644 --- a/packages/apps/src/routing/addresses.ts +++ b/packages/apps/src/routing/addresses.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/democracy.ts b/packages/apps/src/routing/democracy.ts index 5b70eb4a18..203e25ca30 100644 --- a/packages/apps/src/routing/democracy.ts +++ b/packages/apps/src/routing/democracy.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -15,6 +15,9 @@ export default ([ icon: 'calendar check', isApiGated: true, isHidden: false, - name: 'democracy' + name: 'democracy', + needsApi: [ + 'query.democracy.nextTally' + ] } ] as Routes); diff --git a/packages/apps/src/routing/explorer.ts b/packages/apps/src/routing/explorer.ts index 6ffc6e5b2f..02e6c76de6 100644 --- a/packages/apps/src/routing/explorer.ts +++ b/packages/apps/src/routing/explorer.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/extrinsics.ts b/packages/apps/src/routing/extrinsics.ts index 95c1755c5b..eb432b51d1 100644 --- a/packages/apps/src/routing/extrinsics.ts +++ b/packages/apps/src/routing/extrinsics.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/index.ts b/packages/apps/src/routing/index.ts index ab2f53215b..e62d0cf331 100644 --- a/packages/apps/src/routing/index.ts +++ b/packages/apps/src/routing/index.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/rpc.ts b/packages/apps/src/routing/rpc.ts index 7222f8d4ad..acdaa89fe0 100644 --- a/packages/apps/src/routing/rpc.ts +++ b/packages/apps/src/routing/rpc.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/settings.ts b/packages/apps/src/routing/settings.ts index 1d50cdaf38..eca9f1c762 100644 --- a/packages/apps/src/routing/settings.ts +++ b/packages/apps/src/routing/settings.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/staking.ts b/packages/apps/src/routing/staking.ts index 145a8ce824..c5e4793071 100644 --- a/packages/apps/src/routing/staking.ts +++ b/packages/apps/src/routing/staking.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -15,6 +15,9 @@ export default ([ icon: 'certificate', isApiGated: true, isHidden: false, - name: 'staking' + name: 'staking', + needsApi: [ + 'tx.staking.stake' + ] } ] as Routes); diff --git a/packages/apps/src/routing/storage.ts b/packages/apps/src/routing/storage.ts index 3586925677..59b8123909 100644 --- a/packages/apps/src/routing/storage.ts +++ b/packages/apps/src/routing/storage.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/toolbox.ts b/packages/apps/src/routing/toolbox.ts index 4af9585382..d3018a7ca9 100644 --- a/packages/apps/src/routing/toolbox.ts +++ b/packages/apps/src/routing/toolbox.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/routing/transfer.ts b/packages/apps/src/routing/transfer.ts index 66f678a48b..46b39483a4 100644 --- a/packages/apps/src/routing/transfer.ts +++ b/packages/apps/src/routing/transfer.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -15,6 +15,9 @@ export default ([ icon: 'angle double right', isApiGated: true, isHidden: false, - name: 'transfer' + name: 'transfer', + needsApi: [ + 'tx.balances.transfer' + ] } ] as Routes); diff --git a/packages/apps/src/routing/vanitygen.ts b/packages/apps/src/routing/vanitygen.ts index c285a1c329..d40c64e8a7 100644 --- a/packages/apps/src/routing/vanitygen.ts +++ b/packages/apps/src/routing/vanitygen.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/translate.ts b/packages/apps/src/translate.ts index 32a5b64524..a90066e7ba 100644 --- a/packages/apps/src/translate.ts +++ b/packages/apps/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/apps/src/types.ts b/packages/apps/src/types.ts index 3335e937a8..7a4f1a37a8 100644 --- a/packages/apps/src/types.ts +++ b/packages/apps/src/types.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -17,7 +17,8 @@ export type Route = { icon: SemanticICONS, isApiGated: boolean, isHidden: boolean, - name: string + name: string, + needsApi?: Array }; export type Routes = Array; diff --git a/packages/apps/webpack.config.js b/packages/apps/webpack.config.js index af490a4c68..fb48c260a5 100644 --- a/packages/apps/webpack.config.js +++ b/packages/apps/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors +// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/package.json b/packages/ui-app/package.json index d02625f872..b66abde2dc 100644 --- a/packages/ui-app/package.json +++ b/packages/ui-app/package.json @@ -11,11 +11,11 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.2.0", - "@polkadot/types": "^0.35.19", - "@polkadot/ui-identicon": "^0.24.18", - "@polkadot/ui-keyring": "^0.24.18", + "@polkadot/types": "^0.37.6", + "@polkadot/ui-identicon": "^0.24.25", + "@polkadot/ui-keyring": "^0.24.25", "@polkadot/ui-react-rx": "^0.21.17", - "@polkadot/ui-settings": "^0.24.18", + "@polkadot/ui-settings": "^0.24.25", "@types/chart.js": "^2.7.42", "@types/i18next": "^12.1.0", "@types/i18next-browser-languagedetector": "^2.0.1", diff --git a/packages/ui-app/src/AddressMini.tsx b/packages/ui-app/src/AddressMini.tsx index 1db28e3b99..2c2e1b2a17 100644 --- a/packages/ui-app/src/AddressMini.tsx +++ b/packages/ui-app/src/AddressMini.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/app-staking authors & contributors +// Copyright 2017-2019 @polkadot/app-staking authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -7,7 +7,7 @@ import { BareProps } from './types'; import BN from 'bn.js'; import React from 'react'; import { AccountId, AccountIndex, Address, Balance } from '@polkadot/types'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import classes from './util/classes'; import toShortAddress from './util/toShortAddress'; @@ -19,21 +19,21 @@ type Props = BareProps & { children?: React.ReactNode, isPadded?: boolean, isShort?: boolean, - sessionValidators?: Array, + query_session_validators?: Array, value?: AccountId | AccountIndex | Address | string, withBalance?: boolean }; class AddressMini extends React.PureComponent { render () { - const { children, className, isPadded = true, isShort = true, sessionValidators = [], style, value } = this.props; + const { children, className, isPadded = true, isShort = true, query_session_validators, style, value } = this.props; if (!value) { return null; } const address = value.toString(); - const isValidator = sessionValidators.find((validator) => + const isValidator = (query_session_validators || []).find((validator) => validator.toString() === address ); @@ -75,5 +75,5 @@ class AddressMini extends React.PureComponent { export default withMulti( AddressMini, - withObservable('sessionValidators') + withCall('query.session.validators') ); diff --git a/packages/ui-app/src/AddressRow.tsx b/packages/ui-app/src/AddressRow.tsx index 6ccbfd2249..4a768e69e5 100644 --- a/packages/ui-app/src/AddressRow.tsx +++ b/packages/ui-app/src/AddressRow.tsx @@ -1,9 +1,9 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import React from 'react'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import classes from './util/classes'; import { AddressSummary } from './AddressSummary'; @@ -35,6 +35,6 @@ class AddressRow extends AddressSummary { export default withMulti( AddressRow, translate, - withObservable('accountIdAndIndex', { paramProp: 'value' }), - withObservable('sessionValidators') + withCall('derive.balances.accountIdAndIndex', { paramProp: 'value' }), + withCall('query.session.validators') ); diff --git a/packages/ui-app/src/AddressSummary.tsx b/packages/ui-app/src/AddressSummary.tsx index 16a1c27183..e377675511 100644 --- a/packages/ui-app/src/AddressSummary.tsx +++ b/packages/ui-app/src/AddressSummary.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -7,7 +7,7 @@ import { I18nProps } from './types'; import React from 'react'; import { AccountId, AccountIndex, Address, Balance } from '@polkadot/types'; import { Nonce } from '@polkadot/ui-react-rx/index'; -import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; +import { withCall, withMulti } from '@polkadot/ui-react-rx/with/index'; import classes from './util/classes'; import toShortAddress from './util/toShortAddress'; @@ -16,7 +16,7 @@ import IdentityIcon from './IdentityIcon'; import translate from './translate'; export type Props = I18nProps & { - accountIdAndIndex?: [AccountId | undefined, AccountIndex | undefined], + derive_balances_accountIdAndIndex?: [AccountId | undefined, AccountIndex | undefined], balance?: Balance | Array, children?: React.ReactNode, name?: string, @@ -25,7 +25,7 @@ export type Props = I18nProps & { withIndex?: boolean, identIconSize?: number, isShort?: boolean, - sessionValidators?: Array, + query_session_validators?: Array, withCopy?: boolean, withIcon?: boolean, withNonce?: boolean @@ -35,8 +35,8 @@ const DEFAULT_ADDR = '5'.padEnd(16, 'x'); class AddressSummary extends React.PureComponent { render () { - const { accountIdAndIndex = [], className, style } = this.props; - const [accountId, accountIndex] = accountIdAndIndex; + const { derive_balances_accountIdAndIndex = [], className, style } = this.props; + const [accountId, accountIndex] = derive_balances_accountIdAndIndex; const isValid = accountId || accountIndex; return ( @@ -83,8 +83,8 @@ class AddressSummary extends React.PureComponent { } protected renderAccountId () { - const { accountIdAndIndex = [], name, isShort = true } = this.props; - const [accountId, accountIndex] = accountIdAndIndex; + const { derive_balances_accountIdAndIndex = [], name, isShort = true } = this.props; + const [accountId, accountIndex] = derive_balances_accountIdAndIndex; if (!accountId && accountIndex) { return null; @@ -112,8 +112,8 @@ class AddressSummary extends React.PureComponent { } protected renderAccountIndex () { - const { accountIdAndIndex = [] } = this.props; - const [, accountIndex] = accountIdAndIndex; + const { derive_balances_accountIdAndIndex = [] } = this.props; + const [, accountIndex] = derive_balances_accountIdAndIndex; if (!accountIndex) { return null; @@ -165,15 +165,15 @@ class AddressSummary extends React.PureComponent { } protected renderIcon (className: string = 'ui--AddressSummary-icon', size?: number) { - const { accountIdAndIndex = [], identIconSize = 96, sessionValidators = [], value, withIcon = true } = this.props; + const { derive_balances_accountIdAndIndex = [], identIconSize = 96, query_session_validators, value, withIcon = true } = this.props; if (!withIcon) { return null; } - const [_accountId] = accountIdAndIndex; + const [_accountId] = derive_balances_accountIdAndIndex; const accountId = (_accountId || '').toString(); - const isValidator = sessionValidators.find((validator) => + const isValidator = (query_session_validators || []).find((validator) => validator.toString() === accountId ); @@ -188,8 +188,8 @@ class AddressSummary extends React.PureComponent { } protected renderNonce () { - const { accountIdAndIndex = [], t, withNonce = true } = this.props; - const [accountId] = accountIdAndIndex; + const { derive_balances_accountIdAndIndex = [], t, withNonce = true } = this.props; + const [accountId] = derive_balances_accountIdAndIndex; if (!withNonce || !accountId) { return null; @@ -230,6 +230,6 @@ export { export default withMulti( AddressSummary, translate, - withObservable('accountIdAndIndex', { paramProp: 'value' }), - withObservable('sessionValidators') + withCall('derive.balances.accountIdAndIndex', { paramProp: 'value' }), + withCall('query.session.validators') ); diff --git a/packages/ui-app/src/Balance.tsx b/packages/ui-app/src/Balance.tsx index bd29cdcff3..110c97afa5 100644 --- a/packages/ui-app/src/Balance.tsx +++ b/packages/ui-app/src/Balance.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Button/Button.css b/packages/ui-app/src/Button/Button.css index 7d811f9187..9f99c3dd49 100644 --- a/packages/ui-app/src/Button/Button.css +++ b/packages/ui-app/src/Button/Button.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/ui-app authors & contributors +/* Copyright 2017-2019 @polkadot/ui-app authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/ui-app/src/Button/Button.tsx b/packages/ui-app/src/Button/Button.tsx index 6900c23f42..b227578bf0 100644 --- a/packages/ui-app/src/Button/Button.tsx +++ b/packages/ui-app/src/Button/Button.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Button/Divider.tsx b/packages/ui-app/src/Button/Divider.tsx index 7427e59bce..24d6547aef 100644 --- a/packages/ui-app/src/Button/Divider.tsx +++ b/packages/ui-app/src/Button/Divider.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Button/Group.tsx b/packages/ui-app/src/Button/Group.tsx index d358ce0144..69ac8844d3 100644 --- a/packages/ui-app/src/Button/Group.tsx +++ b/packages/ui-app/src/Button/Group.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Button/Or.tsx b/packages/ui-app/src/Button/Or.tsx index e85b9cf557..29766445f0 100644 --- a/packages/ui-app/src/Button/Or.tsx +++ b/packages/ui-app/src/Button/Or.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Button/index.tsx b/packages/ui-app/src/Button/index.tsx index c2456e43dd..53692b9bd0 100644 --- a/packages/ui-app/src/Button/index.tsx +++ b/packages/ui-app/src/Button/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Button/types.ts b/packages/ui-app/src/Button/types.ts index 1dfde1391d..af15af7916 100644 --- a/packages/ui-app/src/Button/types.ts +++ b/packages/ui-app/src/Button/types.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Call.tsx b/packages/ui-app/src/Call.tsx index 754cb9250f..3d248f9531 100644 --- a/packages/ui-app/src/Call.tsx +++ b/packages/ui-app/src/Call.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/CardSummary.tsx b/packages/ui-app/src/CardSummary.tsx index d2ddd41a9d..a22cb0354c 100644 --- a/packages/ui-app/src/CardSummary.tsx +++ b/packages/ui-app/src/CardSummary.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Chart/Doughnut.tsx b/packages/ui-app/src/Chart/Doughnut.tsx index a118308444..709a0d4822 100644 --- a/packages/ui-app/src/Chart/Doughnut.tsx +++ b/packages/ui-app/src/Chart/Doughnut.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Chart/index.ts b/packages/ui-app/src/Chart/index.ts index a14e118d1a..89db6c7358 100644 --- a/packages/ui-app/src/Chart/index.ts +++ b/packages/ui-app/src/Chart/index.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/CopyButton.tsx b/packages/ui-app/src/CopyButton.tsx index 530c154838..2d3ced6582 100644 --- a/packages/ui-app/src/CopyButton.tsx +++ b/packages/ui-app/src/CopyButton.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Dropdown.tsx b/packages/ui-app/src/Dropdown.tsx index 746d90a52b..5e03499526 100644 --- a/packages/ui-app/src/Dropdown.tsx +++ b/packages/ui-app/src/Dropdown.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Event.tsx b/packages/ui-app/src/Event.tsx index c8b7899e5d..9ff71e875c 100644 --- a/packages/ui-app/src/Event.tsx +++ b/packages/ui-app/src/Event.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Icon.tsx b/packages/ui-app/src/Icon.tsx index e225f67d79..418d6f4d47 100644 --- a/packages/ui-app/src/Icon.tsx +++ b/packages/ui-app/src/Icon.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/IdentityIcon.tsx b/packages/ui-app/src/IdentityIcon.tsx index b3c3e6754d..e3a3910fcb 100644 --- a/packages/ui-app/src/IdentityIcon.tsx +++ b/packages/ui-app/src/IdentityIcon.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Input.tsx b/packages/ui-app/src/Input.tsx index c105b701d3..c649c0e280 100644 --- a/packages/ui-app/src/Input.tsx +++ b/packages/ui-app/src/Input.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputAddress/InputAddress.css b/packages/ui-app/src/InputAddress/InputAddress.css index e612236ab0..624626df21 100644 --- a/packages/ui-app/src/InputAddress/InputAddress.css +++ b/packages/ui-app/src/InputAddress/InputAddress.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/ui-app authors & contributors +/* Copyright 2017-2019 @polkadot/ui-app authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/ui-app/src/InputAddress/index.tsx b/packages/ui-app/src/InputAddress/index.tsx index c596563ab2..dda7e82f25 100644 --- a/packages/ui-app/src/InputAddress/index.tsx +++ b/packages/ui-app/src/InputAddress/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -12,7 +12,7 @@ import store from 'store'; import keyring from '@polkadot/ui-keyring'; import keyringOption from '@polkadot/ui-keyring/options'; import makeOption from '@polkadot/ui-keyring/options/item'; -import { withMulti, withObservableBase } from '@polkadot/ui-react-rx/with/index'; +import { withMulti, withObservable } from '@polkadot/ui-react-rx/with/index'; import Dropdown from '../Dropdown'; import classes from '../util/classes'; @@ -218,5 +218,5 @@ export { InputAddress }; export default withMulti( InputAddress, - withObservableBase(keyringOption.optionsSubject, { propName: 'optionsAll' }) + withObservable(keyringOption.optionsSubject, { propName: 'optionsAll' }) ); diff --git a/packages/ui-app/src/InputError.tsx b/packages/ui-app/src/InputError.tsx index 85dc22fd8d..8860db5642 100644 --- a/packages/ui-app/src/InputError.tsx +++ b/packages/ui-app/src/InputError.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputExtrinsic/InputExtrinsic.css b/packages/ui-app/src/InputExtrinsic/InputExtrinsic.css index edc3ab18ad..b7cd2810f1 100644 --- a/packages/ui-app/src/InputExtrinsic/InputExtrinsic.css +++ b/packages/ui-app/src/InputExtrinsic/InputExtrinsic.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/ui-app authors & contributors +/* Copyright 2017-2019 @polkadot/ui-app authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx b/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx index 4732cecae8..831f78deb0 100644 --- a/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx +++ b/packages/ui-app/src/InputExtrinsic/SelectMethod.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -7,13 +7,14 @@ import { I18nProps } from '../types'; import { DropdownOptions } from '../util/types'; import React from 'react'; -import Api from '@polkadot/api-observable'; +import ApiPromise from '@polkadot/api/promise'; import Dropdown from '../Dropdown'; import classes from '../util/classes'; import translate from '../translate'; type Props = I18nProps & { + apiPromise: ApiPromise, isError?: boolean, label?: string, onChange: (value: MethodFunction) => void, @@ -24,14 +25,14 @@ type Props = I18nProps & { class SelectMethod extends React.PureComponent { render () { - const { className, isError, label = '', onChange, options, style, t, value, withLabel } = this.props; + const { apiPromise, className, isError, label = '', onChange, options, style, t, value, withLabel } = this.props; if (!options.length) { return null; } const transform = (method: string): MethodFunction => - Api.extrinsics[value.section][method]; + apiPromise.tx[value.section][method]; return ( { } as State; } - static getDerivedStateFromProps (props: Props, { value }: State): State | null { + static getDerivedStateFromProps ({ apiPromise }: Props, { value }: State): State | null { return { - optionsMethod: methodOptions(value.section), - optionsSection: sectionOptions() + optionsMethod: methodOptions(apiPromise, value.section), + optionsSection: sectionOptions(apiPromise) } as State; } render () { - const { className, labelMethod, labelSection, style, withLabel } = this.props; + const { apiPromise, className, labelMethod, labelSection, style, withLabel } = this.props; const { optionsMethod, optionsSection, value } = this.state; return ( @@ -71,6 +72,7 @@ class InputExtrinsic extends React.PureComponent { withLabel={withLabel} /> { } onSectionChange = (newSection: string): void => { + const { apiPromise } = this.props; const { value } = this.state; if (newSection === value.section) { return; } - const optionsMethod = methodOptions(newSection); - const fn = Api.extrinsics[newSection][optionsMethod[0].value]; + const optionsMethod = methodOptions(apiPromise, newSection); + const fn = apiPromise.tx[newSection][optionsMethod[0].value]; this.setState({ optionsMethod }, () => this.onKeyChange(fn) @@ -111,4 +114,8 @@ class InputExtrinsic extends React.PureComponent { } } -export default translate(InputExtrinsic); +export default withMulti( + InputExtrinsic, + translate, + withApi +); diff --git a/packages/ui-app/src/InputExtrinsic/options/method.tsx b/packages/ui-app/src/InputExtrinsic/options/method.tsx index 611004e7ad..973c97a43e 100644 --- a/packages/ui-app/src/InputExtrinsic/options/method.tsx +++ b/packages/ui-app/src/InputExtrinsic/options/method.tsx @@ -1,14 +1,14 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { DropdownOptions } from '../../util/types'; import React from 'react'; -import Api from '@polkadot/api-observable'; +import ApiPromise from '@polkadot/api/promise'; -export default function createOptions (sectionName: string): DropdownOptions { - const section = Api.extrinsics[sectionName]; +export default function createOptions (apiPromise: ApiPromise, sectionName: string): DropdownOptions { + const section = apiPromise.tx[sectionName]; if (!section) { return []; diff --git a/packages/ui-app/src/InputExtrinsic/options/section.ts b/packages/ui-app/src/InputExtrinsic/options/section.ts index 456cfba8d0..82cfe09356 100644 --- a/packages/ui-app/src/InputExtrinsic/options/section.ts +++ b/packages/ui-app/src/InputExtrinsic/options/section.ts @@ -1,14 +1,14 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { DropdownOptions } from '../../util/types'; -import Api from '@polkadot/api-observable'; +import ApiPromise from '@polkadot/api/promise'; -export default function createOptions (): DropdownOptions { +export default function createOptions (apiPromise: ApiPromise): DropdownOptions { return Object - .keys(Api.extrinsics) + .keys(apiPromise.tx) .sort() .map((name) => ({ text: name, diff --git a/packages/ui-app/src/InputFile.tsx b/packages/ui-app/src/InputFile.tsx index 8ee66b5ea1..f73775c6cd 100644 --- a/packages/ui-app/src/InputFile.tsx +++ b/packages/ui-app/src/InputFile.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputNumber.spec.js b/packages/ui-app/src/InputNumber.spec.js index f5efba2e1c..ca75657835 100644 --- a/packages/ui-app/src/InputNumber.spec.js +++ b/packages/ui-app/src/InputNumber.spec.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputNumber.tsx b/packages/ui-app/src/InputNumber.tsx index 93ba376745..dbf56faa97 100644 --- a/packages/ui-app/src/InputNumber.tsx +++ b/packages/ui-app/src/InputNumber.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputRpc/SelectMethod.tsx b/packages/ui-app/src/InputRpc/SelectMethod.tsx index e4ddd3eb10..bb2ca0d53e 100644 --- a/packages/ui-app/src/InputRpc/SelectMethod.tsx +++ b/packages/ui-app/src/InputRpc/SelectMethod.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputRpc/SelectSection.tsx b/packages/ui-app/src/InputRpc/SelectSection.tsx index 17b1b51829..3b8a7d5676 100644 --- a/packages/ui-app/src/InputRpc/SelectSection.tsx +++ b/packages/ui-app/src/InputRpc/SelectSection.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputRpc/index.tsx b/packages/ui-app/src/InputRpc/index.tsx index 94e3408f5b..1362dbd5d7 100644 --- a/packages/ui-app/src/InputRpc/index.tsx +++ b/packages/ui-app/src/InputRpc/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputRpc/options/method.tsx b/packages/ui-app/src/InputRpc/options/method.tsx index a1a050cff4..06f4950f7f 100644 --- a/packages/ui-app/src/InputRpc/options/method.tsx +++ b/packages/ui-app/src/InputRpc/options/method.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputRpc/options/section.ts b/packages/ui-app/src/InputRpc/options/section.ts index d085a8aabf..33bf994697 100644 --- a/packages/ui-app/src/InputRpc/options/section.ts +++ b/packages/ui-app/src/InputRpc/options/section.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputStorage/SelectKey.tsx b/packages/ui-app/src/InputStorage/SelectKey.tsx index b5bf8258a7..fc02abc460 100644 --- a/packages/ui-app/src/InputStorage/SelectKey.tsx +++ b/packages/ui-app/src/InputStorage/SelectKey.tsx @@ -1,19 +1,20 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import { ApiProps } from '@polkadot/ui-react-rx/types'; import { DropdownOptions } from '../util/types'; import { I18nProps } from '../types'; import React from 'react'; -import Api from '@polkadot/api-observable'; import { StorageFunction } from '@polkadot/types/StorageKey'; +import { withApi, withMulti } from '@polkadot/ui-react-rx/with'; import Dropdown from '../Dropdown'; import classes from '../util/classes'; import translate from '../translate'; -type Props = I18nProps & { +type Props = ApiProps & I18nProps & { isError?: boolean, label?: string, onChange: (value: StorageFunction) => void, @@ -24,14 +25,14 @@ type Props = I18nProps & { class SelectKey extends React.PureComponent { render () { - const { className, isError, label = '', onChange, options, style, t, value, withLabel } = this.props; + const { apiPromise, className, isError, label = '', onChange, options, style, t, value, withLabel } = this.props; if (!options.length) { return null; } const transform = (method: string): StorageFunction => - Api.storage[value.section][method]; + apiPromise.query[value.section][method]; return ( { } } -export default translate(SelectKey); +export default withMulti( + SelectKey, + translate, + withApi +); diff --git a/packages/ui-app/src/InputStorage/SelectSection.tsx b/packages/ui-app/src/InputStorage/SelectSection.tsx index 3891738285..efa3b0385d 100644 --- a/packages/ui-app/src/InputStorage/SelectSection.tsx +++ b/packages/ui-app/src/InputStorage/SelectSection.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/InputStorage/index.tsx b/packages/ui-app/src/InputStorage/index.tsx index 0130259b3d..aa28f01cc2 100644 --- a/packages/ui-app/src/InputStorage/index.tsx +++ b/packages/ui-app/src/InputStorage/index.tsx @@ -1,17 +1,18 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. // TODO: We have a lot shared between this and InputExtrinsic import { StorageFunction } from '@polkadot/types/StorageKey'; +import { ApiProps } from '@polkadot/ui-react-rx/types'; import { DropdownOptions } from '../util/types'; import { I18nProps } from '../types'; import '../InputExtrinsic/InputExtrinsic.css'; import React from 'react'; -import Api from '@polkadot/api-observable'; +import { withApi, withMulti } from '@polkadot/ui-react-rx/with'; import classes from '../util/classes'; import translate from '../translate'; @@ -20,7 +21,7 @@ import SelectSection from './SelectSection'; import keyOptions from './options/key'; import sectionOptions from './options/section'; -type Props = I18nProps & { +type Props = ApiProps & I18nProps & { defaultValue: StorageFunction, isError?: boolean, labelMethod?: string, @@ -41,11 +42,11 @@ class InputStorage extends React.PureComponent { constructor (props: Props) { super(props); - const method = this.props.defaultValue; + const { apiPromise, defaultValue: { section } } = this.props; this.state = { - optionsMethod: keyOptions(method.section), - optionsSection: sectionOptions(), + optionsMethod: keyOptions(apiPromise, section), + optionsSection: sectionOptions(apiPromise), value: this.props.defaultValue }; } @@ -93,14 +94,15 @@ class InputStorage extends React.PureComponent { } private onSectionChange = (newSection: string): void => { + const { apiPromise } = this.props; const { value } = this.state; if (newSection === value.section) { return; } - const optionsMethod = keyOptions(newSection); - const newValue = Api.storage[newSection][optionsMethod[0].value]; + const optionsMethod = keyOptions(apiPromise, newSection); + const newValue = apiPromise.query[newSection][optionsMethod[0].value]; this.setState({ optionsMethod }, () => this.onKeyChange(newValue) @@ -108,4 +110,8 @@ class InputStorage extends React.PureComponent { } } -export default translate(InputStorage); +export default withMulti( + InputStorage, + translate, + withApi +); diff --git a/packages/ui-app/src/InputStorage/options/key.tsx b/packages/ui-app/src/InputStorage/options/key.tsx index 1db243fd7a..56d8f9e044 100644 --- a/packages/ui-app/src/InputStorage/options/key.tsx +++ b/packages/ui-app/src/InputStorage/options/key.tsx @@ -1,14 +1,14 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { DropdownOptions } from '../../util/types'; import React from 'react'; -import Api from '@polkadot/api-observable'; +import ApiPromise from '@polkadot/api/promise'; -export default function createOptions (sectionName: keyof typeof Api.storage): DropdownOptions { - const section = Api.storage[sectionName]; +export default function createOptions (apiPromise: ApiPromise, sectionName: string): DropdownOptions { + const section = apiPromise.query[sectionName]; if (!section) { return []; diff --git a/packages/ui-app/src/InputStorage/options/section.ts b/packages/ui-app/src/InputStorage/options/section.ts index cbccb2f00e..879c9e4d0b 100644 --- a/packages/ui-app/src/InputStorage/options/section.ts +++ b/packages/ui-app/src/InputStorage/options/section.ts @@ -1,14 +1,14 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { DropdownOptions } from '../../util/types'; -import Api from '@polkadot/api-observable'; +import ApiPromise from '@polkadot/api/promise'; -export default function createOptions (): DropdownOptions { +export default function createOptions (apiPromise: ApiPromise): DropdownOptions { return Object - .keys(Api.storage) + .keys(apiPromise.query) .sort() .map((name) => ({ text: name, diff --git a/packages/ui-app/src/Labelled.tsx b/packages/ui-app/src/Labelled.tsx index 18724e8dd8..f41b14cf27 100644 --- a/packages/ui-app/src/Labelled.tsx +++ b/packages/ui-app/src/Labelled.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Menu.tsx b/packages/ui-app/src/Menu.tsx index 713bd6a8e0..c2ab3af99c 100644 --- a/packages/ui-app/src/Menu.tsx +++ b/packages/ui-app/src/Menu.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Modal.tsx b/packages/ui-app/src/Modal.tsx index 244c36a966..e082af9ea9 100644 --- a/packages/ui-app/src/Modal.tsx +++ b/packages/ui-app/src/Modal.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Output.tsx b/packages/ui-app/src/Output.tsx index cf51a724e2..2ede81917c 100644 --- a/packages/ui-app/src/Output.tsx +++ b/packages/ui-app/src/Output.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Account.tsx b/packages/ui-app/src/Params/Param/Account.tsx index 5dbc2b4cb2..c130592852 100644 --- a/packages/ui-app/src/Params/Param/Account.tsx +++ b/packages/ui-app/src/Params/Param/Account.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Amount.tsx b/packages/ui-app/src/Params/Param/Amount.tsx index 1c4afbc1db..ed31a87d85 100644 --- a/packages/ui-app/src/Params/Param/Amount.tsx +++ b/packages/ui-app/src/Params/Param/Amount.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Balance.spec.js b/packages/ui-app/src/Params/Param/Balance.spec.js index b0608b31a1..2914191b54 100644 --- a/packages/ui-app/src/Params/Param/Balance.spec.js +++ b/packages/ui-app/src/Params/Param/Balance.spec.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Balance.tsx b/packages/ui-app/src/Params/Param/Balance.tsx index cb436c8e02..2042561cb8 100644 --- a/packages/ui-app/src/Params/Param/Balance.tsx +++ b/packages/ui-app/src/Params/Param/Balance.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Bare.tsx b/packages/ui-app/src/Params/Param/Bare.tsx index 8c9595b578..4c1405f181 100644 --- a/packages/ui-app/src/Params/Param/Bare.tsx +++ b/packages/ui-app/src/Params/Param/Bare.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Base.tsx b/packages/ui-app/src/Params/Param/Base.tsx index fae358327d..6835b241aa 100644 --- a/packages/ui-app/src/Params/Param/Base.tsx +++ b/packages/ui-app/src/Params/Param/Base.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/BaseBytes.tsx b/packages/ui-app/src/Params/Param/BaseBytes.tsx index ea5aba6cab..dd09dca540 100644 --- a/packages/ui-app/src/Params/Param/BaseBytes.tsx +++ b/packages/ui-app/src/Params/Param/BaseBytes.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Bool.tsx b/packages/ui-app/src/Params/Param/Bool.tsx index c8c406946f..f2d00e25e9 100644 --- a/packages/ui-app/src/Params/Param/Bool.tsx +++ b/packages/ui-app/src/Params/Param/Bool.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Bytes.tsx b/packages/ui-app/src/Params/Param/Bytes.tsx index 9d7c97582e..edea963a03 100644 --- a/packages/ui-app/src/Params/Param/Bytes.tsx +++ b/packages/ui-app/src/Params/Param/Bytes.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Code.tsx b/packages/ui-app/src/Params/Param/Code.tsx index ef01c3b6ea..5de11280cd 100644 --- a/packages/ui-app/src/Params/Param/Code.tsx +++ b/packages/ui-app/src/Params/Param/Code.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/File.tsx b/packages/ui-app/src/Params/Param/File.tsx index 7be9a9e289..46bd935275 100644 --- a/packages/ui-app/src/Params/Param/File.tsx +++ b/packages/ui-app/src/Params/Param/File.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Hash.tsx b/packages/ui-app/src/Params/Param/Hash.tsx index 71646a8815..b08242c438 100644 --- a/packages/ui-app/src/Params/Param/Hash.tsx +++ b/packages/ui-app/src/Params/Param/Hash.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/KeyValue.tsx b/packages/ui-app/src/Params/Param/KeyValue.tsx index 2b6b3d7266..7f36802180 100644 --- a/packages/ui-app/src/Params/Param/KeyValue.tsx +++ b/packages/ui-app/src/Params/Param/KeyValue.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/KeyValueArray.tsx b/packages/ui-app/src/Params/Param/KeyValueArray.tsx index 4b31bbe7ef..86d0bfb902 100644 --- a/packages/ui-app/src/Params/Param/KeyValueArray.tsx +++ b/packages/ui-app/src/Params/Param/KeyValueArray.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Proposal.tsx b/packages/ui-app/src/Params/Param/Proposal.tsx index 5503f724b3..5c62dd8e87 100644 --- a/packages/ui-app/src/Params/Param/Proposal.tsx +++ b/packages/ui-app/src/Params/Param/Proposal.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/String.tsx b/packages/ui-app/src/Params/Param/String.tsx index 8af04b9630..e5d6481388 100644 --- a/packages/ui-app/src/Params/Param/String.tsx +++ b/packages/ui-app/src/Params/Param/String.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Timestamp.tsx b/packages/ui-app/src/Params/Param/Timestamp.tsx index 3ba1311166..544787c7ce 100644 --- a/packages/ui-app/src/Params/Param/Timestamp.tsx +++ b/packages/ui-app/src/Params/Param/Timestamp.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Tuple.tsx b/packages/ui-app/src/Params/Param/Tuple.tsx index 0c8b26e886..b5d0f0786a 100644 --- a/packages/ui-app/src/Params/Param/Tuple.tsx +++ b/packages/ui-app/src/Params/Param/Tuple.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Unknown.tsx b/packages/ui-app/src/Params/Param/Unknown.tsx index 2f48d9bb36..4669a8cf4f 100644 --- a/packages/ui-app/src/Params/Param/Unknown.tsx +++ b/packages/ui-app/src/Params/Param/Unknown.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Vector.tsx b/packages/ui-app/src/Params/Param/Vector.tsx index 3a22fab8de..45378bdfc6 100644 --- a/packages/ui-app/src/Params/Param/Vector.tsx +++ b/packages/ui-app/src/Params/Param/Vector.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/Vote.tsx b/packages/ui-app/src/Params/Param/Vote.tsx new file mode 100644 index 0000000000..5fc89e510a --- /dev/null +++ b/packages/ui-app/src/Params/Param/Vote.tsx @@ -0,0 +1,52 @@ +// Copyright 2017-2019 @polkadot/ui-app authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { Props } from '../types'; + +import BN from 'bn.js'; +import React from 'react'; + +import Dropdown from '../../Dropdown'; +import Bare from './Bare'; + +const options = [ + { text: 'Nay', value: 0 }, + { text: 'Aye', value: -1 } +]; + +export default class Vote extends React.PureComponent { + render () { + const { className, defaultValue: { value }, isDisabled, isError, label, style, withLabel } = this.props; + const defaultValue = value instanceof BN + ? value.toNumber() + : value as number; + + return ( + + + + ); + } + + private onChange = (value: number): void => { + const { onChange } = this.props; + + onChange && onChange({ + isValid: true, + value + }); + } +} diff --git a/packages/ui-app/src/Params/Param/VoteThreshold.tsx b/packages/ui-app/src/Params/Param/VoteThreshold.tsx index 45e6a205a0..0651d81e0a 100644 --- a/packages/ui-app/src/Params/Param/VoteThreshold.tsx +++ b/packages/ui-app/src/Params/Param/VoteThreshold.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Param/findComponent.ts b/packages/ui-app/src/Params/Param/findComponent.ts index f5efbf92a8..7636ded768 100644 --- a/packages/ui-app/src/Params/Param/findComponent.ts +++ b/packages/ui-app/src/Params/Param/findComponent.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -20,6 +20,7 @@ import Timestamp from './Timestamp'; import Tuple from './Tuple'; import Unknown from './Unknown'; import Vector from './Vector'; +import Vote from './Vote'; import VoteThreshold from './VoteThreshold'; const components: ComponentMap = { @@ -51,6 +52,7 @@ const components: ComponentMap = { 'u32': Amount, 'u64': Amount, 'Vector': Vector, + 'Vote': Vote, 'VoteIndex': Amount, 'VoteThreshold': VoteThreshold }; diff --git a/packages/ui-app/src/Params/Param/index.tsx b/packages/ui-app/src/Params/Param/index.tsx index 16e45d3997..77b392414f 100644 --- a/packages/ui-app/src/Params/Param/index.tsx +++ b/packages/ui-app/src/Params/Param/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/Params.css b/packages/ui-app/src/Params/Params.css index 76ae326086..9fe7c66153 100644 --- a/packages/ui-app/src/Params/Params.css +++ b/packages/ui-app/src/Params/Params.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/ui-app authors & contributors +/* Copyright 2017-2019 @polkadot/ui-app authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/ui-app/src/Params/index.tsx b/packages/ui-app/src/Params/index.tsx index 90449685e8..01af4d3487 100644 --- a/packages/ui-app/src/Params/index.tsx +++ b/packages/ui-app/src/Params/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-app/src/Params/initValue.ts b/packages/ui-app/src/Params/initValue.ts index 8bce71c811..4a4f27c5f8 100644 --- a/packages/ui-app/src/Params/initValue.ts +++ b/packages/ui-app/src/Params/initValue.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -48,6 +48,9 @@ export default function getInitValue (def: TypeDef): RawParam$Value | Array, { api, className, provider, style, url }: Props = {}, rootId: string = 'root'): void { +export default function createApp (App: React.ComponentType, { className, style, url }: Props, rootId: string = 'root'): void { const rootElement = document.getElementById(rootId); if (!rootElement) { @@ -95,11 +91,7 @@ export default function createApp (App: React.ComponentType, { api, c } ReactDOM.render( - + // rxjs$ISubscription | null>; + chain?: string }; -// HACK Initialise with static data -Method.injectMethods(Api.extrinsics); - export default class ApiWrapper extends React.PureComponent { state: State = {} as State; constructor (props: Props) { super(props); - const { provider, url = '' } = props; - const api = props.api || new RxApi( - url && url.length - ? new WsProvider(url) - : provider - ); - const setApi = (api: RpcRxInterface): void => { - const apiObservable = new Api(api); + const { url } = props; + const provider = new WsProvider(url); + const setApi = (provider: ProviderInterface): void => { + const apiPromise = new ApiPromise(provider); - this.setState({ api, apiObservable }, () => { + this.setState({ apiPromise }, () => { this.updateSubscriptions(); }); }; - const setApiProvider = (provider?: ProviderInterface): void => - setApi(new RxApi(provider)); - const setApiWsUrl = (url: string = defaults.WS_URL): void => - setApiProvider(new WsProvider(url)); + const setApiUrl = (url: string = defaults.WS_URL): void => + setApi(new WsProvider(url)); this.state = { isApiConnected: false, isApiReady: false, - api, - apiMethods: {}, - apiObservable: new Api(api), - apiSupport: 'latest', - setApi, - setApiProvider, - setApiWsUrl, - subscriptions: [] + apiPromise: new ApiPromise(provider), + setApiUrl }; } @@ -79,113 +57,77 @@ export default class ApiWrapper extends React.PureComponent { this.updateSubscriptions(); } - componentWillUnmount () { - this.unsubscribe(); - } - private updateSubscriptions () { - const { api, apiObservable } = this.state; + const { apiPromise } = this.state; - this.unsubscribe(); - this.setState({ - subscriptions: - [ - this.subscribeIsConnected, - this.subscribeIsReady, - this.subscribeChain, - this.subscribeMethodCheck - ].map((fn: Function) => { - try { - return fn(api, apiObservable); - } catch (error) { - console.error(error); - return null; - } - }) - }); - } - - private subscribeChain = (rpc: RpcRxInterface, api: Api): void => { - combineLatest( - rpc.system.properties().pipe(catchError(() => of())), - api.chain() - ).subscribe(([properties = new ChainProperties(), value]: [ChainProperties, any]) => { - const chain = value - ? value.toString() - : null; - const found = settings.availableChains.find(({ name }) => name === chain) || { - networkId: 0, - tokenDecimals: 0, - tokenSymbol: undefined - }; - - console.log('found chain', chain, [...properties.entries()]); - - balanceFormat.setDefaultDecimals(properties.get('tokenDecimals') || found.tokenDecimals); - InputNumber.setUnit(properties.get('tokenSymbol') || found.tokenSymbol); - - // setup keyringonly after prefix has been set - keyring.setAddressPrefix(properties.get('networkId') || found.networkId as any); - keyring.setDevMode(isTestChain(chain || '')); - keyring.loadAll(); - - this.setState({ chain }); - }); - } - - private subscribeIsConnected = (rpc: RpcRxInterface, api: Api): void => { - rpc.isConnected().subscribe((isConnected?: boolean) => { - this.setState({ isApiConnected: !!isConnected }); - }); - } - - private subscribeIsReady = (rpc: RpcRxInterface, api: Api): void => { - api.whenReady.subscribe((isReady?: boolean) => { - this.setState({ isApiReady: !!isReady }); - }); - } - - private subscribeMethodCheck = (rpc: RpcRxInterface, api: Api): void => { - rpc.chain - .subscribeNewHead() - .subscribe(async (header?: Header) => { - if (!header || !header.parentHash) { - return; - } - - // NOTE no checks atm, add when new method checks are required - }); - } - - private unsubscribe (): void { - const { subscriptions } = this.state; - - subscriptions.forEach((subscription) => { - if (subscription) { - try { - subscription.unsubscribe(); - } catch (error) { - console.error(error); - } + [ + this.subscribeIsConnected, + this.subscribeIsReady, + this.subscribeChain + ].map((fn: Function) => { + try { + return fn(apiPromise); + } catch (error) { + console.error(error); + return null; } }); } + private subscribeChain = async (api: ApiPromise) => { + const [properties = new ChainProperties(), value] = await Promise.all([ + api.rpc.system.properties(), + api.rpc.system.chain() + ]); + + const chain = value + ? value.toString() + : null; + const found = settings.availableChains.find(({ name }) => name === chain) || { + networkId: 42, + tokenDecimals: 0, + tokenSymbol: undefined + }; + + console.log('found chain', chain, [...properties.entries()]); + + balanceFormat.setDefaultDecimals(properties.get('tokenDecimals') || found.tokenDecimals); + InputNumber.setUnit(properties.get('tokenSymbol') || found.tokenSymbol); + + // setup keyringonly after prefix has been set + keyring.setAddressPrefix(properties.get('networkId') || found.networkId as any); + keyring.setDevMode(isTestChain(chain || '')); + keyring.loadAll(); + + this.setState({ chain }); + } + + private subscribeIsConnected = (api: ApiPromise) => { + api.on('connected', () => { + this.setState({ isApiConnected: true }); + }); + + api.on('disconnected', () => { + this.setState({ isApiConnected: false }); + }); + } + + private subscribeIsReady = (api: ApiPromise) => { + api.on('ready', () => { + this.setState({ isApiReady: true }); + }); + } + render () { - const { isApiConnected, isApiReady, api, apiMethods, apiObservable, apiSupport, chain, setApi, setApiProvider, setApiWsUrl } = this.state; + const { apiPromise, chain, isApiConnected, isApiReady, setApiUrl } = this.state; return ( {this.props.children} diff --git a/packages/ui-react-rx/src/Balance.ts b/packages/ui-react-rx/src/Balance.ts deleted file mode 100644 index 1ee7819cff..0000000000 --- a/packages/ui-react-rx/src/Balance.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { RxBalance } from '@polkadot/api-observable/types'; - -import { withObservableDiv } from './with/index'; -import { balanceFormat } from './util/index'; - -const Component: React.ComponentType = withObservableDiv('votingBalance')( - (balance?: RxBalance): string => { - if (!balance) { - return '0'; - } - - return balanceFormat(balance.freeBalance); - }, - { className: 'rx--Balance' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/Balance.tsx b/packages/ui-react-rx/src/Balance.tsx new file mode 100644 index 0000000000..447284bba3 --- /dev/null +++ b/packages/ui-react-rx/src/Balance.tsx @@ -0,0 +1,38 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { Balance } from '@polkadot/types'; + +import { balanceFormat } from './util/index'; +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + query_balances_freeBalance: Balance +}; + +class BalanceDisplay extends React.PureComponent { + render () { + const { children, className, label = '', style, query_balances_freeBalance } = this.props; + + return ( +
+ {label}{ + query_balances_freeBalance + ? balanceFormat(query_balances_freeBalance) + : '0' + }{children} +
+ ); + } +} + +export default withCall('query.balances.freeBalance')(BalanceDisplay); diff --git a/packages/ui-react-rx/src/BestFinalised.ts b/packages/ui-react-rx/src/BestFinalised.ts deleted file mode 100644 index e0988fa0de..0000000000 --- a/packages/ui-react-rx/src/BestFinalised.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { BlockNumber } from '@polkadot/types'; - -import { numberFormat } from './util/index'; -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('bestNumberFinalised')( - (value?: BlockNumber): string => { - return value - ? numberFormat(value) - : 'unknown'; - }, - { className: 'rx--BestNumberFinalised' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/BestFinalised.tsx b/packages/ui-react-rx/src/BestFinalised.tsx new file mode 100644 index 0000000000..b792a16964 --- /dev/null +++ b/packages/ui-react-rx/src/BestFinalised.tsx @@ -0,0 +1,38 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { BlockNumber } from '@polkadot/types'; + +import { numberFormat } from './util/index'; +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + derive_chain_bestNumberFinalised?: BlockNumber +}; + +class BestFinalised extends React.PureComponent { + render () { + const { children, className, label = '', style, derive_chain_bestNumberFinalised } = this.props; + + return ( +
+ {label}{ + derive_chain_bestNumberFinalised + ? numberFormat(derive_chain_bestNumberFinalised) + : '-' + }{children} +
+ ); + } +} + +export default withCall('derive.chain.bestNumberFinalised')(BestFinalised); diff --git a/packages/ui-react-rx/src/BestNumber.ts b/packages/ui-react-rx/src/BestNumber.ts deleted file mode 100644 index 14ed65c0a3..0000000000 --- a/packages/ui-react-rx/src/BestNumber.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { BlockNumber } from '@polkadot/types'; - -import { numberFormat } from './util/index'; -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('bestNumber')( - (value?: BlockNumber): string => { - return value - ? numberFormat(value) - : 'unknown'; - }, - { className: 'rx--BestNumber' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/BestNumber.tsx b/packages/ui-react-rx/src/BestNumber.tsx new file mode 100644 index 0000000000..7bed51ffd8 --- /dev/null +++ b/packages/ui-react-rx/src/BestNumber.tsx @@ -0,0 +1,38 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { BlockNumber } from '@polkadot/types'; + +import { numberFormat } from './util/index'; +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + derive_chain_bestNumber?: BlockNumber +}; + +class BestNumber extends React.PureComponent { + render () { + const { children, className, label = '', style, derive_chain_bestNumber } = this.props; + + return ( +
+ {label}{ + derive_chain_bestNumber + ? numberFormat(derive_chain_bestNumber) + : '-' + }{children} +
+ ); + } +} + +export default withCall('derive.chain.bestNumber')(BestNumber); diff --git a/packages/ui-react-rx/src/Chain.ts b/packages/ui-react-rx/src/Chain.ts deleted file mode 100644 index 91024f44de..0000000000 --- a/packages/ui-react-rx/src/Chain.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { Text } from '@polkadot/types'; - -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('chain')( - (value: Text | string = 'unknown'): string => - value.toString(), - { className: 'rx--Chain' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/Chain.tsx b/packages/ui-react-rx/src/Chain.tsx new file mode 100644 index 0000000000..295ece9718 --- /dev/null +++ b/packages/ui-react-rx/src/Chain.tsx @@ -0,0 +1,33 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { Text } from '@polkadot/types'; + +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + rpc_system_chain?: Text +}; + +class Chain extends React.PureComponent { + render () { + const { children, className, label = '', style, rpc_system_chain = 'unknown' } = this.props; + + return ( +
+ {label}{rpc_system_chain.toString()}{children} +
+ ); + } +} + +export default withCall('rpc.system.chain')(Chain); diff --git a/packages/ui-react-rx/src/Connected.ts b/packages/ui-react-rx/src/Connected.ts deleted file mode 100644 index a1125b15e8..0000000000 --- a/packages/ui-react-rx/src/Connected.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('isConnected')( - (value: boolean = false): string => { - return value - ? 'connected' - : 'disconnected'; - }, - { className: 'rx--Connected' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/Div.tsx b/packages/ui-react-rx/src/Div.tsx deleted file mode 100644 index 44d479bd54..0000000000 --- a/packages/ui-react-rx/src/Div.tsx +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { BaseProps, BareProps } from './types'; - -import React from 'react'; - -type Props = BaseProps; - -const echoFormatter = (value?: any): string | undefined => - value - ? value.toString() - : undefined; - -export default function Div ({ children, className = 'rx--Div', render = echoFormatter, rxUpdated = false, label = '', style, value }: Props) { - const props: BareProps = { - className: [className, rxUpdated ? 'rx--updated' : undefined] - .filter((c) => c) - .join(' ') || undefined, - style - }; - - return ( -
- {label}{render(value) || ''}{children} -
- ); -} diff --git a/packages/ui-react-rx/src/Elapsed.tsx b/packages/ui-react-rx/src/Elapsed.tsx index 3558b51073..119fe5011a 100644 --- a/packages/ui-react-rx/src/Elapsed.tsx +++ b/packages/ui-react-rx/src/Elapsed.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/NodeName.ts b/packages/ui-react-rx/src/NodeName.ts deleted file mode 100644 index f9173769f3..0000000000 --- a/packages/ui-react-rx/src/NodeName.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { Text } from '@polkadot/types'; - -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('systemName')( - (value: Text | string = 'unknown'): string => - value.toString(), - { className: 'rx--NodeName' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/NodeName.tsx b/packages/ui-react-rx/src/NodeName.tsx new file mode 100644 index 0000000000..edd5514b1f --- /dev/null +++ b/packages/ui-react-rx/src/NodeName.tsx @@ -0,0 +1,33 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { Text } from '@polkadot/types'; + +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + rpc_system_name?: Text +}; + +class NodeName extends React.PureComponent { + render () { + const { children, className, label = '', style, rpc_system_name = 'unknown' } = this.props; + + return ( +
+ {label}{rpc_system_name.toString()}{children} +
+ ); + } +} + +export default withCall('rpc.system.name')(NodeName); diff --git a/packages/ui-react-rx/src/NodeVersion.ts b/packages/ui-react-rx/src/NodeVersion.ts deleted file mode 100644 index 7a03523e33..0000000000 --- a/packages/ui-react-rx/src/NodeVersion.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { Text } from '@polkadot/types'; - -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('systemVersion')( - (value: Text | string = 'unknown'): string => - value.toString(), - { className: 'rx--NodeVersion' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/NodeVersion.tsx b/packages/ui-react-rx/src/NodeVersion.tsx new file mode 100644 index 0000000000..b77f0d0d11 --- /dev/null +++ b/packages/ui-react-rx/src/NodeVersion.tsx @@ -0,0 +1,33 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { Text } from '@polkadot/types'; + +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + rpc_system_version?: Text +}; + +class NodeVersion extends React.PureComponent { + render () { + const { children, className, label = '', style, rpc_system_version = 'unknown' } = this.props; + + return ( +
+ {label}{rpc_system_version.toString()}{children} +
+ ); + } +} + +export default withCall('rpc.system.version')(NodeVersion); diff --git a/packages/ui-react-rx/src/Nonce.ts b/packages/ui-react-rx/src/Nonce.ts deleted file mode 100644 index 6a74affc62..0000000000 --- a/packages/ui-react-rx/src/Nonce.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import numberFormat from './util/numberFormat'; -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('accountNonce')( - numberFormat, - { className: 'rx--Nonce' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/Nonce.tsx b/packages/ui-react-rx/src/Nonce.tsx new file mode 100644 index 0000000000..696985fe2f --- /dev/null +++ b/packages/ui-react-rx/src/Nonce.tsx @@ -0,0 +1,38 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { Index } from '@polkadot/types'; + +import { numberFormat } from './util/index'; +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + query_system_accountNonce: Index +}; + +class Nonce extends React.PureComponent { + render () { + const { children, className, label = '', style, query_system_accountNonce } = this.props; + + return ( +
+ {label}{ + query_system_accountNonce + ? numberFormat(query_system_accountNonce) + : '0' + }{children} +
+ ); + } +} + +export default withCall('query.system.accountNonce')(Nonce); diff --git a/packages/ui-react-rx/src/TimeNow.ts b/packages/ui-react-rx/src/TimeNow.ts deleted file mode 100644 index 3d3b7c1c5e..0000000000 --- a/packages/ui-react-rx/src/TimeNow.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { withObservable } from './with/index'; -import Elapsed from './Elapsed'; - -const Component: React.ComponentType = withObservable('blockNow', { propName: 'value' })( - Elapsed, - { className: 'rx--TimeNow' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/TimeNow.tsx b/packages/ui-react-rx/src/TimeNow.tsx new file mode 100644 index 0000000000..986abb7ec7 --- /dev/null +++ b/packages/ui-react-rx/src/TimeNow.tsx @@ -0,0 +1,12 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { withCall } from './with/index'; +import Elapsed from './Elapsed'; + +const Component: React.ComponentType = withCall('query.timestamp.now', { propName: 'value' })( + Elapsed +); + +export default Component; diff --git a/packages/ui-react-rx/src/TimePeriod.ts b/packages/ui-react-rx/src/TimePeriod.ts deleted file mode 100644 index fbe37600fb..0000000000 --- a/packages/ui-react-rx/src/TimePeriod.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { Moment } from '@polkadot/types'; - -import numberFormat from './util/numberFormat'; -import { withObservableDiv } from './with/index'; - -const Component: React.ComponentType = withObservableDiv('blockPeriod')( - (value?: Moment): string => - `${numberFormat(value ? (2 * value.toNumber()) : 0)}s`, - { className: 'rx--TimePeriod' } -); - -export default Component; diff --git a/packages/ui-react-rx/src/TimePeriod.tsx b/packages/ui-react-rx/src/TimePeriod.tsx new file mode 100644 index 0000000000..b6bd368304 --- /dev/null +++ b/packages/ui-react-rx/src/TimePeriod.tsx @@ -0,0 +1,38 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { BareProps } from './types'; + +import React from 'react'; +import { Moment } from '@polkadot/types'; + +import { numberFormat } from './util/index'; +import { withCall } from './with/index'; + +type Props = BareProps & { + children?: React.ReactNode, + label?: string, + query_timestamp_blockPeriod: Moment +}; + +class TimePeriod extends React.PureComponent { + render () { + const { children, className, label = '', style, query_timestamp_blockPeriod } = this.props; + + return ( +
+ {label}{ + query_timestamp_blockPeriod + ? `${numberFormat(query_timestamp_blockPeriod.toNumber() * 2)}s` + : '-' + }{children} +
+ ); + } +} + +export default withCall('query.timestamp.blockPeriod')(TimePeriod); diff --git a/packages/ui-react-rx/src/demo.tsx b/packages/ui-react-rx/src/demo.tsx deleted file mode 100644 index 17405fb3d4..0000000000 --- a/packages/ui-react-rx/src/demo.tsx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import React from 'react'; -import ReactDOM from 'react-dom'; -import Mock from '@polkadot/rpc-provider/mock'; - -import Api from './Api'; -import Balance from './Balance'; -import BestNumber from './BestNumber'; -import Chain from './Chain'; -import Connected from './Connected'; -import NodeName from './NodeName'; -import NodeVersion from './NodeVersion'; -import Nonce from './Nonce'; -import { withApi } from './with/index'; - -const provider = new Mock(); - -const ALICE_ADDR = '5GoKvZWG5ZPYL1WUovuHW3zJBWBP5eT8CbqjdRY4Q6iMaDtZ'; -const ALICE_PUBLIC = '0xd172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f'; - -const element = document.getElementById('demo'); - -if (!element) { - throw new Error('Unable to find #demo element'); -} - -const WithApiDebug = withApi( - (apiProps) => ( -
-      {JSON.stringify(apiProps, undefined, 2)}
-    
- ) -); - -ReactDOM.render( - - - - - -
- - - -
- -
, - element -); diff --git a/packages/ui-react-rx/src/derive/balances/accountIdAndIndex.tsx b/packages/ui-react-rx/src/derive/balances/accountIdAndIndex.tsx new file mode 100644 index 0000000000..3eabd5b402 --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/accountIdAndIndex.tsx @@ -0,0 +1,47 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import { decodeAddress } from '@polkadot/keyring'; +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, AccountIndex } from '@polkadot/types'; + +import accountIdToIndex from './accountIdToIndex'; +import accountIndexToId from './accountIndexToId'; + +export type IdAndIndex = [AccountId | undefined, AccountIndex | undefined]; + +export default function accountIdAndIndex (api: ApiPromise): DeriveSubscription { + return (address: AccountId | AccountIndex | string | null | undefined, cb: (idAndIndex: IdAndIndex) => any): UnsubFunction => { + try { + // yes, this can fail, don't care too much, catch will catch it + const length = decodeAddress((address as any).toString()).length; + + if (length === 32) { + const accountId = new AccountId(address as string); + + return accountIdToIndex(api)(accountId, (accountIndex?: AccountIndex) => + cb([accountId, accountIndex]) + ); + } + + const accountIndex = new AccountIndex(address as string); + + return accountIndexToId(api)(accountIndex, (accountId?: AccountId) => + cb([accountId, accountIndex]) + ); + } catch (error) { + // swallow + } + + cb([undefined, undefined]); + + // just return empties + return (): void => { + // nothing to unsubscribe from + }; + }; +} diff --git a/packages/ui-react-rx/src/derive/balances/accountIdToIndex.ts b/packages/ui-react-rx/src/derive/balances/accountIdToIndex.ts new file mode 100644 index 0000000000..2c66033e2d --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/accountIdToIndex.ts @@ -0,0 +1,18 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, AccountIndex } from '@polkadot/types'; + +import accountIndexes, { AccountIndexes } from './accountIndexes'; + +export default function accountIdToIndex (api: ApiPromise): DeriveSubscription { + return (accountId: AccountId | string, cb: (index?: AccountIndex) => any): UnsubFunction => + accountIndexes(api)((indexes?: AccountIndexes) => + cb((indexes || {})[accountId.toString()]) + ); +} diff --git a/packages/ui-react-rx/src/derive/balances/accountIndexToId.ts b/packages/ui-react-rx/src/derive/balances/accountIndexToId.ts new file mode 100644 index 0000000000..f155f4ff67 --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/accountIndexToId.ts @@ -0,0 +1,22 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, AccountIndex } from '@polkadot/types'; +import { ENUMSET_SIZE } from '@polkadot/types/AccountIndex'; + +export default function accountIndexToId (api: ApiPromise): DeriveSubscription { + return (_accountIndex: AccountIndex | string, cb: (accountId?: AccountId) => any): UnsubFunction => { + const accountIndex = _accountIndex instanceof AccountIndex + ? _accountIndex + : new AccountIndex(_accountIndex); + + return api.query.balances.enumSet(accountIndex, (accounts: Array) => + cb((accounts || [])[accountIndex.mod(ENUMSET_SIZE).toNumber()]) + ); + }; +} diff --git a/packages/ui-react-rx/src/derive/balances/accountIndexes.ts b/packages/ui-react-rx/src/derive/balances/accountIndexes.ts new file mode 100644 index 0000000000..41a0b8184a --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/accountIndexes.ts @@ -0,0 +1,51 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { QueryableStorageFunction, UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, AccountIndex } from '@polkadot/types'; +import { ENUMSET_SIZE } from '@polkadot/types/AccountIndex'; + +export type AccountIndexes = { [index: string]: AccountIndex }; + +export default function accountIndexes (api: ApiPromise): DeriveSubscription { + return (cb: (indexes: AccountIndexes) => any): UnsubFunction => { + let combineDestroy: UnsubFunction | undefined; + const nextEnumSetDestory = api.query.balances.nextEnumSet((next: AccountIndex) => { + const setSize = ENUMSET_SIZE.toNumber(); + const enumRange = [...Array((next || new BN(0)).div(ENUMSET_SIZE).toNumber() + 1).keys()].map((index) => + [api.query.balances.enumSet, index] as [QueryableStorageFunction, ...Array] + ); + + if (combineDestroy) { + combineDestroy(); + } + + combineDestroy = api.combineLatest(enumRange, (all: Array | undefined>) => { + cb( + (all || []).reduce((result, list, outerIndex) => { + (list || []).forEach((accountId, innerIndex) => { + const index = (outerIndex * setSize) + innerIndex; + + result[accountId.toString()] = new AccountIndex(index); + }); + + return result; + }, {} as AccountIndexes) + ); + }); + }) as any as UnsubFunction; // FIXME? wtf? + + return (): void => { + nextEnumSetDestory(); + + if (combineDestroy) { + combineDestroy(); + } + }; + }; +} diff --git a/packages/ui-react-rx/src/derive/balances/fees.ts b/packages/ui-react-rx/src/derive/balances/fees.ts new file mode 100644 index 0000000000..31fe2d62ae --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/fees.ts @@ -0,0 +1,28 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription, DerivedBalancesFees } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; + +export default function fees (api: ApiPromise): DeriveSubscription { + return (cb: (fees: DerivedBalancesFees) => any): UnsubFunction => + api.combineLatest([ + api.query.balances.creationFee, + api.query.balances.existentialDeposit, + api.query.balances.transactionBaseFee, + api.query.balances.transactionByteFee, + api.query.balances.transferFee + ], ([creationFee, existentialDeposit, transactionBaseFee, transactionByteFee, transferFee]) => + cb({ + creationFee: creationFee || new BN(0), + existentialDeposit: existentialDeposit || new BN(0), + transactionBaseFee: transactionBaseFee || new BN(0), + transactionByteFee: transactionByteFee || new BN(0), + transferFee: transferFee || new BN(0) + }) + ); +} diff --git a/packages/ui-react-rx/src/derive/balances/index.ts b/packages/ui-react-rx/src/derive/balances/index.ts new file mode 100644 index 0000000000..fca300a737 --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/index.ts @@ -0,0 +1,14 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +export { default as accountIdAndIndex } from './accountIdAndIndex'; +export { default as accountIdToIndex } from './accountIdToIndex'; +export { default as accountIndexes } from './accountIndexes'; +export { default as accountIndexToId } from './accountIndexToId'; +export { default as fees } from './fees'; +export { default as validatingBalance } from './votingBalance'; +export { default as validatingBalances } from './validatingBalances'; +export { default as votingBalance } from './votingBalance'; +export { default as votingBalances } from './votingBalances'; +export { default as votingBalancesNominatorsFor } from './votingBalancesNominatorsFor'; diff --git a/packages/ui-react-rx/src/derive/balances/validatingBalance.tsx b/packages/ui-react-rx/src/derive/balances/validatingBalance.tsx new file mode 100644 index 0000000000..2d4cbe5b7a --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/validatingBalance.tsx @@ -0,0 +1,35 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { CombinatorFunction } from '@polkadot/api/promise/Combinator'; +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription, DerivedBalances } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, Balance } from '@polkadot/types'; + +import votingBalance from './votingBalance'; +import votingBalancesNominatorsFor from './votingBalancesNominatorsFor'; + +export default function validatingBalance (api: ApiPromise): DeriveSubscription { + return (accountId: AccountId | string, cb: (balance: DerivedBalances) => any): UnsubFunction => + api.combineLatest([ + [votingBalance(api), accountId] as [CombinatorFunction, ...Array], + [votingBalancesNominatorsFor(api), accountId] as [CombinatorFunction, ...Array] + ], ([balance, nominators]) => { + const nominatedBalance = nominators.reduce((total: BN, nominatorBalance: DerivedBalances) => { + return total.add(nominatorBalance.votingBalance); + }, new BN(0)); + + cb({ + ...balance, + nominators, + nominatedBalance: new Balance(nominatedBalance), + stakingBalance: new Balance( + nominatedBalance.add(balance.votingBalance) + ) + }); + }); +} diff --git a/packages/ui-react-rx/src/derive/balances/validatingBalances.tsx b/packages/ui-react-rx/src/derive/balances/validatingBalances.tsx new file mode 100644 index 0000000000..0b1d05897d --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/validatingBalances.tsx @@ -0,0 +1,32 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { CombinatorFunction } from '@polkadot/api/promise/Combinator'; +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription, DerivedBalancesMap } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { AccountId } from '@polkadot/types'; + +import validatingBalance from './validatingBalance'; + +export default function votingBalances (api: ApiPromise): DeriveSubscription { + return (...params: Array): UnsubFunction => { + const accountIds: Array = params.slice(0, params.length - 1); + const cb: (balanceMap: DerivedBalancesMap) => any = params[params.length - 1]; + + return api.combineLatest( + accountIds.map((accountId) => + [validatingBalance(api), accountId] as [CombinatorFunction, ...Array] + ), (result) => + cb( + result.reduce((balances, balance) => { + balances[balance.address.toString()] = balance; + + return balances; + }, {} as DerivedBalancesMap) + ) + ); + }; +} diff --git a/packages/ui-react-rx/src/derive/balances/votingBalance.tsx b/packages/ui-react-rx/src/derive/balances/votingBalance.tsx new file mode 100644 index 0000000000..df3d221a28 --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/votingBalance.tsx @@ -0,0 +1,57 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription, DerivedBalances } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, AccountIndex, Balance } from '@polkadot/types'; + +import accountIdAndIndex from './accountIdAndIndex'; + +const EMPTY_ACCOUNT = new AccountId(new Uint8Array(32)); + +export default function votingBalance (api: ApiPromise): DeriveSubscription { + return (address: AccountIndex | AccountId | string, cb: (balance: DerivedBalances) => any): UnsubFunction => { + let combineDestroy: UnsubFunction | undefined; + const idDestory = accountIdAndIndex(api)(address, ([accountId]: [AccountId | undefined]) => { + const handler = (freeBalance?: Balance, reservedBalance?: Balance) => { + cb({ + accountId: accountId || EMPTY_ACCOUNT, + freeBalance: freeBalance || new Balance(0), + nominatedBalance: new Balance(0), + reservedBalance: reservedBalance || new Balance(0), + stakingBalance: new Balance(0), + votingBalance: new Balance( + (freeBalance || new Balance(0)).add(reservedBalance || new Balance(0)) + ) + }); + }; + + if (combineDestroy) { + combineDestroy(); + combineDestroy = undefined; + } + + if (!accountId) { + return handler(); + } + + combineDestroy = api.combineLatest([ + [api.query.balances.freeBalance, accountId], + [api.query.balances.reservedBalance, accountId] + ], ([freeBalance, reservedBalance]) => + handler(freeBalance, reservedBalance) + ); + }); + + return (): void => { + idDestory(); + + if (combineDestroy) { + combineDestroy(); + } + }; + }; +} diff --git a/packages/ui-react-rx/src/derive/balances/votingBalances.tsx b/packages/ui-react-rx/src/derive/balances/votingBalances.tsx new file mode 100644 index 0000000000..10d7cfd715 --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/votingBalances.tsx @@ -0,0 +1,25 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { CombinatorFunction } from '@polkadot/api/promise/Combinator'; +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription, DerivedBalances } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, AccountIndex } from '@polkadot/types'; + +import votingBalance from './votingBalance'; + +export default function votingBalances (api: ApiPromise): DeriveSubscription { + return (...params: Array): UnsubFunction => { + const addresses: Array = params.slice(0, params.length - 1); + const cb: (balance: Array) => any = params[params.length - 1]; + + return api.combineLatest( + addresses.map((address) => + [votingBalance(api), address] as [CombinatorFunction, ...Array] + ), cb + ); + }; +} diff --git a/packages/ui-react-rx/src/derive/balances/votingBalancesNominatorsFor.ts b/packages/ui-react-rx/src/derive/balances/votingBalancesNominatorsFor.ts new file mode 100644 index 0000000000..c79db82ef6 --- /dev/null +++ b/packages/ui-react-rx/src/derive/balances/votingBalancesNominatorsFor.ts @@ -0,0 +1,32 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription, DerivedBalances } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { AccountId } from '@polkadot/types'; + +import votingBalances from './votingBalances'; + +export default function votingBalancesNominatorsFor (api: ApiPromise): DeriveSubscription { + return (accountId: AccountId | string, cb: (balance: Array) => any): UnsubFunction => { + let combineDestroy: UnsubFunction | undefined; + const nominatorDestory = api.query.staking.nominatorsFor(accountId, (nominators?: Array) => { + if (combineDestroy) { + combineDestroy(); + } + + combineDestroy = votingBalances(api)(...(nominators || []), cb); + }); + + return (): void => { + nominatorDestory(); + + if (combineDestroy) { + combineDestroy(); + } + }; + }; +} diff --git a/packages/ui-react-rx/src/derive/chain/bestNumber.ts b/packages/ui-react-rx/src/derive/chain/bestNumber.ts new file mode 100644 index 0000000000..20b1a7a44a --- /dev/null +++ b/packages/ui-react-rx/src/derive/chain/bestNumber.ts @@ -0,0 +1,18 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { BlockNumber, Header } from '@polkadot/types'; + +export default function bestNumber (api: ApiPromise): DeriveSubscription { + return (cb: (blockNumber: BlockNumber) => any): UnsubFunction => + api.rpc.chain.subscribeNewHead((header?: Header) => { + if (header && header.blockNumber) { + cb(header.blockNumber); + } + }) as UnsubFunction; +} diff --git a/packages/ui-react-rx/src/derive/chain/bestNumberFinalised.ts b/packages/ui-react-rx/src/derive/chain/bestNumberFinalised.ts new file mode 100644 index 0000000000..dd1a2e124e --- /dev/null +++ b/packages/ui-react-rx/src/derive/chain/bestNumberFinalised.ts @@ -0,0 +1,18 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { BlockNumber, Header } from '@polkadot/types'; + +export default function bestNumberFinalised (api: ApiPromise): DeriveSubscription { + return (cb: (blockNumber: BlockNumber) => any): UnsubFunction => + api.rpc.chain.subscribeFinalisedHeads((header?: Header) => { + if (header && header.blockNumber) { + cb(header.blockNumber); + } + }) as UnsubFunction; +} diff --git a/packages/ui-react-rx/src/derive/chain/index.ts b/packages/ui-react-rx/src/derive/chain/index.ts new file mode 100644 index 0000000000..3ac2510d45 --- /dev/null +++ b/packages/ui-react-rx/src/derive/chain/index.ts @@ -0,0 +1,6 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +export { default as bestNumber } from './bestNumber'; +export { default as bestNumberFinalised } from './bestNumberFinalised'; diff --git a/packages/ui-react-rx/src/derive/democracy/index.ts b/packages/ui-react-rx/src/derive/democracy/index.ts new file mode 100644 index 0000000000..af355ce40a --- /dev/null +++ b/packages/ui-react-rx/src/derive/democracy/index.ts @@ -0,0 +1,8 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +export { default as referendumInfos } from './referendumInfos'; +export { default as referendums } from './referendums'; +export { default as referendumVotesFor } from './referendumVotesFor'; +export { default as votes } from './votes'; diff --git a/packages/ui-react-rx/src/derive/democracy/referendumInfos.tsx b/packages/ui-react-rx/src/derive/democracy/referendumInfos.tsx new file mode 100644 index 0000000000..6070ae0ccb --- /dev/null +++ b/packages/ui-react-rx/src/derive/democracy/referendumInfos.tsx @@ -0,0 +1,27 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { CombinatorFunction } from '@polkadot/api/promise/Combinator'; +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; +import { ReferendumInfo } from '@polkadot/types'; + +export default function referendumInfos (api: ApiPromise): DeriveSubscription { + return (...params: Array): UnsubFunction => { + const ids: Array = params.slice(0, params.length - 1); + const cb: (infos: Array) => any = params[params.length - 1]; + + return api.combineLatest( + ids.map((id) => + [api.query.democracy.referendumInfoOf, id] as [CombinatorFunction, ...Array] + ), (infos: Array) => + cb( + (infos || []).filter((info) => info) as Array + ) + ); + }; +} diff --git a/packages/ui-react-rx/src/derive/democracy/referendumVotesFor.ts b/packages/ui-react-rx/src/derive/democracy/referendumVotesFor.ts new file mode 100644 index 0000000000..2757d7a104 --- /dev/null +++ b/packages/ui-react-rx/src/derive/democracy/referendumVotesFor.ts @@ -0,0 +1,51 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { CombinatorFunction } from '@polkadot/api/promise/Combinator'; +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription, DerivedReferendumVote } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, Balance, Vote } from '@polkadot/types'; + +import votingBalances from '../balances/votingBalances'; +import votes from './votes'; + +export default function referendumVotesFor (api: ApiPromise): DeriveSubscription { + return (referendumId: BN | number, cb: (votes: Array) => any): UnsubFunction => { + let innerDestroy: UnsubFunction | undefined; + const outerDestroy = api.query.democracy.votersFor(referendumId, (votersFor: Array) => { + if (innerDestroy) { + innerDestroy(); + innerDestroy = undefined; + } + + if (!votersFor || !votersFor.length) { + return cb([]); + } + + innerDestroy = api.combineLatest([ + [votes(api), referendumId, ...votersFor] as [CombinatorFunction, ...Array], + [votingBalances(api), ...votersFor] as [CombinatorFunction, ...Array] + ], ([votes, balances]) => + cb( + votersFor.map((accountId, index): DerivedReferendumVote => ({ + accountId, + balance: balances[index].votingBalance || new Balance(0), + vote: votes[index] || new Vote(0) + })) + ) + ); + }); + + return (): void => { + if (innerDestroy) { + innerDestroy(); + } + + outerDestroy(); + }; + }; +} diff --git a/packages/ui-react-rx/src/derive/democracy/referendums.ts b/packages/ui-react-rx/src/derive/democracy/referendums.ts new file mode 100644 index 0000000000..14e494a5fb --- /dev/null +++ b/packages/ui-react-rx/src/derive/democracy/referendums.ts @@ -0,0 +1,44 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import ApiPromise from '@polkadot/api/promise'; +import { ReferendumInfo } from '@polkadot/types'; + +import referendumInfos from './referendumInfos'; + +export default function referendums (api: ApiPromise): DeriveSubscription { + return (cb: (referendums: Array) => any): UnsubFunction => { + let innerDispose: UnsubFunction | undefined; + const outerDispose = api.combineLatest([ + api.query.democracy.nextTally, + api.query.democracy.referendumCount + ], ([nextTally, referendumCount]) => { + if (innerDispose) { + innerDispose(); + innerDispose = undefined; + } + + if (referendumCount && nextTally && referendumCount.gt(nextTally) && referendumCount.gtn(0)) { + innerDispose = referendumInfos(api)( + ...[...Array(referendumCount.sub(nextTally).toNumber())].map((_, i) => + nextTally.addn(i) + ), cb + ); + } else { + cb([]); + } + }); + + return (): void => { + outerDispose(); + + if (innerDispose) { + innerDispose(); + } + }; + }; +} diff --git a/packages/ui-react-rx/src/derive/democracy/votes.tsx b/packages/ui-react-rx/src/derive/democracy/votes.tsx new file mode 100644 index 0000000000..29f90d5eb6 --- /dev/null +++ b/packages/ui-react-rx/src/derive/democracy/votes.tsx @@ -0,0 +1,23 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { QueryableStorageFunction, UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; +import { AccountId, bool as Bool } from '@polkadot/types'; + +export default function votes (api: ApiPromise): DeriveSubscription { + return (...params: Array): UnsubFunction => { + const referendumId: BN = params[0]; + const accountIds: Array = params.slice(1, params.length - 1); + const cb: (infos: Array) => any = params[params.length - 1]; + + return api.combineLatest( + accountIds.map((accountId) => + [api.query.democracy.voteOf, [referendumId, accountId]] as [QueryableStorageFunction, ...Array] + ), cb); + }; +} diff --git a/packages/ui-react-rx/src/derive/index.ts b/packages/ui-react-rx/src/derive/index.ts new file mode 100644 index 0000000000..0d751a70a8 --- /dev/null +++ b/packages/ui-react-rx/src/derive/index.ts @@ -0,0 +1,15 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import * as balances from './balances'; +import * as chain from './chain'; +import * as democracy from './democracy'; +import * as session from './session'; + +export default { + balances, + chain, + democracy, + session +}; diff --git a/packages/ui-react-rx/src/derive/session/eraLength.ts b/packages/ui-react-rx/src/derive/session/eraLength.ts new file mode 100644 index 0000000000..13f608b812 --- /dev/null +++ b/packages/ui-react-rx/src/derive/session/eraLength.ts @@ -0,0 +1,19 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; + +export default function eraLength (api: ApiPromise): DeriveSubscription { + return (cb: (count: BN) => any): UnsubFunction => + api.combineLatest([ + api.query.session.sessionLength, + api.query.staking.sessionsPerEra + ], ([sessionLength, sessionsPerEra]) => + cb((sessionLength || new BN(1)).mul(sessionsPerEra || new BN(1))) + ); +} diff --git a/packages/ui-react-rx/src/derive/session/eraProgress.ts b/packages/ui-react-rx/src/derive/session/eraProgress.ts new file mode 100644 index 0000000000..56c34a5cef --- /dev/null +++ b/packages/ui-react-rx/src/derive/session/eraProgress.ts @@ -0,0 +1,30 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; + +import sessionProgress from './sessionProgress'; + +export default function eraProgress (api: ApiPromise): DeriveSubscription { + return (cb: (count: BN) => any): UnsubFunction => + api.combineLatest([ + sessionProgress(api), + api.query.session.currentIndex, + api.query.session.sessionLength, + api.query.staking.lastEraLengthChange, + api.query.staking.sessionsPerEra + ], ([sessionProgress, currentIndex, sessionLength, lastEraLengthChange, sessionsPerEra]) => + cb( + (currentIndex || new BN(0)) + .sub(lastEraLengthChange || new BN(0)) + .mod(sessionsPerEra || new BN(1)) + .mul(sessionLength || new BN(1)) + .add(sessionProgress || new BN(0)) + ) + ); +} diff --git a/packages/ui-react-rx/src/derive/session/index.ts b/packages/ui-react-rx/src/derive/session/index.ts new file mode 100644 index 0000000000..7386ce7450 --- /dev/null +++ b/packages/ui-react-rx/src/derive/session/index.ts @@ -0,0 +1,7 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +export { default as eraLength } from './eraLength'; +export { default as eraProgress } from './eraProgress'; +export { default as sessionProgress } from './sessionProgress'; diff --git a/packages/ui-react-rx/src/derive/session/sessionProgress.ts b/packages/ui-react-rx/src/derive/session/sessionProgress.ts new file mode 100644 index 0000000000..37311a5da0 --- /dev/null +++ b/packages/ui-react-rx/src/derive/session/sessionProgress.ts @@ -0,0 +1,27 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; +import { DeriveSubscription } from '../types'; + +import BN from 'bn.js'; +import ApiPromise from '@polkadot/api/promise'; + +import bestNumber from '../chain/bestNumber'; + +export default function sessionProgress (api: ApiPromise): DeriveSubscription { + return (cb: (count: BN) => any): UnsubFunction => + api.combineLatest([ + bestNumber(api), + api.query.session.sessionLength, + api.query.session.lastLengthChange + ], ([bestNumber, sessionLength, lastLengthChange]) => + cb( + (bestNumber || new BN(0)) + .sub(lastLengthChange || new BN(0)) + .add(sessionLength || new BN(1)) + .mod(sessionLength || new BN(1)) + ) + ); +} diff --git a/packages/ui-react-rx/src/derive/types.ts b/packages/ui-react-rx/src/derive/types.ts new file mode 100644 index 0000000000..d6461e3ce7 --- /dev/null +++ b/packages/ui-react-rx/src/derive/types.ts @@ -0,0 +1,40 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { UnsubFunction } from '@polkadot/api/promise/types'; + +import BN from 'bn.js'; +import { AccountId, Balance, Vote } from '@polkadot/types'; + +export interface DeriveSubscription { + (...params: Array): UnsubFunction; +} + +export type DerivedBalancesFees = { + creationFee: BN, + existentialDeposit: BN, + transactionBaseFee: BN, + transactionByteFee: BN, + transferFee: BN +}; + +export type DerivedBalances = { + accountId: AccountId, + freeBalance: Balance, + nominatedBalance: Balance, + reservedBalance: Balance, + votingBalance: Balance, + stakingBalance: Balance, + nominators?: Array +}; + +export type DerivedBalancesMap = { + [index: string]: DerivedBalances +}; + +export type DerivedReferendumVote = { + accountId: AccountId, + balance: Balance, + vote: Vote +}; diff --git a/packages/ui-react-rx/src/index.ts b/packages/ui-react-rx/src/index.ts index c58658378d..44b7c4a851 100644 --- a/packages/ui-react-rx/src/index.ts +++ b/packages/ui-react-rx/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -7,8 +7,6 @@ import Balance from './Balance'; import BestFinalised from './BestFinalised'; import BestNumber from './BestNumber'; import Chain from './Chain'; -import Connected from './Connected'; -import Div from './Div'; import NodeName from './NodeName'; import NodeVersion from './NodeVersion'; import Nonce from './Nonce'; @@ -21,8 +19,6 @@ export { BestFinalised, BestNumber, Chain, - Connected, - Div, NodeName, NodeVersion, Nonce, diff --git a/packages/ui-react-rx/src/types.ts b/packages/ui-react-rx/src/types.ts index eb85e9900b..337d229994 100644 --- a/packages/ui-react-rx/src/types.ts +++ b/packages/ui-react-rx/src/types.ts @@ -1,11 +1,8 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { ProviderInterface } from '@polkadot/rpc-provider/types'; -import { RpcRxInterface } from '@polkadot/rpc-rx/types'; - -import ApiObservable from '@polkadot/api-observable'; +import ApiPromise from '@polkadot/api/promise'; export type BareProps = { className?: string, @@ -15,15 +12,8 @@ export type BareProps = { export type ApiProps = { isApiConnected: boolean, isApiReady: boolean, - api: RpcRxInterface, - apiMethods: { - [index: string]: boolean - }, - apiObservable: ApiObservable, - apiSupport: 'latest', - setApi: (api: RpcRxInterface) => void, - setApiProvider: (provider?: ProviderInterface) => void, - setApiWsUrl: (url?: string) => void + apiPromise: ApiPromise, + setApiUrl: (url?: string) => void }; export type OnChangeCb$Obs = { next: (value?: T) => any }; @@ -48,7 +38,7 @@ export type RxProps = { export type BaseProps = BareProps & ApiProps & ChangeProps & ParamProps & RxProps & { children?: React.ReactNode, label?: string, - render?: (value?: T) => any // node? + render?: (value?: T) => React.ReactNode }; export type Formatter = (value?: any) => string; diff --git a/packages/ui-react-rx/src/util/balanceFormat.spec.js b/packages/ui-react-rx/src/util/balanceFormat.spec.js index 03d49f554d..ded2d8dc09 100644 --- a/packages/ui-react-rx/src/util/balanceFormat.spec.js +++ b/packages/ui-react-rx/src/util/balanceFormat.spec.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/util/balanceFormat.ts b/packages/ui-react-rx/src/util/balanceFormat.ts index 4fcc5d7620..bb19edbe4b 100644 --- a/packages/ui-react-rx/src/util/balanceFormat.ts +++ b/packages/ui-react-rx/src/util/balanceFormat.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/util/decimalFormat.ts b/packages/ui-react-rx/src/util/decimalFormat.ts index dc35911473..5eae450e29 100644 --- a/packages/ui-react-rx/src/util/decimalFormat.ts +++ b/packages/ui-react-rx/src/util/decimalFormat.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/util/index.ts b/packages/ui-react-rx/src/util/index.ts index 0db6c94428..c18c87c5e8 100644 --- a/packages/ui-react-rx/src/util/index.ts +++ b/packages/ui-react-rx/src/util/index.ts @@ -1,10 +1,11 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import balanceFormat from './balanceFormat'; import decimalFormat from './decimalFormat'; -import intervalSubscribe from './intervalSubscribe'; +import intervalObservable from './intervalObservable'; +import intervalTimer from './intervalTimer'; import isEqual from './isEqual'; import isTestChain from './isTestChain'; import numberFormat from './numberFormat'; @@ -13,7 +14,8 @@ import triggerChange from './triggerChange'; export { balanceFormat, decimalFormat, - intervalSubscribe, + intervalObservable, + intervalTimer, isEqual, isTestChain, numberFormat, diff --git a/packages/ui-react-rx/src/util/intervalSubscribe.ts b/packages/ui-react-rx/src/util/intervalObservable.ts similarity index 90% rename from packages/ui-react-rx/src/util/intervalSubscribe.ts rename to packages/ui-react-rx/src/util/intervalObservable.ts index 79ad823f2f..efcccb28e3 100644 --- a/packages/ui-react-rx/src/util/intervalSubscribe.ts +++ b/packages/ui-react-rx/src/util/intervalObservable.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/util/intervalTimer.ts b/packages/ui-react-rx/src/util/intervalTimer.ts new file mode 100644 index 0000000000..01b5d1efa5 --- /dev/null +++ b/packages/ui-react-rx/src/util/intervalTimer.ts @@ -0,0 +1,18 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { RxProps } from '../types'; + +const TIMEOUT = 500; + +export default function intervalTimer> (that: React.Component): number { + return window.setInterval(() => { + const elapsed = Date.now() - ((that.state.rxUpdatedAt as number) || 0); + const rxUpdated = elapsed <= 1500; + + if (rxUpdated !== that.state.rxUpdated) { + that.setState({ rxUpdated }); + } + }, TIMEOUT); +} diff --git a/packages/ui-react-rx/src/util/isEqual.ts b/packages/ui-react-rx/src/util/isEqual.ts index 736eb2b12d..27011d8bb5 100644 --- a/packages/ui-react-rx/src/util/isEqual.ts +++ b/packages/ui-react-rx/src/util/isEqual.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/util/isTestChain.spec.js b/packages/ui-react-rx/src/util/isTestChain.spec.js index e123d12f50..20a46fcb71 100644 --- a/packages/ui-react-rx/src/util/isTestChain.spec.js +++ b/packages/ui-react-rx/src/util/isTestChain.spec.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/util/isTestChain.ts b/packages/ui-react-rx/src/util/isTestChain.ts index b0ed15714d..cbbe46dd08 100644 --- a/packages/ui-react-rx/src/util/isTestChain.ts +++ b/packages/ui-react-rx/src/util/isTestChain.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/util/numberFormat.ts b/packages/ui-react-rx/src/util/numberFormat.ts index 8f76783de5..9628872fbb 100644 --- a/packages/ui-react-rx/src/util/numberFormat.ts +++ b/packages/ui-react-rx/src/util/numberFormat.ts @@ -1,14 +1,13 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import BN from 'bn.js'; -import { UInt } from '@polkadot/types/codec'; import decimalFormat from './decimalFormat'; -export default function numberFormat (value?: UInt | BN | number | null): string { - if (value === undefined || value === null) { +export default function numberFormat (value?: BN | number | null): string { + if (!value) { return '0'; } diff --git a/packages/ui-react-rx/src/util/triggerChange.ts b/packages/ui-react-rx/src/util/triggerChange.ts index 1c3e9786ff..b1863273a8 100644 --- a/packages/ui-react-rx/src/util/triggerChange.ts +++ b/packages/ui-react-rx/src/util/triggerChange.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/with/api.tsx b/packages/ui-react-rx/src/with/api.tsx index 2ec634ae7b..59e86c5f82 100644 --- a/packages/ui-react-rx/src/with/api.tsx +++ b/packages/ui-react-rx/src/with/api.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. @@ -22,7 +22,7 @@ export default function withApi (Inner: React.ComponentT return ( {(apiProps: ApiProps) => { - assert(apiProps && apiProps.api, `Application root must be wrapped inside 'rx-react/Api' to provide API context`); + assert(apiProps && apiProps.apiPromise, `Application root must be wrapped inside 'rx-react/Api' to provide API context`); return ( // @ts-ignore Something here with the props are going wonky diff --git a/packages/ui-react-rx/src/with/apiDiv.ts b/packages/ui-react-rx/src/with/apiDiv.ts deleted file mode 100644 index 909298ba39..0000000000 --- a/packages/ui-react-rx/src/with/apiDiv.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { BaseProps } from '../types'; -import { ApiMethod, ComponentRenderer, DefaultProps, RenderFn, Options } from './types'; - -import withObservableDiv from './observableDiv'; - -export default function withApiDiv> (call: ApiMethod, options?: Options): ComponentRenderer { - return (render: RenderFn, defaultProps: DefaultProps = {}): React.ComponentType => - withObservableDiv('rawCall', { ...options, params: [call] })(render, defaultProps); -} diff --git a/packages/ui-react-rx/src/with/call.tsx b/packages/ui-react-rx/src/with/call.tsx new file mode 100644 index 0000000000..8cbe4f3206 --- /dev/null +++ b/packages/ui-react-rx/src/with/call.tsx @@ -0,0 +1,206 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +// TODO: Lots of duplicated code between this and withObservable, surely there is a better way of doing this? + +import { ApiProps, RxProps } from '../types'; +import { HOC, Options } from './types'; + +import React from 'react'; +import { assert, isUndefined } from '@polkadot/util'; + +import derive from '../derive/index'; +import { intervalTimer, isEqual, triggerChange } from '../util/index'; +import echoTransform from './transform/echo'; +import withApi from './api'; + +type State = RxProps & { + destroy?: () => void, + propName: string, + timerId: number +}; + +type Props = ApiProps & {}; + +const NOOP = () => { + // ignore +}; + +// FIXME proper types for attributes + +export default function withCall (endpoint: string, { rxChange, params = [], paramProp = 'params', propName, transform = echoTransform }: Options = {}): HOC { + return (Inner: React.ComponentType): React.ComponentType => { + class WithPromise extends React.Component> { + state: State; + + constructor (props: Props) { + super(props); + + const [area, section, method] = endpoint.split('.'); + + this.state = { + propName: `${area}_${section}_${method}`, + rxUpdated: false, + rxUpdatedAt: 0, + timerId: -1, + value: void 0 + }; + } + + componentDidUpdate (prevProps: any) { + const newParams = this.getParams(this.props); + + if (!isEqual(newParams, this.getParams(prevProps))) { + this + .subscribe(newParams) + .then(NOOP) + .catch(NOOP); + } + } + + componentDidMount () { + this.setState({ + timerId: intervalTimer(this) + }); + + this + .subscribe(this.getParams(this.props)) + .then(NOOP) + .catch(NOOP); + } + + componentWillUnmount () { + const { timerId } = this.state; + + if (timerId !== -1) { + clearInterval(timerId); + } + + this.unsubscribe(); + } + + private getParams (props: any): Array { + const paramValue = props[paramProp]; + + return isUndefined(paramValue) + ? params + : params.concat( + Array.isArray(paramValue) + ? paramValue + : [paramValue] + ); + } + + private getApiMethod (newParams: Array) { + const { apiPromise } = this.props; + + if (endpoint === 'subscribe') { + const [fn, ...params] = newParams; + + return [ + fn, + params, + true + ]; + } + + const [area, section, method, ...others] = endpoint.split('.'); + + assert(area.length && section.length && method.length && others.length === 0, `Invalid API format, expected .
., found ${endpoint}`); + assert(['rpc', 'query', 'derive'].includes(area), `Unknown api.${area}, expected rpc, query or derive`); + + if (area === 'derive') { + const apiSection = (derive as any)[section]; + + assert(apiSection && apiSection[method], `Unable to find api.derive.${section}.${method}`); + + return [ + apiSection[method](apiPromise), + newParams, + true + ]; + } + + const apiSection = (apiPromise as any)[area][section]; + + assert(apiSection && apiSection[method], `Unable to find api.${area}.${section}.${method}`); + + return [ + apiSection[method], + newParams, + area === 'query' || method.startsWith('subscribe') + ]; + } + + private async subscribe (newParams: Array) { + const { apiPromise } = this.props; + + await apiPromise.isReady; + + try { + const [apiMethod, params, isSubscription] = this.getApiMethod(newParams); + + this.unsubscribe(); + + if (isSubscription) { + this.setState({ + destroy: apiMethod(...params, (value?: T) => + this.triggerUpdate(this.props, value)) + }); + } else { + const value: T = await apiMethod(...params); + + this.triggerUpdate(this.props, value); + } + } catch (error) { + console.error(endpoint, '::', error); + } + } + + private unsubscribe () { + const { destroy } = this.state; + + if (destroy) { + destroy(); + } + } + + private triggerUpdate (props: any, _value?: T): void { + try { + const value = (props.transform || transform)(_value); + + if (isEqual(value, this.state.value)) { + return; + } + + triggerChange(value, rxChange, props.rxChange); + + this.setState({ + rxUpdated: true, + rxUpdatedAt: Date.now(), + value + }); + } catch (error) { + console.error(endpoint, '::', error.message); + } + } + + render () { + const { rxUpdated, rxUpdatedAt, value } = this.state; + const _props = { + ...this.props, + rxUpdated, + rxUpdatedAt, + [propName || this.state.propName]: value + }; + + return ( + + ); + } + } + + return withApi(WithPromise); + }; +} diff --git a/packages/ui-react-rx/src/with/callDiv.tsx b/packages/ui-react-rx/src/with/callDiv.tsx new file mode 100644 index 0000000000..b23ae00d5a --- /dev/null +++ b/packages/ui-react-rx/src/with/callDiv.tsx @@ -0,0 +1,36 @@ +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { DefaultProps, Options } from './types'; +import { BaseProps } from '../types'; + +import React from 'react'; + +import withCall from './call'; + +type Props = BaseProps & { + value?: T +}; + +export default function withCallDiv (endpoint: string, options: Options = {}) { + return (render: (value?: T) => React.ReactNode, defaultProps: DefaultProps = {}): React.ComponentType => { + class Inner extends React.PureComponent> { + render () { + const { children, className = defaultProps.className, label = '', rxUpdated, style, value } = this.props; + + return ( +
+ {label}{render(value)}{children} +
+ ); + } + } + + return withCall(endpoint, { ...options, propName: 'value' })(Inner); + }; +} diff --git a/packages/ui-react-rx/src/with/index.ts b/packages/ui-react-rx/src/with/index.ts index 32c89019e5..e7544e4ed4 100644 --- a/packages/ui-react-rx/src/with/index.ts +++ b/packages/ui-react-rx/src/with/index.ts @@ -1,19 +1,17 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import withApi from './api'; -import withApiDiv from './apiDiv'; +import withCall from './call'; +import withCallDiv from './callDiv'; import withMulti from './multi'; import withObservable from './observable'; -import withObservableBase from './observableBase'; -import withObservableDiv from './observableDiv'; export { withApi, - withApiDiv, + withCall, + withCallDiv, withMulti, - withObservable, - withObservableBase, - withObservableDiv + withObservable }; diff --git a/packages/ui-react-rx/src/with/multi.ts b/packages/ui-react-rx/src/with/multi.ts index 199f3156f6..6f55c7349f 100644 --- a/packages/ui-react-rx/src/with/multi.ts +++ b/packages/ui-react-rx/src/with/multi.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/with/observable.tsx b/packages/ui-react-rx/src/with/observable.tsx index e2bef967c6..2fb46d7015 100644 --- a/packages/ui-react-rx/src/with/observable.tsx +++ b/packages/ui-react-rx/src/with/observable.tsx @@ -1,100 +1,100 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -// TODO: Lots of duplicated code between this and withObservable, surely there ois a better way of doing this? +// TODO: Lots of duplicated code between this and withObservable, surely there is a better way of doing this? -import { ApiFunctions } from '@polkadot/api-observable/types'; import { RxProps } from '../types'; import { HOC, Options, DefaultProps, RenderFn } from './types'; import React from 'react'; -import { isUndefined } from '@polkadot/util'; +import { Observable, of } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; -import { isEqual } from '../util/index'; +import { intervalObservable, isEqual, triggerChange } from '../util/index'; import echoTransform from './transform/echo'; -import withApi from './api'; -import withObservableBase from './observableBase'; type State = RxProps & { - Component?: React.ComponentType + subscriptions: Array; // FIXME subscriptions }; // FIXME proper types for attributes -export default function withObservable (subscription: ApiFunctions, { rxChange, params = [], paramProp = 'params', propName = subscription, transform = echoTransform }: Options = {}): HOC { +export default function withObservable (observable: Observable

, { rxChange, propName = 'value', transform = echoTransform }: Options = {}): HOC { return (Inner: React.ComponentType, defaultProps: DefaultProps = {}, render?: RenderFn): React.ComponentType => { - class WithObservable extends React.Component> { + return class WithObservable extends React.Component> { state: State; constructor (props: any) { super(props); - this.state = {}; - } - - private getParams (props: any): Array { - const paramValue = props[paramProp]; - - return isUndefined(paramValue) - ? params - : params.concat( - Array.isArray(paramValue) - ? paramValue - : [paramValue] - ); - } - - componentDidUpdate (prevProps: any) { - const newParams = this.getParams(this.props); - - if (!isEqual(newParams, this.getParams(prevProps))) { - this.subscribe(newParams); - } + this.state = { + rxUpdated: false, + rxUpdatedAt: 0, + subscriptions: [], + value: void 0 + }; } componentDidMount () { - this.subscribe(this.getParams(this.props)); - } - - componentWillUnmount () { this.setState({ - Component: undefined + subscriptions: [ + observable + .pipe( + map(transform), + catchError(() => + of(undefined) + ) + ) + .subscribe((value: any) => + this.triggerUpdate(this.props, value) + ), + intervalObservable(this) + ] }); } - private subscribe (newParams: Array) { + componentWillUnmount () { + this.state.subscriptions.forEach((subscription) => + subscription.unsubscribe() + ); + } + + triggerUpdate = (props: any, value?: T): void => { try { - const { apiObservable } = this.props; - const observable = apiObservable[subscription](...newParams); + if (isEqual(value, this.state.value)) { + return; + } + + triggerChange(value, rxChange, props.rxChange || defaultProps.rxChange); this.setState({ - Component: withObservableBase(observable, { - rxChange, - propName, - transform - })(Inner, defaultProps, render) + rxUpdated: true, + rxUpdatedAt: Date.now(), + value }); } catch (error) { - console.error('withObservable:subscribe', subscription, error); - - // throw error; + console.error(this.props, error); } } render () { - const { Component } = this.state; - - if (!Component) { - return null; - } + const { children } = this.props; + const { rxUpdated, rxUpdatedAt, value } = this.state; + const _props = { + ...defaultProps, + ...this.props, + rxUpdated, + rxUpdatedAt, + [propName]: value + }; return ( - + + {render && render(value)}{children} + ); } - } - - return withApi(WithObservable); + }; }; } diff --git a/packages/ui-react-rx/src/with/observableBase.tsx b/packages/ui-react-rx/src/with/observableBase.tsx deleted file mode 100644 index bfd78153a8..0000000000 --- a/packages/ui-react-rx/src/with/observableBase.tsx +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -// TODO: Lots of duplicated code between this and withObservable, surely there ois a better way of doing this? - -import { RxProps } from '../types'; -import { HOC, Options, DefaultProps, RenderFn } from './types'; - -import React from 'react'; -import { Observable, of } from 'rxjs'; -import { catchError, map } from 'rxjs/operators'; - -import { intervalSubscribe, isEqual, triggerChange } from '../util/index'; -import echoTransform from './transform/echo'; - -type State = RxProps & { - subscriptions: Array; // FIXME subscriptions -}; - -// FIXME proper types for attributes - -export default function withObservableBase (observable: Observable

, { rxChange, propName = 'value', transform = echoTransform }: Options = {}): HOC { - return (Inner: React.ComponentType, defaultProps: DefaultProps = {}, render?: RenderFn): React.ComponentType => { - return class WithObservable extends React.Component> { - state: State; - - constructor (props: any) { - super(props); - - this.state = { - rxUpdated: false, - rxUpdatedAt: 0, - subscriptions: [], - value: void 0 - }; - } - - componentDidMount () { - this.setState({ - subscriptions: [ - observable - .pipe( - map(transform), - catchError(() => - of(undefined) - ) - ) - .subscribe((value: any) => - this.triggerUpdate(this.props, value) - ), - intervalSubscribe(this) - ] - }); - } - - componentWillUnmount () { - this.state.subscriptions.forEach((subscription) => - subscription.unsubscribe() - ); - } - - triggerUpdate = (props: any, value?: T): void => { - try { - if (isEqual(value, this.state.value)) { - return; - } - - triggerChange(value, rxChange, props.rxChange || defaultProps.rxChange); - - this.setState({ - rxUpdated: true, - rxUpdatedAt: Date.now(), - value - }); - } catch (error) { - console.error(this.props, error); - } - } - - render () { - const { children } = this.props; - const { rxUpdated, rxUpdatedAt, value } = this.state; - const _props = { - ...defaultProps, - ...this.props, - rxUpdated, - rxUpdatedAt, - [propName]: value - }; - - return ( - - {render && render(value)}{children} - - ); - } - }; - }; -} diff --git a/packages/ui-react-rx/src/with/observableDiv.ts b/packages/ui-react-rx/src/with/observableDiv.ts deleted file mode 100644 index 18ed98e4f2..0000000000 --- a/packages/ui-react-rx/src/with/observableDiv.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { ApiFunctions } from '@polkadot/api-observable/types'; -import { BaseProps } from '../types'; -import { ComponentRenderer, DefaultProps, RenderFn, Options } from './types'; - -import Div from '../Div'; -import withObservable from './observable'; - -export default function withObservableDiv> (call: ApiFunctions, options?: Options): ComponentRenderer { - return (render: RenderFn, defaultProps: DefaultProps = {}): React.ComponentType => - withObservable(call, options)(Div, defaultProps, render); -} diff --git a/packages/ui-react-rx/src/with/transform/echo.ts b/packages/ui-react-rx/src/with/transform/echo.ts index e5dfcc7391..f480168db6 100644 --- a/packages/ui-react-rx/src/with/transform/echo.ts +++ b/packages/ui-react-rx/src/with/transform/echo.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/src/with/types.ts b/packages/ui-react-rx/src/with/types.ts index dd044fe574..7df4b55f20 100644 --- a/packages/ui-react-rx/src/with/types.ts +++ b/packages/ui-react-rx/src/with/types.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/test/enzyme.js b/packages/ui-react-rx/test/enzyme.js index a8b03751ea..5db9d7230a 100644 --- a/packages/ui-react-rx/test/enzyme.js +++ b/packages/ui-react-rx/test/enzyme.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/test/observable.js b/packages/ui-react-rx/test/observable.js index 8ea3abcce9..3f900d381c 100644 --- a/packages/ui-react-rx/test/observable.js +++ b/packages/ui-react-rx/test/observable.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-react-rx/webpack.config.js b/packages/ui-react-rx/webpack.config.js index c9aef54f98..cce86a72bc 100644 --- a/packages/ui-react-rx/webpack.config.js +++ b/packages/ui-react-rx/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-react-rx authors & contributors +// Copyright 2017-2019 @polkadot/ui-react-rx authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-signer/package.json b/packages/ui-signer/package.json index cef2875de7..79a4b36eab 100644 --- a/packages/ui-signer/package.json +++ b/packages/ui-signer/package.json @@ -12,6 +12,6 @@ "dependencies": { "@babel/runtime": "^7.2.0", "@polkadot/ui-app": "^0.21.17", - "@polkadot/ui-keyring": "^0.24.18" + "@polkadot/ui-keyring": "^0.24.25" } } diff --git a/packages/ui-signer/src/Extrinsic.tsx b/packages/ui-signer/src/Extrinsic.tsx index 6ff6f9dac3..dcccf1878a 100644 --- a/packages/ui-signer/src/Extrinsic.tsx +++ b/packages/ui-signer/src/Extrinsic.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-signer authors & contributors +// Copyright 2017-2019 @polkadot/ui-signer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-signer/src/Modal.spec.js b/packages/ui-signer/src/Modal.spec.js index acff7c6214..1c9e565800 100644 --- a/packages/ui-signer/src/Modal.spec.js +++ b/packages/ui-signer/src/Modal.spec.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-app authors & contributors +// Copyright 2017-2019 @polkadot/ui-app authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-signer/src/Modal.tsx b/packages/ui-signer/src/Modal.tsx index 8e27377d33..30695fda3e 100644 --- a/packages/ui-signer/src/Modal.tsx +++ b/packages/ui-signer/src/Modal.tsx @@ -1,19 +1,20 @@ -// Copyright 2017-2018 @polkadot/ui-signer authors & contributors +// Copyright 2017-2019 @polkadot/ui-signer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. +import { SubmittableSendResult } from '@polkadot/api/types'; import { ApiProps } from '@polkadot/ui-react-rx/types'; import { I18nProps, BareProps } from '@polkadot/ui-app/types'; import { RpcMethod } from '@polkadot/jsonrpc/types'; import { QueueTx, QueueTx$MessageSetStatus, QueueTx$Result, QueueTx$Status } from '@polkadot/ui-app/Status/types'; import React from 'react'; +import SubmittableExtrinsic from '@polkadot/api/promise/SubmittableExtrinsic'; import { decodeAddress } from '@polkadot/keyring'; import { Button, Modal } from '@polkadot/ui-app/index'; import keyring from '@polkadot/ui-keyring'; import { withApi, withMulti } from '@polkadot/ui-react-rx/with/index'; import { format } from '@polkadot/util/logger'; -import { Extrinsic } from '@polkadot/types'; import ExtrinsicDisplay from './Extrinsic'; import Unlock from './Unlock'; @@ -267,16 +268,16 @@ class Signer extends React.PureComponent { } } - const { apiObservable, queueSetTxStatus } = this.props; + const { apiPromise, queueSetTxStatus } = this.props; queueSetTxStatus(id, 'sending'); const pair = keyring.getPair(accountId); if (!isUnsigned) { - console.log(`sendExtrinsic: from=${pair.address()}, nonce=${accountNonce}, blockHash=${apiObservable.genesisHash.toHex()}`); + console.log(`sendExtrinsic: from=${pair.address()}, nonce=${accountNonce}, blockHash=${apiPromise.genesisHash.toHex()}`); - extrinsic.sign(pair, accountNonce, apiObservable.genesisHash); + extrinsic.sign(pair, accountNonce, apiPromise.genesisHash); } else { console.log(`sendInherent: from=${pair.address()}, nonce=${accountNonce}`); } @@ -284,11 +285,11 @@ class Signer extends React.PureComponent { await this.submitExtrinsic(extrinsic, id); } - private async submitRpc (rpc: RpcMethod, values: Array): Promise { - const { apiObservable } = this.props; + private async submitRpc ({ method, section }: RpcMethod, values: Array): Promise { + const { apiPromise } = this.props; try { - const result = await apiObservable.rawCall(rpc, ...values).toPromise(); + const result = await (apiPromise.rpc as any)[section][method](...values); console.log('submitRpc: result ::', format(result)); @@ -306,34 +307,25 @@ class Signer extends React.PureComponent { } } - private async submitExtrinsic (extrinsic: Extrinsic, id: number): Promise { - const { apiObservable, queueSetTxStatus } = this.props; + private async submitExtrinsic (extrinsic: SubmittableExtrinsic, id: number): Promise { + const { queueSetTxStatus } = this.props; try { const encoded = extrinsic.toJSON(); console.log('submitAndWatchExtrinsic: encode ::', encoded); - apiObservable - .submitAndWatchExtrinsic(extrinsic) - .subscribe( - (result) => { - if (!result) { - return; - } + extrinsic.send((result: SubmittableSendResult) => { + if (!result) { + return; + } - const status = result.type.toLowerCase() as QueueTx$Status; + const status = result.type.toLowerCase() as QueueTx$Status; - console.log('submitAndWatchExtrinsic: updated status ::', result); + console.log('submitAndWatchExtrinsic: updated status ::', result); - queueSetTxStatus(id, status, result); - }, - (error) => { - console.error('submitAndWatchExtrinsic:', error); - - queueSetTxStatus(id, 'error', null, error); - } - ); + queueSetTxStatus(id, status, result); + }); } catch (error) { console.error('submitAndWatchExtrinsic:', error); diff --git a/packages/ui-signer/src/Unlock.tsx b/packages/ui-signer/src/Unlock.tsx index f2d9520470..dea64a85ba 100644 --- a/packages/ui-signer/src/Unlock.tsx +++ b/packages/ui-signer/src/Unlock.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-signer authors & contributors +// Copyright 2017-2019 @polkadot/ui-signer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-signer/src/index.css b/packages/ui-signer/src/index.css index ef833cc576..61b3b274be 100644 --- a/packages/ui-signer/src/index.css +++ b/packages/ui-signer/src/index.css @@ -1,4 +1,4 @@ -/* Copyright 2017-2018 @polkadot/ui-signer authors & contributors +/* Copyright 2017-2019 @polkadot/ui-signer authors & contributors /* This software may be modified and distributed under the terms /* of the Apache-2.0 license. See the LICENSE file for details. */ diff --git a/packages/ui-signer/src/index.tsx b/packages/ui-signer/src/index.tsx index 7b0fdbed49..442d81773f 100644 --- a/packages/ui-signer/src/index.tsx +++ b/packages/ui-signer/src/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-signer authors & contributors +// Copyright 2017-2019 @polkadot/ui-signer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-signer/src/translate.ts b/packages/ui-signer/src/translate.ts index fd637a4230..049c163e69 100644 --- a/packages/ui-signer/src/translate.ts +++ b/packages/ui-signer/src/translate.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-signer authors & contributors +// Copyright 2017-2019 @polkadot/ui-signer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/packages/ui-signer/src/types.ts b/packages/ui-signer/src/types.ts index de5b991bd4..39f4ae3248 100644 --- a/packages/ui-signer/src/types.ts +++ b/packages/ui-signer/src/types.ts @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot/ui-signer authors & contributors +// Copyright 2017-2019 @polkadot/ui-signer authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/test/enzyme.js b/test/enzyme.js index fe04bb28a8..62e25ef623 100644 --- a/test/enzyme.js +++ b/test/enzyme.js @@ -1,4 +1,4 @@ -// Copyright 2017-2018 @polkadot authors & contributors +// Copyright 2017-2019 @polkadot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/yarn.lock b/yarn.lock index 37e0a18288..06c527452f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@babel/cli@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.2.0.tgz#505ed8d351daee6a88918da02c046c18c8c5a24f" - integrity sha512-FLteTkEoony0DX8NbnT51CmwmLBzINdlXmiJCSqCLmqWCDA/xk8EITPWqwDnVLbuK0bsZONt/grqHnQzQ15j0Q== +"@babel/cli@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.2.3.tgz#1b262e42a3e959d28ab3d205ba2718e1923cfee6" + integrity sha512-bfna97nmJV6nDJhXNPeEfxyMjWnt6+IjUAaDPiYRTBlm8L41n8nvw6UAqUCbvpFfU246gHPxW7sfWwqtF4FcYA== dependencies: commander "^2.8.1" convert-source-map "^1.1.0" @@ -46,17 +46,6 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.1.6": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.0.tgz#eaf3821fa0301d9d4aef88e63d4bcc19b73ba16c" - integrity sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg== - dependencies: - "@babel/types" "^7.2.0" - jsesc "^2.5.1" - lodash "^4.17.10" - source-map "^0.5.0" - trim-right "^1.0.1" - "@babel/generator@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc" @@ -100,16 +89,16 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-create-class-features-plugin@^7.2.1": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.1.tgz#f6e8027291669ef64433220dc8327531233f1161" - integrity sha512-EsEP7XLFmcJHjcuFYBxYD1FkP0irC8C9fsrt2tX/jrAi/eTnFI6DOPgVFb+WREeg1GboF+Ib+nCHbGBodyAXSg== +"@babel/helper-create-class-features-plugin@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.3.tgz#f6e719abb90cb7f4a69591e35fd5eb89047c4a7c" + integrity sha512-xO/3Gn+2C7/eOUeb0VRnSP1+yvWHNxlpAot1eMhtoKDCN7POsyQP5excuT5UsV5daHxMWBeIIOeI5cmB8vMRgQ== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-replace-supers" "^7.2.3" "@babel/helper-define-map@^7.1.0": version "7.1.0" @@ -166,15 +155,15 @@ "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" - integrity sha512-0JZRd2yhawo79Rcm4w0LwSMILFmFXjugG3yqf+P/UsKsRS1mJCmMwwlHDlMg7Avr9LrvSpp4ZSULO9r8jpCzcw== + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" + integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/template" "^7.2.2" + "@babel/types" "^7.2.2" lodash "^4.17.10" "@babel/helper-optimise-call-expression@^7.0.0": @@ -207,14 +196,14 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" - integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ== +"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz#19970020cf22677d62b3a689561dbd9644d8c5e5" + integrity sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA== dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.1.0" + "@babel/traverse" "^7.2.3" "@babel/types" "^7.0.0" "@babel/helper-simple-access@^7.1.0": @@ -260,11 +249,6 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.2", "@babel/parser@^7.1.6": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.0.tgz#02d01dbc330b6cbf36b76ac93c50752c69027065" - integrity sha512-M74+GvK4hn1eejD9lZ7967qAwvqTZayQa3g10ag4s9uewgR7TKjeaT0YMyoq+gVfKYABiWZ4MQD701/t5e1Jhg== - "@babel/parser@^7.2.2", "@babel/parser@^7.2.3": version "7.2.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" @@ -279,12 +263,12 @@ "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-class-properties@^7.2.0": - version "7.2.1" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.1.tgz#c734a53e0a1ec40fe5c22ee5069d26da3b187d05" - integrity sha512-/4FKFChkQ2Jgb8lBDsvFX496YTi7UWTetVgS8oJUpX1e/DlaoeEK57At27ug8Hu2zI2g8bzkJ+8k9qrHZRPGPA== +"@babel/plugin-proposal-class-properties@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.3.tgz#c9e1294363b346cff333007a92080f3203698461" + integrity sha512-FVuQngLoN2iDrpW7LmhPZ2sO4DJxf35FOcwidwB9Ru9tMvI5URthnkVHuG14IStV+TzkMTyLMoOUlSTtrdVwqw== dependencies: - "@babel/helper-create-class-features-plugin" "^7.2.1" + "@babel/helper-create-class-features-plugin" "^7.2.3" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-json-strings@^7.2.0": @@ -401,9 +385,9 @@ lodash "^4.17.10" "@babel/plugin-transform-classes@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.0.tgz#374f8876075d7d21fea55aeb5c53561259163f96" - integrity sha512-aPCEkrhJYebDXcGTAP+cdUENkH7zqOlgbKwLbghjjHpJRJBWM/FSlCjMoPGA8oUdiMfOrk3+8EFPLLb5r7zj2w== + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" + integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" @@ -588,9 +572,9 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.0.tgz#0c76c12a3b5826130078ee8ec84a7a8e4afd79c4" - integrity sha512-7TtPIdwjS/i5ZBlNiQePQCovDh9pAhVbp/nGVRBZuUdBiVRThyyLend3OHobc0G+RLCPPAN70+z/MAMhsgJd/A== + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" @@ -634,10 +618,10 @@ "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/preset-env@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.0.tgz#a5030e7e4306af5a295dd5d7c78dc5464af3fee2" - integrity sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng== +"@babel/preset-env@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.3.tgz#948c8df4d4609c99c7e0130169f052ea6a7a8933" + integrity sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -720,16 +704,7 @@ dependencies: regenerator-runtime "^0.12.0" -"@babel/template@^7.1.0", "@babel/template@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" - integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.2" - "@babel/types" "^7.1.2" - -"@babel/template@^7.2.2": +"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== @@ -738,22 +713,7 @@ "@babel/parser" "^7.2.2" "@babel/types" "^7.2.2" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.6.tgz#c8db9963ab4ce5b894222435482bd8ea854b7b5c" - integrity sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.6" - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.1.6" - "@babel/types" "^7.1.6" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.10" - -"@babel/traverse@^7.2.2": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3": version "7.2.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8" integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw== @@ -768,16 +728,7 @@ globals "^11.1.0" lodash "^4.17.10" -"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.6", "@babel/types@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.0.tgz#7941c5b2d8060e06f9601d6be7c223eef906d5d8" - integrity sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A== - dependencies: - esutils "^2.0.2" - lodash "^4.17.10" - to-fast-properties "^2.0.0" - -"@babel/types@^7.2.2": +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg== @@ -813,14 +764,14 @@ resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.3.tgz#6310a047f12d21a1036fb031317219892440416f" integrity sha512-4zAPlpDEh2VwXswwr/t8xGNDGg8RQiPxtxZ3qQEXyQsBV39ptTdESCjuBvGze1nLMVrxmTIKmnO/nAV8Tqjjzg== -"@lerna/add@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.7.1.tgz#7424843bc791a81a3a4f021c42e2f6a4f2766cb2" - integrity sha512-vECSd4XbLjXTvCa1qn5bNhsZ8OO9It2dhIcHSsfWDV4KyMvxUhdWeMMfxIgaODLUkfgJY1W12hWstLoCE9N5+g== +"@lerna/add@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.8.2.tgz#4e6ac25c6df7e4422e56f719b800750031c30b5f" + integrity sha512-P9U5fzvrINVcslfn2CoMoRH0k+skwNTEsBTYkqjRf+ZYaaM3PvKzXvnonMfPSLBgAK3bBMnzinfb3USJnStx2w== dependencies: - "@lerna/bootstrap" "^3.7.1" - "@lerna/command" "^3.7.1" - "@lerna/filter-options" "^3.6.0" + "@lerna/bootstrap" "^3.8.2" + "@lerna/command" "^3.8.1" + "@lerna/filter-options" "^3.8.1" "@lerna/npm-conf" "^3.7.0" "@lerna/validation-error" "^3.6.0" dedent "^0.7.0" @@ -837,23 +788,23 @@ "@lerna/validation-error" "^3.6.0" libnpm "^2.0.1" -"@lerna/bootstrap@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.7.1.tgz#e9fe1c3858c897f42f1c0ac552bdf9b55fde3009" - integrity sha512-ryY/AwOS8SLN/FA+rKqVvXoQVtT8A3NxRq9Ywqphf8Rtil10Fkl9H1Th3kyKuG5W1e4V9g1s39pEPeogULim3w== +"@lerna/bootstrap@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.8.2.tgz#9a7d4d6f77e83bbb6131db64a50eebd7242ce153" + integrity sha512-/MT2krnth21mI2t3S6M1FJ4MUt+h+ycwcSfHhDMsgqfPqtb6y7awWlAFjHzgWXxf1LUOStkIOoGsJGNsxjiXWQ== dependencies: "@lerna/batch-packages" "^3.6.0" - "@lerna/command" "^3.7.1" - "@lerna/filter-options" "^3.6.0" + "@lerna/command" "^3.8.1" + "@lerna/filter-options" "^3.8.1" "@lerna/has-npm-version" "^3.3.0" - "@lerna/npm-install" "^3.6.0" + "@lerna/npm-install" "^3.8.2" "@lerna/package-graph" "^3.6.0" "@lerna/pulse-till-done" "^3.7.1" "@lerna/rimraf-dir" "^3.6.0" - "@lerna/run-lifecycle" "^3.7.1" + "@lerna/run-lifecycle" "^3.8.2" "@lerna/run-parallel-batches" "^3.0.0" - "@lerna/symlink-binary" "^3.7.0" - "@lerna/symlink-dependencies" "^3.7.0" + "@lerna/symlink-binary" "^3.7.2" + "@lerna/symlink-dependencies" "^3.8.1" "@lerna/validation-error" "^3.6.0" dedent "^0.7.0" get-port "^3.2.0" @@ -866,23 +817,23 @@ read-package-tree "^5.1.6" semver "^5.5.0" -"@lerna/changed@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.7.1.tgz#73090b6d1a6cd9a5db71cb51ea704011671c5e70" - integrity sha512-0b/bzWafSFTKBxcl7m8QWKsEEtW+DMJ+XylcVhnB58emogdLzqywSEf1sSeoMAlQKFp1IZskQGbsemSOrcHXHA== +"@lerna/changed@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.8.2.tgz#61c40a59ab33488cd920f5406d2ff2023dc78e1d" + integrity sha512-NMxLftHcNVZH+kdL9qylD4c/ZYljQ7YOQdgrc97ds23dk11UhLVAkbbpRVU5DE/s+bqo03zROVHPEYT+ELQjWg== dependencies: - "@lerna/collect-updates" "^3.6.0" - "@lerna/command" "^3.7.1" + "@lerna/collect-updates" "^3.8.1" + "@lerna/command" "^3.8.1" "@lerna/listable" "^3.6.0" "@lerna/output" "^3.6.0" - "@lerna/version" "^3.7.1" + "@lerna/version" "^3.8.2" -"@lerna/check-working-tree@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.6.0.tgz#638ee7f5976fe607d544629b1ef4ae67887984b5" - integrity sha512-Ioy1t2aVasAwhY1Oi5kfpwbW9RDupxxVVu2t2c1EeBYYCu3jIt1A5ad34gidgsKyiG3HeBEVziI4Uaihnb96ZQ== +"@lerna/check-working-tree@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.8.1.tgz#bda0719f3a3ceaed976b08f57b054af6a0acf295" + integrity sha512-UJqyvFr3+MTDo31fVjJlV/eshmQg8u0vpQcY95Vs00B99QxzLoICSGpNdldhSBnOIpOlq6tm5H/2hflc5hANew== dependencies: - "@lerna/describe-ref" "^3.6.0" + "@lerna/describe-ref" "^3.8.1" "@lerna/validation-error" "^3.6.0" "@lerna/child-process@^3.3.0": @@ -894,13 +845,13 @@ execa "^1.0.0" strong-log-transformer "^2.0.0" -"@lerna/clean@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.7.1.tgz#37d9eb023d62a472f80179d9090aa636cfed8c91" - integrity sha512-wJ9rEyTHDAsF9/7ei1JU2vAWtLCOUOoBtsAyDXpWUxg89cLnLVbtlNX+BDFSVbSWsLgR80J1MWQMYBQba5J25g== +"@lerna/clean@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.8.1.tgz#40df71a3481b369266fd467bafd481e79390f100" + integrity sha512-+jxuiKdvau3tlhiMq1cQMzzdr/4b95q4Cmpt8BD5ivrEpD+X3pCJGjjMxybpi5sZzR/XWlfJn9vn9mnFpyTrTA== dependencies: - "@lerna/command" "^3.7.1" - "@lerna/filter-options" "^3.6.0" + "@lerna/command" "^3.8.1" + "@lerna/filter-options" "^3.8.1" "@lerna/prompt" "^3.6.0" "@lerna/pulse-till-done" "^3.7.1" "@lerna/rimraf-dir" "^3.6.0" @@ -918,25 +869,25 @@ libnpm "^2.0.1" yargs "^12.0.1" -"@lerna/collect-updates@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.6.0.tgz#8520d64852c5059b453db53afee22539853f2bde" - integrity sha512-knliEz3phY51SGnwDhhYqx6SJN6y9qh/gZrZgQ7ogqz1UgA/MyJb27gszjsyyG6jUQshimBpjsG7OMwjt8+n9A== +"@lerna/collect-updates@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.8.1.tgz#e227efe9955b56b258baf7e8f853f779d40556a7" + integrity sha512-1ULd1FBX8j8XGe166CUx+PkNeBJrbauI6Ux9+NiVrpeyE5rF6hzrowRyaptE9n5jzAl0WtTTIP1MsdrVG7BvAA== dependencies: "@lerna/child-process" "^3.3.0" - "@lerna/describe-ref" "^3.6.0" + "@lerna/describe-ref" "^3.8.1" libnpm "^2.0.1" minimatch "^3.0.4" slash "^1.0.0" -"@lerna/command@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.7.1.tgz#fcd11758880d838223472813bc2f5cd874fb08d9" - integrity sha512-IZDnessP+8AZ+UcnYQUiBou5zV04c3UyPSKdIG9L1S8UsacIN8OmCT0eYzX47yOTAS/nUpsUxvAfOSQpZf/Ncw== +"@lerna/command@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.8.1.tgz#ec5b2f7ff1b2ad7491179dfc8b6708d4fedf4c6f" + integrity sha512-AWC1ziiSCJikuviBcQHOc9qTqGS/KwG9cy4wbk65Zxmfy373/JJEt0bg0bfo48reZ2HiJu0mBXLitd3brXpdIw== dependencies: "@lerna/child-process" "^3.3.0" "@lerna/package-graph" "^3.6.0" - "@lerna/project" "^3.7.0" + "@lerna/project" "^3.7.2" "@lerna/validation-error" "^3.6.0" "@lerna/write-log-file" "^3.6.0" dedent "^0.7.0" @@ -968,13 +919,13 @@ fs-extra "^7.0.0" libnpm "^2.0.1" -"@lerna/create@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.7.1.tgz#859c9f925da1d1bf5f9b450547a876ce6a776fe8" - integrity sha512-05WPErmgrNZ9ZuLLmcCEijRNaIfw6ArfONPa+ESr5uN+m/p6huEn4+PuoPgrHHceo32NfgpkzFEBWom5gLrOaw== +"@lerna/create@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.8.1.tgz#f8f6e282786c60caeb01306f2929645b77e965f2" + integrity sha512-+mUkK9MEwTa8w69+yf5WhGF7csxn7wJRmsBe99J7QklamOSZXTLt4O5AeBtaYKFdJ9Tf5D+oxENMYLd2EaJNSw== dependencies: "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.7.1" + "@lerna/command" "^3.8.1" "@lerna/npm-conf" "^3.7.0" "@lerna/validation-error" "^3.6.0" camelcase "^4.1.0" @@ -991,42 +942,42 @@ validate-npm-package-name "^3.0.0" whatwg-url "^7.0.0" -"@lerna/describe-ref@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.6.0.tgz#29eda334c81cd4c0a2942f309936bcb69a4543a0" - integrity sha512-hVZJ2hYVbrrNiEG+dEg/Op4pYAbROkDZdiIUabAJffr0T/frcN+5es2HfmOC//4+78Cs1M9iTyQRoyC1RXS2BQ== +"@lerna/describe-ref@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.8.1.tgz#b99ef6f8aa58fa9389af1e03beaa716cc6cb506d" + integrity sha512-EPXFiZbWG0KiaDM+BT3RZahy5gwrTVyKDv8HmPkGhu2h4pr34tzsSMmYmJ8I0dLeu4IpP/G/OIBa6DkYWisiZw== dependencies: "@lerna/child-process" "^3.3.0" libnpm "^2.0.1" -"@lerna/diff@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.7.1.tgz#85efc5aacd0fceead87151e2dc092150f675167d" - integrity sha512-Ogzv3jDFpGjKhLo74LcUypN8tjRr6QkiQ133yrBMplKWGmA6s4kqLiVr6sqChHcx8Ew3IFoNoHCkTFekU9JEmw== +"@lerna/diff@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.8.1.tgz#739836a7faf6d08e820a936aa765fd45e805371c" + integrity sha512-FrQ2c7AULUs4eYwLE5adw6YObRdS8EgCbq5dE/sLrvnqODniM2hRnMf/zsFl4R8wf9PIs5tFXdyTdMVsQfwZGg== dependencies: "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.7.1" + "@lerna/command" "^3.8.1" "@lerna/validation-error" "^3.6.0" libnpm "^2.0.1" -"@lerna/exec@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.7.1.tgz#4f46475e202625f84e389d1adc59d2c1ac561a48" - integrity sha512-cGcNdq0Yh0L8Ek3va+t+BHdGtLS756JWFKI9C/SFOH850ws0tVIEAgtflHNVptvWsP2IQZZJxyiA4UwUSCFSxw== +"@lerna/exec@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.8.1.tgz#a73c812cb7bea6fccef9d0d8e940e395f235af17" + integrity sha512-v+AAxkq19UdTfsO0aOfmAvQs9GnDpy5TyP1q4NVOZCotLOfVnFQ16QfzVCBA4hR3a6puugs3lmaOlQnMmDoDFQ== dependencies: "@lerna/batch-packages" "^3.6.0" "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.7.1" - "@lerna/filter-options" "^3.6.0" + "@lerna/command" "^3.8.1" + "@lerna/filter-options" "^3.8.1" "@lerna/run-parallel-batches" "^3.0.0" "@lerna/validation-error" "^3.6.0" -"@lerna/filter-options@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.6.0.tgz#8100a3f2e18a9772a61138711e1fe1f14969f814" - integrity sha512-6iUMZuvvXPL5EAF7Zo9azaZ6FxOq6tGbiSX8fUXgCdN+jlRjorvkzR+E0HS4bEGTWmV446lnLwdQLZuySfLcbQ== +"@lerna/filter-options@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.8.1.tgz#8c9708d60681383051d90a06eaa292dddd1d16b4" + integrity sha512-ty4Pl+vZjPSc7jc4nhK/4YYGKpLOhcGHLw6Zu71D4V3DJW/ZDHm/veRIApmhddL7+6y9G+ZGnGYYh/8RFyT6hA== dependencies: - "@lerna/collect-updates" "^3.6.0" + "@lerna/collect-updates" "^3.8.1" "@lerna/filter-packages" "^3.6.0" dedent "^0.7.0" @@ -1068,13 +1019,13 @@ "@lerna/child-process" "^3.3.0" semver "^5.5.0" -"@lerna/import@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.7.1.tgz#0aa8f0a1d85abd4c2519b20946841f75bb7d9571" - integrity sha512-fwmwuOzUOPzI8nkfk1Pgu2S+XVUnE6d6y/iyt09ZXPxasatPRfyqFHwct8l4N+jNd3gI85sUcmZzT73FVzUG4Q== +"@lerna/import@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.8.1.tgz#d6565c43d993f2827d1ef84c6bfb3a61ee563881" + integrity sha512-4GETPwbZOd7HuSDaqiAf6UENBLzmU2ICE7RXGoe5hIyCIYODx8q+/OSBYOdpV0hHbm/4IaKDa/k0rvCrI/dUFQ== dependencies: "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.7.1" + "@lerna/command" "^3.8.1" "@lerna/prompt" "^3.6.0" "@lerna/pulse-till-done" "^3.7.1" "@lerna/validation-error" "^3.6.0" @@ -1082,35 +1033,35 @@ fs-extra "^7.0.0" p-map-series "^1.0.0" -"@lerna/init@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.7.1.tgz#2dd2a781933904a382ddc604921da8687ab409b1" - integrity sha512-1BRu3R+zt+lzRsEW4/pQeo9Z7ONWfqWzh8vxNDbu9NhpHP6+9UMbAUNVlWl1WjD9UKpPWPOaOms5gsFtz3brOA== +"@lerna/init@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.8.1.tgz#0c417573865253cbd87d40ccbec089fae9119f6b" + integrity sha512-pWS5EBaRr7kNr5uQSN06vd1kN2afIRJoYA4PEiD1Cs4Z9tPJYoDMEClPnss0sdh8O8RH3IzcDkN2gjzLn7oe/Q== dependencies: "@lerna/child-process" "^3.3.0" - "@lerna/command" "^3.7.1" + "@lerna/command" "^3.8.1" fs-extra "^7.0.0" p-map "^1.2.0" write-json-file "^2.3.0" -"@lerna/link@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.7.1.tgz#407f4d742c97a130168d0f0fedb608a660813e0e" - integrity sha512-v+otrKI935IA9wM7lrjx4vm425wX5jmzi2zsgCK9ulNkmXzEaSDOD+iycuWg47bwLVAGRtiQ+mwVWElfWkTAhg== +"@lerna/link@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.8.1.tgz#1c11b52843f8c4f2ebc8e13f98a28225e2fefca2" + integrity sha512-IKdnForLXk9XrR4i02ExfK//pQe94z0Q7TF9uSbjHk1JNLnUSzxRZ31WeuI5/ZZrhdHBJV1eDb6lJg7IRiXH5A== dependencies: - "@lerna/command" "^3.7.1" + "@lerna/command" "^3.8.1" "@lerna/package-graph" "^3.6.0" - "@lerna/symlink-dependencies" "^3.7.0" + "@lerna/symlink-dependencies" "^3.8.1" p-map "^1.2.0" slash "^1.0.0" -"@lerna/list@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.7.1.tgz#ddec541147b6233255a46f9e2fbd482e5b79d864" - integrity sha512-cQvA7KWYdfiJGCKohajYm7IjBb+ZD+Csf6PS+ne2j5OZULhPXNxGxVzxtAiA7fc+kr+Z6GhADpHwQ6BzX4/STg== +"@lerna/list@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.8.1.tgz#ae7a148f4e6494278f96e9c909a30ef6362f1dab" + integrity sha512-2Eafq6tlbXmCMBCpKLlQRD27b2W2ygAc6X/jYJ9bZtKZ1ZzNBjp5TWIHQAvj3/vAAR1VhSrfL+rMHIaqzEAASg== dependencies: - "@lerna/command" "^3.7.1" - "@lerna/filter-options" "^3.6.0" + "@lerna/command" "^3.8.1" + "@lerna/filter-options" "^3.8.1" "@lerna/listable" "^3.6.0" "@lerna/output" "^3.6.0" @@ -1149,10 +1100,10 @@ figgy-pudding "^3.5.1" libnpm "^2.0.1" -"@lerna/npm-install@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.6.0.tgz#314fc0d0c35429e2b5db1e7de87b3ddb1ab77606" - integrity sha512-RKV31VdrBZKjmKfq25JG4mIHJ8NAOsLKq/aYSaBs8zP+uwXH7RU39saVfv9ReKiAzhKE2ghOG2JeMdIHtYnPNA== +"@lerna/npm-install@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.8.2.tgz#24c7271a62bd3ec03275cf0a1c5fbafef4955f42" + integrity sha512-A22IrhPy70Gm30rBYSPp/PDWjByvj6QdxqQh41HlNGOCzM5WCCSDXpfeoxzS0ow0d3WGJMraE2k1GFpOP6Hyxg== dependencies: "@lerna/child-process" "^3.3.0" "@lerna/get-npm-exec-opts" "^3.6.0" @@ -1161,12 +1112,12 @@ signal-exit "^3.0.2" write-pkg "^3.1.0" -"@lerna/npm-publish@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.7.1.tgz#41236e316c4e50cf15cc410282119a798da922f0" - integrity sha512-3Tv4UWD+1Wz1Eqc7/8eEvAHL5c2pTx+rOKYMEc6P5Z1glN1+TfIfPckPAX0H2xg44yTCh1KGJSSBpJQl68QqIQ== +"@lerna/npm-publish@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.8.2.tgz#5f2bc820894c73a77fc277135fba6e4ade7c24f5" + integrity sha512-0ZVEmD7vQs29mV35O/8q/eCvTVA4nu49Jpq5821TMMENa2CiBmQCWv/MqLaQlPCAdTx/kXHJMQ9kmhwrhks0Aw== dependencies: - "@lerna/run-lifecycle" "^3.7.1" + "@lerna/run-lifecycle" "^3.8.2" figgy-pudding "^3.5.1" fs-extra "^7.0.0" libnpm "^2.0.1" @@ -1187,13 +1138,14 @@ dependencies: libnpm "^2.0.1" -"@lerna/pack-directory@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-3.7.1.tgz#d1030d2c22ec1fe1e4852e2271bb58631c027a80" - integrity sha512-/7R9NRyybublORCGrvzjZ8zNqfkUYjE7mA2J4OA7Uy+/EfxmDj/2tjUuuC2MTfKfgoeHOw388uW7qsHF4dx2Jw== +"@lerna/pack-directory@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-3.8.2.tgz#5ffddce7781998195cffcbe51128c5a69dd3ca7a" + integrity sha512-sYXioixVw3L5r9O4bt+hnfPQ8jLn/PVOJVivQdpSlup+ZUiI5mmtjzAO3NOK/k8DZf8YrUx0Lm1+vzgnqu1tKw== dependencies: "@lerna/get-packed" "^3.7.0" - "@lerna/run-lifecycle" "^3.7.1" + "@lerna/package" "^3.7.2" + "@lerna/run-lifecycle" "^3.8.2" figgy-pudding "^3.5.1" libnpm "^2.0.1" npm-packlist "^1.1.12" @@ -1209,21 +1161,21 @@ libnpm "^2.0.1" semver "^5.5.0" -"@lerna/package@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.7.0.tgz#00bece03fd4280c9395c519402773896e17a7063" - integrity sha512-GfcBoRY5eEOqIxYJ5EmUTCh/zsotvISL//+w0V6ebsuGgnYxOEU36lnNJe8Pu2wXS55Oxscl3IU6lRoRY/yGmw== +"@lerna/package@^3.7.2": + version "3.7.2" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.7.2.tgz#03c69fd7fb965c372c8c969165a2f7d6dfe2dfcb" + integrity sha512-8A5hN2CekM1a0Ix4VUO/g+REo+MsnXb8lnQ0bGjr1YGWzSL5NxYJ0Z9+0pwTfDpvRDYlFYO0rMVwBUW44b4dUw== dependencies: libnpm "^2.0.1" load-json-file "^4.0.0" write-pkg "^3.1.0" -"@lerna/project@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.7.0.tgz#b72164cf1e1c8910d7667d6f5436d75d32fd8269" - integrity sha512-W9E6biuuvPDA4j1H9AblyBcPRDm7tlEVLgIj/lbqe8q+fEi1qo2IR2b/zZVgKZ3dEuGAfwNmV+fT5tf2y+YWqA== +"@lerna/project@^3.7.2": + version "3.7.2" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.7.2.tgz#02315e10b6de85289e9388c0e260d8f12d246c38" + integrity sha512-YNJw61G4YrnwW0P1NAR/bd/kfDdK+WPI5YH10AHsG1TXBFV9hBusjB7MROmobYbln7zNWJJ3PQmXtWv134aaRQ== dependencies: - "@lerna/package" "^3.7.0" + "@lerna/package" "^3.7.2" "@lerna/validation-error" "^3.6.0" cosmiconfig "^5.0.2" dedent "^0.7.0" @@ -1244,33 +1196,32 @@ inquirer "^6.2.0" libnpm "^2.0.1" -"@lerna/publish@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.7.1.tgz#87c0fd8cc5a89eb3c158a25f1b114ae7a1b899f5" - integrity sha512-t9dggmQkdmNwVzjWvepMJlpC+qXYyjowGayXDTXmD/EjxWsy+l85v9aLNQD9JSCZfrWZTGu9wkhrtKE6yyMD4w== +"@lerna/publish@^3.8.4": + version "3.8.4" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.8.4.tgz#5c24180a136aacbb7b5eb81dc9ca6a130ab4e56d" + integrity sha512-Bbz3Ne0UHiBqLrHAhB2+zitzYjgjIiydLmhLiuzhwbPgah7kP7nv9/HrXv927kjEY7EHd/+zqs/NuviJvKKb0g== dependencies: "@lerna/batch-packages" "^3.6.0" - "@lerna/check-working-tree" "^3.6.0" + "@lerna/check-working-tree" "^3.8.1" "@lerna/child-process" "^3.3.0" - "@lerna/collect-updates" "^3.6.0" - "@lerna/command" "^3.7.1" - "@lerna/describe-ref" "^3.6.0" + "@lerna/collect-updates" "^3.8.1" + "@lerna/command" "^3.8.1" + "@lerna/describe-ref" "^3.8.1" "@lerna/log-packed" "^3.6.0" "@lerna/npm-conf" "^3.7.0" "@lerna/npm-dist-tag" "^3.7.1" - "@lerna/npm-publish" "^3.7.1" + "@lerna/npm-publish" "^3.8.2" "@lerna/output" "^3.6.0" - "@lerna/pack-directory" "^3.7.1" + "@lerna/pack-directory" "^3.8.2" "@lerna/prompt" "^3.6.0" "@lerna/pulse-till-done" "^3.7.1" - "@lerna/run-lifecycle" "^3.7.1" + "@lerna/run-lifecycle" "^3.8.2" "@lerna/run-parallel-batches" "^3.0.0" "@lerna/validation-error" "^3.6.0" - "@lerna/version" "^3.7.1" + "@lerna/version" "^3.8.2" figgy-pudding "^3.5.1" fs-extra "^7.0.0" libnpm "^2.0.1" - npm-registry-fetch "^3.8.0" p-finally "^1.0.0" p-map "^1.2.0" p-pipe "^1.2.0" @@ -1303,10 +1254,10 @@ path-exists "^3.0.0" rimraf "^2.6.2" -"@lerna/run-lifecycle@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.7.1.tgz#4b06e69a34cc2bd9911dc90f93fd346d75ca5eaf" - integrity sha512-kE6w8d8Qde+ewZaDNIz4zhwde8s/i8vbbOsGDlR/Vw/9nqlmtj2YBZaS262NtWj83N04dtdYr4FVj51thciGQw== +"@lerna/run-lifecycle@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.8.2.tgz#fe97f771506e2351aa170ec75ef8e6d7e9b94509" + integrity sha512-V80nIoHpp0IL9WEaK8wz47SeqLSlI8DyNqVqUoG1DCeCGr6rdvRGD0FgHSKgRnZxk/SgP1Az/YBBtc5qnA+CzA== dependencies: "@lerna/npm-conf" "^3.7.0" figgy-pudding "^3.5.1" @@ -1320,14 +1271,14 @@ p-map "^1.2.0" p-map-series "^1.0.0" -"@lerna/run@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.7.1.tgz#27b91b870ea72a44de622b1473a971e0e7795859" - integrity sha512-woK/cXU1xJotllWmlHHHMes/AQNJn+qxoZvha5udjMcMzxxGu8LpNKLZTrimf2Zs+/APBmioM/Krr1ioAkwPJw== +"@lerna/run@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.8.1.tgz#73fd74b90652a437cd11964f5c504bf11ee30957" + integrity sha512-EKJsdfuZYLr6QrEqOt7qteBIR/hZ/Fdk526fdVBtryaL5t1UESwaF741M65WWQMJnFOtJZI6n2tna5CX0n7xVQ== dependencies: "@lerna/batch-packages" "^3.6.0" - "@lerna/command" "^3.7.1" - "@lerna/filter-options" "^3.6.0" + "@lerna/command" "^3.8.1" + "@lerna/filter-options" "^3.8.1" "@lerna/npm-run-script" "^3.6.0" "@lerna/output" "^3.6.0" "@lerna/run-parallel-batches" "^3.0.0" @@ -1335,25 +1286,24 @@ "@lerna/validation-error" "^3.6.0" p-map "^1.2.0" -"@lerna/symlink-binary@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.7.0.tgz#250c80966230ff64db6dcfba4c3efefa0040a9ba" - integrity sha512-J/6GeeTLaIjrhMyduHQQrj8gujJmSGVO8rCcBB0bAl++QDoMjBcMiTiYDtCCdRTOJo8KTVhnp/KhKJhu1r7RXQ== +"@lerna/symlink-binary@^3.7.2": + version "3.7.2" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.7.2.tgz#fedce89711ecfeb3d85fd7035199fab0436a793a" + integrity sha512-xS7DdBXNQgfgrhBe2Jz27+S65yxBfnl+Xi+grvlqoEGVk7b8kt2VcBtui/XgL6AAaTg6f9szj4LUnwC/oX6S1Q== dependencies: "@lerna/create-symlink" "^3.6.0" - "@lerna/package" "^3.7.0" + "@lerna/package" "^3.7.2" fs-extra "^7.0.0" p-map "^1.2.0" - read-pkg "^3.0.0" -"@lerna/symlink-dependencies@^3.7.0": - version "3.7.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.7.0.tgz#02ee9060f3be5151d3e8e01b3a53cf11479518f2" - integrity sha512-Vsb6aEYJFyBOBSlLwd9Z/vPO/auRLKKrsLfyBb/5x8BtCV9PVqVp3w86QdoOc3uBxeHYlDHVbUzShbwSANMYqw== +"@lerna/symlink-dependencies@^3.8.1": + version "3.8.1" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.8.1.tgz#890979f232beb9c4618a3b49d4ad11f567617642" + integrity sha512-MlXRTpB3Go/ubexxySngzg8PnItpPIxa0ydHMxvvw7s06g7ZsOOMOAx+F7AUPPr7bssdZ+gg5bfSq+J1HoINrg== dependencies: "@lerna/create-symlink" "^3.6.0" "@lerna/resolve-symlink" "^3.6.0" - "@lerna/symlink-binary" "^3.7.0" + "@lerna/symlink-binary" "^3.7.2" fs-extra "^7.0.0" p-finally "^1.0.0" p-map "^1.2.0" @@ -1371,20 +1321,20 @@ dependencies: libnpm "^2.0.1" -"@lerna/version@^3.7.1": - version "3.7.1" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.7.1.tgz#8db7897693832acb913e81ab4d3e24d9ac8b9974" - integrity sha512-ryPyRagOB0SMHwlAadgbjAuIxQWiJZrXQpbBtHS7zsM9cxTzSpAYzMp3v1b4w9tnineCegKMTRtRBsacv250vA== +"@lerna/version@^3.8.2": + version "3.8.2" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.8.2.tgz#4a44bb01a6a4121b46628fab0e2b9703429d73fb" + integrity sha512-TANvavzkyTcSVElsh8+zTZmsjzF6B0xuE9ldRdFKQaYAqmkkWNmf73BwLDZGisqEh45wnveiR9GeflSw4XI4iw== dependencies: "@lerna/batch-packages" "^3.6.0" - "@lerna/check-working-tree" "^3.6.0" + "@lerna/check-working-tree" "^3.8.1" "@lerna/child-process" "^3.3.0" - "@lerna/collect-updates" "^3.6.0" - "@lerna/command" "^3.7.1" + "@lerna/collect-updates" "^3.8.1" + "@lerna/command" "^3.8.1" "@lerna/conventional-commits" "^3.6.0" "@lerna/output" "^3.6.0" "@lerna/prompt" "^3.6.0" - "@lerna/run-lifecycle" "^3.7.1" + "@lerna/run-lifecycle" "^3.8.2" "@lerna/validation-error" "^3.6.0" chalk "^2.3.1" dedent "^0.7.0" @@ -1419,39 +1369,40 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@polkadot/api-observable@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/api-observable/-/api-observable-0.35.19.tgz#9edadd42c18dd8772fa649b18a874944ce45925f" - integrity sha512-Xc8Puzjy1pQ0Q+DZwwR4m7DG7mV1hM121ckvIHpcYmnGdQwdS0o9jIh2Srh8rg78QhELzL6RCabUXPnWYlQP1w== +"@polkadot/api@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-0.37.6.tgz#ac0fcdbaedc0fd58abfad754ecd92f4937749618" + integrity sha512-n6jo7BFzz8q4Dn/3++yTji9TjkyDxJ8Kvr+l5e55wzAAI+m0zQmGJ2JrzdqsXVqaD7fjZlR4fC61VS2YxLfeow== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/extrinsics" "^0.35.19" - "@polkadot/rpc-core" "^0.35.19" - "@polkadot/rpc-provider" "^0.35.19" - "@polkadot/storage" "^0.35.19" + "@polkadot/extrinsics" "^0.37.6" + "@polkadot/rpc-provider" "^0.37.6" + "@polkadot/rpc-rx" "^0.37.6" + "@polkadot/storage" "^0.37.6" + "@polkadot/types" "^0.37.6" "@types/rx" "^4.1.1" rxjs "^6.3.3" -"@polkadot/dev-react@^0.23.3": - version "0.23.3" - resolved "https://registry.yarnpkg.com/@polkadot/dev-react/-/dev-react-0.23.3.tgz#b7d81df555043c68ef513f4c5aec0c63763a089b" - integrity sha512-iuC+0c777247Sq1o56Pe77oFWZ8xW7j/E05dxgEaeew77G+kgHoakN3ZIVjDE5UhI9PZAcYCoAE2aHdhry9Mdw== +"@polkadot/dev-react@^0.23.7": + version "0.23.7" + resolved "https://registry.yarnpkg.com/@polkadot/dev-react/-/dev-react-0.23.7.tgz#59c0b23e208c2fc10a007994ff3ca4b805f9673f" + integrity sha512-8fUdnv7vwPaTZSMKYZ9pYDAZl5g6mnl+GcT81EpMtBfVhPi2ZimzhMqQwQQ+lS4gMs6Jcmnk0Ajfg87EIFzdBA== dependencies: "@babel/core" "^7.2.2" "@babel/plugin-syntax-dynamic-import" "^7.2.0" "@babel/preset-react" "^7.0.0" - "@polkadot/dev" "^0.23.3" - "@types/react" "^16.7.17" + "@polkadot/dev" "^0.23.7" + "@types/react" "^16.7.18" "@types/react-dom" "^16.0.11" "@types/styled-components" "^4.1.4" - babel-loader "^8.0.4" + babel-loader "^8.0.5" babel-plugin-styled-components "^1.10.0" - browserslist "^4.3.6" + browserslist "^4.3.7" copy-webpack-plugin "^4.6.0" - css-loader "^2.0.1" + css-loader "^2.1.0" enzyme "^3.8.0" enzyme-adapter-react-16 "^1.7.1" - file-loader "^2.0.0" + file-loader "^3.0.1" html-webpack-plugin "^3.2.0" mini-css-extract-plugin "^0.5.0" react "^16.7.0" @@ -1459,30 +1410,30 @@ react-hot-loader "^4.6.3" style-loader "^0.23.0" styled-components "^4.1.3" - thread-loader "^2.0.1" + thread-loader "^2.1.1" tslint "^5.12.0" tslint-react "^3.6.0" url-loader "^1.1.1" - webpack "^4.28.0" - webpack-cli "^3.1.2" + webpack "^4.28.3" + webpack-cli "^3.2.0" webpack-serve "^2.0.3" worker-loader "^2.0.0" -"@polkadot/dev@^0.23.3": - version "0.23.3" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.23.3.tgz#ee9bc6ccb1f985c8c79c8537bbebcd97cefbec1b" - integrity sha512-jAUbcEP0kQBkU9cXnlzghjqaDFda/cKjdXxR5nbgA8aIt5DvkACbihHSc0+ZDw5dr4NrbtDxx7hNuriWffKstg== +"@polkadot/dev@^0.23.7": + version "0.23.7" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.23.7.tgz#4a32050214fe13e7fdaa5aa1cc9fd0ccd310211b" + integrity sha512-6US2N28NBSfUt67zEZn+5CJ6DCFcklGqwHEykN6Xr+S9HsX+en9oK4NTzfgewjNP9FlKLjDjl7EwIJgIOERmwA== dependencies: - "@babel/cli" "^7.2.0" + "@babel/cli" "^7.2.3" "@babel/core" "^7.2.2" - "@babel/plugin-proposal-class-properties" "^7.2.0" + "@babel/plugin-proposal-class-properties" "^7.2.3" "@babel/plugin-proposal-object-rest-spread" "^7.2.0" "@babel/plugin-transform-runtime" "^7.2.0" - "@babel/preset-env" "^7.2.0" + "@babel/preset-env" "^7.2.3" "@babel/preset-typescript" "^7.1.0" "@babel/register" "^7.0.0" "@babel/runtime" "^7.2.0" - "@types/jest" "^23.3.10" + "@types/jest" "^23.3.11" "@types/node" "^10.12.18" babel-core "^7.0.0-bridge.0" babel-jest "^23.6.0" @@ -1492,161 +1443,160 @@ coveralls "^3.0.1" cpx "^1.5.0" gitbook-cli "^2.3.2" - gitbook-plugin-asciidoc-include "^0.1.9" gitbook-plugin-include-codeblock "^3.2.2" gitbook-plugin-insert-logo-link "^1.0.1" gitbook-plugin-mermaid-gb3 "^2.1.0" gitbook-plugin-sunlight-highlighter "^0.4.3" jest "^23.6.0" - lerna "^3.7.1" + lerna "^3.8.4" makeshift "^1.1.0" mkdirp "^0.5.1" - rimraf "^2.6.2" + rimraf "^2.6.3" tslint "^5.12.0" tslint-config-standard "^8.0.1" typedoc "^0.13.0" - typedoc-plugin-markdown "^1.1.19" - typedoc-plugin-no-inherit "^1.0.2" + typedoc-plugin-markdown "^1.1.20" + typedoc-plugin-no-inherit "^1.1.1" typescript "^3.2.2" -"@polkadot/extrinsics@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.35.19.tgz#271077bbc35ac837f4d6b7715935406c1b391ec7" - integrity sha512-Y3IW8TMrYPzVElZFSjoTQYiu5dDr4asSUGfu07JNt1HTHu3p+bWlKShOTrTfpQymmwosJYvFGO91SMDbIohxhg== +"@polkadot/extrinsics@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/extrinsics/-/extrinsics-0.37.6.tgz#114e46922c550449c10f60463c62af5d8663e0e3" + integrity sha512-lycUEEhLaQ1v0VQbidLixuO8G212yb8s9SmgMkGRZxk+GFBRXHir1/2pY253IMgWYfcjXBhCkUooBBPPNC0YSg== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/types" "^0.35.19" - "@polkadot/util" "^0.33.27" + "@polkadot/types" "^0.37.6" + "@polkadot/util" "^0.33.30" -"@polkadot/jsonrpc@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.35.19.tgz#21a46671cff3c82430d64cc692583703cdc1cfe1" - integrity sha512-SqWah2KH/kHHGK5U+M9MfjdXzTVb6nwRn229lKY+kPymE9qTWLZDyKBbVxInSyuAlSNYC6KFCoDZLzNND6FNXg== +"@polkadot/jsonrpc@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/jsonrpc/-/jsonrpc-0.37.6.tgz#9ec737f7dff710a54c9964f7f945a9b9ab40e5c2" + integrity sha512-n34Wh6ZWiTHgjuxMmYtmzaVTIFXRJGtujiJehhKQb95IF0KXP4irG132PBU0dW4X29STHV7UbxY63P2McHHAtg== dependencies: "@babel/runtime" "^7.2.0" -"@polkadot/keyring@^0.33.27": - version "0.33.27" - resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.33.27.tgz#f8b89bcf5e5a0975e72a7c146e78f4a727ccc697" - integrity sha512-khZe+jNggZ0LY6HA+mEKWXcdsHYDuW6eVNk3JMKK4MjdVfVRJ1Ep7dm2lMiHeJtXknJz57qzPKLelPI4YbQe8A== +"@polkadot/keyring@^0.33.30": + version "0.33.30" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.33.30.tgz#54cb6baec7db16366989381601cd58f2b5f9b851" + integrity sha512-qE6X9Nhp0reXBSPz5PGPlT78KchJXdfUuAE/yJIOyM2s5WGOWCHCMzQEJmL7S9F70w76EFxazczJCmNe+ZhPGA== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/util" "^0.33.27" - "@polkadot/util-crypto" "^0.33.27" - "@types/bs58" "^3.0.30" + "@polkadot/util" "^0.33.30" + "@polkadot/util-crypto" "^0.33.30" + "@types/bs58" "^4.0.0" bs58 "^4.0.1" -"@polkadot/rpc-core@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.35.19.tgz#d89b3da6d6b434b57d0bd4975fe3df602102316b" - integrity sha512-vjg6tNd7iAGkG4/1XShBhatyjQKKZZEzonwObvP0bDVgLwQPnYYo8gIB3e9l00q1MYx9j7YxV51i+h8o9EjxJQ== +"@polkadot/rpc-core@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-0.37.6.tgz#4b34d64cbafc6a12e8dca8d47ad680bbca95f855" + integrity sha512-C9sFNO+v5o7hCK1hlNMrDYvWUujziQP2x4tQg4J/FGgnAcPGZ8n+8htPkPaLrNiYWtgRFV5zmDXhGOy43s0SBw== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/jsonrpc" "^0.35.19" - "@polkadot/rpc-provider" "^0.35.19" - "@polkadot/types" "^0.35.19" - "@polkadot/util" "^0.33.27" + "@polkadot/jsonrpc" "^0.37.6" + "@polkadot/rpc-provider" "^0.37.6" + "@polkadot/types" "^0.37.6" + "@polkadot/util" "^0.33.30" -"@polkadot/rpc-provider@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.35.19.tgz#6cde7409a82a5a864755f84bec05e78709d5b983" - integrity sha512-06w8WJ6b4Pcrrhkw6EukaIlPwy+M5JWe8k8iI5VEZZmwsuRqYPGNRAj+wxrcN+K+DKVF+KjNC0WUXvnmlN6pVQ== +"@polkadot/rpc-provider@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-0.37.6.tgz#d23a133fa30c1a3937d83abe9d21417aac44f331" + integrity sha512-R4zc11oDqG66TlTswcKmj6ayb0W6ejjFixihh2XjtPirNSbaoQO0Hzs4ZJyeqYu802aX1LuyL4BrtbTAYaGDKw== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/keyring" "^0.33.27" - "@polkadot/storage" "^0.35.19" - "@polkadot/util" "^0.33.27" - "@polkadot/util-crypto" "^0.33.27" + "@polkadot/keyring" "^0.33.30" + "@polkadot/storage" "^0.37.6" + "@polkadot/util" "^0.33.30" + "@polkadot/util-crypto" "^0.33.30" "@types/nock" "^9.3.0" eventemitter3 "^3.1.0" isomorphic-fetch "^2.2.1" websocket "^1.0.28" -"@polkadot/rpc-rx@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/rpc-rx/-/rpc-rx-0.35.19.tgz#a6eb5dc55b7054d0ca60646c93931b217bf3ef40" - integrity sha512-7nRs5jz23lGq6ng9pShx7KD4rcD0cl68IDmHs8PG7Ll5o/T+GuW1kU4A7Vn6s67in1P2Qw/ivY3/gC4rciBp6A== +"@polkadot/rpc-rx@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-rx/-/rpc-rx-0.37.6.tgz#231326992eff3799fca4a113e10245d6aa335111" + integrity sha512-40NtFiSpnlIIS3gJJAvvdRkXDwCO/s9sDTam2xEVOo2RwKtfb9pnRdNSkdxzpNXM1tkru++2UMYE9dkQdSe7aw== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/rpc-core" "^0.35.19" - "@polkadot/rpc-provider" "^0.35.19" + "@polkadot/rpc-core" "^0.37.6" + "@polkadot/rpc-provider" "^0.37.6" "@types/rx" "^4.1.1" rxjs "^6.3.3" -"@polkadot/storage@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.35.19.tgz#d5faddc17aee71415bd8386e5278c2339b006477" - integrity sha512-m/pUuolFrRGVNodkqKCviRkX7Krn0xm5lG0Ucf8AmEBvqE9ECZNuizSFzn5JXnEDJ5ebBYarfsKvkZxyXtEp6Q== +"@polkadot/storage@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/storage/-/storage-0.37.6.tgz#ef9e7ed7082760faf92797f31b3854594914d011" + integrity sha512-4C8CzXhUdoyN4KeGLUOqkqRF0hphR7ZZZCX0c2SiQkfMhJOSkifi7vX9MzxaENt4oFcoSWE2V56K3fBZHFopzw== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/keyring" "^0.33.27" - "@polkadot/types" "^0.35.19" - "@polkadot/util" "^0.33.27" - "@polkadot/util-crypto" "^0.33.27" + "@polkadot/keyring" "^0.33.30" + "@polkadot/types" "^0.37.6" + "@polkadot/util" "^0.33.30" + "@polkadot/util-crypto" "^0.33.30" -"@polkadot/ts@^0.1.44": - version "0.1.44" - resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.44.tgz#2fb28215f10b869bfa544fd8df8fccb4932d64f2" - integrity sha512-tor7vSd3ZsRBO9FIuKZQ9hfqEGkNZnanAFVGmoL1iSmdhcoKtYTlQe0BQafjIynqIMOfXdJ7Zes9PlorPtw6yw== +"@polkadot/ts@^0.1.47": + version "0.1.47" + resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.47.tgz#89a7e44ce3274feb446e8102f16499ec6a5b5720" + integrity sha512-UE8Wru0BOk+h0RiDAxo1P5dpk9mZyK1VIJiKKM2vfzQqMCPfKnSuQXXXkNzJ/4dqjRJ6ilYwFkzXQwemJWF0+w== -"@polkadot/types@^0.35.19": - version "0.35.19" - resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.35.19.tgz#78457eb998e11c2ae741c7e982a2613e9cfee5cf" - integrity sha512-KiLARkFwne4Hy/4smL/XKcqWg5obkFhDDQp7kivCaL1hyxe+nrGIlfWrR6pCoFkbw0vGCHqICb3HuewznrzYCA== +"@polkadot/types@^0.37.6": + version "0.37.6" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.37.6.tgz#14da5f675f47e05bfdacd3add4f65eecf726d654" + integrity sha512-EOsbIydY9LfnCvW/BABN0ENDmlnEpVRlmlcHarM+VqUkGp9MpLBJWA/PirdPHB6h3x86QOqEtd03JUrHhzhu2g== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/keyring" "^0.33.27" - "@polkadot/util" "^0.33.27" + "@polkadot/keyring" "^0.33.30" + "@polkadot/util" "^0.33.30" core-js "^2.6.1" -"@polkadot/ui-assets@^0.24.18": - version "0.24.18" - resolved "https://registry.yarnpkg.com/@polkadot/ui-assets/-/ui-assets-0.24.18.tgz#b01c309cee391fdc93ef3c3dd1408bf94aa74178" - integrity sha512-GmUKptVtwTMdouO1trZdjCqAiOIqRvSnxpIlhrIoFDjaAMmLtXS5tstouxlv52FJbpCI0IDishSa8oIu3e4hCA== +"@polkadot/ui-assets@^0.24.25": + version "0.24.25" + resolved "https://registry.yarnpkg.com/@polkadot/ui-assets/-/ui-assets-0.24.25.tgz#bc65bf5ae64f5b9056d0997351b62ebfd592670c" + integrity sha512-ZWcuWPwnDcdwGyd/q8pqTxczZSe7MKByNRDsMq5aOFAdUiF40AXKlvAVjhTf29ryEEXbOq4D6A9NKuH/mrHAMw== dependencies: "@babel/runtime" "^7.2.0" -"@polkadot/ui-identicon@^0.24.18": - version "0.24.18" - resolved "https://registry.yarnpkg.com/@polkadot/ui-identicon/-/ui-identicon-0.24.18.tgz#87277862eba0644b6e4743ada6a10e6a557a35c6" - integrity sha512-zRmXM1gzn/6pBRWDZiAaBCfkHVZ+YfFbjTFLJl23+FFCNOmcMqyJSVL8hrsjMzKxAmPo8iHbvTQULxRyTGaJAA== +"@polkadot/ui-identicon@^0.24.25": + version "0.24.25" + resolved "https://registry.yarnpkg.com/@polkadot/ui-identicon/-/ui-identicon-0.24.25.tgz#d65170a56965288cb09af6f407e4fe1b6d1d2d70" + integrity sha512-TbIIeyK/MaRsEidLn/VSN2YvfkNkbxWnSEW9l2Y3DiPmvNOYgqmhja1jLbYv8Knt39kj0DeXQxiCvfOXyXEWbQ== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/keyring" "^0.33.27" - "@polkadot/ui-settings" "^0.24.18" - "@polkadot/util-crypto" "^0.33.27" + "@polkadot/keyring" "^0.33.30" + "@polkadot/ui-settings" "^0.24.25" + "@polkadot/util-crypto" "^0.33.30" "@types/color" "^3.0.0" "@types/react-copy-to-clipboard" "^4.2.6" color "^3.0.0" react-copy-to-clipboard "^5.0.1" -"@polkadot/ui-keyring@^0.24.18": - version "0.24.18" - resolved "https://registry.yarnpkg.com/@polkadot/ui-keyring/-/ui-keyring-0.24.18.tgz#b5b76585bd8a01e9c44d70af8c3dc1c7b810e666" - integrity sha512-vLVk4SdhqZMsegFIDXFDmA6eGdZO/J/ZhcwT/WeueLiZO2FiDYBmKcWG1NSSH7DM6zNpiyOjKnKLVFvZcw879g== +"@polkadot/ui-keyring@^0.24.25": + version "0.24.25" + resolved "https://registry.yarnpkg.com/@polkadot/ui-keyring/-/ui-keyring-0.24.25.tgz#19fbb2cdff5d27cfa84016df9bffd0fefceb694b" + integrity sha512-PAz/8tPn81/7BSQKG5L5e2/3FsntBS+vB23avpf28TKBx/v3w/8q+DvdDUpmZUYngt78i76EvEog1Y3SKwVMIg== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/keyring" "^0.33.27" - "@polkadot/types" "^0.35.19" + "@polkadot/keyring" "^0.33.30" + "@polkadot/types" "^0.37.6" "@types/store" "^2.0.1" store "^2.0.12" -"@polkadot/ui-settings@^0.24.18": - version "0.24.18" - resolved "https://registry.yarnpkg.com/@polkadot/ui-settings/-/ui-settings-0.24.18.tgz#4a1f9f9f8d10a620f41c05e55aad480da3a0abe7" - integrity sha512-fTJi1zsyi3Ps1UYtr7D3RSQbYho8sqWzLAo6TU0K1WTpAVXjRqeTiZbQQEn7RZ7M5kPerG3fJrYa9VGEAi2yGw== +"@polkadot/ui-settings@^0.24.25": + version "0.24.25" + resolved "https://registry.yarnpkg.com/@polkadot/ui-settings/-/ui-settings-0.24.25.tgz#dbc93cc32c4237552c2c8ea33f97ff6ce134e5ac" + integrity sha512-Mt7FjRz/OZmjFMrVyPgMnMiZ/XAuQgeynaLNqtY7MAF/Zm69FbelcEKQHtJyiW7OB0sn7yvH8P/yJmJ+pKgxZA== dependencies: "@babel/runtime" "^7.2.0" "@types/store" "^2.0.1" store "^2.0.12" -"@polkadot/util-crypto@^0.33.27": - version "0.33.27" - resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.33.27.tgz#efea792ebe43fa679e924f303bdcb6857c28e6d4" - integrity sha512-ZdlcUnPJOerbgbYJgMQHtGz8SGUr43geZ5/QIE4v8SkdSnwP6MKEvve/G2AkzmXIUZsLMpfW5k3CRsEFNHd1lQ== +"@polkadot/util-crypto@^0.33.30": + version "0.33.30" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.33.30.tgz#e164d6cc274e9031b6e51bbe674fc32a3845a6bd" + integrity sha512-epaEyZlVjAvOS2GwiIzgKcD+/09GaNeWcb7+N+Cpr3y8SV2cTFe0r4FHip93Aioj/pB+QzMiYuJbM2gYxKxMvQ== dependencies: "@babel/runtime" "^7.2.0" - "@polkadot/util" "^0.33.27" + "@polkadot/util" "^0.33.30" "@types/bip39" "^2.4.1" bip39 "^2.5.0" blakejs "^1.1.0" @@ -1654,16 +1604,16 @@ tweetnacl "^1.0.0" xxhashjs "^0.2.2" -"@polkadot/util@^0.33.27": - version "0.33.27" - resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.33.27.tgz#982e9afdd648731c88690ab6208512ca3bcde1ab" - integrity sha512-jLYx8dcTag6ACdYybeGWBkmpQj7DsTZ2mCqInhQFCuYmb1h7P7QK/RRDrCQ+Ai3yHfHol8pq/k/oQrgKXpyt6g== +"@polkadot/util@^0.33.30": + version "0.33.30" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.33.30.tgz#a25ca56ac5b5979ec199d51c35593153162b7ea0" + integrity sha512-193F3ZlFdCWn6hrnICy2NJmsVhi7VsxC1C2RXOfddfxgJa9/5+xtgPiobFD/6sL7IOhLF6vINlDYcoFNKdsw9w== dependencies: "@babel/runtime" "^7.2.0" "@types/bn.js" "^4.11.3" "@types/camelcase" "^4.1.0" "@types/deasync" "^0.1.0" - "@types/ip-regex" "^2.0.0" + "@types/ip-regex" "^3.0.0" "@types/xxhashjs" "^0.1.1" bn.js "^4.11.8" camelcase "^5.0.0" @@ -1705,9 +1655,11 @@ integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== "@types/base-x@*": - version "1.0.29" - resolved "https://registry.yarnpkg.com/@types/base-x/-/base-x-1.0.29.tgz#8a2d73e4a5c3121757a5f8870cfa4509655186b6" - integrity sha1-ii1z5KXDEhdXpfiHDPpFCWVRhrY= + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/base-x/-/base-x-3.0.0.tgz#a1365259d1d3fa3ff973ab543192a6bdd4cb2f90" + integrity sha512-vnqSlpsv9uFX5/z8GyKWAfWHhLGJDBkrgRRsnxlsX23DHOlNyqP/eHQiv4TwnYcZULzQIxaWA/xRWU9Dyy4qzw== + dependencies: + "@types/node" "*" "@types/bip39@^2.4.1": version "2.4.1" @@ -1723,10 +1675,10 @@ dependencies: "@types/node" "*" -"@types/bs58@^3.0.30": - version "3.0.30" - resolved "https://registry.yarnpkg.com/@types/bs58/-/bs58-3.0.30.tgz#916ba10992465e56f81afc735e7935fd749893e1" - integrity sha1-kWuhCZJGXlb4GvxzXnk1/XSYk+E= +"@types/bs58@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/bs58/-/bs58-4.0.0.tgz#baec75cb007b419ede3ec6b3410d2c8f14c92fc5" + integrity sha512-gYX+MHD4G/R+YGYwdhG5gbJj4LsEQGr3Vg6gVDAbe7xC5Bn8dNNG2Lpo6uDX/rT5dE7VBj0rGEFuV8L0AEx4Rg== dependencies: "@types/base-x" "*" @@ -1791,9 +1743,9 @@ "@types/node" "*" "@types/handlebars@^4.0.38": - version "4.0.39" - resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.39.tgz#961fb54db68030890942e6aeffe9f93a957807bd" - integrity sha512-vjaS7Q0dVqFp85QhyPSZqDKnTTCemcSHNHFvDdalO1s0Ifz5KuE64jQD5xoUkfdWwF4WpqdJEl7LsWH8rzhKJA== + version "4.0.40" + resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.40.tgz#b714e13d296a75bff3f199316d1311933ca79ffd" + integrity sha512-sGWNtsjNrLOdKha2RV1UeF8+UbQnPSG7qbe5wwbni0mw4h2gHXyPFUMOC+xwGirIiiydM/HSqjDO4rk6NFB18w== "@types/highlight.js@^9.12.3": version "9.12.3" @@ -1820,20 +1772,20 @@ resolved "https://registry.yarnpkg.com/@types/i18next/-/i18next-12.1.0.tgz#7c3fd3dbe03f9531147033773bbd0ca4f474a180" integrity sha512-qLyqTkp3ZKHsSoX8CNVYcTyTkxlm0aRCUpaUVetgkSlSpiNCdWryOgaYwgbO04tJIfLgBXPcy0tJ3Nl/RagllA== -"@types/ip-regex@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/ip-regex/-/ip-regex-2.0.0.tgz#4b7abb4c2cc1a50f00bb4f26983eefd0cd88f005" - integrity sha1-S3q7TCzBpQ8Au08mmD7v0M2I8AU= +"@types/ip-regex@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/ip-regex/-/ip-regex-3.0.0.tgz#f06748a44dd47810bb24555958b4b410cfe5abab" + integrity sha512-4j26qYCikXbIaypgqdGQhhIvYfTR+40i/05jVQB8oc57RbROEkBocdIUZO7fOhyqJsx7WRY36ySW8hoUZn7Fgw== -"@types/jest@^23.3.10": - version "23.3.10" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.10.tgz#4897974cc317bf99d4fe6af1efa15957fa9c94de" - integrity sha512-DC8xTuW/6TYgvEg3HEXS7cu9OijFqprVDXXiOcdOKZCU/5PJNLZU37VVvmZHdtMiGOa8wAA/We+JzbdxFzQTRQ== +"@types/jest@^23.3.11": + version "23.3.11" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.11.tgz#d3a936ae753d9e484965f5cbd19027c2b8af2551" + integrity sha512-eroF85PoG87XjCwzxey7yBsQNkIY/TV5myKKSG/022A0FW25afdu/uub6JDMS5eT68zBBt82S+w/MFOTjeLM3Q== "@types/lodash@^4.14.110": - version "4.14.118" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.118.tgz#247bab39bfcc6d910d4927c6e06cbc70ec376f27" - integrity sha512-iiJbKLZbhSa6FYRip/9ZDX6HXhayXLDGY2Fqws9cOkEQ6XeKfaxB0sC541mowZJueYyMnVUmmG+al5/4fCDrgw== + version "4.14.119" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.119.tgz#be847e5f4bc3e35e46d041c394ead8b603ad8b39" + integrity sha512-Z3TNyBL8Vd/M9D9Ms2S3LmFq2sSMzahodD6rCS9V2N44HUMINb75jNkSuwAx7eo2ufqTdfOdtGQpNbieUjPQmw== "@types/marked@^0.4.0": version "0.4.2" @@ -1852,20 +1804,15 @@ dependencies: "@types/node" "*" -"@types/node@*": - version "10.12.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.12.tgz#e15a9d034d9210f00320ef718a50c4a799417c47" - integrity sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A== - -"@types/node@^10.12.18": +"@types/node@*", "@types/node@^10.12.18": version "10.12.18" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== "@types/prop-types@*": - version "15.5.7" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.7.tgz#c6f1e0d0109ff358b132d98b7b4025c7a7b707c5" - integrity sha512-a6WH0fXkgPNiGIuLjjdpf0n/GnmgWZ4vLuVIJJnDwhmRDPEaiRBcy5ofQPh+EJFua0S1QWmk1745+JqZQGnJ8Q== + version "15.5.8" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.8.tgz#8ae4e0ea205fe95c3901a5a1df7f66495e3a56ce" + integrity sha512-3AQoUxQcQtLHsK25wtTWIoIpgYjH3vSDroZOUr7PpCHw/jLY1RB9z9E8dBT/OSmwStVgkRNvdh+ZHNiomRieaw== "@types/react-copy-to-clipboard@^4.2.6": version "4.2.6" @@ -1898,25 +1845,17 @@ "@types/react-router" "*" "@types/react-router@*": - version "4.4.1" - resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.4.1.tgz#c875dfd0b6fe00efa463eb8e5de8b5f74644b3f5" - integrity sha512-CtQfdcXyMye3vflnQQ2sHU832iDJRoAr4P+7f964KlLYupXU1I5crP1+d/WnCMo6mmtjBjqQvxrtbAbodqerMA== + version "4.4.3" + resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.4.3.tgz#ea68b4021cb576866f83365b2201411537423d50" + integrity sha512-8GmjakEBFNCLJbpg9jtDp1EDvFP0VkIPPKBpVwmB3Q+9whFoHu8rluMUXUE5SoGkEQvVOtgJzWmUsJojNpFMQQ== dependencies: "@types/history" "*" "@types/react" "*" -"@types/react@*": - version "16.7.13" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.13.tgz#d2369ae78377356d42fb54275d30218e84f2247a" - integrity sha512-WhqrQLAE9z65hfcvWqZfR6qUtIazFRyb8LXqHo8440R53dAQqNkt2OlVJ3FXwqOwAXXg4nfYxt0qgBvE18o5XA== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - -"@types/react@^16.7.17": - version "16.7.17" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.17.tgz#3242e796a1ffbba4f49eae5915a67f4c079504e9" - integrity sha512-YcXcaoXaxo7A76mBCGlKlN2aZu3REQfF0DTrhiyXVJLA7PDdxVCr+wiQOrkVNn44D/zLlIyDSn3U918Ve0AaEA== +"@types/react@*", "@types/react@^16.7.18": + version "16.7.18" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.18.tgz#f4ce0d539a893dd61e36cd11ae3a5e54f5a48337" + integrity sha512-Tx4uu3ppK53/iHk6VpamMP3f3ahfDLEVt3ZQc8TFm30a1H3v9lMsCntBREswZIW/SKrvJjkb3Hq8UwO6GREBng== dependencies: "@types/prop-types" "*" csstype "^2.2.0" @@ -2023,9 +1962,9 @@ "@types/rx-lite-virtualtime" "*" "@types/shelljs@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632" - integrity sha512-vs1hCC8RxLHRu2bwumNyYRNrU3o8BtZhLysH5A4I98iYmA2APl6R3uNQb5ihl+WiwH0xdC9LLO+vRrXLs/Kyxg== + version "0.8.1" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.1.tgz#133e874b5fb816a2e1c8647839c82d76760b1191" + integrity sha512-1lQw+48BuVgp6c1+z8EMipp18IdnV2dLh6KQGwOm+kJy9nPjEkaqRKmwbDNEYf//EKBvKcwOC6V2cDrNxVoQeQ== dependencies: "@types/glob" "*" "@types/node" "*" @@ -2049,10 +1988,10 @@ resolved "https://registry.yarnpkg.com/@types/xxhashjs/-/xxhashjs-0.1.1.tgz#980709096c7138713b7777f49dccd4b8f93908e5" integrity sha512-6mHo5kJME0Ydtms1ZW8qIV34xs4QryS6O8e8xQ5d3kXZgFOtdfV3h1HXhb11EhYSTO94fEj95xa+08VFZB5ZBQ== -"@types/yargs@^12.0.2": - version "12.0.2" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.2.tgz#7569157b2601d49d4442023c0d22f81d23f62d1e" - integrity sha512-NUyxaQW48vjeDHybmhy7CFx/6of1+PoaEGPMI+0PzBVr5s3BTELT7gV4lNaxUsKllNS1YAjkeTEhBtzIDWs2WQ== +"@types/yargs@^12.0.5": + version "12.0.5" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.5.tgz#f4f85fe198e1e9cedc0bb53a8c2d30fb34299e50" + integrity sha512-y51XRWWg1GiW4+mV2zmFQUqJT3bX7nuUaXW4j8a2dFvT9ZlaNLjb7ZxcUSDyklt/UBWrW2+31x+hQpRzxaTFzw== "@webassemblyjs/ast@1.7.11": version "1.7.11" @@ -2323,9 +2262,9 @@ acorn@^5.0.0, acorn@^5.2.1, acorn@^5.5.3, acorn@^5.6.2: integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== acorn@^6.0.1: - version "6.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754" - integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg== + version "6.0.5" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" + integrity sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg== agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: version "4.2.1" @@ -2360,9 +2299,9 @@ ajv@^4.9.1: json-stable-stringify "^1.0.1" ajv@^6.1.0, ajv@^6.5.5: - version "6.6.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" - integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww== + version "6.6.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d" + integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -2386,6 +2325,11 @@ ansi-colors@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + integrity sha1-06ioOzGapneTZisT52HHkRQiMG4= + ansi-escapes@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" @@ -2703,28 +2647,16 @@ attr-accept@^1.1.3: dependencies: core-js "^2.5.0" -autoprefixer@^9.3.1: - version "9.4.2" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.4.2.tgz#0234d20900684fc4bfb67926493deb68384067f5" - integrity sha512-tYQYJvZvqlJCzF+BLC//uAcdT/Yy4ik9bwZRXr/EehUJ/bjjpTthsWTy8dpowdoIE1sLCDf1ch4Eb2cOSzZC9w== +autoprefixer@^9.4.2, autoprefixer@^9.4.4: + version "9.4.4" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.4.4.tgz#40c42b335bdb22efe8cd80389ca82ffb5e32d68d" + integrity sha512-7tpjBadJyHKf+gOJEmKhZIksWxdZCSrnKbbTJNsw+/zX9+f//DLELRQPWjjjVoDbbWlCuNRkN7RfmZwDVgWMLw== dependencies: - browserslist "^4.3.5" - caniuse-lite "^1.0.30000914" + browserslist "^4.3.7" + caniuse-lite "^1.0.30000926" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^7.0.6" - postcss-value-parser "^3.3.1" - -autoprefixer@^9.4.3: - version "9.4.3" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.4.3.tgz#c97384a8fd80477b78049163a91bbc725d9c41d9" - integrity sha512-/XSnzDepRkAU//xLcXA/lUWxpsBuw0WiriAHOqnxkuCtzLhaz+fL4it4gp20BQ8n5SyLzK/FOc7A0+u/rti2FQ== - dependencies: - browserslist "^4.3.6" - caniuse-lite "^1.0.30000921" - normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.6" + postcss "^7.0.7" postcss-value-parser "^3.3.1" aws-sign2@~0.6.0: @@ -2778,12 +2710,12 @@ babel-jest@^23.6.0: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" -babel-loader@^8.0.4: - version "8.0.4" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.4.tgz#7bbf20cbe4560629e2e41534147692d3fecbdce6" - integrity sha512-fhBhNkUToJcW9nV46v8w87AJOwAJDz84c1CL57n3Stj73FANM/b9TbCUK4YhdOwEyZ+OxhYpdeZDNzSI29Firw== +babel-loader@^8.0.5: + version "8.0.5" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.5.tgz#225322d7509c2157655840bba52e46b6c2f2fe33" + integrity sha512-NTnHnVRd2JnRqPC0vW+iOQWU5pchDbYXsG2E6DMXEpMfUcQKclF9gmf3G3ZMhzG7IG9ji4coL0cm+FxeWxDpnw== dependencies: - find-cache-dir "^1.0.0" + find-cache-dir "^2.0.0" loader-utils "^1.0.2" mkdirp "^0.5.1" util.promisify "^1.0.0" @@ -2821,16 +2753,7 @@ babel-plugin-module-resolver@^3.1.1: reselect "^3.0.1" resolve "^1.4.0" -"babel-plugin-styled-components@>= 1": - version "1.9.2" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.2.tgz#0e6a6587454dcb1c9a362a8fd31fc0b075ccd260" - integrity sha512-McnheW8RkBkur/mQw7rEwQO/oUUruQ/nIIj5LIRpsVL8pzG1oo1Y53xyvAYeOfamIrl4/ta7g1G/kuTR1ekO3A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.0.0" - babel-plugin-syntax-jsx "^6.18.0" - lodash "^4.17.10" - -babel-plugin-styled-components@^1.10.0: +"babel-plugin-styled-components@>= 1", babel-plugin-styled-components@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.0.tgz#ff1f42ad2cc78c21f26b62266b8f564dbc862939" integrity sha512-sQVKG8irFXx14ZfaK1bBePirfkacl3j8nZwSZK+ZjsbnadRHKQTbhXbe/RB1vT6Vgkz45E+V95LBq4KqdhZUNw== @@ -2850,6 +2773,15 @@ babel-plugin-syntax-object-rest-spread@^6.13.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= +babel-polyfill@6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" + integrity sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0= + dependencies: + babel-runtime "^6.22.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + babel-preset-jest@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" @@ -2959,6 +2891,11 @@ big.js@^3.1.3: resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" integrity sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q== +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + bin-links@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.2.tgz#fb74bd54bae6b7befc6c6221f25322ac830d9757" @@ -3018,7 +2955,7 @@ block-stream@*, block-stream@0.0.9: dependencies: inherits "~2.0.0" -bluebird@^3.4.1, bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.2, bluebird@^3.5.3, bluebird@~3.5.0: +bluebird@^3.4.1, bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.3, bluebird@~3.5.0: version "3.5.3" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== @@ -3162,23 +3099,14 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.3.4, browserslist@^4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.5.tgz#1a917678acc07b55606748ea1adf9846ea8920f7" - integrity sha512-z9ZhGc3d9e/sJ9dIx5NFXkKoaiQTnrvrMsN3R1fGb1tkWWNSz12UewJn9TNxGo1l7J23h0MRaPmk7jfeTZYs1w== +browserslist@^4.3.4, browserslist@^4.3.5, browserslist@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.7.tgz#f1de479a6466ea47a0a26dcc725e7504817e624a" + integrity sha512-pWQv51Ynb0MNk9JGMCZ8VkM785/4MQNXiFYtPqI7EEP0TJO+/d/NqRVn1uiAN0DNbnlUSpL2sh16Kspasv3pUQ== dependencies: - caniuse-lite "^1.0.30000912" - electron-to-chromium "^1.3.86" - node-releases "^1.0.5" - -browserslist@^4.3.6: - version "4.3.6" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a" - integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw== - dependencies: - caniuse-lite "^1.0.30000921" - electron-to-chromium "^1.3.92" - node-releases "^1.1.1" + caniuse-lite "^1.0.30000925" + electron-to-chromium "^1.3.96" + node-releases "^1.1.3" bs58@^4.0.1: version "4.0.1" @@ -3290,24 +3218,24 @@ cacache@^10.0.0, cacache@^10.0.4: unique-filename "^1.1.0" y18n "^4.0.0" -cacache@^11.0.1, cacache@^11.0.2, cacache@^11.2.0: - version "11.3.1" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f" - integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA== +cacache@^11.0.1, cacache@^11.0.2, cacache@^11.3.2: + version "11.3.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa" + integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg== dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - figgy-pudding "^3.1.0" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.3" + bluebird "^3.5.3" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.3" + graceful-fs "^4.1.15" + lru-cache "^5.1.1" mississippi "^3.0.0" mkdirp "^0.5.1" move-concurrently "^1.0.1" promise-inflight "^1.0.1" rimraf "^2.6.2" - ssri "^6.0.0" - unique-filename "^1.1.0" + ssri "^6.0.1" + unique-filename "^1.1.1" y18n "^4.0.0" cacache@^9.2.9: @@ -3445,15 +3373,10 @@ camelize@^1.0.0: resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= -caniuse-lite@^1.0.30000905, caniuse-lite@^1.0.30000912, caniuse-lite@^1.0.30000914: - version "1.0.30000918" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000918.tgz#6288f79da3c5c8b45e502f47ad8f3eb91f1379a9" - integrity sha512-CAZ9QXGViBvhHnmIHhsTPSWFBujDaelKnUj7wwImbyQRxmXynYqKGi3UaZTSz9MoVh+1EVxOS/DFIkrJYgR3aw== - -caniuse-lite@^1.0.30000921: - version "1.0.30000923" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000923.tgz#148f9bda508024b5ce957b463ae2e8302b451bb2" - integrity sha512-j5ur7eeluOFjjPUkydtXP4KFAsmH3XaQNch5tvWSO+dLHYt5PE+VgJZLWtbVOodfWij6m6zas28T4gB/cLYq1w== +caniuse-lite@^1.0.30000918, caniuse-lite@^1.0.30000925, caniuse-lite@^1.0.30000926: + version "1.0.30000927" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000927.tgz#114a9de4ff1e01f5790fe578ecd93421c7524665" + integrity sha512-ogq4NbUWf1uG/j66k0AmiO3GjqJAlQyF8n4w8a954cbCyFKmYGvRtgz6qkq2fWuduTXHibX7GyYL5Pg58Aks2g== capture-exit@^1.2.0: version "1.2.0" @@ -3477,7 +3400,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -3502,6 +3425,11 @@ char-spinner@~1.0.1: resolved "https://registry.yarnpkg.com/char-spinner/-/char-spinner-1.0.1.tgz#e6ea67bd247e107112983b7ab0479ed362800081" integrity sha1-5upnvSR+EHESmDt6sEee02KAAIE= +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -3748,11 +3676,6 @@ color@^3.0.0: color-convert "^1.9.1" color-string "^1.5.2" -colors@0.5.x: - version "0.5.1" - resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774" - integrity sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q= - colors@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" @@ -3790,7 +3713,7 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.12.1, commander@^2.18.0, commander@^2.5.0, commander@^2.8.1, commander@^2.9.0: +commander@^2.12.1, commander@^2.18.0, commander@^2.19.0, commander@^2.5.0, commander@^2.8.1, commander@^2.9.0: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== @@ -3881,9 +3804,11 @@ constants-browserify@^1.0.0: integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= content-disposition@~0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" content-type-parser@^1.0.1: version "1.0.2" @@ -4036,12 +3961,7 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY= -core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.7: - version "2.6.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.0.tgz#1e30793e9ee5782b307e37ffa22da0eacddd84d4" - integrity sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw== - -core-js@^2.6.1: +core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.7, core-js@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.1.tgz#87416ae817de957a3f249b3b5ca475d4aaed6042" integrity sha512-L72mmmEayPJBejKIWe2pYtGis5r0tQ5NaJekdhyXgeMQTpJoBsH0NL4ElY2LfSoV15xeQWKQ+XTTOZdyero5Xg== @@ -4195,28 +4115,43 @@ crypto-random-string@^1.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= +css-blank-pseudo@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz#dfdefd3254bf8a82027993674ccf35483bfcb3c5" + integrity sha512-LHz35Hr83dnFeipc7oqFDmsjHdljj3TQtxGGiNWSOsTLIAubSm4TEz8qCaKFpk7idaQ1GfWscF4E6mgpBysA1w== + dependencies: + postcss "^7.0.5" + css-color-keywords@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= -css-loader@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.0.1.tgz#2e51a15449ab3f7195b7e1bc00a407460016a3b3" - integrity sha512-XIVwoIOzSFRVsafOKa060GJ/A70c0IP/C1oVPHEX4eHIFF39z0Jl7j8Kua1SUTiqWDupUnbY3/yQx9r7EUB35w== +css-has-pseudo@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/css-has-pseudo/-/css-has-pseudo-0.10.0.tgz#3c642ab34ca242c59c41a125df9105841f6966ee" + integrity sha512-Z8hnfsZu4o/kt+AuFzeGpLVhFOGO9mluyHBaA2bA8aCGTwah5sT3WV/fTHH8UNZUytOIImuGPrl/prlb4oX4qQ== + dependencies: + postcss "^7.0.6" + postcss-selector-parser "^5.0.0-rc.4" + +css-loader@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.0.tgz#42952ac22bca5d076978638e9813abce49b8f0cc" + integrity sha512-MoOu+CStsGrSt5K2OeZ89q3Snf+IkxRfAIt9aAKg4piioTrhtP1iEFPu+OVn3Ohz24FO6L+rw9UJxBILiSBw5Q== dependencies: icss-utils "^4.0.0" - loader-utils "^1.0.2" + loader-utils "^1.2.1" lodash "^4.17.11" postcss "^7.0.6" postcss-modules-extract-imports "^2.0.0" - postcss-modules-local-by-default "^2.0.2" + postcss-modules-local-by-default "^2.0.3" postcss-modules-scope "^2.0.0" postcss-modules-values "^2.0.0" postcss-value-parser "^3.3.0" schema-utils "^1.0.0" -css-prefers-color-scheme@^3.0.0: +css-prefers-color-scheme@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz#6f830a2714199d4f0d0d0bb8a27916ed65cff1f4" integrity sha512-MTu6+tMs9S3EUqzmqLXEcgNRbNkkD/TGFvowpeoWJn5Vfq7FMgsmRQs9X5NXAURiOBmOxm/lLjsDNXDE6k9bhg== @@ -4256,10 +4191,10 @@ css-what@2.1: resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.2.tgz#c0876d9d0480927d7d4920dcd72af3595649554d" integrity sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ== -cssdb@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-4.2.0.tgz#89623ec696121d0688080ccdcd4627c7e6c6ee0d" - integrity sha512-27CuM+rp1/HIH4hkiOvrRUjgv31WamWk7+XSGz7OP/uWR8EOMeXOh4Ncpa/Eq1eO/1eRhQx7HWj8KEbt4nKQBA== +cssdb@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-4.3.0.tgz#2e1229900616f80c66ff2d568ea2b4f92db1c78c" + integrity sha512-VHPES/+c9s+I0ryNj+PXvp84nz+ms843z/efpaEINwP/QfGsINL3gpLp5qjapzDNzNzbXxur8uxKxSXImrg4ag== cssesc@^0.1.0: version "0.1.0" @@ -4291,9 +4226,9 @@ cssstyle@^1.0.0: cssom "0.3.x" csstype@^2.2.0: - version "2.5.8" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.8.tgz#4ce5aa16ea0d562ef9105fa3ae2676f199586a35" - integrity sha512-r4DbsyNJ7slwBSKoGesxDubRWJ71ghG8W2+1HcsDlAo12KGca9dDLv0u98tfdFw7ldBdoA7XmCnI6Q8LpAJXaQ== + version "2.6.0" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.0.tgz#6cf7b2fa7fc32aab3d746802c244d4eda71371a2" + integrity sha512-by8hi8BlLbowQq0qtkx54d9aN73R9oUW20HISpka5kmgsR9F7nnxgfsemuR2sdCKZh+CDNf5egW9UZMm4mgJRg== cuint@^0.2.2: version "0.2.2" @@ -4410,9 +4345,9 @@ debug@^3.1.0: ms "^2.1.1" debug@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" @@ -4480,7 +4415,7 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" -define-properties@^1.1.2: +define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -4542,6 +4477,11 @@ destroy@^1.0.4: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= + detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" @@ -4706,7 +4646,7 @@ dot-prop@^3.0.0: dependencies: is-obj "^1.0.0" -dot-prop@^4.1.0, dot-prop@^4.1.1, dot-prop@^4.2.0: +dot-prop@^4.1.0, dot-prop@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== @@ -4751,15 +4691,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -electron-to-chromium@^1.3.86: - version "1.3.88" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.88.tgz#f36ab32634f49ef2b0fdc1e82e2d1cc17feb29e7" - integrity sha512-UPV4NuQMKeUh1S0OWRvwg0PI8ASHN9kBC8yDTk1ROXLC85W5GnhTRu/MZu3Teqx3JjlQYuckuHYXSUSgtb3J+A== - -electron-to-chromium@^1.3.92: - version "1.3.95" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.95.tgz#79fac438813ca7f3db182a525c2ab432934f6484" - integrity sha512-0JZEDKOQAE05EO/4rk3vLAE+PYFI9OLCVLAS4QAq1y+Bb2y1N6MyQJz62ynzHN/y0Ka/nO5jVJcahbCEdfiXLQ== +electron-to-chromium@^1.3.96: + version "1.3.96" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.96.tgz#25770ec99b8b07706dedf3a5f43fa50cb54c4f9a" + integrity sha512-ZUXBUyGLeoJxp4Nt6G/GjBRLnyz8IKQGexZ2ndWaoegThgMGFO1tdDYID5gBV32/1S83osjJHyfzvanE/8HY4Q== elliptic@^6.0.0: version "6.4.1" @@ -4899,18 +4834,19 @@ error-inject@^1.0.0: resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37" integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc= -es-abstract@^1.10.0, es-abstract@^1.5.0, es-abstract@^1.5.1, es-abstract@^1.6.1: - version "1.12.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" - integrity sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA== +es-abstract@^1.10.0, es-abstract@^1.12.0, es-abstract@^1.5.0, es-abstract@^1.5.1: + version "1.13.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" + integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== dependencies: - es-to-primitive "^1.1.1" + es-to-primitive "^1.2.0" function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" + has "^1.0.3" + is-callable "^1.1.4" is-regex "^1.0.4" + object-keys "^1.0.12" -es-to-primitive@^1.1.1: +es-to-primitive@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== @@ -5049,19 +4985,6 @@ exec-sh@^0.2.0: dependencies: merge "^1.2.0" -execa@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" - integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw== - dependencies: - cross-spawn "^6.0.0" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" @@ -5138,6 +5061,13 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= + dependencies: + homedir-polyfill "^1.0.1" + expect@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" @@ -5170,6 +5100,15 @@ extend@~3.0.0, extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +external-editor@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + external-editor@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" @@ -5267,7 +5206,7 @@ fbjs@^0.8.0, fbjs@^0.8.5: setimmediate "^1.0.5" ua-parser-js "^0.7.18" -figgy-pudding@^3.1.0, figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: +figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== @@ -5279,10 +5218,10 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -file-loader@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-2.0.0.tgz#39749c82f020b9e85901dcff98e8004e6401cfde" - integrity sha512-YCsBfd1ZGCyonOKLxPiKPdu+8ld9HAaMEvJewzz+b2eTF7uL5Zm/HdBF6FjCrpCMRq25Mi0U1gl4pwn2TlH7hQ== +file-loader@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-3.0.1.tgz#f8e0ba0b599918b51adfe45d66d1e771ad560faa" + integrity sha512-4sNIOXgtH/9WZq4NvlfU3Opn5ynUsqBwSLyM+I7UOwdGigTBYfVVQEwe/msZNX/j4pCJTIM14Fsw66Svo1oVrw== dependencies: loader-utils "^1.0.2" schema-utils "^1.0.0" @@ -5406,6 +5345,16 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +findup-sync@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" + integrity sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= + dependencies: + detect-file "^1.0.0" + is-glob "^3.1.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" @@ -5593,7 +5542,7 @@ fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10, fstream@~1.0.11: mkdirp ">=0.5 0" rimraf "2" -function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1: +function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== @@ -5793,13 +5742,6 @@ gitbook-cli@^2.3.2: tmp "0.0.31" user-home "2.0.0" -gitbook-plugin-asciidoc-include@^0.1.9: - version "0.1.9" - resolved "https://registry.yarnpkg.com/gitbook-plugin-asciidoc-include/-/gitbook-plugin-asciidoc-include-0.1.9.tgz#ba7736576d882c1bfa1a1d2b639d8d594bc972af" - integrity sha1-unc2V22ILBv6Gh0rY52NWUvJcq8= - dependencies: - q "1.4.1" - gitbook-plugin-include-codeblock@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/gitbook-plugin-include-codeblock/-/gitbook-plugin-include-codeblock-3.2.2.tgz#88e8779258cfb151dc54130df0b24ec166e3fa38" @@ -5929,6 +5871,26 @@ global-modules-path@^2.3.0: resolved "https://registry.yarnpkg.com/global-modules-path/-/global-modules-path-2.3.1.tgz#e541f4c800a1a8514a990477b267ac67525b9931" integrity sha512-y+shkf4InI7mPRHSo2b/k6ix6+NLDtyccYv86whhxrSGX9wjPX1VMITmrDbE1eh7zkzhiWtW2sHklJYoQ62Cxg== +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + global@^4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" @@ -6007,7 +5969,7 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@~4.1.11, graceful-fs@~4.1.6: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@~4.1.11, graceful-fs@~4.1.6: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== @@ -6241,6 +6203,13 @@ home-or-tmp@^3.0.0: resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" integrity sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs= +homedir-polyfill@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + integrity sha1-TCu8inWJmP7r9e1oWA921GdotLw= + dependencies: + parse-passwd "^1.0.0" + hosted-git-info@^2.1.4, hosted-git-info@^2.1.5, hosted-git-info@^2.4.2, hosted-git-info@^2.6.0: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" @@ -6421,7 +6390,7 @@ i18next@^12.1.0: resolved "https://registry.yarnpkg.com/i18next/-/i18next-12.1.0.tgz#387bf4b94d05b0160b6a41d001a6b360e384bdb1" integrity sha512-AexmwGkKxwKfo5fGeXTWEY4xqzRPigQ1S/0InOUUVziGO54cd4fKyYK8ED1Thx9fd+WA3fRSZ+1iekvFQMbsFw== -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@^0.4.5, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@^0.4.5, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -6583,6 +6552,25 @@ init-package-json@~1.9.4: validate-npm-package-license "^3.0.1" validate-npm-package-name "^3.0.0" +inquirer@3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347" + integrity sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c= + dependencies: + ansi-escapes "^1.1.0" + chalk "^1.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.1" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx "^4.1.0" + string-width "^2.0.0" + strip-ansi "^3.0.0" + through "^2.3.6" + inquirer@^6.2.0: version "6.2.1" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52" @@ -6603,9 +6591,9 @@ inquirer@^6.2.0: through "^2.3.6" interpret@^1.0.0, interpret@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" - integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= + version "1.2.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" + integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" @@ -6973,7 +6961,7 @@ is-utf8@^0.2.0: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-windows@^1.0.2: +is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== @@ -7416,9 +7404,9 @@ jquery@x.*: integrity sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg== js-base64@^2.1.9: - version "2.4.9" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.9.tgz#748911fb04f48a60c4771b375cac45a80df11c03" - integrity sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ== + version "2.5.0" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.0.tgz#42255ba183ab67ce59a0dee640afdc00ab5ae93e" + integrity sha512-wlEBIZ5LP8usDylWbDNhKPEFVFdI5hCHpnVoT/Ysvoi/PRhJENm/Rlh9TvjYB38HFfKZN7OzEbRjmjvLkFw11g== js-levenshtein@^1.1.3: version "1.1.4" @@ -7557,6 +7545,13 @@ json5@^0.5.0, json5@^0.5.1: resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + json5@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" @@ -7767,26 +7762,26 @@ left-pad@^1.3.0: resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== -lerna@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.7.1.tgz#b0e8fb5c569bab495453d63a5cdd539f8c29bd74" - integrity sha512-XUAMrjR8VABp+orpyPIfYXZylt5kJJsS8XygBeNHuuvXV1IIM0rKEog35LTMVb6hvV8vmksTvBboLkTBzIvplg== +lerna@^3.8.4: + version "3.8.4" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.8.4.tgz#62cc2248e27bb62cf359fb2012a69884849c4012" + integrity sha512-bmFDfYiHhgaDndFT9o0HcQ7jNHi5OVF47Y8hWZWtVOpQuVDAYiAKXwtFCNoqgzIeZxsdGXI/VoW9aZ/IPHErMw== dependencies: - "@lerna/add" "^3.7.1" - "@lerna/bootstrap" "^3.7.1" - "@lerna/changed" "^3.7.1" - "@lerna/clean" "^3.7.1" + "@lerna/add" "^3.8.2" + "@lerna/bootstrap" "^3.8.2" + "@lerna/changed" "^3.8.2" + "@lerna/clean" "^3.8.1" "@lerna/cli" "^3.6.0" - "@lerna/create" "^3.7.1" - "@lerna/diff" "^3.7.1" - "@lerna/exec" "^3.7.1" - "@lerna/import" "^3.7.1" - "@lerna/init" "^3.7.1" - "@lerna/link" "^3.7.1" - "@lerna/list" "^3.7.1" - "@lerna/publish" "^3.7.1" - "@lerna/run" "^3.7.1" - "@lerna/version" "^3.7.1" + "@lerna/create" "^3.8.1" + "@lerna/diff" "^3.8.1" + "@lerna/exec" "^3.8.1" + "@lerna/import" "^3.8.1" + "@lerna/init" "^3.8.1" + "@lerna/link" "^3.8.1" + "@lerna/list" "^3.8.1" + "@lerna/publish" "^3.8.4" + "@lerna/run" "^3.8.1" + "@lerna/version" "^3.8.2" import-local "^1.0.0" libnpm "^2.0.1" @@ -7950,14 +7945,14 @@ loader-utils@^0.2.16: json5 "^0.5.0" object-assign "^4.0.1" -loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" - integrity sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0= +loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.1: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== dependencies: - big.js "^3.1.3" + big.js "^5.2.2" emojis-list "^2.0.0" - json5 "^0.5.0" + json5 "^1.0.1" locate-path@^2.0.0: version "2.0.0" @@ -8098,7 +8093,7 @@ lodash@4.17.4: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4= -lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: +lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== @@ -8156,6 +8151,13 @@ lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3, lru-cach pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + lru-cache@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" @@ -8306,9 +8308,9 @@ mem@^4.0.0: p-is-promise "^1.1.0" memoize-one@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.0.3.tgz#cdfdd942853f1a1b4c71c5336b8c49da0bf0273c" - integrity sha512-QmpUu4KqDmX0plH4u+tf0riMc1KHE1+lw95cMrLlXQAFOx/xnBtwhZ52XJxd9X2O6kwKBqX32kmhbhlobD0cuw== + version "4.1.0" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-4.1.0.tgz#a2387c58c03fff27ca390c31b764a79addf3f906" + integrity sha512-2GApq0yI/b22J2j9rhbrAlsHb0Qcz+7yWxeLG8h+95sl1XPUgeLimQSOdur4Vw7cUhrBHwaUZxWFZueojqNRzA== memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" @@ -8419,7 +8421,7 @@ micromatch@^2.1.5, micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -8519,7 +8521,7 @@ minimist@1.1.x: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" integrity sha1-O+39kaktOQFvz6ocaB6Pqhoe/ag= -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: +minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= @@ -8612,12 +8614,7 @@ modify-values@^1.0.0: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== -moment@^2.10.2, moment@^2.20.1: - version "2.22.2" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" - integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y= - -moment@^2.23.0: +moment@^2.10.2, moment@^2.20.1, moment@^2.23.0: version "2.23.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.23.0.tgz#759ea491ac97d54bac5ad776996e2a58cc1bc225" integrity sha512-3IE39bHVqFbWWaPOMHZF98Q9c3LDKGTmypMiTM2QygGXXElkFWIH7GxfmlwmY2vwa+wmNsoYZmG2iusf1ZjJoA== @@ -8659,11 +8656,16 @@ multimatch@^2.1.0: arrify "^1.0.0" minimatch "^3.0.0" -mute-stream@0.0.7, mute-stream@~0.0.4: +mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mute-stream@~0.0.4: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + mz@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -8674,9 +8676,9 @@ mz@^2.6.0: thenify-all "^1.0.0" nan@^2.11.0, nan@^2.9.2: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== + version "2.12.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" + integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== nanoassert@^1.1.0: version "1.1.0" @@ -8684,9 +8686,9 @@ nanoassert@^1.1.0: integrity sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40= nanobus@^4.3.1: - version "4.3.5" - resolved "https://registry.yarnpkg.com/nanobus/-/nanobus-4.3.5.tgz#9d106c35a1f136bc34e0c4b5d28230a6cdb9e6ae" - integrity sha512-6UlqagLV9/ADqcTU60mipAPEd16WDbO+a9WeeGVn9RucHKNDTcPt9MOf8ZmAvbA3V2CV+EJS28eupNalg4YF8Q== + version "4.4.0" + resolved "https://registry.yarnpkg.com/nanobus/-/nanobus-4.4.0.tgz#e5c20846fa17cff01ef5aac301410d1e541f81ed" + integrity sha512-Hv9USGyH8EsPy0o8pPWE7x3YRIfuZDgMBirzjU6XLebhiSK2g53JlfqgolD0c39ne6wXAfaBNcIAvYe22Bav+Q== dependencies: nanoassert "^1.1.0" nanotiming "^7.2.0" @@ -8730,12 +8732,12 @@ natural-compare@^1.4.0: integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= nearley@^2.7.10: - version "2.15.1" - resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.15.1.tgz#965e4e6ec9ed6b80fc81453e161efbcebb36d247" - integrity sha512-8IUY/rUrKz2mIynUGh8k+tul1awMKEjeHHC5G3FHvvyAW6oq4mQfNp2c0BMea+sYZJvYcrrM6GmZVIle/GRXGw== + version "2.16.0" + resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.16.0.tgz#77c297d041941d268290ec84b739d0ee297e83a7" + integrity sha512-Tr9XD3Vt/EujXbZBv6UAHYoLUSMQAxSsTnm9K3koXzjzNWY195NqALeyrzLZBKzAkL3gl92BcSogqrHjD8QuUg== dependencies: + commander "^2.19.0" moo "^0.4.3" - nomnom "~1.6.2" railroad-diagrams "^1.0.0" randexp "0.4.6" semver "^5.4.1" @@ -8754,7 +8756,7 @@ negotiator@0.6.1: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= -neo-async@^2.5.0: +neo-async@^2.5.0, neo-async@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== @@ -8790,6 +8792,14 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" +node-fetch@1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04" + integrity sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ= + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -8900,17 +8910,10 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-releases@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.0.tgz#be7464fa8d877808237520fd49436d5e79191c3d" - integrity sha512-+qV91QMDBvARuPxUEfI/mRF/BY+UAkTIn3pvmvM2iOLIRvv6RNYklFXBgrkky6P1wXUqQW1P3qKlWxxy4JZbfg== - dependencies: - semver "^5.3.0" - -node-releases@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.2.tgz#93c17fba5eec8650ad908de5433fa8763baebe4d" - integrity sha512-j1gEV/zX821yxdWp/1vBMN0pSUjuH9oGUdLCb4PfUko6ZW7KdRs3Z+QGGwDUhYtSpQvdVVyLd2V0YvLsmdg5jQ== +node-releases@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.3.tgz#aad9ce0dcb98129c753f772c0aa01360fb90fbd2" + integrity sha512-6VrvH7z6jqqNFY200kdB6HdzkgM96Oaj9v3dqGfgp6mF+cHmU4wyQKZ2/WPDRVoR0Jz9KqbamaBN0ZhdUaysUQ== dependencies: semver "^5.3.0" @@ -8924,14 +8927,6 @@ node-version@^1.1.3: resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.2.0.tgz#34fde3ffa8e1149bd323983479dda620e1b5060d" integrity sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ== -nomnom@~1.6.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971" - integrity sha1-hKZqJgF0QI/Ft3oY+IjszET7aXE= - dependencies: - colors "0.5.x" - underscore "~1.4.4" - "nopt@2 || 3", nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -9465,14 +9460,14 @@ object.assign@^4.1.0: object-keys "^1.0.11" object.entries@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" - integrity sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8= + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.0.tgz#2024fc6d6ba246aee38bdb0ffd5cfbcf371b7519" + integrity sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA== dependencies: - define-properties "^1.1.2" - es-abstract "^1.6.1" - function-bind "^1.1.0" - has "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" object.getownpropertydescriptors@^2.0.3: version "2.0.3" @@ -9498,14 +9493,14 @@ object.pick@^1.3.0: isobject "^3.0.1" object.values@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a" - integrity sha1-5STaCbT2b/Bd9FdUbscqyZ8TBpo= + version "1.1.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.0.tgz#bf6810ef5da3e5325790eaaa2be213ea84624da9" + integrity sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg== dependencies: - define-properties "^1.1.2" - es-abstract "^1.6.1" - function-bind "^1.1.0" - has "^1.0.1" + define-properties "^1.1.3" + es-abstract "^1.12.0" + function-bind "^1.1.1" + has "^1.0.3" on-finished@^2.3.0: version "2.3.0" @@ -9533,11 +9528,31 @@ only@~0.0.2: resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4" integrity sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q= +opencollective@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/opencollective/-/opencollective-1.0.3.tgz#aee6372bc28144583690c3ca8daecfc120dd0ef1" + integrity sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE= + dependencies: + babel-polyfill "6.23.0" + chalk "1.1.3" + inquirer "3.0.6" + minimist "1.2.0" + node-fetch "1.6.3" + opn "4.0.2" + opener@~1.4.1, opener@~1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8" integrity sha1-XG2ixdflgx6P+jlklQ+NZnSskLg= +opn@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" + integrity sha1-erwi5kTf9jsKltWrfyeQwPAavJU= + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + opn@^5.1.0, opn@^5.3.0: version "5.4.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035" @@ -9585,11 +9600,11 @@ os-locale@^2.0.0: mem "^1.1.0" os-locale@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.0.1.tgz#3b014fbf01d87f60a1e5348d80fe870dc82c4620" - integrity sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== dependencies: - execa "^0.10.0" + execa "^1.0.0" lcid "^2.0.0" mem "^4.0.0" @@ -9638,9 +9653,9 @@ p-limit@^1.0.0, p-limit@^1.1.0: p-try "^1.0.0" p-limit@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" - integrity sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A== + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.1.0.tgz#1d5a0d20fb12707c758a655f6bbc4386b5930d68" + integrity sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g== dependencies: p-try "^2.0.0" @@ -9716,16 +9731,16 @@ package-json@^4.0.0: semver "^5.1.0" pacote@^9.2.3: - version "9.2.3" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.2.3.tgz#48cfe87beb9177acd6594355a584a538835424b3" - integrity sha512-Y3+yY3nBRAxMlZWvr62XLJxOwCmG9UmkGZkFurWHoCjqF0cZL72cTOCRJTvWw8T4OhJS2RTg13x4oYYriauvEw== + version "9.3.0" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.3.0.tgz#ec0d21b739a625d81a19ae546386fedee3300bc1" + integrity sha512-uy5xghB5wUtmFS+uNhQGhlsIF9rfsfxw6Zsu2VpmSz4/f+8D2+5V1HwjHdSn7W6aQTrxNNmmoUF5qNE10/EVdA== dependencies: - bluebird "^3.5.2" - cacache "^11.2.0" + bluebird "^3.5.3" + cacache "^11.3.2" figgy-pudding "^3.5.1" get-stream "^4.1.0" glob "^7.1.3" - lru-cache "^4.1.3" + lru-cache "^5.1.1" make-fetch-happen "^4.0.1" minimatch "^3.0.4" minipass "^2.3.5" @@ -9744,7 +9759,7 @@ pacote@^9.2.3: safe-buffer "^5.1.2" semver "^5.6.0" ssri "^6.0.1" - tar "^4.4.6" + tar "^4.4.8" unique-filename "^1.1.1" which "^1.3.1" @@ -9837,6 +9852,11 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -9901,7 +9921,7 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-parse@^1.0.5: +path-parse@^1.0.5, path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== @@ -10247,10 +10267,10 @@ postcss-modules-extract-imports@^2.0.0: dependencies: postcss "^7.0.5" -postcss-modules-local-by-default@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.2.tgz#edfd6a874d326b52daaa3014bfc11e9e4b0cfafc" - integrity sha512-qghHvHeydUBQ3EQic5NjYryZ5jzXzAYxHR7lZQlCNmjGpJtINRyX/ELnh/7fxBBmHNkEzNkq2l5cV6trfidYng== +postcss-modules-local-by-default@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-2.0.3.tgz#6a199d596ec3ef57b8f5ced96d786b8cb16a7dec" + integrity sha512-jv4CQ8IQ0+TkaAIP7H4kgu/jQbrjte8xU61SYJAIOby+o3H0MGWX6eN1WXUKHccK6/EEjcAERjyIP8MXzAWAbQ== dependencies: css-selector-tokenizer "^0.7.0" postcss "^7.0.6" @@ -10272,15 +10292,7 @@ postcss-modules-values@^2.0.0: icss-replace-symbols "^1.1.0" postcss "^7.0.6" -postcss-nested@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.1.0.tgz#271da8a047f2ee378139410ae2400b1c67d0bf30" - integrity sha512-owY13v4s3WWTUjsT1H1Cgpa4veHjcBJ/FqbgORe1dJIKpggbFoh6ww+zUP0nzrvy7fXGihcuFhJQj3eXtaWXsw== - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^3.1.1" - -postcss-nested@^4.1.1: +postcss-nested@^4.1.0, postcss-nested@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-4.1.1.tgz#2074e6641583bf7151d951908d68fa95039fe340" integrity sha512-3+V8+g+i9zUQ/AADNtBj3DVVvSOhRCV7W8Kzn9n4ViWJtSQrSdtIJnxZaupfdTrnhCkY86sAsuKVxBCuyfJDeA== @@ -10325,16 +10337,18 @@ postcss-place@^4.0.1: postcss-values-parser "^2.0.0" postcss-preset-env@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-6.4.0.tgz#f5466550b177454fc98ca5054b4478e8e5caa714" - integrity sha512-0jCyY/T9kWv1i2abt5DOOoh0uHJia0HUTWMV72Tw75tGx3pH628oSS8WBMCE5L1Ou3LvoAl9pe07u8g/afvc3A== + version "6.5.0" + resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-6.5.0.tgz#a14b8f6e748b2a3a4a02a56f36c390f30073b9e1" + integrity sha512-RdsIrYJd9p9AouQoJ8dFP5ksBJEIegA4q4WzJDih8nevz3cZyIP/q1Eaw3pTVpUAu3n7Y32YmvAW3X07mSRGkw== dependencies: - autoprefixer "^9.3.1" - browserslist "^4.3.4" - caniuse-lite "^1.0.30000905" - css-prefers-color-scheme "^3.0.0" - cssdb "^4.2.0" - postcss "^7.0.5" + autoprefixer "^9.4.2" + browserslist "^4.3.5" + caniuse-lite "^1.0.30000918" + css-blank-pseudo "^0.1.4" + css-has-pseudo "^0.10.0" + css-prefers-color-scheme "^3.1.1" + cssdb "^4.3.0" + postcss "^7.0.6" postcss-attribute-case-insensitive "^4.0.0" postcss-color-functional-notation "^2.0.1" postcss-color-gray "^5.0.0" @@ -10413,19 +10427,10 @@ postcss-selector-not@^4.0.0: balanced-match "^1.0.0" postcss "^7.0.2" -postcss-selector-parser@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz#4f875f4afb0c96573d5cf4d74011aee250a7e865" - integrity sha1-T4dfSvsMllc9XPTXQBGu4lCn6GU= - dependencies: - dot-prop "^4.1.1" - indexes-of "^1.0.1" - uniq "^1.0.1" - postcss-selector-parser@^5.0.0-rc.3, postcss-selector-parser@^5.0.0-rc.4: - version "5.0.0-rc.4" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0-rc.4.tgz#ca5e77238bf152966378c13e91ad6d611568ea87" - integrity sha512-0XvfYuShrKlTk1ooUrVzMCFQRcypsdEIsGqh5IxC5rdtBi4/M/tDAJeSONwC2MTqEFsmPZYAV7Dd4X8rgAfV0A== + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c" + integrity sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ== dependencies: cssesc "^2.0.0" indexes-of "^1.0.1" @@ -10471,16 +10476,7 @@ postcss@^6.0.21, postcss@^6.0.22, postcss@^6.0.6, postcss@^6.x: source-map "^0.6.1" supports-color "^5.4.0" -postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.2, postcss@^7.0.5, postcss@^7.0.6: - version "7.0.6" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.6.tgz#6dcaa1e999cdd4a255dcd7d4d9547f4ca010cdc2" - integrity sha512-Nq/rNjnHFcKgCDDZYO0lNsl6YWe6U7tTy+ESN+PnLxebL8uBtYX59HZqvrj7YLK5UCyll2hqDsJOo3ndzEW8Ug== - dependencies: - chalk "^2.4.1" - source-map "^0.6.1" - supports-color "^5.5.0" - -postcss@^7.0.7: +postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.2, postcss@^7.0.5, postcss@^7.0.6, postcss@^7.0.7: version "7.0.7" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.7.tgz#2754d073f77acb4ef08f1235c36c5721a7201614" integrity sha512-HThWSJEPkupqew2fnuQMEI2YcTj/8gMV3n80cMdJsKxfIh5tHf7nM5JigNX6LxVMqo6zkgQNAI88hyFvBk41Pg== @@ -10636,9 +10632,9 @@ pseudomap@^1.0.1, pseudomap@^1.0.2: integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= psl@^1.1.24, psl@^1.1.28: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" - integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== public-encrypt@^4.0.0: version "4.0.3" @@ -10700,11 +10696,6 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -q@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" - integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= - q@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" @@ -10862,19 +10853,19 @@ react-hot-loader@^4.6.3: source-map "^0.7.3" react-i18next@^8.3.8: - version "8.3.8" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-8.3.8.tgz#6f0f56d048cc10e60ae7ea1a8266e460261d6777" - integrity sha512-ZcSpakSBcDxPJkl34fv/SI0TaoTDvVDrk4WpDF+WElorine+dHUjGMAA6RG5Km2KcLNW1t4GLunHprgKiqDrSw== + version "8.4.0" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-8.4.0.tgz#e9f0c5b9938b155eaa6051360614719c08cae72f" + integrity sha512-zIO/bc1L0UUGdaws2y40cTiSQHuQud5e9SSodYM6MTzhJTI3iayxCCdgvotblOLM4taOD77Ct2/fUbheQIhyeg== dependencies: "@babel/runtime" "^7.1.2" create-react-context "0.2.3" hoist-non-react-statics "3.0.1" html-parse-stringify2 "2.0.1" -react-is@^16.3.2, react-is@^16.6.0, react-is@^16.6.1, react-is@^16.6.3: - version "16.6.3" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.3.tgz#d2d7462fcfcbe6ec0da56ad69047e47e56e7eac0" - integrity sha512-u7FDWtthB4rWibG/+mFbVd5FvdI20yde86qKGx4lVUTWmPlSWQ4QxbBIrrs+HnXGbxOUlUzTAP/VDmvCwaP2yA== +react-is@^16.3.2, react-is@^16.6.0, react-is@^16.6.1, react-is@^16.7.0: + version "16.7.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.7.0.tgz#c1bd21c64f1f1364c6f70695ec02d69392f41bfa" + integrity sha512-Z0VRQdF4NPDoI0tsXVMLkJLiwEBa+RP66g0xDHxgxysxSoCUccSten4RTF/UFvZF1dZvZ9Zu1sx+MDXwcOR34g== react-lifecycles-compat@^3.0.4: version "3.0.4" @@ -10907,14 +10898,14 @@ react-router@^4.3.1: warning "^4.0.1" react-test-renderer@^16.0.0-0: - version "16.6.3" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.6.3.tgz#5f3a1a7d5c3379d46f7052b848b4b72e47c89f38" - integrity sha512-B5bCer+qymrQz/wN03lT0LppbZUDRq6AMfzMKrovzkGzfO81a9T+PWQW6MzkWknbwODQH/qpJno/yFQLX5IWrQ== + version "16.7.0" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.7.0.tgz#1ca96c2b450ab47c36ba92cd8c03fcefc52ea01c" + integrity sha512-tFbhSjknSQ6+ttzmuGdv+SjQfmvGcq3PFKyPItohwhhOBmRoTf1We3Mlt3rJtIn85mjPXOkKV+TaKK4irvk9Yg== dependencies: object-assign "^4.1.1" prop-types "^15.6.2" - react-is "^16.6.3" - scheduler "^0.11.2" + react-is "^16.7.0" + scheduler "^0.12.0" react@^16.7.0: version "16.7.0" @@ -11053,9 +11044,9 @@ readable-stream@1.0: string_decoder "~0.10.x" readable-stream@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.0.6.tgz#351302e4c68b5abd6a2ed55376a7f9a25be3057a" - integrity sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg== + version "3.1.1" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.1.1.tgz#ed6bbc6c5ba58b090039ff18ce670515795aeb06" + integrity sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -11175,6 +11166,11 @@ regenerate@^1.2.1, regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== +regenerator-runtime@^0.10.0: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= + regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" @@ -11273,9 +11269,9 @@ relateurl@0.2.x: integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= remove-array-items@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-array-items/-/remove-array-items-1.1.0.tgz#e3d4aaba795a412479ea89408dee345387da7d3b" - integrity sha512-+YAHWd5patqAM/F4uBsto9h8RXDVxPRrKW46AkbI6eH12OFrN9wlGpkNWYxCjCfwtkidTjaaCXqU634V4mysvw== + version "1.1.1" + resolved "https://registry.yarnpkg.com/remove-array-items/-/remove-array-items-1.1.1.tgz#fd745ff73d0822e561ea910bf1b401fc7843e693" + integrity sha512-MXW/jtHyl5F1PZI7NbpS8SOtympdLuF20aoWJT5lELR1p/HJDd5nqW8Eu9uLh/hCRY3FgvrIT5AwDCgBODklcA== remove-trailing-separator@^1.0.1: version "1.1.0" @@ -11434,6 +11430,14 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -11468,11 +11472,11 @@ resolve@1.1.7: integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2, resolve@^1.4.0, resolve@^1.6.0, resolve@^1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== + version "1.9.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" + integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ== dependencies: - path-parse "^1.0.5" + path-parse "^1.0.6" restore-cursor@^2.0.0: version "2.0.0" @@ -11492,12 +11496,12 @@ retry@^0.10.0, retry@~0.10.0, retry@~0.10.1: resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= -rimraf@2, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" - integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== +rimraf@2, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@~2.6.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: - glob "^7.0.5" + glob "^7.1.3" rimraf@~2.2.6: version "2.2.8" @@ -11546,6 +11550,11 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" +rx@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" + integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I= + rxjs-compat@^6.3.2: version "6.3.3" resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.3.3.tgz#2ab3b9ac0dac0c073749d55fef9c03ea1df2045c" @@ -11558,7 +11567,7 @@ rxjs@^6.1.0, rxjs@^6.3.2, rxjs@^6.3.3: dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -11596,14 +11605,6 @@ sax@^1.2.1, sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.11.2: - version "0.11.3" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.3.tgz#b5769b90cf8b1464f3f3cfcafe8e3cd7555a2d6b" - integrity sha512-i9X9VRRVZDd3xZw10NY5Z2cVMbdYg6gqFecfj79USv1CFN+YrJ3gIPRKf1qlY+Sxly4djoKdfx1T+m9dnRB8kQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b" @@ -11677,9 +11678,9 @@ semver@~5.1.0: integrity sha1-oykqNz5vPgeY2gsgZBuanFvEfhk= serialize-javascript@^1.4.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" - integrity sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ== + version "1.6.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879" + integrity sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw== set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" @@ -12005,9 +12006,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2" - integrity sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg== + version "3.0.3" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" + integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== spdx-license-ids@~1.2.2: version "1.2.2" @@ -12041,9 +12042,9 @@ sprintf-js@~1.0.2: integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629" - integrity sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA== + version "1.16.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.0.tgz#1d4963a2fbffe58050aa9084ca20be81741c07de" + integrity sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -12285,11 +12286,10 @@ strip-url-auth@^1.0.0: integrity sha1-IrD6OkE4WzO+PzMVUbu4N/oM164= strong-log-transformer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.0.0.tgz#fa6d8e0a9e62b3c168c3cad5ae5d00dc97ba26cc" - integrity sha512-FQmNqAXJgOX8ygOcvPLlGWBNT41mvNJ9ALoYf0GTwVt9t30mGTqpmp/oJx5gLcu52DXK10kS7dVWhx8aPXDTlg== + version "2.1.0" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" + integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== dependencies: - byline "^5.0.0" duplexer "^0.1.1" minimist "^1.2.0" through "^2.3.4" @@ -12409,7 +12409,7 @@ tar@^2.0.0, tar@~2.2.1: fstream "^1.0.2" inherits "2" -tar@^4, tar@^4.4.6, tar@^4.4.8: +tar@^4, tar@^4.4.8: version "4.4.8" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== @@ -12460,9 +12460,9 @@ term-size@^1.2.0: execa "^0.7.0" terser-webpack-plugin@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.1.0.tgz#cf7c25a1eee25bf121f4a587bb9e004e3f80e528" - integrity sha512-61lV0DSxMAZ8AyZG7/A4a3UPlrbOBo8NIQ4tJzLPAdGOQ+yoNC7l5ijEow27lBAL2humer01KLS6bGIMYQxKoA== + version "1.2.1" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.2.1.tgz#7545da9ae5f4f9ae6a0ac961eb46f5e7c845cc26" + integrity sha512-GGSt+gbT0oKcMDmPx4SRSfJPE1XaN3kQRWG4ghxKQw9cn5G9x6aCKSsgYdvyM0na9NJ4Drv0RG6jbBByZ5CMjw== dependencies: cacache "^11.0.2" find-cache-dir "^2.0.0" @@ -12474,9 +12474,9 @@ terser-webpack-plugin@^1.1.0: worker-farm "^1.5.2" terser@^3.8.1: - version "3.11.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-3.11.0.tgz#60782893e1f4d6788acc696351f40636d0e37af0" - integrity sha512-5iLMdhEPIq3zFWskpmbzmKwMQixKmTYwY3Ox9pjtSklBLnHiuQ0GKJLhL1HSYtyffHM3/lDIFBnb82m9D7ewwQ== + version "3.14.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-3.14.1.tgz#cc4764014af570bc79c79742358bd46926018a32" + integrity sha512-NSo3E99QDbYSMeJaEk9YW2lTg3qS9V0aKGlb+PlOrei1X02r1wSBHCNX/O+yeTRFSWPKPIGj6MqvvdqV4rnVGw== dependencies: commander "~2.17.1" source-map "~0.6.1" @@ -12517,14 +12517,14 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -thread-loader@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-2.0.2.tgz#d756b6accfcf9ec55a24daef58dacbd674a3581b" - integrity sha512-AK2MyeiPOwVHB3duKMMIE0IwlvcRMFa73Vs7+9dGcZ/0uhtRAmnCnMNHTMLcUQqAPYEImoENqodJDIJpCUsGGw== +thread-loader@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/thread-loader/-/thread-loader-2.1.1.tgz#c105639b4908486f7756167870ada8b5b544f0a4" + integrity sha512-hMaTITa01Qt/I/Q1vKYDu2wjfWhJAfP5J3gOw32ng3/7DZHOOhBGVwsRvyHKk4I/KVTPaQi6J7fdlY+2nzjguw== dependencies: - async "^2.6.1" loader-runner "^2.3.1" loader-utils "^1.1.0" + neo-async "^2.6.0" throat@^4.0.0: version "4.1.0" @@ -12761,9 +12761,9 @@ tsutils@^2.13.1, tsutils@^2.27.2: tslib "^1.8.1" tsutils@^3.0.0: - version "3.5.2" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.5.2.tgz#6fd3c2d5a731e83bb21b070a173ec0faf3a8f6d3" - integrity sha512-qIlklNuI/1Dzfm+G+kJV5gg3gimZIX5haYtIVQe7qGyKd7eu8T1t1DY6pz4Sc2CGXAj9s1izycctm9Zfl9sRuQ== + version "3.6.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.6.0.tgz#33fc3ddb74abf5bba10789acd03eee6ea96c839c" + integrity sha512-hCG3lZz+uRmmiC4brr/kY6Yuypnl20PNe8t49DO4OUGlbxWkxYHF63EeG2XPSd0JcKiWmp9p55yQyrkxqSS5Dg== dependencies: tslib "^1.8.1" @@ -12833,17 +12833,17 @@ typedoc-default-themes@^0.5.0: resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz#6dc2433e78ed8bea8e887a3acde2f31785bd6227" integrity sha1-bcJDPnjti+qOiHo6zeLzF4W9Yic= -typedoc-plugin-markdown@^1.1.19: - version "1.1.19" - resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-1.1.19.tgz#f0c2e0a390932f80e85a393961849d0e9d372561" - integrity sha512-dk1J9NHW3c1cMmcmTrw55U7ke6zadB3hZL7y7tkLQ6FeJGkz6SEMuexjVOq5rltuW7JeLqt1ngNKAwG9dXiMgQ== +typedoc-plugin-markdown@^1.1.20: + version "1.1.20" + resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-1.1.20.tgz#a3eb91994f3f8b67d5df4d938653982bf2b85209" + integrity sha512-2rDLrzb0Wb0w0+iQ7LEGWccvRvluHTfPzj+wiggUaOYq3WaUfjA2KVFlAOECIuPiLoMiVgwSAp2YOLCYNp1C5A== dependencies: turndown "^5.0.1" -typedoc-plugin-no-inherit@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/typedoc-plugin-no-inherit/-/typedoc-plugin-no-inherit-1.0.2.tgz#d2dff762395eb66d38f47a99dab8d2a1e7838b11" - integrity sha512-+fRnc8sWLzO2wjPuJT09vUOBmGt7pDE5JJuyJ2FVG79rCBUHUChUt/8/j6yQEBwo6jWMr9yjKjaltKz4SDUrrA== +typedoc-plugin-no-inherit@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/typedoc-plugin-no-inherit/-/typedoc-plugin-no-inherit-1.1.1.tgz#ee2c5e53de50c4c34f26342a880d7a01cf76f61a" + integrity sha512-+yZWgh8Nh7wL6gxDMrdx2pPGigG8U9iklSiHQyxOdNb8r+EyR/q9KssdFCiPCyFZEcCviU+4a7wuD8ZOGyXrWA== typedoc@^0.13.0: version "0.13.0" @@ -12901,11 +12901,6 @@ underscore@^1.8.3: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== -underscore@~1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" - integrity sha1-YaajIBBiKvoHljvzJSA88SI51gQ= - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -13258,21 +13253,24 @@ webidl-conversions@^4.0.0, webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-cli@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.1.2.tgz#17d7e01b77f89f884a2bbf9db545f0f6a648e746" - integrity sha512-Cnqo7CeqeSvC6PTdts+dywNi5CRlIPbLx1AoUPK2T6vC1YAugMG3IOoO9DmEscd+Dghw7uRlnzV1KwOe5IrtgQ== +webpack-cli@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.2.0.tgz#9648cb6d65060f916e63c3d3b55387fb94c019fd" + integrity sha512-wxnUqH0P5ErcwGIKMZbUqix2FjuUmhpS2N9ukZAuGmk9+3vOt7VY2ZM/90W9UZetf6lOJuBNcsbeGU7uCTLdSA== dependencies: chalk "^2.4.1" cross-spawn "^6.0.5" enhanced-resolve "^4.1.0" + findup-sync "^2.0.0" + global-modules "^1.0.0" global-modules-path "^2.3.0" import-local "^2.0.0" interpret "^1.1.0" loader-utils "^1.1.0" + opencollective "^1.0.3" supports-color "^5.5.0" v8-compile-cache "^2.0.2" - yargs "^12.0.2" + yargs "^12.0.4" webpack-dev-middleware@^3.0.0: version "3.4.0" @@ -13361,10 +13359,10 @@ webpack-sources@^1.1.0, webpack-sources@^1.3.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^4.28.0: - version "4.28.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.28.1.tgz#d0e2856e75d1224b170bf16c30b6ca9b75f0d958" - integrity sha512-qAS7BFyS5iuOZzGJxyDXmEI289h7tVNtJ5XMxf6Tz55J2riOyH42uaEsWF0F32TRaI+54SmI6qRgHM3GzsZ+sQ== +webpack@^4.28.3: + version "4.28.3" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.28.3.tgz#8acef6e77fad8a01bfd0c2b25aa3636d46511874" + integrity sha512-vLZN9k5I7Nr/XB1IDG9GbZB4yQd1sPuvufMFgJkx0b31fi2LD97KQIjwjxE7xytdruAYfu5S0FLBLjdxmwGJCg== dependencies: "@webassemblyjs/ast" "1.7.11" "@webassemblyjs/helper-module-context" "1.7.11" @@ -13449,7 +13447,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1, which@^1.2.12, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -13701,7 +13699,7 @@ yargs@^11.0.0: y18n "^3.2.1" yargs-parser "^9.0.2" -yargs@^12.0.1, yargs@^12.0.2, yargs@^12.0.5: +yargs@^12.0.1, yargs@^12.0.4, yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==