diff --git a/packages/pubsweet-component-signup/CHANGELOG.md b/packages/pubsweet-component-signup/CHANGELOG.md deleted file mode 100644 index 6e2faa066f967fc6027e4223c8bef79a09ba016b..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/CHANGELOG.md +++ /dev/null @@ -1,278 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. - -<a name="1.0.33"></a> -## [1.0.33](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.32...pubsweet-component-signup@1.0.33) (2018-11-05) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.32"></a> -## [1.0.32](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.31...pubsweet-component-signup@1.0.32) (2018-10-08) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.31"></a> -## [1.0.31](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.30...pubsweet-component-signup@1.0.31) (2018-09-27) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.30"></a> -## [1.0.30](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.29...pubsweet-component-signup@1.0.30) (2018-09-19) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.29"></a> -## [1.0.29](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.28...pubsweet-component-signup@1.0.29) (2018-09-06) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.28"></a> -## [1.0.28](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.27...pubsweet-component-signup@1.0.28) (2018-09-04) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.27"></a> -## [1.0.27](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.26...pubsweet-component-signup@1.0.27) (2018-08-20) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.26"></a> -## [1.0.26](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.25...pubsweet-component-signup@1.0.26) (2018-08-17) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.25"></a> -## [1.0.25](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.24...pubsweet-component-signup@1.0.25) (2018-08-02) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.24"></a> -## [1.0.24](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.23...pubsweet-component-signup@1.0.24) (2018-07-27) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.23"></a> -## [1.0.23](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.22...pubsweet-component-signup@1.0.23) (2018-07-12) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.22"></a> -## [1.0.22](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.21...pubsweet-component-signup@1.0.22) (2018-07-09) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.21"></a> -## [1.0.21](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.20...pubsweet-component-signup@1.0.21) (2018-07-03) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.20"></a> -## [1.0.20](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.19...pubsweet-component-signup@1.0.20) (2018-07-02) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.19"></a> -## [1.0.19](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.18...pubsweet-component-signup@1.0.19) (2018-06-28) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.18"></a> -## [1.0.18](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.17...pubsweet-component-signup@1.0.18) (2018-06-28) - - -### Bug Fixes - -* **monorepo:** fix versions of ui across repo ([72ada07](https://gitlab.coko.foundation/pubsweet/pubsweet/commit/72ada07)) - - - - -<a name="1.0.17"></a> -## [1.0.17](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.16...pubsweet-component-signup@1.0.17) (2018-05-21) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.16"></a> -## [1.0.16](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.15...pubsweet-component-signup@1.0.16) (2018-05-18) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.15"></a> -## [1.0.15](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.14...pubsweet-component-signup@1.0.15) (2018-05-10) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.14"></a> -## [1.0.14](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.13...pubsweet-component-signup@1.0.14) (2018-05-09) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.13"></a> -## [1.0.13](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.12...pubsweet-component-signup@1.0.13) (2018-05-03) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.12"></a> -## [1.0.12](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.11...pubsweet-component-signup@1.0.12) (2018-04-24) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.11"></a> -## [1.0.11](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.10...pubsweet-component-signup@1.0.11) (2018-04-11) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.10"></a> -## [1.0.10](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.9...pubsweet-component-signup@1.0.10) (2018-04-03) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.9"></a> -## [1.0.9](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.8...pubsweet-component-signup@1.0.9) (2018-03-30) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.8"></a> -## [1.0.8](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.7...pubsweet-component-signup@1.0.8) (2018-03-28) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.7"></a> -## [1.0.7](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.6...pubsweet-component-signup@1.0.7) (2018-03-27) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.6"></a> -## [1.0.6](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.5...pubsweet-component-signup@1.0.6) (2018-03-19) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.5"></a> -## [1.0.5](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.4...pubsweet-component-signup@1.0.5) (2018-03-15) - - - - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.4"></a> - -## [1.0.4](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.3...pubsweet-component-signup@1.0.4) (2018-03-09) - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.3"></a> - -## [1.0.3](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.2...pubsweet-component-signup@1.0.3) (2018-03-06) - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.2"></a> - -## [1.0.2](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.1...pubsweet-component-signup@1.0.2) (2018-03-05) - -### Bug Fixes - -* **components:** add dependency on pubsweet/ui ([f0a1926](https://gitlab.coko.foundation/pubsweet/pubsweet/commit/f0a1926)) -* **components:** signup and login error examples ([3f991ec](https://gitlab.coko.foundation/pubsweet/pubsweet/commit/3f991ec)) - -<a name="1.0.1"></a> - -## [1.0.1](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@1.0.0...pubsweet-component-signup@1.0.1) (2018-02-16) - -**Note:** Version bump only for package pubsweet-component-signup - -<a name="1.0.0"></a> - -# [1.0.0](https://gitlab.coko.foundation/pubsweet/pubsweet/compare/pubsweet-component-signup@0.5.0...pubsweet-component-signup@1.0.0) (2018-02-02) - -### Features - -* **client:** upgrade React to version 16 ([626cf59](https://gitlab.coko.foundation/pubsweet/pubsweet/commit/626cf59)), closes [#65](https://gitlab.coko.foundation/pubsweet/pubsweet/issues/65) - -### BREAKING CHANGES - -* **client:** Upgrade React to version 16 diff --git a/packages/pubsweet-component-signup/Signup.jsx b/packages/pubsweet-component-signup/Signup.jsx deleted file mode 100644 index e6c5bc700d0f2415cecf50ec3f8201d9042dcb28..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/Signup.jsx +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react' -import { Field } from 'redux-form' -import { - CenteredColumn, - Link, - H1, - ErrorText, - Button, - TextField, -} from '@pubsweet/ui' - -const UsernameInput = props => <TextField label="Username" {...props.input} /> -const EmailInput = props => ( - <TextField label="Email" {...props.input} type="email" /> -) -const PasswordInput = props => ( - <TextField label="Password" {...props.input} type="password" /> -) - -const Signup = ({ error, handleSubmit }) => ( - <CenteredColumn small> - <H1>Sign up</H1> - - {error && <ErrorText>{error}</ErrorText>} - - <form onSubmit={handleSubmit}> - <Field component={UsernameInput} name="username" /> - <Field component={EmailInput} name="email" /> - <Field component={PasswordInput} name="password" /> - <Button primary type="submit"> - Sign up - </Button> - </form> - - <div> - <span>Already have an account? </span> - <Link to="/login">Login</Link> - </div> - </CenteredColumn> -) - -export default Signup diff --git a/packages/pubsweet-component-signup/Signup.md b/packages/pubsweet-component-signup/Signup.md deleted file mode 100644 index 6ba7e53aba41eb4e195bf18eeeb1a3197de0f3d0..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/Signup.md +++ /dev/null @@ -1,26 +0,0 @@ -A login form - -```js -const { reduxForm } = require('redux-form') - -const SignupForm = reduxForm({ - form: 'signup', - onChange: values => console.log(values), -})(Signup) -;<SignupForm /> -``` - -Which can have an error message: - -```js -const { reduxForm, SubmissionError } = require('redux-form') - -const SignupForm = reduxForm({ - form: 'signup-error', - onSubmit: val => { - console.log(val) - return Promise.reject(new SubmissionError({ _error: 'Error message' })) - }, -})(Signup) -;<SignupForm /> -``` diff --git a/packages/pubsweet-component-signup/SignupContainer.js b/packages/pubsweet-component-signup/SignupContainer.js deleted file mode 100644 index a1cd2947b2b339ac0de9dd67703f5d9f2c5ca64a..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/SignupContainer.js +++ /dev/null @@ -1,20 +0,0 @@ -import { connect } from 'react-redux' -import { compose } from 'recompose' -import { reduxForm } from 'redux-form' - -import { signupUser } from './actions' -import Signup from './Signup' - -const onSubmit = (values, dispatch) => { - dispatch(signupUser(values)) -} - -export default compose( - reduxForm({ - form: 'signup', - onSubmit, - }), - connect(state => ({ - error: state.error, - })), -)(Signup) diff --git a/packages/pubsweet-component-signup/actions.js b/packages/pubsweet-component-signup/actions.js deleted file mode 100644 index 3c47ea703cb29ba051eaaf04d9bf5e744d2e6b29..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/actions.js +++ /dev/null @@ -1,36 +0,0 @@ -import { push } from 'react-router-redux' -import * as api from 'pubsweet-client/src/helpers/api' -import * as T from './types' - -function signupRequest() { - return { - type: T.SIGNUP_REQUEST, - } -} - -function signupSuccess(user) { - return { - type: T.SIGNUP_SUCCESS, - user, - } -} - -function signupFailure(message) { - return { - type: T.SIGNUP_FAILURE, - error: message, - } -} - -export function signupUser(user) { - return dispatch => { - dispatch(signupRequest()) - return api.create('/users', user).then( - user => { - dispatch(signupSuccess(user)) - dispatch(push('/login')) - }, - err => dispatch(signupFailure(err)), - ) - } -} diff --git a/packages/pubsweet-component-signup/index.js b/packages/pubsweet-component-signup/index.js deleted file mode 100644 index 97d462d9b9beb987d214e03505412ba1e7389ef5..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - frontend: { - components: [() => require('./SignupContainer')], - actions: () => require('./actions'), - reducers: () => require('./reducers'), - }, -} diff --git a/packages/pubsweet-component-signup/package.json b/packages/pubsweet-component-signup/package.json deleted file mode 100644 index 40c23e43373c1e2f500ccb787ca3b06126574663..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "pubsweet-component-signup", - "version": "1.0.33", - "description": "Basic signup form component for PubSweet", - "main": "index.js", - "author": "Collaborative Knowledge Foundation", - "license": "MIT", - "dependencies": { - "@pubsweet/ui": "^8.8.0", - "prop-types": "^15.5.10", - "react-bootstrap": "^0.32.0", - "react-redux": "^5.0.6", - "react-router": "^4.2.0", - "redux": "^3.7.2" - }, - "peerDependencies": { - "pubsweet-client": ">=1.0.0", - "react": ">=16" - }, - "repository": { - "type": "git", - "url": "https://gitlab.coko.foundation/pubsweet/pubsweet", - "path": "Signup" - } -} diff --git a/packages/pubsweet-component-signup/reducers.js b/packages/pubsweet-component-signup/reducers.js deleted file mode 100644 index 3b1268c9e07d333e59170867cf9dd481df7dd64d..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/reducers.js +++ /dev/null @@ -1,21 +0,0 @@ -import { SIGNUP_SUCCESS } from './types' - -export default function userSignup( - state = { - isFetching: false, - isAuthenticated: false, - }, - action, -) { - switch (action.type) { - case SIGNUP_SUCCESS: - return { - ...state, - isFetching: false, - isAuthenticated: true, - user: action.user, - } - default: - return state - } -} diff --git a/packages/pubsweet-component-signup/types.js b/packages/pubsweet-component-signup/types.js deleted file mode 100644 index 8cea7b558eb965d7997e7abb8fa05c42429942d3..0000000000000000000000000000000000000000 --- a/packages/pubsweet-component-signup/types.js +++ /dev/null @@ -1,5 +0,0 @@ -// Action types - -export const SIGNUP_REQUEST = 'SIGNUP_REQUEST' -export const SIGNUP_SUCCESS = 'SIGNUP_SUCCESS' -export const SIGNUP_FAILURE = 'SIGNUP_FAILURE' diff --git a/packages/xpub-faraday/config/components.json b/packages/xpub-faraday/config/components.json index 01db85a3f575c70a8ad95fd3625ef8383ba1d27d..aebff0aa7d8026a5b1ac2ca58f598261ba3c5d8d 100644 --- a/packages/xpub-faraday/config/components.json +++ b/packages/xpub-faraday/config/components.json @@ -1,6 +1,5 @@ [ "pubsweet-component-login", - "pubsweet-component-signup", "pubsweet-component-wizard", "pubsweet-component-modal", "pubsweet-components-faraday", diff --git a/packages/xpub-faraday/package.json b/packages/xpub-faraday/package.json index 3f7c75d27236aafd60a30c2d22b6ce2fbfbc3760..54758218ae012ede24d0251340b6bb2bdc8586ce 100644 --- a/packages/xpub-faraday/package.json +++ b/packages/xpub-faraday/package.json @@ -30,7 +30,6 @@ "pubsweet": "3.0.6", "pubsweet-client": "^4.0.4", "pubsweet-component-login": "^1.2.0", - "pubsweet-component-signup": "^1.0.33", "pubsweet-server": "10.0.1", "react": "^16.4.2", "react-dnd": "^2.5.4",