...
 
Commits (18)
{
"presets": [
"env",
"react",
"stage-2"
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-class-properties"
]
}
\ No newline at end of file
}
......@@ -46,20 +46,17 @@ import { hot } from 'react-hot-loader'
import createHistory from 'history/createBrowserHistory'
import { configureStore, Root } from 'pubsweet-client'
import { Root } from 'pubsweet-client'
import theme from './theme'
import routes from './routes'
console.log('the', theme)
const history = createHistory()
const store = configureStore(history, {})
const rootEl = document.getElementById('root')
ReactDOM.render(
<Root history={history} routes={routes} store={store} theme={theme} />,
<Root history={history} routes={routes} theme={theme} />,
rootEl,
)
......
import { css } from 'styled-components'
export default css`
background-color: #404040;
background-image: none;
border: 1px solid transparent;
border-radius: 0;
color: #fff;
cursor: pointer;
display: block;
font-size: 14px;
font-weight: normal;
line-height: 1.42857;
margin-bottom: 20px;
padding: 6px 12px;
text-align: center;
touch-action: manipulation;
vertical-align: middle;
white-space: nowrap;
width: 100%;
&:hover {
background-color: #404040;
}
`
import { css } from 'styled-components'
export default css`
border-left: 4px solid #404040;
border-right: 4px solid #d8d8d8;
padding-left: 40px !important;
padding-right: 40px !important;
`
import { css } from 'styled-components'
export default {
H1: css`
color: #404040;
margin-bottom: 5px;
margin-top: 5px;
padding-bottom: 20px;
padding-top: 0;
`,
}
import { css } from 'styled-components'
export default css`
margin-left: auto;
margin-right: auto;
width: 150px;
img {
filter: grayscale(100%);
margin-bottom: 30px;
margin-top: 30px;
max-width: 100%;
}
`
import { css } from 'styled-components'
import { th } from '@pubsweet/ui-toolkit'
export default {
// TODO
// -- input padding: breaking the grid?
// -- small placeholder text? maybe by default?
Label: css`
color: #404040;
margin-bottom: 5px;
`,
Input: css`
border: 2px solid #b0b0b0;
border-right: 4px solid #484848;
box-sizing: border-box;
color: ${props => {
switch (props.validationStatus) {
case 'success':
return props.theme.colorSuccess
case 'warning':
return props.theme.colorWarning
case 'error':
return props.theme.colorError
default:
return 'inherit'
}
}};
height: 34px;
padding: 6px 12px;
transition: ${th('transitionDuration')} ${th('transitionTimingFunction')};
&:focus {
border-color: ${th('colorPrimary')};
color: inherit;
}
&::placeholder {
font-size: ${th('fontSizeBaseSmall')};
line-height: ${th('lineHeightBaseSmall')};
}
`,
}
export { default as FormContainer } from './FormContainer'
export { default as TextField } from './TextField'
export { default as Heading } from './Heading'
export { default as Button } from './Button'
export { default as Logo } from './Logo'
......@@ -3,11 +3,11 @@ import { Redirect, Route, Switch } from 'react-router-dom'
// Users and Teams
import UsersManager from 'pubsweet-component-users-manager/UsersManagerContainer'
import GlobalTeamsManager from 'pubsweet-component-editoria-global-teams/src/GlobalTeamsManager'
import GlobalTeamsManager from 'pubsweet-component-editoria-global-teams/src/ConnectedGlobalTeams'
// Authentication
import Login from 'pubsweet-component-login/LoginContainer'
import Signup from 'pubsweet-component-signup/SignupContainer'
import Login from 'editoria-component-login/src/LoginContainer'
import Signup from 'editoria-component-signup/src/SignupContainer'
import PasswordReset from 'pubsweet-component-password-reset-frontend/PasswordReset'
// Editor
......@@ -51,8 +51,18 @@ const Editor = WithConfig(Wax, {
export default (
<Switch>
<Redirect exact path="/" to="/books" />
<Route component={Login} path="/login" />
<Route component={Signup} path="/signup" />
<Route
path="/login"
render={props => (
<Login {...props} logo="/assets/pubsweet-rgb-small.jpg" />
)}
/>
<Route
path="/signup"
render={props => (
<Signup {...props} logo="/assets/pubsweet-rgb-small.jpg" />
)}
/>
<Route component={PasswordReset} path="/password-reset" />
<Manage nav={<Navigation />}>
......
......@@ -2,8 +2,20 @@
// import 'typeface-fira-sans'
import theme from '@pubsweet/coko-theme'
import { clone } from 'lodash'
import { FormContainer, TextField, Heading, Button, Logo } from './elements'
const editoriaTheme = clone(theme)
editoriaTheme.fontInterface = 'Fira Sans'
editoriaTheme.cssOverrides = {
ui: {
TextField,
H1: Heading.H1,
Button,
},
Login: {
FormContainer,
Logo,
},
}
export default editoriaTheme
[
"@pubsweet/model-team",
"@pubsweet/model-user",
"@pubsweet/model-fragment",
"pubsweet-component-epub",
"pubsweet-component-epub-frontend",
"pubsweet-component-ink-backend",
"pubsweet-component-ink-frontend",
"pubsweet-component-login",
"pubsweet-component-password-reset-backend",
"pubsweet-component-password-reset-frontend",
"pubsweet-component-signup",
"pubsweet-component-vivliostyle-viewer",
"pubsweet-component-pagedjs-viewer",
"pubsweet-component-wax",
"pubsweet-component-theme-editoria",
"editoria-component-login",
"editoria-component-signup",
"editoria-data-model/src/book",
"editoria-data-model/src/bookCollection",
"editoria-data-model/src/bookCollectionTranslation",
......@@ -19,5 +22,6 @@
"editoria-data-model/src/bookComponentTranslation",
"editoria-data-model/src/bookTranslation",
"editoria-data-model/src/division",
"editoria-data-model/src/team",
"editoria-api"
]
\ No newline at end of file
CREATE TABLE entities (id UUID PRIMARY KEY, data JSONB);
\ No newline at end of file
create table book_collection (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false
);
create table book_collection_translation (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false,
-- translation
language_iso text not null,
--foreign
collection_id uuid not null references book_collection,
--own
description text,
title text not null,
-- constraints
unique(collection_id, language_iso)
);
create table book (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false,
-- foreign
collection_id uuid not null references book_collection,
/*
to do
we cannot enforce the integrity of division id's, as an array of foreign
keys is not yet supported in postgres. there seems to be some work on this,
so we should update when the feature is in postgres.
*/
divisions jsonb not null,
-- own
archived boolean default false,
copyright_statement text,
copyright_holder text,
copyright_year int,
edition int,
license text,
publication_date date,
reference_id uuid
);
create table book_translation (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false,
-- translation
language_iso text not null,
-- foreign
book_id uuid not null references book,
-- own
abstract_content text,
abstract_title text,
alternative_title text,
keywords text [],
subtitle text,
title text not null,
-- constraints
unique(book_id, language_iso)
);
create table division (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false,
--foreign
book_id uuid not null references book,
/* Same note as divisions in book */
book_components jsonb not null,
--own
label text not null
);
create table book_component (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false,
-- foreign
book_id uuid not null references book,
division_id uuid not null references division,
-- own
archived boolean default false,
component_type text,
pagination jsonb not null,
reference_id uuid not null,
-- own -> counters
equation_counter int,
figure_counter int,
note_counter int,
page_counter int,
table_counter int,
word_counter int
);
create table book_component_translation (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false,
-- translation
language_iso text not null,
-- foreign
book_component_id uuid not null references book_component,
-- own
content text,
notes jsonb,
title text,
-- constraints
unique(book_component_id, language_iso)
);
create table book_component_state (
-- base
id uuid primary key,
type text not null,
created timestamp with time zone not null default current_timestamp,
updated timestamp with time zone,
-- editoria base
deleted boolean default false,
-- foreign
book_component_id uuid not null references book_component,
-- own
comments jsonb,
track_changes_enabled boolean default false,
workflow_stages jsonb
uploading boolean default false,
);
......@@ -19,11 +19,14 @@
"license": "MIT",
"version": "1.1.0",
"dependencies": {
"@pubsweet/coko-theme": "^5.0.7",
"@pubsweet/component-polling-client": "^0.0.3",
"@pubsweet/component-polling-server": "^0.0.9",
"@pubsweet/db-manager": "^2.1.2",
"@pubsweet/coko-theme": "^5.0.7",
"@pubsweet/db-manager": "^2.3.0",
"@pubsweet/logger": "^0.2.2",
"@pubsweet/model-fragment": "^2.0.2",
"@pubsweet/model-team": "^2.0.0",
"@pubsweet/model-user": "^4.0.0",
"@pubsweet/ui": "^9.1.3",
"@pubsweet/ui-toolkit": "^2.0.7",
"authsome": "^0.1.0",
......@@ -33,8 +36,8 @@
"lodash": "4.17.4",
"path-to-regexp": "^2.4.0",
"prop-types": "^15.6.0",
"pubsweet": "^3.0.12",
"pubsweet-client": "^8.0.0",
"pubsweet": "^4.0.0",
"pubsweet-client": "^9.0.0",
"pubsweet-component-bookbuilder": "^1.1.5",
"pubsweet-component-editoria-dashboard": "^0.1.4",
"pubsweet-component-editoria-global-teams": "^0.1.2",
......@@ -42,49 +45,51 @@
"pubsweet-component-epub-frontend": "^0.1.3",
"pubsweet-component-ink-backend": "^0.1.1",
"pubsweet-component-ink-frontend": "^0.2.3",
"pubsweet-component-login": "^0.5.5",
"pubsweet-component-manage": "^1.0.0",
"pubsweet-component-navigation": "^1.0.1",
"pubsweet-component-pagedjs-viewer": "^0.1.1",
"pubsweet-component-password-reset-backend": "1.0.0",
"pubsweet-component-password-reset-frontend": "1.0.0",
"pubsweet-component-signup": "^0.4.1",
"pubsweet-component-theme-editoria": "^0.0.5",
"pubsweet-component-users-manager": "1.0.0",
"pubsweet-component-users-manager": "^3.0.0",
"pubsweet-component-vivliostyle-viewer": "^1.0.1",
"pubsweet-component-wax": "^0.6.16",
"pubsweet-server": "^10.1.3",
"pubsweet-server": "^13.0.0",
"pubsweet-theme-plugin": "^0.0.3",
"react": "^16.2.0",
"react-bootstrap": "0.32.1",
"react-dnd": "2.5.4",
"react-dnd-html5-backend": "2.5.4",
"styled-components": "^4.1.2",
"react-dom": "^16.2.0",
"react-redux": "5.0.4",
"react-router-bootstrap": "0.24.4",
"react-router-dom": "^4.3.1",
"recompose": "^0.26.0",
"redux": "3.6.0",
"styled-components": "^4.1.2",
"typeface-fira-sans": "^0.0.43",
"waait": "^1.0.2"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@commitlint/cli": "^6.0.5",
"@commitlint/config-conventional": "^6.0.4",
"app-module-path": "^2.2.0",
"autobind-decorator": "^1.3.4",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.3",
"babel-loader": "^7.1.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-babili": "0.0.12",
"babel-preset-env": "^1.6.0",
"babel-preset-es2015": "^6.24.1",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.4.2",
"babel-loader": "^8.0.0",
"babel-preset-es2015-native-modules": "^6.9.4",
"babel-preset-minify": "^0.3.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"babili-webpack-plugin": "^0.0.11",
"bootstrap-sass": "^3.3.7",
"clean-webpack-plugin": "^0.1.17",
......@@ -144,7 +149,7 @@
"testcafe-react-selectors": "^1.0.5",
"uglifyjs-webpack-plugin": "^1.1.2",
"url-loader": "^0.6.2",
"webpack": "^3.8.1",
"webpack": "^4.29.0",
"webpack-dev-middleware": "^1.12.0",
"webpack-hot-middleware": "^2.20.0",
"winston-daily-rotate-file": "^3.2.1"
......@@ -189,5 +194,8 @@
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"resolutions": {
"graphql": "^14.1.1"
}
}
#!/usr/bin/env node
const logger = require('@pubsweet/logger')
const { Team } = require('pubsweet-server/src/models')
const { model } = require('@pubsweet/model-team')
const Team = model
const makeTeam = async type => {
const names = {
......
......@@ -14,11 +14,13 @@ module.exports = [
loader: 'babel-loader',
options: {
presets: [
[require('babel-preset-env'), { modules: false }],
require('babel-preset-react'),
require('babel-preset-stage-2'),
[require('@babel/preset-env'), { modules: false }],
require('@babel/preset-react'),
],
plugins: [
require('react-hot-loader/babel'),
require('@babel/plugin-proposal-class-properties'),
],
plugins: [require('react-hot-loader/babel')],
},
},
......
......@@ -16,7 +16,7 @@ module.exports = [
options: {
presets: [
[require('babel-preset-env'), { modules: false }],
require('babel-preset-react'),
require('@babel/preset-react'),
require('babel-preset-stage-2'),
],
},
......
......@@ -10,6 +10,7 @@ const resolve = require('./common-resolve')
module.exports = [
{
mode: 'development',
name: 'app',
watch: true,
target: 'web',
......
......@@ -15,6 +15,7 @@ const resolve = require('./common-resolve')
module.exports = [
{
// The configuration for the client
mode: 'production',
name: 'app',
target: 'web',
context: path.join(__dirname, '..', 'app'),
......
This source diff could not be displayed because it is too large. You can view the blob instead.