New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

augur-ui-react-components

Package Overview
Dependencies
Maintainers
5
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

augur-ui-react-components - npm Package Compare versions

Comparing version 3.0.57 to 3.0.58

src/modules/reports/constants/binary-outcomes.js

2

package.json
{
"name": "augur-ui-react-components",
"version": "3.0.57",
"version": "3.0.58",
"description": "Augur UI React Components",

@@ -5,0 +5,0 @@ "author": "Augur Project",

@@ -35,2 +35,3 @@ import activePage from '../test/assertions/active-page';

import portfolioTotals from '../test/assertions/portfolio-totals';
import tradeCommitLock from '../test/assertions/trade-commit-lock';

@@ -71,3 +72,4 @@ export default {

myReportsSummary,
loginAccountReports
loginAccountReports,
tradeCommitLock
};

@@ -112,11 +112,11 @@ import React, { PropTypes, Component } from 'react';

<tr className={classnames('account-info-item', { displayNone: p.account.localNode })}>
<th className="title">Login ID:</th>
<th className="title">Secure Login ID:</th>
<td className="item">
{!s.showFullID &&
<span>
{p.account.prettyLoginID}
{p.account.prettySecureLoginID}
</span>
}
{s.showFullID &&
<textarea className="full-secure-login-id" value={p.account.loginID} readOnly />
<textarea className="full-secure-login-id" value={p.account.secureLoginID} readOnly />
}

@@ -123,0 +123,0 @@ <button

@@ -11,3 +11,3 @@ import React, { Component, PropTypes } from 'react';

title: PropTypes.string,
loginID: PropTypes.string,
secureLoginID: PropTypes.string,
rememberMe: PropTypes.bool,

@@ -38,3 +38,3 @@ passwordPlaceholder: PropTypes.string,

static defaultProps = {
rememberMe: true
rememberMe: false
};

@@ -45,3 +45,2 @@

this.handleSubmit = this.handleSubmit.bind(this);
this.handlePasswordInput = this.handlePasswordInput.bind(this);
if (new FileReader()) {

@@ -52,5 +51,4 @@ this.fileReader = new FileReader();

msg: this.props.msg,
loginID: this.props.loginID,
rememberMe: this.props.rememberMe,
disableInputs: false
secureLoginID: this.props.secureLoginID,
rememberMe: this.props.rememberMe || true
};

@@ -60,3 +58,3 @@ }

componentWillReceiveProps(nextProps) {
this.setState({ msg: nextProps.msg, showID: nextProps.isVisibleID });
this.setState({ msg: nextProps.msg, secureLoginID: nextProps.secureLoginID });
}

@@ -79,4 +77,4 @@

e.preventDefault();
const name = this.refs.accountName.value;
const loginID = this.state.loginID;
const name = this.refs.name.value;
const secureLoginID = this.state.secureLoginID;
const password = this.refs.password.value;

@@ -86,4 +84,3 @@ const password2 = this.refs.password2.value;

const file = (this.refs.form[1].files[0] !== undefined);
this.setState({ msg: '', disableInputs: false });
console.log(file);
if (file && this.fileReader) {

@@ -93,23 +90,9 @@ this.fileReader.readAsText(this.refs.form[1].files[0]);

const importAccount = JSON.parse(e.target.result);
setTimeout(() => this.props.onSubmit(name, password, password2, loginID, rememberMe, importAccount, undefined), 300);
setTimeout(() => this.props.onSubmit(name, password, password2, secureLoginID, rememberMe, importAccount), 100);
};
} else {
setTimeout(() => this.props.onSubmit(name, password, password2, loginID, rememberMe, undefined, undefined), 300);
setTimeout(() => this.props.onSubmit(name, password, password2, secureLoginID, rememberMe, undefined), 100);
}
return false;
}
handlePasswordInput = (e) => {
e.preventDefault();
const name = this.refs.accountName.value;
const loginID = this.state.loginID;
const password = this.refs.password.value;
const password2 = this.refs.password2.value;
const rememberMe = this.state.rememberMe;
if (password !== '' && password2 !== '') {
setTimeout(() => this.props.onSubmit(name, password, password2, loginID, rememberMe, undefined, (loginAccount) => {
this.setState({ loginID: loginAccount.loginID, disableInputs: true });
}), 300);
}
this.setState({ msg: '' });
}

@@ -135,3 +118,2 @@

</h1>
{p.instruction && <p className={classnames('instruction')}>{p.instruction}</p>}
{s.msg &&

@@ -143,9 +125,8 @@ <span className={classnames('msg', p.msgClass)}>

<input
ref="accountName"
ref="name"
className={classnames('auth-input', { displayNone: !p.isVisibleName })}
type="text"
placeholder="account name"
placeholder="name"
maxLength="30"
autoFocus="autofocus"
disabled={s.disableInputs}
/>

@@ -158,14 +139,12 @@ <input

autoFocus="autofocus"
disabled={s.disableInputs}
/>
<Input
name="loginID"
ref={(ref) => { if (ref && ref.state.value !== s.loginID) { this.setState({ loginID: ref.state.value }); } }}
className={classnames('login-id-input', { displayNone: !p.isVisibleID })}
name="secureLoginID"
ref={(ref) => { if (ref && ref.state.value !== s.secureLoginID) { this.setState({ secureLoginID: ref.state.value }); } }}
className={classnames('secure-login-id-input', { displayNone: !p.isVisibleID })}
type="text"
value={s.loginID}
placeholder="Login ID"
value={s.secureLoginID}
placeholder="secure login ID"
autoFocus="autofocus"
onChange={(loginID) => this.setState({ loginID })}
disabled={s.disableInputs}
onChange={(secureLoginID) => this.setState({ secureLoginID })}
/>

@@ -179,4 +158,2 @@ <input

maxLength="256"
onChange={this.handlePasswordInput}
disabled={s.disableInputs}
/>

@@ -189,4 +166,2 @@ <input

maxLength="256"
onChange={this.handlePasswordInput}
disabled={s.disableInputs}
/>

@@ -223,3 +198,2 @@ <div className={classnames('bottom-container')}>

</Link>
<p className={classnames('instruction')}>Passwords must be at least 6 characters in length. Passwords should contain at least one number, one lowercase letter, and one uppercase letter.</p>
</form>

@@ -226,0 +200,0 @@ );

@@ -62,2 +62,3 @@ import React, { Component, PropTypes } from 'react';

outcomes={p.market.outcomes}
marketType={p.market.type}
selectedOutcome={p.selectedOutcome}

@@ -64,0 +65,0 @@ tradeSummary={p.market.tradeSummary}

import React from 'react';
import classnames from 'classnames';
import Checkbox from '../../common/components/checkbox';
import { BINARY, CATEGORICAL } from '../../markets/constants/market-types';
import BINARY_OUTCOMES from '../../reports/constants/binary-outcomes';

@@ -54,3 +56,3 @@ export default class ReportForm extends React.Component {

let outcomeOptions;
if (p.type !== 'scalar') {
if (p.type === CATEGORICAL) {
outcomeOptions = (

@@ -72,2 +74,19 @@ (p.reportableOutcomes || []).map(outcome => (

);
} else if (p.type === BINARY) {
outcomeOptions = (
(p.reportableOutcomes || []).map(outcome => (
<label key={outcome.id} className={classnames('outcome-option', { disabled: s.isReported || s.isIndeterminate })}>
<input
type="radio"
className="outcome-option-radio"
name="outcome-option-radio"
value={outcome.id}
checked={s.reportedOutcomeID === outcome.id}
disabled={s.isReported || s.isIndeterminate}
onChange={this.handleOutcomeChange}
/>
{BINARY_OUTCOMES[outcome.id - 1]}
</label>
))
);
} else {

@@ -74,0 +93,0 @@ outcomeOptions = (

@@ -9,2 +9,4 @@ import React from 'react';

import { SCALAR } from '../../markets/constants/market-types';
const TradeBuilderRow = (p) => {

@@ -17,4 +19,6 @@ const bids = !p.showFullOrderBook ? p.orderBook.bids.slice(0, 1) : p.orderBook.bids;

<td className={classnames('outcome-name', { fade: p.isFaded })}>
{p.name}
&nbsp; - &nbsp;
{p.marketType !== SCALAR && <span>
{p.name}
<span>&nbsp;-&nbsp;</span>
</span>}
<ValueDenomination {...p.lastPricePercent} formatted={p.lastPricePercent.rounded} />

@@ -88,5 +92,6 @@ </td>

showFullOrderBook: React.PropTypes.bool,
updateSelectedOutcome: React.PropTypes.func
updateSelectedOutcome: React.PropTypes.func,
marketType: React.PropTypes.string
};
export default TradeBuilderRow;

@@ -23,2 +23,3 @@ import React from 'react';

{...outcome}
marketType={p.marketType}
showFullOrderBook={!!p.selectedOutcome && !!p.selectedOutcome.selectedOutcomeID && p.selectedOutcome.selectedOutcomeID === outcome.id}

@@ -35,2 +36,3 @@ isFaded={!!p.selectedOutcome && !!p.selectedOutcome.selectedOutcomeID && p.selectedOutcome.selectedOutcomeID !== outcome.id}

outcomes: React.PropTypes.array,
marketType: React.PropTypes.string,
selectedOutcome: React.PropTypes.object,

@@ -37,0 +39,0 @@ userOpenOrdersSummary: React.PropTypes.object

@@ -9,2 +9,3 @@ import React from 'react';

outcomes={p.outcomes}
marketType={p.marketType}
userOpenOrdersSummary={p.userOpenOrdersSummary}

@@ -36,2 +37,3 @@ selectedOutcome={p.selectedOutcome}

outcomes: React.PropTypes.array,
marketType: React.PropTypes.string,
selectedOutcome: React.PropTypes.object,

@@ -38,0 +40,0 @@ tradeSummary: React.PropTypes.object,

@@ -6,2 +6,3 @@ import React from 'react';

import { LOGIN, FUND_ACCOUNT } from '../../auth/constants/auth-types';
import { SCALAR } from '../../markets/constants/market-types';
import ValueDenomination from '../../common/components/value-denomination';

@@ -33,6 +34,6 @@

case SHORT_SELL:
nodes.action = 'SELL';
nodes.action = 'SHORT SELL';
break;
case SHORT_SELL_RISKY:
nodes.action = 'ASK';
nodes.action = 'SHORT ASK';
break;

@@ -46,4 +47,7 @@ default:

<ValueDenomination className="shares" {...p.data.numShares} />
<span className="of">of</span>
<span className="outcome-name">{p.data.outcomeName.substring(0, 35) + (p.data.outcomeName.length > 35 && '...' || '')}</span>
{p.data.marketType !== SCALAR &&
<span>
<span className="of">of</span> <span className="outcome-name">{p.data.outcomeName.substring(0, 35) + (p.data.outcomeName.length > 35 && '...' || '')}</span>
</span>
}
<span className="at">@</span>

@@ -50,0 +54,0 @@ <ValueDenomination className="avgPrice" {...p.data.avgPrice} />

@@ -22,2 +22,3 @@ import activePage from './selectors/active-page';

import myReports from './selectors/my-reports';
import tradeCommitLock from './selectors/trade-commit-lock';

@@ -46,3 +47,4 @@ // all selectors should go here

loginAccountReports,
myReports
myReports,
tradeCommitLock
};

@@ -49,0 +51,0 @@

@@ -21,3 +21,2 @@ import loginAccount from './login-account';

topLinkText: 'Sign Up',
instruction: 'Please enter your Login ID and password below.'
};

@@ -28,9 +27,8 @@

submitButtonClass: 'register-button',
submitButtonText: 'Sign In',
submitButtonText: 'Generate Account',
title: 'Sign Up',
isVisibleName: false,
isVisibleName: true,
isVisibleID: false,
isVisiblePassword2: true,
isVisibleRememberMe: false,
instruction: 'Please enter your password, then enter it again to generate an account. Once your account has been generated you can hit the Sign Up button to start using Augur. Don\'t forget to copy down your Login ID.',
topLinkText: 'login',

@@ -59,18 +57,18 @@ onSubmit: SignUpOnSubmit,

// const logIn = {
// ...Shared,
// ...loginParts,
// topLink: {
// href: '/register',
// onClick: () => {
// require('../selectors').update({ authForm: { ...signUp, clearPassword: true, clearName: true } });
// }
// },
// onSubmit: (name, password, password2, secureLoginID, rememberMe) => {
// require('../selectors').update({ authForm: { ...signUp, clearName: true,
// clearPassword: true } });
// loginAccount.signIn();
// require('../selectors').update({ activePage: 'account' });
// }
// };
const logIn = {
...Shared,
...loginParts,
topLink: {
href: '/register',
onClick: () => {
require('../selectors').update({ authForm: { ...signUp, clearPassword: true, clearName: true } });
}
},
onSubmit: (name, password, password2, secureLoginID, rememberMe) => {
require('../selectors').update({ authForm: { ...signUp, clearName: true,
clearPassword: true } });
loginAccount.signIn();
require('../selectors').update({ activePage: 'account' });
}
};

@@ -85,3 +83,2 @@ const importAccount = {

submitButtonText: 'Import Account',
instruction: 'Please upload your account file and enter the password to unlock the uploaded account.',
bottomLink: {

@@ -97,3 +94,3 @@ href: '/register',

loginAccount.signIn();
return () => { require('../selectors').update({ activePage: 'account' }); };
require('../selectors').update({ activePage: 'account' });
}

@@ -103,10 +100,9 @@ };

const accountCreated = {
...signUp,
isVisibleID: true,
...logIn,
msg: 'Success! Your account has been generated locally. We do not retain a copy. *It is critical that you save this information in a safe place.*',
loginID: 'testID123ASDW3N193NF7V123ADW25579130239SE1235189ADJWKRUY8123AOUELOREMIPSUMDOLORSITAMETCONSECTETURADIPISICINGELITSEDDOEIUSMODTEMPORINCIDIDUNTUTLABOREETDOLOREMAGNAALIQUAUTENIMADMINIMVENIAMQUISNOSTRUDEXERCITATIONULLAMCOLABORISNISIUTALIQUIPEXEACOMMODOCONSEQUATDUISAUTEIRUREDOLORINREPREHENDERITINVOLUPTATEVELITESSECILLUMDOLOREEUFUGIATNULLAPARIATUREXCEPTEURSINTOCCAECATCUPIDATATNONPROIDENTSUNTINCULPAQUIOFFICIADESERUNTMOLLITANIMIDESTLABORUM',
secureLoginID: 'testID123ASDW3N193NF7V123ADW25579130239SE1235189ADJWKRUY8123AOUELOREMIPSUMDOLORSITAMETCONSECTETURADIPISICINGELITSEDDOEIUSMODTEMPORINCIDIDUNTUTLABOREETDOLOREMAGNAALIQUAUTENIMADMINIMVENIAMQUISNOSTRUDEXERCITATIONULLAMCOLABORISNISIUTALIQUIPEXEACOMMODOCONSEQUATDUISAUTEIRUREDOLORINREPREHENDERITINVOLUPTATEVELITESSECILLUMDOLOREEUFUGIATNULLAPARIATUREXCEPTEURSINTOCCAECATCUPIDATATNONPROIDENTSUNTINCULPAQUIOFFICIADESERUNTMOLLITANIMIDESTLABORUM',
};
function SignUpOnSubmit(name, password, password2, secureLoginID, rememberMe, importedAccount, cb) {
function SignUpOnSubmit(name, password, password2) {
require('../selectors').update({

@@ -117,9 +113,2 @@ authForm: {

});
if (typeof cb !== 'function') {
require('../selectors').update({ activePage: 'markets' });
} else {
cb(require('../selectors').loginAccount);
}
return false;
}

@@ -126,0 +115,0 @@

@@ -8,4 +8,4 @@ import { makeNumber } from '../utils/make-number';

localNode: false,
loginID: 'testID123ASDW3N193NF7V123ADW25579130239SE1235189ADJWKRUY8123AOUELOREMIPSUMDOLORSITAMETCONSECTETURADIPISICINGELITSEDDOEIUSMODTEMPORINCIDIDUNTUTLABOREETDOLOREMAGNAALIQUAUTENIMADMINIMVENIAMQUISNOSTRUDEXERCITATIONULLAMCOLABORISNISIUTALIQUIPEXEACOMMODOCONSEQUATDUISAUTEIRUREDOLORINREPREHENDERITINVOLUPTATEVELITESSECILLUMDOLOREEUFUGIATNULLAPARIATUREXCEPTEURSINTOCCAECATCUPIDATATNONPROIDENTSUNTINCULPAQUIOFFICIADESERUNTMOLLITANIMIDESTLABORUM',
prettyLoginID: 'test...ORUM',
secureLoginID: 'testID123ASDW3N193NF7V123ADW25579130239SE1235189ADJWKRUY8123AOUELOREMIPSUMDOLORSITAMETCONSECTETURADIPISICINGELITSEDDOEIUSMODTEMPORINCIDIDUNTUTLABOREETDOLOREMAGNAALIQUAUTENIMADMINIMVENIAMQUISNOSTRUDEXERCITATIONULLAMCOLABORISNISIUTALIQUIPEXEACOMMODOCONSEQUATDUISAUTEIRUREDOLORINREPREHENDERITINVOLUPTATEVELITESSECILLUMDOLOREEUFUGIATNULLAPARIATUREXCEPTEURSINTOCCAECATCUPIDATATNONPROIDENTSUNTINCULPAQUIOFFICIADESERUNTMOLLITANIMIDESTLABORUM',
prettySecureLoginID: 'test...ORUM',
rep: makeNumber(47, ' REP'),

@@ -12,0 +12,0 @@ ether: makeNumber(10000, ' ETH'),

@@ -5,2 +5,4 @@ import { makeNumber } from '../utils/make-number';

import { BINARY, CATEGORICAL, SCALAR } from '../modules/markets/constants/market-types';
import { M } from '../modules/site/constants/pages';

@@ -12,3 +14,3 @@

const markets = [];
const types = ['binary', 'categorical', 'scalar'];
const types = [BINARY, CATEGORICAL, SCALAR];

@@ -316,2 +318,3 @@ for (let i = 0; i < 5; i++) {

data: {
marketType: m.type,
outcomeName: outcome.name,

@@ -318,0 +321,0 @@ marketDescription: m.description,

@@ -0,1 +1,3 @@

import { BINARY, CATEGORICAL, SCALAR } from '../modules/markets/constants/market-types';
export default [

@@ -7,2 +9,3 @@ {

outcomeID: '7',
marketType: CATEGORICAL,
marketDescription: 'Which Jess coordinations clap Dwight Mission cube?',

@@ -40,2 +43,3 @@ outcomeName: 'follow',

outcomeID: '1',
marketType: BINARY,
marketDescription: 'Which Jess coordinations clap Dwight Mission cube?',

@@ -73,2 +77,3 @@ outcomeName: 'blast',

outcomeID: '1',
marketType: SCALAR,
marketDescription: 'Which political party\'s candidate will win the 2016 U.S. Presidential Election?',

@@ -75,0 +80,0 @@ outcomeName: 'Democratic',

@@ -23,5 +23,2 @@ import { assert } from 'chai';

assert.isDefined(authForm.instruction, `authForm.instruction isn't defined`);
assert.isString(authForm.instruction, `authForm.instruction isn't a string`);
assert.isDefined(authForm.isVisibleName, `authForm.isVisibleName isn't defined`);

@@ -28,0 +25,0 @@ assert.isBoolean(authForm.isVisibleName, `authForm.isVisibleName isn't a boolean`);

@@ -17,7 +17,7 @@ import { assert } from 'chai';

assert.isDefined(loginAccount.loginID, `loginAccount.loginID isn't defined`);
assert.isString(loginAccount.loginID, `loginAccount.loginID isn't a string`);
assert.isDefined(loginAccount.secureLoginID, `loginAccount.secureLoginID isn't defined`);
assert.isString(loginAccount.secureLoginID, `loginAccount.secureLoginID isn't a string`);
assert.isDefined(loginAccount.prettyLoginID, `loginAccount.prettyLoginID isn't defined`);
assert.isString(loginAccount.prettyLoginID, `loginAccount.prettyLoginID isn't a string`);
assert.isDefined(loginAccount.prettySecureLoginID, `loginAccount.prettySecureLoginID isn't defined`);
assert.isString(loginAccount.prettySecureLoginID, `loginAccount.prettySecureLoginID isn't a string`);

@@ -24,0 +24,0 @@ assert.isDefined(loginAccount.prettyAddress, `loginAccount.prettyAddress isn't defined`);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc