From 29e7655e7d9a5488feec08924ba371638bd4e65b Mon Sep 17 00:00:00 2001 From: Ryan Smith <3045513+ryansmith94@users.noreply.github.com> Date: Wed, 23 Oct 2019 10:53:00 +0100 Subject: [PATCH] refactor(CSS): Remove CSS files from pages. (https://github.com/LearningLocker/learninglocker/pull/1464 - [LL-204](https://learningpool.atlassian.net/browse/LL-204)) --- .eslintrc | 1 + api/src/routes/HttpRoutes.js | 4 +- package.json | 1 + .../index.js => AddModelPrompt.js} | 12 +- .../ExportManager/AddModelPrompt/styles.css | 4 - .../CacheKeysAutoComplete.js | 0 .../index.js => ExportOutputPreview.js} | 48 +++-- .../ExportForm/ExportOutputPreview/styles.css | 58 ------ .../index.js => ProjectionInput.js} | 18 +- .../ProjectionInput/projectionbuilder.css | 49 ----- .../ExportManager/ExportForm/index.js | 52 +++-- .../ExportManager/ExportForm/styles.css | 27 --- .../DataSourcePage/ExportManager/index.js | 5 +- .../DataSourcePage/ExportManager/styles.css | 4 - .../DataSourcePage/Statement/ActivityPart.js | 24 +++ .../DataSourcePage/Statement/ActorPart.js | 25 +++ ui/src/pages/DataSourcePage/Statement/Part.js | 21 ++ .../DataSourcePage/Statement/VerbPart.js | 25 +++ .../pages/DataSourcePage/Statement/index.js | 52 +++-- .../pages/DataSourcePage/Statement/styles.css | 11 - .../index.js => StatementForm.js} | 4 +- .../StatementForm/statementform.css | 2 - ui/src/pages/DataSourcePage/index.js | 27 ++- ui/src/pages/DataSourcePage/styles.css | 10 - .../ForgotPasswordPage/forgotpassword.css | 7 - ui/src/pages/ForgotPasswordPage/index.js | 9 +- .../pages/HomePage/Register/CardContainer.js | 12 ++ ui/src/pages/HomePage/Register/Divider.js | 7 + .../HomePage/Register/DontShowAgainText.js | 13 ++ .../HomePage/Register/RegistrationLink.js | 8 + .../HomePage/Register/RegistrationLogo.js | 7 + .../HomePage/Register/RegistrationText.js | 7 + ui/src/pages/HomePage/Register/index.js | 47 +++-- ui/src/pages/HomePage/Register/styles.css | 55 ----- ui/src/pages/HomePage/index.js | 5 +- ui/src/pages/HomePage/styles.css | 18 -- ui/src/pages/LoginPage/index.js | 13 +- ui/src/pages/LoginPage/styles.css | 16 -- .../ColumnHeaderEditor/AccountHomePageForm.js | 48 ++--- .../ColumnHeaderEditor/AccountNameForm.js | 12 +- .../ColumnHeaderEditor/AttributeNameForm.js | 12 +- .../ColumnHeaderEditor/FieldTypeForm.js | 14 +- .../stages/ColumnHeaderEditor/InputField.js | 7 + .../stages/ColumnHeaderEditor/InputFields.js | 12 +- .../stages/ColumnHeaderEditor/PrimaryForm.js | 12 +- .../stages/ColumnHeaderEditor/TableData.js | 6 + .../stages/ColumnHeaderEditor/index.js | 77 ++++--- .../stages/ColumnHeaderEditor/styles.css | 37 ---- .../ConfigureUpload.spec.js.snap | 6 +- .../AttributesEditor/NewRow.js | 19 +- .../AttributesEditor/SavedRowEditor.js | 17 +- .../AttributesEditor/SavedRowViewer.js | 15 +- .../AttributesEditor/index.js | 17 +- .../AttributesEditor/styles.css | 19 -- .../AttributesEditor/tableComponents.js | 18 ++ .../AttributesViewer/SavedRow.js | 24 --- .../AttributesViewer/index.js | 33 ++- .../AttributesViewer/styles.css | 9 - .../IdentifiersEditor/NewRow.js | 21 +- .../IdentifiersEditor/SavedRow.js | 19 +- .../IdentifiersEditor/TableData.js | 6 + .../IdentifiersEditor/actionsStyle.js | 6 + .../IdentifiersEditor/index.js | 22 +- .../IdentifiersEditor/styles.css | 19 -- .../IdentifiersEditor/tableDataStyle.js | 7 + .../IdentifiersViewer/SavedRow.js | 17 +- .../IdentifiersViewer/index.js | 15 +- .../IdentifiersViewer/styles.css | 9 - .../IdentifiersViewer/tableDataStyle.js | 7 + .../IfiViewer/IfiAccountViewer.js | 18 +- .../PeopleManagePage/IfiViewer/styles.css | 3 - .../pages/PeopleManagePage/MergeForm/index.js | 29 +-- .../PeopleManagePage/MergeForm/styles.css | 8 - .../index.js => PersonaAutoComplete.js} | 0 .../{PersonaView/index.js => PersonaView.js} | 6 +- ui/src/pages/ResetPasswordPage/index.js | 28 +-- ui/src/pages/ResetPasswordPage/styles.css | 14 -- .../{ClientForm => }/AuthorityEditor.js | 0 .../{ClientForm/index.js => ClientForm.js} | 5 +- .../SettingsClientsPage/ClientForm/styles.css | 2 - ui/src/pages/SettingsClientsPage/Clients.css | 16 -- .../__tests__/ClientForm.spec.js | 10 +- .../__snapshots__/ClientForm.spec.js.snap | 7 +- .../{RoleForm/index.js => RoleForm.js} | 53 +++-- .../{RoleForm => }/RoleForm.spec.js | 2 +- .../SettingsRolesPage/RoleForm/styles.css | 10 - ui/src/pages/SettingsUsersPage/index.js | 15 +- ui/src/pages/SettingsUsersPage/users.css | 20 -- ui/src/pages/SiteUsersPage/SiteUserOrgItem.js | 2 +- ui/src/pages/SiteUsersPage/index.js | 23 +-- yarn.lock | 194 +++++++++++++++++- 91 files changed, 858 insertions(+), 877 deletions(-) rename ui/src/pages/DataSourcePage/ExportManager/{AddModelPrompt/index.js => AddModelPrompt.js} (53%) delete mode 100644 ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt/styles.css rename ui/src/pages/DataSourcePage/ExportManager/ExportForm/{ProjectionInput => }/CacheKeysAutoComplete.js (100%) rename ui/src/pages/DataSourcePage/ExportManager/ExportForm/{ExportOutputPreview/index.js => ExportOutputPreview.js} (75%) delete mode 100644 ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview/styles.css rename ui/src/pages/DataSourcePage/ExportManager/ExportForm/{ProjectionInput/index.js => ProjectionInput.js} (79%) delete mode 100644 ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/projectionbuilder.css delete mode 100644 ui/src/pages/DataSourcePage/ExportManager/ExportForm/styles.css delete mode 100644 ui/src/pages/DataSourcePage/ExportManager/styles.css create mode 100644 ui/src/pages/DataSourcePage/Statement/ActivityPart.js create mode 100644 ui/src/pages/DataSourcePage/Statement/ActorPart.js create mode 100644 ui/src/pages/DataSourcePage/Statement/Part.js create mode 100644 ui/src/pages/DataSourcePage/Statement/VerbPart.js delete mode 100644 ui/src/pages/DataSourcePage/Statement/styles.css rename ui/src/pages/DataSourcePage/{StatementForm/index.js => StatementForm.js} (73%) delete mode 100644 ui/src/pages/DataSourcePage/StatementForm/statementform.css delete mode 100644 ui/src/pages/DataSourcePage/styles.css delete mode 100644 ui/src/pages/ForgotPasswordPage/forgotpassword.css create mode 100644 ui/src/pages/HomePage/Register/CardContainer.js create mode 100644 ui/src/pages/HomePage/Register/Divider.js create mode 100644 ui/src/pages/HomePage/Register/DontShowAgainText.js create mode 100644 ui/src/pages/HomePage/Register/RegistrationLink.js create mode 100644 ui/src/pages/HomePage/Register/RegistrationLogo.js create mode 100644 ui/src/pages/HomePage/Register/RegistrationText.js delete mode 100644 ui/src/pages/HomePage/Register/styles.css delete mode 100644 ui/src/pages/HomePage/styles.css delete mode 100644 ui/src/pages/LoginPage/styles.css create mode 100644 ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputField.js create mode 100644 ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/TableData.js delete mode 100644 ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/styles.css delete mode 100644 ui/src/pages/PeopleManagePage/AttributesEditor/styles.css create mode 100644 ui/src/pages/PeopleManagePage/AttributesEditor/tableComponents.js delete mode 100644 ui/src/pages/PeopleManagePage/AttributesViewer/SavedRow.js delete mode 100644 ui/src/pages/PeopleManagePage/AttributesViewer/styles.css create mode 100644 ui/src/pages/PeopleManagePage/IdentifiersEditor/TableData.js create mode 100644 ui/src/pages/PeopleManagePage/IdentifiersEditor/actionsStyle.js delete mode 100644 ui/src/pages/PeopleManagePage/IdentifiersEditor/styles.css create mode 100644 ui/src/pages/PeopleManagePage/IdentifiersEditor/tableDataStyle.js delete mode 100644 ui/src/pages/PeopleManagePage/IdentifiersViewer/styles.css create mode 100644 ui/src/pages/PeopleManagePage/IdentifiersViewer/tableDataStyle.js delete mode 100644 ui/src/pages/PeopleManagePage/IfiViewer/styles.css delete mode 100644 ui/src/pages/PeopleManagePage/MergeForm/styles.css rename ui/src/pages/PeopleManagePage/{PersonaAutoComplete/index.js => PersonaAutoComplete.js} (100%) rename ui/src/pages/PeopleManagePage/{PersonaView/index.js => PersonaView.js} (92%) delete mode 100644 ui/src/pages/ResetPasswordPage/styles.css rename ui/src/pages/SettingsClientsPage/{ClientForm => }/AuthorityEditor.js (100%) rename ui/src/pages/SettingsClientsPage/{ClientForm/index.js => ClientForm.js} (97%) delete mode 100644 ui/src/pages/SettingsClientsPage/ClientForm/styles.css delete mode 100644 ui/src/pages/SettingsClientsPage/Clients.css rename ui/src/pages/SettingsClientsPage/{ClientForm => }/__tests__/ClientForm.spec.js (95%) rename ui/src/pages/SettingsClientsPage/{ClientForm => }/__tests__/__snapshots__/ClientForm.spec.js.snap (98%) rename ui/src/pages/SettingsRolesPage/{RoleForm/index.js => RoleForm.js} (85%) rename ui/src/pages/SettingsRolesPage/{RoleForm => }/RoleForm.spec.js (97%) delete mode 100644 ui/src/pages/SettingsRolesPage/RoleForm/styles.css delete mode 100644 ui/src/pages/SettingsUsersPage/users.css diff --git a/.eslintrc b/.eslintrc index f6138237a3..66980aff2e 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,6 +8,7 @@ }, "parser": "babel-eslint", "rules": { + "import/prefer-default-export": 0, "max-len": 0, "linebreak-style": 0, "array-callback-return": 0, diff --git a/api/src/routes/HttpRoutes.js b/api/src/routes/HttpRoutes.js index 0f476efb9b..bdea7375c8 100644 --- a/api/src/routes/HttpRoutes.js +++ b/api/src/routes/HttpRoutes.js @@ -359,9 +359,7 @@ restify.serve(router, QueryBuilderCache); restify.serve(router, QueryBuilderCacheValue); restify.serve(router, Role); restify.serve(router, PersonaAttribute, { - preDelete: async (req, res, next) => { - return next(); - }, + preDelete: async (req, res, next) => next(), }); restify.serve(router, PersonasImport); restify.serve(router, PersonasImportTemplate); diff --git a/package.json b/package.json index 03aa4a70ab..7103939297 100644 --- a/package.json +++ b/package.json @@ -160,6 +160,7 @@ "source-map-support": "^0.4.10", "sqs-consumer": "^3.6.1", "stats-webpack-plugin": "^0.4.3", + "styled-components": "^4.4.0", "supertest": "^1.2.0", "tincanjs": "^0.41.1", "url-loader": "^0.5.7", diff --git a/ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt/index.js b/ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt.js similarity index 53% rename from ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt/index.js rename to ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt.js index 9c5dc79a40..28850d5844 100644 --- a/ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt/index.js +++ b/ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt.js @@ -1,7 +1,5 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './styles.css'; class AddModelPrompt extends Component { static propTypes = { @@ -10,7 +8,7 @@ class AddModelPrompt extends Component { } static defaultProps = { - onAdd: () => {} + onAdd: () => { } } render = () => { @@ -18,11 +16,13 @@ class AddModelPrompt extends Component { return (

- { message } - + {message} + + +

); } } -export default withStyles(styles)(AddModelPrompt); +export default AddModelPrompt; diff --git a/ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt/styles.css b/ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt/styles.css deleted file mode 100644 index 9c94b6b8aa..0000000000 --- a/ui/src/pages/DataSourcePage/ExportManager/AddModelPrompt/styles.css +++ /dev/null @@ -1,4 +0,0 @@ -.addNew { - margin-left: 8px; } - - diff --git a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/CacheKeysAutoComplete.js b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/CacheKeysAutoComplete.js similarity index 100% rename from ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/CacheKeysAutoComplete.js rename to ui/src/pages/DataSourcePage/ExportManager/ExportForm/CacheKeysAutoComplete.js diff --git a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview/index.js b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview.js similarity index 75% rename from ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview/index.js rename to ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview.js index 5313b3ada0..8270a934f3 100644 --- a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview/index.js +++ b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview.js @@ -1,16 +1,36 @@ /* eslint-disable react/jsx-indent */ import { isString } from 'lodash'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import React from 'react'; +import styled from 'styled-components'; import PropTypes from 'prop-types'; import { Map } from 'immutable'; import { withProps, compose, setPropTypes, shouldUpdate, defaultProps } from 'recompose'; import { MultiGrid, AutoSizer } from 'react-virtualized'; import { withModels } from 'ui/utils/hocs'; -import styles from './styles.css'; + +const Cell = styled.div` + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: baseline; + text-align: left; + padding: 0 1em 0 0; + white-space: nowrap; +`; + +const CellWrapper = styled.div` + overflow: hidden; + width: 100%; +`; + +const HeaderCell = styled(Cell)` + border-bottom: 2px solid #ddd; + font-weight: bold; +`; const enhance = compose( - withStyles(styles), setPropTypes({ filter: PropTypes.instanceOf(Map).isRequired, project: PropTypes.instanceOf(Map).isRequired, @@ -29,8 +49,8 @@ const enhance = compose( const results = models.map(model => project.map((value, key) => ( isString(value) ? - model.getIn(value.replace('$', '').split('.')) : - model.getIn(key.split('.')) + model.getIn(value.replace('$', '').split('.')) : + model.getIn(key.split('.')) )) ).toList(); const headings = project.keySeq(); @@ -53,9 +73,9 @@ const renderHeading = headings => ({ columnIndex, style, key }) => { const heading = headings.get(columnIndex); return ( -
- { heading } -
+ + {heading} + ); }; @@ -67,11 +87,11 @@ const renderResultContent = (results, headings) => const display = value && value.toJS ? JSON.stringify(value.toJS()) : value; return ( -
-
+ + {display} -
-
+ + ); }; @@ -81,8 +101,8 @@ const renderCell = (results, headings) => { return ({ columnIndex, rowIndex, key, style }) => ( rowIndex === 0 - ? renderHeadingCell({ columnIndex, style, key }) - : renderResultContentCell({ columnIndex, rowIndex: rowIndex - 1, style, key }) + ? renderHeadingCell({ columnIndex, style, key }) + : renderResultContentCell({ columnIndex, rowIndex: rowIndex - 1, style, key }) ); }; diff --git a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview/styles.css b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview/styles.css deleted file mode 100644 index 40ead1f0f4..0000000000 --- a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ExportOutputPreview/styles.css +++ /dev/null @@ -1,58 +0,0 @@ -.exportForm { - margin: 10px 0; } - -.gridRow :focus { - outline: 0 !important; } - -.gridRow { - position: relative; - display: flex; - flex-direction: row; - height: 100%; } - -.gridColumn { - display: flex; - flex-direction: column; - flex: 1 1 auto; } - -.leftSideGridContainer { - z-index: 10; - overflow: hidden; } - -.leftSideGrid { - background-color: #fff; - overflow-x: hidden !important; } - -.headerGrid { - background-color: #fff; - width: 100%; - overflow: hidden !important; } - -.bodyGrid { - width: 100%; } - -.oddRow { - background-color: rgba(0, 0, 0, 0.1); } - -.cell, -.headerCell { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: baseline; - text-align: left; - padding: 0 1em 0 0; - white-space: nowrap; } - -.cellWrapper { - overflow: hidden; - width: 100%; } - -.header, -.fixed { - border-bottom: 2px solid #ddd; - font-weight: bold; } - - diff --git a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/index.js b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput.js similarity index 79% rename from ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/index.js rename to ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput.js index 53213bfc77..1435a36ecf 100644 --- a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/index.js +++ b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput.js @@ -1,12 +1,10 @@ /* eslint-disable react/jsx-indent */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { Map } from 'immutable'; import JsonTextArea from 'ui/components/JsonTextArea'; import toString from 'lodash/toString'; import TableInput from 'ui/components/TableInput'; -import styles from './projectionbuilder.css'; import CacheKeysAutoComplete from './CacheKeysAutoComplete'; const stripDollar = string => string.replace(/^(\$)/, ''); @@ -52,20 +50,20 @@ class ProjectionInput extends Component { return (
- { rawMode ? ( + {rawMode ? ( ) : ( - - )} + + )}
); } } -export default withStyles(styles)(ProjectionInput); +export default ProjectionInput; diff --git a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/projectionbuilder.css b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/projectionbuilder.css deleted file mode 100644 index 7c720fec69..0000000000 --- a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/ProjectionInput/projectionbuilder.css +++ /dev/null @@ -1,49 +0,0 @@ -.queryForm > span > .childContainer { - margin-left: 0px; } - .queryForm > span > .childContainer > .expandedChildren > span > .formGroup > label { - font-size: 1.2em; } - -.queryForm { - border: 1px solid #DDDDDD; - padding: 5px; - margin-bottom: 10px; } - .queryForm span { - white-space: normal; - word-break: break-all; } - .queryForm label { - cursor: pointer; - font-weight: normal; - word-wrap: break-word; } - .queryForm textarea { - margin-top: 8px; - width: 100%; } - -.childContainer { - margin-left: 8px; } - -.collapsedChildren a { - margin-right: 8px; - color: #929292; } - -.hasParams { - font-weight: bold; } - -.table { - margin-top: 0px; } - -.table > thead > tr > th { - padding-top: 10px; - padding-bottom: 9px; } - -.table > tbody > tr > td { - padding: 2px 0px; - vertical-align: middle; } - .table > tbody > tr > td input { - border: none; - box-shadow: none; } - -.textRight { - text-align: right; } - -.textInput { - padding: 1rem 0; } diff --git a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/index.js b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/index.js index 0dc474c16a..422ae09939 100644 --- a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/index.js +++ b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/index.js @@ -1,15 +1,14 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Map, List, fromJS } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { withProps, withState, compose } from 'recompose'; import { connect } from 'react-redux'; +import styled from 'styled-components'; import { getDefaultProjectionFromType } from 'ui/redux/modules/exports'; import { withModel } from 'ui/utils/hocs'; import { downloadExport } from 'ui/redux/actions'; import ProjectionInput from './ProjectionInput'; import ExportOutputPreview from './ExportOutputPreview'; -import styles from './styles.css'; const downloadRequestStates = { default: 0, @@ -17,6 +16,20 @@ const downloadRequestStates = { inqueue: 2 }; +const ExportOutputPreviewSection = styled.div` + margin-top: 11px; + + @media (max-width: 991px) { + display: none; + } +`; + +const ProjectionInputSection = styled.div` + @media (max-width: 991px) { + margin-right: 0px; + } +`; + class ExportForm extends Component { static propTypes = { model: PropTypes.instanceOf(Map).isRequired, @@ -126,7 +139,9 @@ class ExportForm extends Component { return (
-
+
{rawMode ? (
) : [ -
- -
, -
- -
- ]} + + + , + + + + ]}
{this.renderDownloadButton()} @@ -156,7 +177,6 @@ class ExportForm extends Component { } export default compose( - withStyles(styles), withProps({ schema: 'export' }), withState('downloadRequestState', 'setDownloadRequestStates', downloadRequestStates.default), withModel, diff --git a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/styles.css b/ui/src/pages/DataSourcePage/ExportManager/ExportForm/styles.css deleted file mode 100644 index 43f2801f32..0000000000 --- a/ui/src/pages/DataSourcePage/ExportManager/ExportForm/styles.css +++ /dev/null @@ -1,27 +0,0 @@ -.exportForm { - margin: 10px 0; - display: flex; } - -.rightPane { - flex-grow: 1; - margin-left: 20px; - padding-left: 20px; - margin-top: 10px; - border-left: 1px solid #eee; } - -.exportOutputPreview { - margin-top: 11px; -} - -@media (max-width: 991px) { - - .exportOutputPreview { - display: none; - } -} - -@media (max-width: 991px) { - .projectionInput { - margin-right: 0px; - } -} \ No newline at end of file diff --git a/ui/src/pages/DataSourcePage/ExportManager/index.js b/ui/src/pages/DataSourcePage/ExportManager/index.js index 546523a09a..9ef71de46b 100644 --- a/ui/src/pages/DataSourcePage/ExportManager/index.js +++ b/ui/src/pages/DataSourcePage/ExportManager/index.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Map, List } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import Tabs from 'ui/components/Material/Tabs'; import { Tab } from 'react-toolbox/lib/tabs'; import { connect } from 'react-redux'; @@ -13,12 +12,10 @@ import { withSchema } from 'ui/utils/hocs'; import AddModelPrompt from './AddModelPrompt'; import ExportDownloadManager from './ExportDownloadManager'; import ExportForm from './ExportForm'; -import styles from './styles.css'; const schema = 'export'; const enhance = compose( - withStyles(styles), withSchema(schema), withState('activeTab', 'setActiveTab', 0), withState('selectedExportId', 'setSelectedExportId'), @@ -58,7 +55,7 @@ const enhance = compose( const renderSelectedExport = ({ pipelines, selectedExportId, setSelectedExport }) => (
-
+
void; + * value: any; + * }} props + */ +export function ActivityPart(props) { + return ( + + + {displayActivity(props.value)} + + + ); +} diff --git a/ui/src/pages/DataSourcePage/Statement/ActorPart.js b/ui/src/pages/DataSourcePage/Statement/ActorPart.js new file mode 100644 index 0000000000..90bc1a7375 --- /dev/null +++ b/ui/src/pages/DataSourcePage/Statement/ActorPart.js @@ -0,0 +1,25 @@ +import React from 'react'; +import styled from 'styled-components'; +import { displayActor } from '../../../utils/xapi'; +import { Part } from './Part'; + +const Actor = styled.a` + font-weight: normal; + color: #555459; +`; + +/** + * @param {{ + * onSetFilter: () => void; + * value: any; + * }} props + */ +export function ActorPart(props) { + return ( + + + {displayActor(props.value)} + + + ); +} diff --git a/ui/src/pages/DataSourcePage/Statement/Part.js b/ui/src/pages/DataSourcePage/Statement/Part.js new file mode 100644 index 0000000000..2eab263c15 --- /dev/null +++ b/ui/src/pages/DataSourcePage/Statement/Part.js @@ -0,0 +1,21 @@ +import React from 'react'; + +/** + * @param {{ + * onSetFilter: () => void; + * value: any; + * children: React.ReactNode; + * }} props + */ +export function Part(props) { + return ( + { + event.preventDefault(); + event.stopPropagation(); + props.onSetFilter(); + }} title={JSON.stringify(props.value.toJS(), null, 2)}> + {props.children} + + ); +} diff --git a/ui/src/pages/DataSourcePage/Statement/VerbPart.js b/ui/src/pages/DataSourcePage/Statement/VerbPart.js new file mode 100644 index 0000000000..66d5f8b52b --- /dev/null +++ b/ui/src/pages/DataSourcePage/Statement/VerbPart.js @@ -0,0 +1,25 @@ +import React from 'react'; +import styled from 'styled-components'; +import { displayVerb } from '../../../utils/xapi'; +import { Part } from './Part'; + +const Verb = styled.a` + font-weight: 600; + color: #555459; +`; + +/** + * @param {{ + * onSetFilter: () => void; + * value: any; + * }} props + */ +export function VerbPart(props) { + return ( + + + {displayVerb(props.value)} + + + ); +} diff --git a/ui/src/pages/DataSourcePage/Statement/index.js b/ui/src/pages/DataSourcePage/Statement/index.js index 2da4d90636..187b4b8395 100644 --- a/ui/src/pages/DataSourcePage/Statement/index.js +++ b/ui/src/pages/DataSourcePage/Statement/index.js @@ -1,11 +1,16 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Map, List } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import moment from 'moment'; -import { displayActor, displayVerb, displayActivity } from '../../../utils/xapi'; +import styled from 'styled-components'; +import { ActivityPart } from './ActivityPart'; +import { ActorPart } from './ActorPart'; import AutoUpdate from './AutoUpdate'; -import styles from './styles.css'; +import { VerbPart } from './VerbPart'; + +const Timestamp = styled.a` + font-weight: normal; +`; class Statement extends Component { static propTypes = { @@ -19,34 +24,27 @@ class Statement extends Component { hasInStatement = path => this.props.statement.hasIn(path); - renderPart = (path, part, displayer, filterPath) => { + renderActor = (path, filterPath) => { const filterValue = this.getInStatement(filterPath); const value = this.getInStatement(path); - const display = displayer(value); - const title = JSON.stringify(value.toJS(), null, 2); - return ( - { - event.preventDefault(); - event.stopPropagation(); - this.props.setFilterAt(filterPath, filterValue); - }} - title={title}> - {display} - + this.props.setFilterAt(filterPath, filterValue)} /> ); } - renderActor = (path, filterPath) => - this.renderPart(path, 'actor', displayActor, filterPath); - - renderVerb = path => - this.renderPart(path, 'verb', displayVerb, path); + renderVerb = (path) => { + const value = this.getInStatement(path); + return ( + this.props.setFilterAt(path, value)} /> + ); + } - renderActivity = path => - this.renderPart(path, 'object', displayActivity, path); + renderActivity = (path) => { + const value = this.getInStatement(path); + return ( + this.props.setFilterAt(path, value)} /> + ); + } renderSubStatement = basePath => ({this.renderStatement(basePath)}); @@ -92,13 +90,13 @@ class Statement extends Component { {this.renderStatement(new List(['statement']))} - + {timestamp.fromNow()} - + ); }; } -export default withStyles(styles)(Statement); +export default Statement; diff --git a/ui/src/pages/DataSourcePage/Statement/styles.css b/ui/src/pages/DataSourcePage/Statement/styles.css deleted file mode 100644 index 8a60b4e87f..0000000000 --- a/ui/src/pages/DataSourcePage/Statement/styles.css +++ /dev/null @@ -1,11 +0,0 @@ -.actor, .object, .timestamp { - font-weight: normal; } - -.actor, .verb { - color: #555459; } - - .verb { - font-weight: 600; - } - - diff --git a/ui/src/pages/DataSourcePage/StatementForm/index.js b/ui/src/pages/DataSourcePage/StatementForm.js similarity index 73% rename from ui/src/pages/DataSourcePage/StatementForm/index.js rename to ui/src/pages/DataSourcePage/StatementForm.js index f2d45aed7c..f21366451c 100644 --- a/ui/src/pages/DataSourcePage/StatementForm/index.js +++ b/ui/src/pages/DataSourcePage/StatementForm.js @@ -1,8 +1,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Map } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './statementform.css'; class StatementForm extends Component { @@ -25,4 +23,4 @@ class StatementForm extends Component { } } -export default withStyles(styles)(StatementForm); +export default StatementForm; diff --git a/ui/src/pages/DataSourcePage/StatementForm/statementform.css b/ui/src/pages/DataSourcePage/StatementForm/statementform.css deleted file mode 100644 index c3095626f5..0000000000 --- a/ui/src/pages/DataSourcePage/StatementForm/statementform.css +++ /dev/null @@ -1,2 +0,0 @@ -.strongwrap { - word-wrap: break-word; } diff --git a/ui/src/pages/DataSourcePage/index.js b/ui/src/pages/DataSourcePage/index.js index cb2fc90a37..62f0745ff5 100644 --- a/ui/src/pages/DataSourcePage/index.js +++ b/ui/src/pages/DataSourcePage/index.js @@ -3,9 +3,9 @@ import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import tooltipFactory from 'react-toolbox/lib/tooltip'; import { IconButton } from 'react-toolbox/lib/button'; +import styled from 'styled-components'; import { withProps, compose } from 'recompose'; import { Map, fromJS, List } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { VelocityTransitionGroup } from 'velocity-react'; import { update$dteTimezone } from 'lib/helpers/update$dteTimezone'; import { @@ -23,7 +23,19 @@ import Statement from './Statement'; import StatementForm from './StatementForm'; import ExportManager from './ExportManager'; -import styles from './styles.css'; +const Heading = styled.div` + display: flex; + align-items: baseline; +`; + +const HeadingButtons = styled.div` + margin-left: auto; +`; + +const HeadingIcon = styled.i` + font-size: 24px; + color: #929292; +`; const withStatements = compose( withProps({ schema: 'statement', displayOwner: false }), @@ -97,17 +109,17 @@ class Source extends PureComponent { return (
-
+ Statements -
+ - + -
-
+ +
({ query: statementQuerySelector(state), timezone: statementTimezoneSelector(state), diff --git a/ui/src/pages/DataSourcePage/styles.css b/ui/src/pages/DataSourcePage/styles.css deleted file mode 100644 index a03ae650ae..0000000000 --- a/ui/src/pages/DataSourcePage/styles.css +++ /dev/null @@ -1,10 +0,0 @@ -.heading { - display: flex; - align-items: baseline; } - .heading .buttons { - margin-left: auto; } - .heading i { - font-size: 24px; - color: #929292; } - - diff --git a/ui/src/pages/ForgotPasswordPage/forgotpassword.css b/ui/src/pages/ForgotPasswordPage/forgotpassword.css deleted file mode 100644 index 60be8f4df1..0000000000 --- a/ui/src/pages/ForgotPasswordPage/forgotpassword.css +++ /dev/null @@ -1,7 +0,0 @@ -.buttonGroup { - text-align: center; - margin-top: 10px; } - .buttonGroup button { - margin-right: 10px; } - .buttonGroup button.last { - margin-right: 0px; } diff --git a/ui/src/pages/ForgotPasswordPage/index.js b/ui/src/pages/ForgotPasswordPage/index.js index 5522a65a63..9f74616bc4 100644 --- a/ui/src/pages/ForgotPasswordPage/index.js +++ b/ui/src/pages/ForgotPasswordPage/index.js @@ -1,6 +1,5 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose } from 'recompose'; import { connect } from 'react-redux'; import { Card } from 'react-toolbox/lib/card'; @@ -13,7 +12,6 @@ import { requestResetRequestStateSelector } from 'ui/redux/modules/auth'; import FullPageBackground from 'ui/components/FullPageBackground'; -import styles from './forgotpassword.css'; class ForgotPassword extends Component { static propTypes = { @@ -25,7 +23,7 @@ class ForgotPassword extends Component { onSubmit = (e) => { if (e) e.preventDefault(); const email = this.email.value; - if (email) this.props.requestPasswordResetStart(email).catch(() => {}); + if (email) this.props.requestPasswordResetStart(email).catch(() => { }); } renderForm() { @@ -52,7 +50,7 @@ class ForgotPassword extends Component { )}
-
+
@@ -84,7 +82,7 @@ class ForgotPassword extends Component {

Forgotten password

- { stateView } + {stateView}
); @@ -92,7 +90,6 @@ class ForgotPassword extends Component { } export default compose( - withStyles(styles), connect( state => ({ requestResetError: requestResetErrorSelector(state), diff --git a/ui/src/pages/HomePage/Register/CardContainer.js b/ui/src/pages/HomePage/Register/CardContainer.js new file mode 100644 index 0000000000..b38d145d59 --- /dev/null +++ b/ui/src/pages/HomePage/Register/CardContainer.js @@ -0,0 +1,12 @@ +import styled from 'styled-components'; +import { CardText } from 'react-toolbox/lib/card'; + +export const CardContainer = styled(CardText)` + color: white; + background-color: #f5aa34; + background-image: url("../../../assets/geometric-pattern.png"); + background-repeat: no-repeat; + background-position: center; + background-size: cover; + text-align: center; +`; diff --git a/ui/src/pages/HomePage/Register/Divider.js b/ui/src/pages/HomePage/Register/Divider.js new file mode 100644 index 0000000000..c03685eed8 --- /dev/null +++ b/ui/src/pages/HomePage/Register/Divider.js @@ -0,0 +1,7 @@ +import styled from 'styled-components'; + +export const Divider = styled.hr` + background-color: #CB7128; + height: 2px; + border: none; +`; diff --git a/ui/src/pages/HomePage/Register/DontShowAgainText.js b/ui/src/pages/HomePage/Register/DontShowAgainText.js new file mode 100644 index 0000000000..533600d815 --- /dev/null +++ b/ui/src/pages/HomePage/Register/DontShowAgainText.js @@ -0,0 +1,13 @@ +import styled from 'styled-components'; + +export const DontShowAgainText = styled.span` + color: #8d5e28; + margin-top: 12px; + cursor: pointer; + + :hover { + color: #8d5e28; + text-decoration: underline; + margin-top: 12px; + } +`; diff --git a/ui/src/pages/HomePage/Register/RegistrationLink.js b/ui/src/pages/HomePage/Register/RegistrationLink.js new file mode 100644 index 0000000000..a84ad40e1d --- /dev/null +++ b/ui/src/pages/HomePage/Register/RegistrationLink.js @@ -0,0 +1,8 @@ +import styled from 'styled-components'; + +export const RegistrationLink = styled.a` + display: block; + background: #276CDA !important; + width: 80px; + margin-left: 12px; +`; diff --git a/ui/src/pages/HomePage/Register/RegistrationLogo.js b/ui/src/pages/HomePage/Register/RegistrationLogo.js new file mode 100644 index 0000000000..5e7f936ce5 --- /dev/null +++ b/ui/src/pages/HomePage/Register/RegistrationLogo.js @@ -0,0 +1,7 @@ +import styled from 'styled-components'; + +export const RegistrationLogo = styled.img` + display: block; + margin-left: auto; + margin-right: auto; +`; diff --git a/ui/src/pages/HomePage/Register/RegistrationText.js b/ui/src/pages/HomePage/Register/RegistrationText.js new file mode 100644 index 0000000000..bdb996147f --- /dev/null +++ b/ui/src/pages/HomePage/Register/RegistrationText.js @@ -0,0 +1,7 @@ +import styled from 'styled-components'; + +export const RegistrationText = styled.div` + margin-top: 20px; + font-size: 28px; + font-weight: bold; +`; diff --git a/ui/src/pages/HomePage/Register/index.js b/ui/src/pages/HomePage/Register/index.js index 8d3dc1f75e..dbb40dc8ea 100644 --- a/ui/src/pages/HomePage/Register/index.js +++ b/ui/src/pages/HomePage/Register/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Card, CardText } from 'react-toolbox/lib/card'; +import { Card } from 'react-toolbox/lib/card'; import { withModel } from 'ui/utils/hocs'; import { compose, @@ -8,9 +8,13 @@ import { withState } from 'recompose'; import { SITE_SETTINGS_ID } from 'lib/constants/siteSettings'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import registerLogo from 'ui/static/register-logo.png'; -import styles from './styles.css'; +import { CardContainer } from './CardContainer'; +import { Divider } from './Divider'; +import { DontShowAgainText } from './DontShowAgainText'; +import { RegistrationLink } from './RegistrationLink'; +import { RegistrationLogo } from './RegistrationLogo'; +import { RegistrationText } from './RegistrationText'; const Register = ({ model, @@ -22,28 +26,34 @@ const Register = ({ } return ( - -
- -
REGISTER YOUR LOCKER
-
-
Get helpdesk access and help promote the Open Source project
+ +
+ + REGISTER YOUR LOCKER + +
+ Get helpdesk access and help promote the Open Source project +
-
- + Register + rel="noopener noreferrer"> + Register + - Don't show again + + Don't show again +
- +
); }; @@ -59,6 +69,5 @@ export default compose( value: true }) }), - withState('ok', 'setOk', false), - withStyles(styles) + withState('ok', 'setOk', false) )(Register); diff --git a/ui/src/pages/HomePage/Register/styles.css b/ui/src/pages/HomePage/Register/styles.css deleted file mode 100644 index 8bebee97d5..0000000000 --- a/ui/src/pages/HomePage/Register/styles.css +++ /dev/null @@ -1,55 +0,0 @@ - -.container { - color: white; - background-color: #f5aa34; - background-image: url("../../../assets/geometric-pattern.png"); - background-repeat: no-repeat; - background-position: center; - background-size: cover; - text-align: center; -} - -.logo { - display: block; - margin-left: auto; - margin-right: auto; -} - -.registerText { - margin-top: 20px; - font-size: 28px; - font-weight: bold; -} - -.divider { - background-color: #CB7128; - height: 2px; - border: none; -} - -.benefits { - font-size: 16px; -} - -.buttons { - margin-top: 20px; -} - -.register { - display: block; - background: #276CDA !important; - width: 80px; - margin-left: 12px; -} - -.dontShowAgain { - color: #8d5e28; - margin-top: 12px; - cursor: pointer; -} - -.dontShowAgain:hover { - color: #8d5e28; - text-decoration: underline; - margin-top: 12px; -} diff --git a/ui/src/pages/HomePage/index.js b/ui/src/pages/HomePage/index.js index 048ed74222..c6e4da4a30 100644 --- a/ui/src/pages/HomePage/index.js +++ b/ui/src/pages/HomePage/index.js @@ -4,7 +4,6 @@ import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import DebounceInput from 'react-debounce-input'; import { connect } from 'react-redux'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { Card, CardText } from 'react-toolbox/lib/card'; import { List, ListItem } from 'react-toolbox/lib/list'; import { Map, List as ImmutList, fromJS } from 'immutable'; @@ -21,7 +20,6 @@ import AuthContainer from 'ui/containers/AuthContainer'; import smallLogo from 'ui/static/smallLogo.png'; import OrgMemberButton from 'ui/containers/OrgMemberButton'; import Register from './Register'; -import styles from './styles.css'; class Home extends Component { static propTypes = { @@ -240,7 +238,7 @@ class Home extends Component { -
+
@@ -252,7 +250,6 @@ class Home extends Component { } export default compose( - withStyles(styles), connect(state => ({ auth: authenticationSelector(state), authUser: loggedInUserSelector(state), diff --git a/ui/src/pages/HomePage/styles.css b/ui/src/pages/HomePage/styles.css deleted file mode 100644 index 55a88d91ac..0000000000 --- a/ui/src/pages/HomePage/styles.css +++ /dev/null @@ -1,18 +0,0 @@ -.buttonGroup, .loginButtons { - text-align: center; - margin-top: 10px; } - .buttonGroup button, .loginButtons button { - margin-right: 10px; } - .buttonGroup button.last, .loginButtons button.last { - margin-right: 0px; } - -.loginButtons { - margin-top: 20px; } - -.orgContainer { - position: relative; } - -.spinnerContainer { - position: absolute; - background-color: rgba(255, 255, 255, 0.5); - width: 100%; } diff --git a/ui/src/pages/LoginPage/index.js b/ui/src/pages/LoginPage/index.js index be88ca2633..7cebc58f9a 100644 --- a/ui/src/pages/LoginPage/index.js +++ b/ui/src/pages/LoginPage/index.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withContext, lifecycle } from 'recompose'; import { Card, CardText } from 'react-toolbox/lib/card'; import { @@ -15,10 +14,8 @@ import Helmet from 'react-helmet'; import Link from 'ui/containers/Link'; import FullPageBackground from 'ui/components/FullPageBackground'; import { IN_PROGRESS } from 'ui/utils/constants'; -import styles from './styles.css'; const enhance = compose( - withStyles(styles), withContext({ router: PropTypes.any, }, () => ({})), @@ -66,7 +63,7 @@ const render = ({ return ( -
+

Welcome

@@ -95,20 +92,20 @@ const render = ({ {!inProgress && -
-
+
+
{googleAuthEnabled && }
-
+
Reset password diff --git a/ui/src/pages/LoginPage/styles.css b/ui/src/pages/LoginPage/styles.css deleted file mode 100644 index 6c3b757fd7..0000000000 --- a/ui/src/pages/LoginPage/styles.css +++ /dev/null @@ -1,16 +0,0 @@ -.buttonGroup, .loginButtons, .otherButtons { - text-align: center; - margin-top: 10px; -} - -.buttonGroup button, .loginButtons button, .otherButtons button { - margin-right: 10px; -} - -.buttonGroup button.last, .loginButtons button.last, .otherButtons button.last { - margin-right: 0px; -} - -.loginButtons { - margin-top: 20px; -} diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountHomePageForm.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountHomePageForm.js index 4f284e5808..ae959d80b8 100644 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountHomePageForm.js +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountHomePageForm.js @@ -1,11 +1,9 @@ import React from 'react'; import uuid from 'uuid'; -import { compose } from 'recompose'; import DebounceInput from 'react-debounce-input'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { getAccountHomePageColumns } from 'lib/services/importPersonas/personasImportHelpers'; import Switch from 'ui/components/Material/Switch'; -import styles from './styles.css'; +import { InputField } from './InputField'; /** * @param {boolean} _.disabled @@ -35,7 +33,7 @@ const AccountHomePageForm = ({ )); return ( -
+ @@ -54,32 +52,30 @@ const AccountHomePageForm = ({ disabled={disabled} /> {!useConstant && ( - - )} + + )} {useConstant && ( - onConstantChange(e.target.value)} - disabled={disabled} - placeholder="https://example.com" /> - )} + onConstantChange(e.target.value)} + disabled={disabled} + placeholder="https://example.com" /> + )} -
+ ); }; -export default compose( - withStyles(styles) -)(AccountHomePageForm); +export default AccountHomePageForm; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountNameForm.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountNameForm.js index a058da4efc..72157e8b83 100644 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountNameForm.js +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AccountNameForm.js @@ -1,8 +1,6 @@ import React from 'react'; import uuid from 'uuid'; -import { compose } from 'recompose'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './styles.css'; +import { InputField } from './InputField'; /** * @param {string} _.relatedColumn @@ -12,7 +10,7 @@ const AccountNameForm = ({ }) => { const formId = uuid.v4(); return ( -
+ @@ -26,10 +24,8 @@ const AccountNameForm = ({ {relatedColumn} -
+ ); }; -export default compose( - withStyles(styles) -)(AccountNameForm); +export default AccountNameForm; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AttributeNameForm.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AttributeNameForm.js index 8f33b43230..a47cb595bd 100644 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AttributeNameForm.js +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/AttributeNameForm.js @@ -1,9 +1,7 @@ import React from 'react'; import DebounceInput from 'react-debounce-input'; import uuid from 'uuid'; -import { compose } from 'recompose'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './styles.css'; +import { InputField } from './InputField'; const AttributeNameForm = ({ attributeName, @@ -13,7 +11,7 @@ const AttributeNameForm = ({ const formId = uuid.v4(); return ( -
+ @@ -27,10 +25,8 @@ const AttributeNameForm = ({ disabled={disabled} placeholder="Attribute Name" /> -
+ ); }; -export default compose( - withStyles(styles) -)(AttributeNameForm); +export default AttributeNameForm; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/FieldTypeForm.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/FieldTypeForm.js index d7d4531088..77a3a9afaa 100644 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/FieldTypeForm.js +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/FieldTypeForm.js @@ -1,13 +1,11 @@ import React from 'react'; import uuid from 'uuid'; -import { compose } from 'recompose'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { COLUMN_TYPES, COLUMN_TYPE_LABELS, COLUMN_ACCOUNT_KEY } from 'lib/constants/personasImport'; -import styles from './styles.css'; +import { InputField } from './InputField'; const FieldTypeForm = ({ columnType, @@ -16,7 +14,7 @@ const FieldTypeForm = ({ }) => { const formId = uuid.v4(); return ( -
+ @@ -39,13 +37,11 @@ const FieldTypeForm = ({ - )) + )) } -
+ ); }; -export default compose( - withStyles(styles) -)(FieldTypeForm); +export default FieldTypeForm; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputField.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputField.js new file mode 100644 index 0000000000..f3a9311372 --- /dev/null +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputField.js @@ -0,0 +1,7 @@ +import styled from 'styled-components'; + +export const InputField = styled.div` + width: 240px; + margin-bottom: 0; + margin-right: 12px; +`; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputFields.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputFields.js index 1934ed1173..2535aba7b7 100644 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputFields.js +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/InputFields.js @@ -2,7 +2,6 @@ import React from 'react'; import { connect } from 'react-redux'; import { compose, withHandlers } from 'recompose'; import { Map } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { COLUMN_ACCOUNT_KEY, COLUMN_ACCOUNT_VALUE, COLUMN_ATTRIBUTE_DATA } from 'lib/constants/personasImport'; import * as personasImportHelpers from 'lib/services/importPersonas/personasImportHelpers'; import { updateModel } from 'ui/redux/modules/models'; @@ -11,7 +10,7 @@ import PrimaryForm from './PrimaryForm'; import AccountNameForm from './AccountNameForm'; import AccountHomePageForm from './AccountHomePageForm'; import AttributeNameForm from './AttributeNameForm'; -import styles from './styles.css'; +import { TableData } from './TableData'; const handlers = { onColumnTypeChange: ({ @@ -145,8 +144,8 @@ const handlers = { const columnName = columnStructure.get('columnName', ''); const newStructure = model - .get('structure') - .setIn([columnName, 'attributeName'], attributeName); + .get('structure') + .setIn([columnName, 'attributeName'], attributeName); doUpdateModel({ schema: 'personasImport', @@ -171,7 +170,7 @@ const InputFields = ({ const isColumnOrderable = personasImportHelpers.isColumnOrderable({ columnStructure: columnStructure.toJS() }); return ( - + )} - + ); }; export default compose( - withStyles(styles), connect( state => state, { updateModel }, diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/PrimaryForm.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/PrimaryForm.js index 230064abf4..eb281f4744 100644 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/PrimaryForm.js +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/PrimaryForm.js @@ -1,8 +1,6 @@ import React from 'react'; import uuid from 'uuid'; -import { compose } from 'recompose'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './styles.css'; +import { InputField } from './InputField'; const PrimaryForm = ({ primary, @@ -11,7 +9,7 @@ const PrimaryForm = ({ }) => { const formId = uuid.v4(); return ( -
+ @@ -23,10 +21,8 @@ const PrimaryForm = ({ value={primary} type="number" disabled={disabled} /> -
+ ); }; -export default compose( - withStyles(styles) -)(PrimaryForm); +export default PrimaryForm; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/TableData.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/TableData.js new file mode 100644 index 0000000000..d88cacf448 --- /dev/null +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/TableData.js @@ -0,0 +1,6 @@ +import styled from 'styled-components'; + +export const TableData = styled.td` + text-align: left; + padding: 8px; +`; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/index.js b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/index.js index 786b4ac73b..d52493bbd8 100644 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/index.js +++ b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/index.js @@ -1,42 +1,55 @@ import React from 'react'; -import { compose } from 'recompose'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './styles.css'; +import styled from 'styled-components'; import InputFields from './InputFields'; +import { TableData } from './TableData'; + +const TableHeader = styled.th` + background-color: #525252; + color: #FFFFFF; + text-align: left; + padding: 8px; +`; + +const Table = styled.table` + tbody tr:nth-child(odd) { + background-color: #FAFAFA; + } + + th:nth-child(1), + td:nth-child(1) { + width: 180px; + } +`; export const ColumnHeaderEditor = ({ model, // personasImports model disabled }) => ( - - - - - - - +
CSV Column NamePersona Field
+ + + CSV Column Name + Persona Field + + - - { - model - .get('structure', new Map()) - .map((columnStructure, columnName) => ( - - + + { + model + .get('structure', new Map()) + .map((columnStructure, columnName) => ( + + {columnName} - - - )).toList().toJS() - } - -
- {columnName} -
-); + + + )).toList().toJS() + } + + + ); -export default compose( - withStyles(styles) -)(ColumnHeaderEditor); +export default ColumnHeaderEditor; diff --git a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/styles.css b/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/styles.css deleted file mode 100644 index 5c57cd22ae..0000000000 --- a/ui/src/pages/PeopleImportPage/stages/ColumnHeaderEditor/styles.css +++ /dev/null @@ -1,37 +0,0 @@ -.table { - border-collapse: collapse; - width: 100%; -} - -.th { - background-color: #525252; - color: #FFFFFF; - text-align: left; - padding: 8px; -} - -.td { - text-align: left; - padding: 8px; -} - -.tr:nth-child(odd) { - background-color: #FAFAFA; -} - -.th:nth-child(1), -.td:nth-child(1) { - width: 180px; -} - -.inputFields { - display: flex; - flex-wrap: wrap; - overflow-x: auto; -} - -.inputField { - width: 240px; - margin-bottom: 0; - margin-right: 12px; -} diff --git a/ui/src/pages/PeopleImportPage/stages/__snapshots__/ConfigureUpload.spec.js.snap b/ui/src/pages/PeopleImportPage/stages/__snapshots__/ConfigureUpload.spec.js.snap index d7bf182aaa..fbca72b83f 100644 --- a/ui/src/pages/PeopleImportPage/stages/__snapshots__/ConfigureUpload.spec.js.snap +++ b/ui/src/pages/PeopleImportPage/stages/__snapshots__/ConfigureUpload.spec.js.snap @@ -5,7 +5,7 @@ exports[`ConfigureUpload should render 1`] = `
- - - - + { keyRef = input; }} /> - - + + - - + + - + ); }; diff --git a/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowEditor.js b/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowEditor.js index d606e3249a..2072d1fb62 100644 --- a/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowEditor.js +++ b/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowEditor.js @@ -1,19 +1,16 @@ import React from 'react'; -import classNames from 'classnames'; import { Map } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withState, withProps } from 'recompose'; import { withModel } from 'ui/utils/hocs'; import SaveIconButton from 'ui/components/IconButton/SaveIconButton'; import CancelIconButton from 'ui/components/IconButton/CancelIconButton'; import TypedInput from 'ui/components/Input/TypedInput'; -import styles from './styles.css'; +import { TableActionsData, TableData } from './tableComponents'; const enhance = compose( withProps({ schema: 'personaAttribute' }), withModel, - withState('attributeValue', 'setAttributeValue', ({ model }) => model.get('value', '')), - withStyles(styles) + withState('attributeValue', 'setAttributeValue', ({ model }) => model.get('value', '')) ); const render = ({ @@ -33,18 +30,18 @@ const render = ({ }; return ( - {key} - + {key} + - - + + - + ); }; diff --git a/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowViewer.js b/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowViewer.js index 093cae2677..23c4f16c93 100644 --- a/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowViewer.js +++ b/ui/src/pages/PeopleManagePage/AttributesEditor/SavedRowViewer.js @@ -1,16 +1,13 @@ import React from 'react'; -import classNames from 'classnames'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withProps } from 'recompose'; import { withModel } from 'ui/utils/hocs'; import EditIconButton from 'ui/components/IconButton/EditIconButton'; import DeleteIconButton from 'ui/components/IconButton/DeleteIconButton'; -import styles from './styles.css'; +import { TableActionsData, TableData } from './tableComponents'; const enhance = compose( withProps({ schema: 'personaAttribute' }), - withModel, - withStyles(styles) + withModel ); const render = ({ model, setMetadata, deleteModel }) => { @@ -21,12 +18,12 @@ const render = ({ model, setMetadata, deleteModel }) => { }; return ( - {key} - {value} - + {key} + {value} + - + ); }; diff --git a/ui/src/pages/PeopleManagePage/AttributesEditor/index.js b/ui/src/pages/PeopleManagePage/AttributesEditor/index.js index 75afca8179..27e720c430 100644 --- a/ui/src/pages/PeopleManagePage/AttributesEditor/index.js +++ b/ui/src/pages/PeopleManagePage/AttributesEditor/index.js @@ -1,14 +1,12 @@ import React from 'react'; import PropTypes from 'prop-types'; -import classNames from 'classnames'; import { Map } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withProps, setPropTypes, withState } from 'recompose'; import { withModels } from 'ui/utils/hocs'; import AddTextIconButton from 'ui/components/TextIconButton/AddTextIconButton'; import NewRow from './NewRow'; import SavedRow from './SavedRow'; -import styles from './styles.css'; +import { TableActionsHeader, TableHeader } from './tableComponents'; const enhance = compose( setPropTypes({ @@ -21,8 +19,7 @@ const enhance = compose( sort: new Map({ _id: -1 }), })), withModels, - withState('isNewAttributeVisible', 'changeNewAttributeVisibility', false), - withStyles(styles) + withState('isNewAttributeVisible', 'changeNewAttributeVisibility', false) ); const render = ({ @@ -44,15 +41,15 @@ const render = ({ }; return (
-
+
- +
- - - + Name + Value + Actions diff --git a/ui/src/pages/PeopleManagePage/AttributesEditor/styles.css b/ui/src/pages/PeopleManagePage/AttributesEditor/styles.css deleted file mode 100644 index a98e7a1f77..0000000000 --- a/ui/src/pages/PeopleManagePage/AttributesEditor/styles.css +++ /dev/null @@ -1,19 +0,0 @@ -.table { - width: 100%; -} - -.buttons { - text-align: right; - margin-bottom: 8px; -} - -.td { - padding: 8px; - border: solid rgb(238, 238, 238) 1px; - width: 43%; -} - -.actions { - text-align: right; - width: 14% -} diff --git a/ui/src/pages/PeopleManagePage/AttributesEditor/tableComponents.js b/ui/src/pages/PeopleManagePage/AttributesEditor/tableComponents.js new file mode 100644 index 0000000000..2854b55487 --- /dev/null +++ b/ui/src/pages/PeopleManagePage/AttributesEditor/tableComponents.js @@ -0,0 +1,18 @@ +import styled, { css } from 'styled-components'; + +export const actionsStyle = css` + text-align: right; + width: 14%; +`; + +export const tableDataStyle = css` + padding: 8px; + border: solid rgb(238, 238, 238) 1px; + width: 43%; +`; + +export const TableHeader = styled.th`${tableDataStyle}`; +export const TableActionsHeader = styled(TableHeader)`${actionsStyle}`; + +export const TableData = styled.td`${tableDataStyle}`; +export const TableActionsData = styled(TableData)`${actionsStyle}`; diff --git a/ui/src/pages/PeopleManagePage/AttributesViewer/SavedRow.js b/ui/src/pages/PeopleManagePage/AttributesViewer/SavedRow.js deleted file mode 100644 index fa3a1830ca..0000000000 --- a/ui/src/pages/PeopleManagePage/AttributesViewer/SavedRow.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import { compose, withProps } from 'recompose'; -import { withModel } from 'ui/utils/hocs'; -import styles from './styles.css'; - -const enhance = compose( - withProps({ schema: 'personaAttribute' }), - withModel, - withStyles(styles) -); - -const render = ({ model }) => { - const key = model.get('key', ''); - const value = model.get('value', ''); - return ( - - - - - ); -}; - -export default enhance(render); diff --git a/ui/src/pages/PeopleManagePage/AttributesViewer/index.js b/ui/src/pages/PeopleManagePage/AttributesViewer/index.js index 062ef945ae..2854f9a094 100644 --- a/ui/src/pages/PeopleManagePage/AttributesViewer/index.js +++ b/ui/src/pages/PeopleManagePage/AttributesViewer/index.js @@ -1,11 +1,18 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Map } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; +import styled, { css } from 'styled-components'; import { compose, withProps, setPropTypes } from 'recompose'; import { withModels } from 'ui/utils/hocs'; -import SavedRow from './SavedRow'; -import styles from './styles.css'; + +const tableDataStyles = css` + padding: 8px; + border: solid rgb(238, 238, 238) 1px; + width: 50%; +`; + +const TableData = styled.td`${tableDataStyles}`; +const TableHeader = styled.th`${tableDataStyles}`; const enhance = compose( setPropTypes({ @@ -17,8 +24,7 @@ const enhance = compose( first: 100, sort: new Map({ _id: -1 }), })), - withModels, - withStyles(styles) + withModels ); const render = ({ models }) => { @@ -31,15 +37,24 @@ const render = ({ models }) => { } return (
-
NameValueActions
{key}{value}
+
- - + Name + Value - {models.map(model => ).valueSeq()} + {models.map((model) => { + const key = model.get('key', ''); + const value = model.get('value', ''); + return ( + + {key} + {value} + + ); + }).valueSeq()}
NameValue
diff --git a/ui/src/pages/PeopleManagePage/AttributesViewer/styles.css b/ui/src/pages/PeopleManagePage/AttributesViewer/styles.css deleted file mode 100644 index 4980b9ed57..0000000000 --- a/ui/src/pages/PeopleManagePage/AttributesViewer/styles.css +++ /dev/null @@ -1,9 +0,0 @@ -.table { - width: 100%; -} - -.td { - padding: 8px; - border: solid rgb(238, 238, 238) 1px; - width: 50%; -} diff --git a/ui/src/pages/PeopleManagePage/IdentifiersEditor/NewRow.js b/ui/src/pages/PeopleManagePage/IdentifiersEditor/NewRow.js index 7c73122b5f..2b3d63ab6d 100644 --- a/ui/src/pages/PeopleManagePage/IdentifiersEditor/NewRow.js +++ b/ui/src/pages/PeopleManagePage/IdentifiersEditor/NewRow.js @@ -1,15 +1,13 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Map } from 'immutable'; -import classNames from 'classnames'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, setPropTypes, withState } from 'recompose'; import AddIconButton from 'ui/components/IconButton/AddIconButton'; import CancelIconButton from 'ui/components/IconButton/CancelIconButton'; -import TypeEditor from './TypeEditor'; import IfiEditor from '../IfiEditor'; +import TypeEditor from './TypeEditor'; import hasIdentifierValueErrors from './hasIdentifierValueErrors'; -import styles from './styles.css'; +import { TableData, ActionsTableData } from './TableData'; const enhance = compose( setPropTypes({ @@ -17,8 +15,7 @@ const enhance = compose( onCancel: PropTypes.func.isRequired, }), withState('identifierType', 'setIdentifierType', 'mbox'), - withState('identifierValue', 'setIdentifierValue', ''), - withStyles(styles), + withState('identifierValue', 'setIdentifierValue', '') ); const render = ({ @@ -61,10 +58,10 @@ const render = ({ }; return ( - + - - + + { firstInputRef = input; }} /> - - + + - + ); }; diff --git a/ui/src/pages/PeopleManagePage/IdentifiersEditor/SavedRow.js b/ui/src/pages/PeopleManagePage/IdentifiersEditor/SavedRow.js index ed57fad878..80ef43140c 100644 --- a/ui/src/pages/PeopleManagePage/IdentifiersEditor/SavedRow.js +++ b/ui/src/pages/PeopleManagePage/IdentifiersEditor/SavedRow.js @@ -1,6 +1,4 @@ import React from 'react'; -import classNames from 'classnames'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withProps } from 'recompose'; import { withModel } from 'ui/utils/hocs'; import IconButton from 'ui/components/IconButton/IconButton'; @@ -8,12 +6,11 @@ import DeleteIconButton from 'ui/components/IconButton/DeleteIconButton'; import IfiViewer from '../IfiViewer'; import { identifierTypeDisplays } from '../constants'; import ReassignmentForm from './ReassignmentForm'; -import styles from './styles.css'; +import { TableData, ActionsTableData } from './TableData'; const enhance = compose( withProps({ schema: 'personaIdentifier' }), - withModel, - withStyles(styles) + withModel ); const render = ({ model, deleteModel, getMetadata, setMetadata }) => { @@ -26,13 +23,13 @@ const render = ({ model, deleteModel, getMetadata, setMetadata }) => { }; return ( - + {identifierTypeDisplays[identifierType]} - - + + - - + + {isReassignmentVisible ? : ( @@ -47,7 +44,7 @@ const render = ({ model, deleteModel, getMetadata, setMetadata }) => {
) } - + ); }; diff --git a/ui/src/pages/PeopleManagePage/IdentifiersEditor/TableData.js b/ui/src/pages/PeopleManagePage/IdentifiersEditor/TableData.js new file mode 100644 index 0000000000..f731e2e155 --- /dev/null +++ b/ui/src/pages/PeopleManagePage/IdentifiersEditor/TableData.js @@ -0,0 +1,6 @@ +import styled from 'styled-components'; +import { tableDataStyle } from './tableDataStyle'; +import { actionsStyle } from './actionsStyle'; + +export const TableData = styled.td`${tableDataStyle}`; +export const ActionsTableData = styled(TableData)`${actionsStyle}`; diff --git a/ui/src/pages/PeopleManagePage/IdentifiersEditor/actionsStyle.js b/ui/src/pages/PeopleManagePage/IdentifiersEditor/actionsStyle.js new file mode 100644 index 0000000000..2b6f5d87ae --- /dev/null +++ b/ui/src/pages/PeopleManagePage/IdentifiersEditor/actionsStyle.js @@ -0,0 +1,6 @@ +import { css } from 'styled-components'; + +export const actionsStyle = css` + text-align: right; + width: 30%; +`; diff --git a/ui/src/pages/PeopleManagePage/IdentifiersEditor/index.js b/ui/src/pages/PeopleManagePage/IdentifiersEditor/index.js index 75dd0e2632..034d16eca8 100644 --- a/ui/src/pages/PeopleManagePage/IdentifiersEditor/index.js +++ b/ui/src/pages/PeopleManagePage/IdentifiersEditor/index.js @@ -1,15 +1,18 @@ import React from 'react'; import PropTypes from 'prop-types'; -import classNames from 'classnames'; import { Map } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withProps, setPropTypes, withState } from 'recompose'; +import styled from 'styled-components'; import { withModels } from 'ui/utils/hocs'; import AddTextIconButton from 'ui/components/TextIconButton/AddTextIconButton'; import createPersonaIdentFilter from '../createPersonaIdentFilter'; import NewRow from './NewRow'; import SavedRow from './SavedRow'; -import styles from './styles.css'; +import { actionsStyle } from './actionsStyle'; +import { tableDataStyle } from './tableDataStyle'; + +const TableHeader = styled.th`${tableDataStyle}`; +const TableActionsHeader = styled(TableHeader)`${actionsStyle}`; const enhance = compose( setPropTypes({ @@ -22,8 +25,7 @@ const enhance = compose( sort: new Map({ _id: -1 }), })), withModels, - withState('isNewIdentifierVisible', 'changeNewIdentifierVisibility', false), - withStyles(styles) + withState('isNewIdentifierVisible', 'changeNewIdentifierVisibility', false) ); const render = ({ @@ -45,17 +47,17 @@ const render = ({ }; return (
-
+
changeNewIdentifierVisibility(true)} />
- +
- - - + Type + Value + Actions diff --git a/ui/src/pages/PeopleManagePage/IdentifiersEditor/styles.css b/ui/src/pages/PeopleManagePage/IdentifiersEditor/styles.css deleted file mode 100644 index e6a0f61255..0000000000 --- a/ui/src/pages/PeopleManagePage/IdentifiersEditor/styles.css +++ /dev/null @@ -1,19 +0,0 @@ -.table { - width: 100%; -} - -.buttons { - text-align: right; - margin-bottom: 8px; -} - -.td { - padding: 8px; - border: solid rgb(238, 238, 238) 1px; - width: 35%; -} - -.actions { - text-align: right; - width: 30% -} diff --git a/ui/src/pages/PeopleManagePage/IdentifiersEditor/tableDataStyle.js b/ui/src/pages/PeopleManagePage/IdentifiersEditor/tableDataStyle.js new file mode 100644 index 0000000000..76627d7b1f --- /dev/null +++ b/ui/src/pages/PeopleManagePage/IdentifiersEditor/tableDataStyle.js @@ -0,0 +1,7 @@ +import { css } from 'styled-components'; + +export const tableDataStyle = css` + padding: 8px; + border: solid rgb(238, 238, 238) 1px; + width: 35%; +`; diff --git a/ui/src/pages/PeopleManagePage/IdentifiersViewer/SavedRow.js b/ui/src/pages/PeopleManagePage/IdentifiersViewer/SavedRow.js index 03bdcd7b48..9511c1c0f9 100644 --- a/ui/src/pages/PeopleManagePage/IdentifiersViewer/SavedRow.js +++ b/ui/src/pages/PeopleManagePage/IdentifiersViewer/SavedRow.js @@ -1,15 +1,16 @@ import React from 'react'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withProps } from 'recompose'; +import styled from 'styled-components'; import { withModel } from 'ui/utils/hocs'; import { identifierTypeDisplays } from '../constants'; import IfiViewer from '../IfiViewer'; -import styles from './styles.css'; +import { tableDataStyle } from './tableDataStyle'; + +const TableData = styled.td`${tableDataStyle}`; const enhance = compose( withProps({ schema: 'personaIdentifier' }), - withModel, - withStyles(styles) + withModel ); const render = ({ model }) => { @@ -17,12 +18,12 @@ const render = ({ model }) => { const identifierValue = model.getIn(['ifi', 'value']); return ( - - + ); }; diff --git a/ui/src/pages/PeopleManagePage/IdentifiersViewer/index.js b/ui/src/pages/PeopleManagePage/IdentifiersViewer/index.js index ff27f12990..651752ed99 100644 --- a/ui/src/pages/PeopleManagePage/IdentifiersViewer/index.js +++ b/ui/src/pages/PeopleManagePage/IdentifiersViewer/index.js @@ -1,12 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Map } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withProps, setPropTypes } from 'recompose'; +import styled from 'styled-components'; import { withModels } from 'ui/utils/hocs'; import createPersonaIdentFilter from '../createPersonaIdentFilter'; import SavedRow from './SavedRow'; -import styles from './styles.css'; +import { tableDataStyle } from './tableDataStyle'; + +const TableHeader = styled.th`${tableDataStyle}`; const enhance = compose( setPropTypes({ @@ -18,8 +20,7 @@ const enhance = compose( first: 100, sort: new Map({ _id: -1 }), })), - withModels, - withStyles(styles) + withModels ); const IdentifiersViewer = ({ models }) => { @@ -32,11 +33,11 @@ const IdentifiersViewer = ({ models }) => { } return (
-
TypeValueActions
+ {identifierTypeDisplays[identifierType]} - + + -
+
- - + Type + Value diff --git a/ui/src/pages/PeopleManagePage/IdentifiersViewer/styles.css b/ui/src/pages/PeopleManagePage/IdentifiersViewer/styles.css deleted file mode 100644 index 4980b9ed57..0000000000 --- a/ui/src/pages/PeopleManagePage/IdentifiersViewer/styles.css +++ /dev/null @@ -1,9 +0,0 @@ -.table { - width: 100%; -} - -.td { - padding: 8px; - border: solid rgb(238, 238, 238) 1px; - width: 50%; -} diff --git a/ui/src/pages/PeopleManagePage/IdentifiersViewer/tableDataStyle.js b/ui/src/pages/PeopleManagePage/IdentifiersViewer/tableDataStyle.js new file mode 100644 index 0000000000..4f6f2698bf --- /dev/null +++ b/ui/src/pages/PeopleManagePage/IdentifiersViewer/tableDataStyle.js @@ -0,0 +1,7 @@ +import { css } from 'styled-components'; + +export const tableDataStyle = css` + padding: 8px; + border: solid rgb(238, 238, 238) 1px; + width: 50%; +`; diff --git a/ui/src/pages/PeopleManagePage/IfiViewer/IfiAccountViewer.js b/ui/src/pages/PeopleManagePage/IfiViewer/IfiAccountViewer.js index bf92bb289e..8bc1dfdcac 100644 --- a/ui/src/pages/PeopleManagePage/IfiViewer/IfiAccountViewer.js +++ b/ui/src/pages/PeopleManagePage/IfiViewer/IfiAccountViewer.js @@ -2,14 +2,16 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Map } from 'immutable'; import { compose, setPropTypes } from 'recompose'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './styles.css'; +import styled from 'styled-components'; + +const Key = styled.span` + font-weight: bold; +`; const enhance = compose( setPropTypes({ identifierValue: PropTypes.instanceOf(Map).isRequired, - }), - withStyles(styles) + }) ); const render = ({ identifierValue }) => { @@ -18,12 +20,12 @@ const render = ({ identifierValue }) => { return (
- Website: - {homePage} + Website: + {homePage}
- User ID: - {name} + User ID: + {name}
); diff --git a/ui/src/pages/PeopleManagePage/IfiViewer/styles.css b/ui/src/pages/PeopleManagePage/IfiViewer/styles.css deleted file mode 100644 index 0182ef9715..0000000000 --- a/ui/src/pages/PeopleManagePage/IfiViewer/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -.key { - font-weight: bold; -} diff --git a/ui/src/pages/PeopleManagePage/MergeForm/index.js b/ui/src/pages/PeopleManagePage/MergeForm/index.js index c7076d9401..8af8c1c7d8 100644 --- a/ui/src/pages/PeopleManagePage/MergeForm/index.js +++ b/ui/src/pages/PeopleManagePage/MergeForm/index.js @@ -1,18 +1,19 @@ import React from 'react'; import { compose, withProps } from 'recompose'; -import classNames from 'classnames'; import { withModel } from 'ui/utils/hocs'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; +import styled from 'styled-components'; import IdentifiersViewer from '../IdentifiersViewer'; import AttributesViewer from '../AttributesViewer'; import PersonaAutoComplete from '../PersonaAutoComplete'; import MergeButton from './MergeButton'; -import styles from './styles.css'; + +const Section = styled.div` + margin-top: 15px; +`; const enhance = compose( withProps({ schema: 'persona' }), - withModel, - withStyles(styles) + withModel ); const renderTarget = ({ hasTarget, mergeTargetId }) => { @@ -22,14 +23,14 @@ const renderTarget = ({ hasTarget, mergeTargetId }) => { return (
-
+

Identifiers

-
-
+ +

Attributes

-
+
); }; @@ -43,18 +44,18 @@ const MergeForm = ({ id, hasMetadata, getMetadata, setMetadata }) => { return (
-
-
+
+
Merge identifiers and attributes from
-
+
-
-
+ + {renderTarget({ hasTarget, mergeTargetId })}
); diff --git a/ui/src/pages/PeopleManagePage/MergeForm/styles.css b/ui/src/pages/PeopleManagePage/MergeForm/styles.css deleted file mode 100644 index f0f3485602..0000000000 --- a/ui/src/pages/PeopleManagePage/MergeForm/styles.css +++ /dev/null @@ -1,8 +0,0 @@ -.section { - margin-top: 15px; -} - -.label { - font-weight: bold; - margin-bottom: 5px; -} diff --git a/ui/src/pages/PeopleManagePage/PersonaAutoComplete/index.js b/ui/src/pages/PeopleManagePage/PersonaAutoComplete.js similarity index 100% rename from ui/src/pages/PeopleManagePage/PersonaAutoComplete/index.js rename to ui/src/pages/PeopleManagePage/PersonaAutoComplete.js diff --git a/ui/src/pages/PeopleManagePage/PersonaView/index.js b/ui/src/pages/PeopleManagePage/PersonaView.js similarity index 92% rename from ui/src/pages/PeopleManagePage/PersonaView/index.js rename to ui/src/pages/PeopleManagePage/PersonaView.js index 80fce04514..87d168dd66 100644 --- a/ui/src/pages/PeopleManagePage/PersonaView/index.js +++ b/ui/src/pages/PeopleManagePage/PersonaView.js @@ -7,9 +7,9 @@ import Tabs from 'ui/components/Material/Tabs'; import { Tab } from 'react-toolbox/lib/tabs'; import { withModel } from 'ui/utils/hocs'; import LabelledInput from 'ui/components/Input/LabelledInput'; -import MergeForm from '../MergeForm'; -import IdentifiersEditor from '../IdentifiersEditor'; -import AttributesEditor from '../AttributesEditor'; +import MergeForm from './MergeForm'; +import IdentifiersEditor from './IdentifiersEditor'; +import AttributesEditor from './AttributesEditor'; const enhance = compose( setPropTypes({ diff --git a/ui/src/pages/ResetPasswordPage/index.js b/ui/src/pages/ResetPasswordPage/index.js index be795826a3..736038ccd5 100644 --- a/ui/src/pages/ResetPasswordPage/index.js +++ b/ui/src/pages/ResetPasswordPage/index.js @@ -2,8 +2,6 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { resetPasswordStart, resetRequestStateSelector, resetErrorSelector } from 'ui/redux/modules/auth'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import { compose } from 'recompose'; import { IN_PROGRESS, COMPLETED, FAILED } from 'ui/utils/constants'; import { Card } from 'react-toolbox/lib/card'; import Helmet from 'react-helmet'; @@ -13,7 +11,6 @@ import classNames from 'classnames'; import FullPageBackground from 'ui/components/FullPageBackground'; import Link from 'ui/containers/Link'; import uuid from 'uuid'; -import styles from './styles.css'; class ResetPassword extends Component { static propTypes = { @@ -30,7 +27,7 @@ class ResetPassword extends Component { email: this.props.email, token: this.props.token, password: this.password.value - }).catch(() => {}); + }).catch(() => { }); } renderForm() { @@ -59,7 +56,7 @@ class ResetPassword extends Component { )}
-
+
@@ -102,21 +99,18 @@ class ResetPassword extends Component {

Reset your password

- { stateView } + {stateView}
); } } -export default compose( - withStyles(styles), - connect( - state => ({ - email: get(routeNodeSelector('reset')(state), ['route', 'params', 'email']), - token: get(routeNodeSelector('reset')(state), ['route', 'params', 'token']), - resetRequestState: resetRequestStateSelector(state), - resetError: resetErrorSelector(state) - }), - { resetPasswordStart } - ) +export default connect( + state => ({ + email: get(routeNodeSelector('reset')(state), ['route', 'params', 'email']), + token: get(routeNodeSelector('reset')(state), ['route', 'params', 'token']), + resetRequestState: resetRequestStateSelector(state), + resetError: resetErrorSelector(state) + }), + { resetPasswordStart } )(ResetPassword); diff --git a/ui/src/pages/ResetPasswordPage/styles.css b/ui/src/pages/ResetPasswordPage/styles.css deleted file mode 100644 index 798bdc548b..0000000000 --- a/ui/src/pages/ResetPasswordPage/styles.css +++ /dev/null @@ -1,14 +0,0 @@ -.card { - padding: 10px 20px; -} - -.buttonGroup { - text-align: center; - margin-top: 10px; - button { - margin-right: 10px; - } - button.last { - margin-right: 0px; - } -} diff --git a/ui/src/pages/SettingsClientsPage/ClientForm/AuthorityEditor.js b/ui/src/pages/SettingsClientsPage/AuthorityEditor.js similarity index 100% rename from ui/src/pages/SettingsClientsPage/ClientForm/AuthorityEditor.js rename to ui/src/pages/SettingsClientsPage/AuthorityEditor.js diff --git a/ui/src/pages/SettingsClientsPage/ClientForm/index.js b/ui/src/pages/SettingsClientsPage/ClientForm.js similarity index 97% rename from ui/src/pages/SettingsClientsPage/ClientForm/index.js rename to ui/src/pages/SettingsClientsPage/ClientForm.js index ac1887f33c..8d81801dbf 100644 --- a/ui/src/pages/SettingsClientsPage/ClientForm/index.js +++ b/ui/src/pages/SettingsClientsPage/ClientForm.js @@ -2,7 +2,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Map, List } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { compose, withProps, withHandlers, setPropTypes } from 'recompose'; import { map } from 'lodash'; import btoa from 'btoa'; @@ -13,7 +12,6 @@ import { API_SCOPES, getXapiScopes } from 'lib/constants/scopes'; import ValidationList from 'ui/components/ValidationList'; import { getAppDataSelector } from 'ui/redux/modules/app'; import AuthorityEditor from './AuthorityEditor'; -import styles from './styles.css'; const renderNoStore = () => [{ value: 'No LRSs available', label: 'No LRSs available', disabled: true }]; @@ -69,7 +67,6 @@ const renderScopes = (setScopes, onChangeScopes, selectedScopes) => )); const enhance = compose( - withStyles(styles), connect(state => ({ enableSingleStatementDeletion: getAppDataSelector('ENABLE_SINGLE_STATEMENT_DELETION')(state) }), {}), @@ -150,7 +147,7 @@ export const render = ({ -

+

Basic {btoa(`${basicKey}:${basicSecret}`)}

diff --git a/ui/src/pages/SettingsClientsPage/ClientForm/styles.css b/ui/src/pages/SettingsClientsPage/ClientForm/styles.css deleted file mode 100644 index c3095626f5..0000000000 --- a/ui/src/pages/SettingsClientsPage/ClientForm/styles.css +++ /dev/null @@ -1,2 +0,0 @@ -.strongwrap { - word-wrap: break-word; } diff --git a/ui/src/pages/SettingsClientsPage/Clients.css b/ui/src/pages/SettingsClientsPage/Clients.css deleted file mode 100644 index ab504c781f..0000000000 --- a/ui/src/pages/SettingsClientsPage/Clients.css +++ /dev/null @@ -1,16 +0,0 @@ -.queryForm > span > .childContainer { - margin-left: 0px; } - .queryForm > span > .childContainer > .expandedChildren > span > .formGroup > label { - font-size: 1.2em; } - -.queryForm { - border: 1px solid #f1f1f1; - padding: 10px; } - .queryForm label { - font-weight: normal; } - .queryForm textarea { - margin-top: 8px; - width: 100%; } - -.search { - margin-top: 10px; } diff --git a/ui/src/pages/SettingsClientsPage/ClientForm/__tests__/ClientForm.spec.js b/ui/src/pages/SettingsClientsPage/__tests__/ClientForm.spec.js similarity index 95% rename from ui/src/pages/SettingsClientsPage/ClientForm/__tests__/ClientForm.spec.js rename to ui/src/pages/SettingsClientsPage/__tests__/ClientForm.spec.js index c52d2baa20..5e4dbab244 100644 --- a/ui/src/pages/SettingsClientsPage/ClientForm/__tests__/ClientForm.spec.js +++ b/ui/src/pages/SettingsClientsPage/__tests__/ClientForm.spec.js @@ -5,7 +5,7 @@ import { Provider } from 'react-redux'; import configureMockStore from 'redux-mock-store'; import thunkMiddleware from 'redux-thunk'; import { withInsertCSS } from 'ui/utils/hocs'; -import ClientForm from '../index'; +import ClientForm from '../ClientForm'; import AuthorityEditor from '../AuthorityEditor'; global.__DEVELOPMENT__ = true; @@ -37,7 +37,7 @@ test('AuthorityEditor renders correctly with mbox', () => { }); const tree = ReactTestRenderer.create( - {}} /> + { }} /> ).toJSON(); expect(tree).toMatchSnapshot(); @@ -53,7 +53,7 @@ test('AuthorityEditor renders correctly with account', () => { }); const tree = ReactTestRenderer.create( - {}} /> + { }} /> ).toJSON(); expect(tree).toMatchSnapshot(); @@ -66,7 +66,7 @@ test('AuthorityEditor renders correctly with openid', () => { }); const tree = ReactTestRenderer.create( - {}} /> + { }} /> ).toJSON(); expect(tree).toMatchSnapshot(); @@ -79,7 +79,7 @@ test('AuthorityEditor renders correctly with mboxsha1sum', () => { }); const mboxSha1SumTree = ReactTestRenderer.create( - {}} /> + { }} /> ).toJSON(); expect(mboxSha1SumTree).toMatchSnapshot(); diff --git a/ui/src/pages/SettingsClientsPage/ClientForm/__tests__/__snapshots__/ClientForm.spec.js.snap b/ui/src/pages/SettingsClientsPage/__tests__/__snapshots__/ClientForm.spec.js.snap similarity index 98% rename from ui/src/pages/SettingsClientsPage/ClientForm/__tests__/__snapshots__/ClientForm.spec.js.snap rename to ui/src/pages/SettingsClientsPage/__tests__/__snapshots__/ClientForm.spec.js.snap index ef79b19537..52cb75a564 100644 --- a/ui/src/pages/SettingsClientsPage/ClientForm/__tests__/__snapshots__/ClientForm.spec.js.snap +++ b/ui/src/pages/SettingsClientsPage/__tests__/__snapshots__/ClientForm.spec.js.snap @@ -419,7 +419,12 @@ exports[`ClientForm renders correctly 1`] = ` header for requests

Basic Og== diff --git a/ui/src/pages/SettingsRolesPage/RoleForm/index.js b/ui/src/pages/SettingsRolesPage/RoleForm.js similarity index 85% rename from ui/src/pages/SettingsRolesPage/RoleForm/index.js rename to ui/src/pages/SettingsRolesPage/RoleForm.js index f0c243787a..70cd9adf9f 100644 --- a/ui/src/pages/SettingsRolesPage/RoleForm/index.js +++ b/ui/src/pages/SettingsRolesPage/RoleForm.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { compose, setPropTypes, withProps, withHandlers } from 'recompose'; +import styled from 'styled-components'; import { List, Set } from 'immutable'; import { chain, @@ -19,9 +20,6 @@ import { getScopeDependencies, getScopeDependents, } from 'lib/helpers/scopes'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from './styles.css'; - export const generateNewScopes = (oldScopes, scope, checked) => { let newScopes; @@ -67,7 +65,6 @@ const enhance = compose( schema: 'role', }), withModel, - withStyles(styles), withHandlers({ handleAttrChange: ({ updateModel }) => (attr, { target: { value } }) => { @@ -103,13 +100,18 @@ export const getLabel = (key) => { switch (key2) { case 'view': return 'View'; - case 'edit' : + case 'edit': return 'Edit'; default: return startCase(lowerCase(key2)); } }; +const StyledCheckbox = styled(Checkbox)` + margin-bottom: 0px; + margin-top: 0px; +`; + const renderScopeTableRow = ({ key, scopes, @@ -120,8 +122,7 @@ const renderScopeTableRow = ({

{map(scopes, scope => (
TypeValue
{getRowLabel(key)} - ); +const Table = styled.table` + width: 100%; + color: black; + font-weight: bold; + + tbody tr:nth-child(even) { + background-color: #FAFAFA; + } + + td { + padding-bottom: 8px; + padding-top: 8px; + } +`; + const RoleForm = ({ model, handleAttrChange, handleScopeChange }) => { const groupedOrgScopes = groupScopes(orgScopes); @@ -156,17 +172,18 @@ const RoleForm = ({ model, handleAttrChange, handleScopeChange }) => {
- { - map(groupedOrgScopes, (scopes, key) => - (renderScopeTableRow({ - scopes, - key, - handleScopeChange, - model - })) - ) - }
+ + + {map(groupedOrgScopes, (scopes, key) => + (renderScopeTableRow({ + scopes, + key, + handleScopeChange, + model + })) + )} + +
diff --git a/ui/src/pages/SettingsRolesPage/RoleForm/RoleForm.spec.js b/ui/src/pages/SettingsRolesPage/RoleForm.spec.js similarity index 97% rename from ui/src/pages/SettingsRolesPage/RoleForm/RoleForm.spec.js rename to ui/src/pages/SettingsRolesPage/RoleForm.spec.js index af390912bc..374fbe6ced 100644 --- a/ui/src/pages/SettingsRolesPage/RoleForm/RoleForm.spec.js +++ b/ui/src/pages/SettingsRolesPage/RoleForm.spec.js @@ -6,7 +6,7 @@ import scopes, { EDIT_PUBLIC_VISUALISATIONS, VIEW_PUBLIC_VISUALISATIONS, } from 'lib/constants/orgScopes'; -import { groupScopes, generateNewScopes } from './index'; +import { groupScopes, generateNewScopes } from './RoleForm'; describe('RoleForm', () => { it('Should group roles', () => { diff --git a/ui/src/pages/SettingsRolesPage/RoleForm/styles.css b/ui/src/pages/SettingsRolesPage/RoleForm/styles.css deleted file mode 100644 index 1454b9c029..0000000000 --- a/ui/src/pages/SettingsRolesPage/RoleForm/styles.css +++ /dev/null @@ -1,10 +0,0 @@ -.table { - width: 100%; - color: black; - font-weight: bold; -} - -.checkbox { - margin-top: 0.8rem; - margin-bottom: 0.8rem; -} diff --git a/ui/src/pages/SettingsUsersPage/index.js b/ui/src/pages/SettingsUsersPage/index.js index bef8b9f699..0bcf336cec 100644 --- a/ui/src/pages/SettingsUsersPage/index.js +++ b/ui/src/pages/SettingsUsersPage/index.js @@ -4,7 +4,6 @@ import { connect } from 'react-redux'; import Portal from 'react-portal'; import uuid from 'uuid'; import { fromJS } from 'immutable'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; import { withProps, compose } from 'recompose'; import { queryStringToQuery, modelQueryStringSelector } from 'ui/redux/modules/search'; import { clearModelsCache as clearModelsCacheAction } from 'ui/redux/modules/pagination'; @@ -19,7 +18,6 @@ import { activeOrgIdSelector } from 'ui/redux/modules/router'; import classNames from 'classnames'; import ValidationList from 'ui/components/ValidationList'; import UserOrgForm from './UserOrgForm'; -import styles from './users.css'; const UserDeleteButton = compose( connect( @@ -100,7 +98,9 @@ class Users extends Component { {name} {model.has('googleId') && - + } ); @@ -188,10 +188,7 @@ class Users extends Component { ); } -export default compose( - withStyles(styles), - connect( - state => ({ searchString: modelQueryStringSelector(schema)(state) }), - { addModel } - ) +export default connect( + state => ({ searchString: modelQueryStringSelector(schema)(state) }), + { addModel } )(Users); diff --git a/ui/src/pages/SettingsUsersPage/users.css b/ui/src/pages/SettingsUsersPage/users.css deleted file mode 100644 index c958936820..0000000000 --- a/ui/src/pages/SettingsUsersPage/users.css +++ /dev/null @@ -1,20 +0,0 @@ -.marginLeft { - margin-left: 1em; - font-weight: bold; } - -.queryForm > span > .childContainer { - margin-left: 0px; } - .queryForm > span > .childContainer > .expandedChildren > span > .formGroup > label { - font-size: 1.2em; } - -.queryForm { - border: 1px solid #f1f1f1; - padding: 10px; } - .queryForm label { - font-weight: normal; } - .queryForm textarea { - margin-top: 8px; - width: 100%; } - -.search { - margin-top: 10px; } diff --git a/ui/src/pages/SiteUsersPage/SiteUserOrgItem.js b/ui/src/pages/SiteUsersPage/SiteUserOrgItem.js index f87b6d2547..4419d2702e 100644 --- a/ui/src/pages/SiteUsersPage/SiteUserOrgItem.js +++ b/ui/src/pages/SiteUsersPage/SiteUserOrgItem.js @@ -19,7 +19,7 @@ function SiteUserOrgItem(props) { ); -}; +} SiteUserOrgItem.propTypes = { org: PropTypes.instanceOf(Map).isRequired, diff --git a/ui/src/pages/SiteUsersPage/index.js b/ui/src/pages/SiteUsersPage/index.js index 4096031d4b..aa4fe63a7e 100644 --- a/ui/src/pages/SiteUsersPage/index.js +++ b/ui/src/pages/SiteUsersPage/index.js @@ -8,8 +8,6 @@ import { queryStringToQuery, modelQueryStringSelector } from 'ui/redux/modules/s import SearchBox from 'ui/containers/SearchBox'; import { expandModel } from 'ui/redux/modules/models'; import ModelList from 'ui/containers/ModelList'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import styles from 'ui/pages/SettingsUsersPage/users.css'; // @TODO: Don't import this from another page. import { routeNodeSelector } from 'redux-router5'; import SiteUserItem from './SiteUserItem'; @@ -31,7 +29,11 @@ class SiteUsers extends Component { {name} - {model.has('googleId') && } + {model.has('googleId') && ( + + )} ); } @@ -60,13 +62,10 @@ class SiteUsers extends Component { ); } -export default compose( - withStyles(styles), - connect( - state => ({ - searchString: modelQueryStringSelector(schema)(state), - userId: routeNodeSelector('admin.users.id')(state).route.params.userId - }), - { expandModel } - ) +export default connect( + state => ({ + searchString: modelQueryStringSelector(schema)(state), + userId: routeNodeSelector('admin.users.id')(state).route.params.userId + }), + { expandModel } )(SiteUsers); diff --git a/yarn.lock b/yarn.lock index 2c74a4795a..d0f2756a00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -79,12 +79,115 @@ events "3.0.0" tslib "^1.9.3" +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + dependencies: + "@babel/highlight" "^7.0.0" + +"@babel/generator@^7.6.3": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.6.4.tgz#a4f8437287bf9671b07f483b76e3bb731bc97671" + dependencies: + "@babel/types" "^7.6.3" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-function-name@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + dependencies: + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-get-function-arity@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-module-imports@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-split-export-declaration@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" + dependencies: + "@babel/types" "^7.4.4" + +"@babel/highlight@^7.0.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^4.0.0" + +"@babel/parser@^7.6.0", "@babel/parser@^7.6.3": + version "7.6.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" + "@babel/runtime@^7.1.2": version "7.5.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.5.2.tgz#98f584f4d03be5d8142c77107ffaedee4d5956f1" dependencies: regenerator-runtime "^0.13.2" +"@babel/template@^7.1.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.6.0" + "@babel/types" "^7.6.0" + +"@babel/traverse@^7.0.0": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.6.3" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.6.3" + "@babel/types" "^7.6.3" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + +"@babel/types@^7.0.0", "@babel/types@^7.4.4", "@babel/types@^7.6.0", "@babel/types@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + +"@emotion/is-prop-valid@^0.8.1": + version "0.8.3" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.3.tgz#cbe62ddbea08aa022cdf72da3971570a33190d29" + dependencies: + "@emotion/memoize" "0.7.3" + +"@emotion/memoize@0.7.3": + version "0.7.3" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.3.tgz#5b6b1c11d6a6dddf1f2fc996f74cf3b219644d78" + +"@emotion/unitless@^0.7.0": + version "0.7.4" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.4.tgz#a87b4b04e5ae14a88d48ebef15015f6b7d1f5677" + "@google-cloud/common@^0.16.1": version "0.16.2" resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.16.2.tgz#029b3c7c4a425f1374045ba8f6a878bd50e4761c" @@ -1403,6 +1506,15 @@ babel-plugin-jest-hoist@^19.0.0: version "19.0.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-19.0.0.tgz#4ae2a04ea612a6e73651f3fde52c178991304bea" +"babel-plugin-styled-components@>= 1": + version "1.10.6" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.6.tgz#f8782953751115faf09a9f92431436912c34006b" + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-module-imports" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" + lodash "^4.17.11" + babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" @@ -1447,7 +1559,7 @@ babel-plugin-syntax-function-bind@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46" -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: +babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -2540,7 +2652,7 @@ camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" -camelize@1.0.0: +camelize@1.0.0, camelize@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" @@ -2625,7 +2737,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" dependencies: @@ -3336,6 +3448,10 @@ css-color-function@^1.2.0: debug "^3.1.0" rgb "~0.1.0" +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" + css-color-names@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" @@ -3380,6 +3496,14 @@ css-selector-tokenizer@^0.7.0: fastparse "^1.1.1" regexpu-core "^1.0.0" +css-to-react-native@^2.2.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.2.tgz#e75e2f8f7aa385b4c3611c52b074b70a002f2e7d" + dependencies: + camelize "^1.0.0" + css-color-keywords "^1.0.0" + postcss-value-parser "^3.3.0" + css-what@2.1: version "2.1.3" resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" @@ -3611,7 +3735,7 @@ debug@3.1.0, debug@=3.1.0: dependencies: ms "2.0.0" -debug@4.1.1, debug@^4.0.0, debug@^4.0.1, debug@^4.1.1: +debug@4.1.1, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" dependencies: @@ -5529,6 +5653,10 @@ global@^4.3.0: min-document "^2.19.0" process "^0.11.10" +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + globals@^9.14.0, globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -6791,6 +6919,10 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-what@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.3.1.tgz#79502181f40226e2d8c09226999db90ef7c1bcbe" + 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" @@ -7161,7 +7293,7 @@ js-cookie@^2.1.3: version "2.2.0" resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.0.tgz#1b2c279a6eece380a12168b92485265b35b1effb" -"js-tokens@^3.0.0 || ^4.0.0": +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -7239,6 +7371,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -8045,6 +8181,10 @@ lodash@^4.0.0, lodash@^4.0.1, lodash@^4.11.1, lodash@^4.15.0, lodash@^4.17.10, l version "4.17.13" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.13.tgz#0bdc3a6adc873d2f4e0c4bac285df91b64fc7b93" +lodash@^4.17.13: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + lodash@~4.8.0: version "4.8.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.8.2.tgz#478ad7ff648c3c71a2f6108e032c5c0cc40747df" @@ -8251,6 +8391,10 @@ mem@^4.0.0: mimic-fn "^2.0.0" p-is-promise "^2.0.0" +memoize-one@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" + memory-fs@^0.4.0, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -8300,6 +8444,12 @@ meow@~2.0.0: minimist "^1.1.0" object-assign "^1.0.0" +merge-anything@^2.2.4: + version "2.4.1" + resolved "https://registry.yarnpkg.com/merge-anything/-/merge-anything-2.4.1.tgz#e9bccaec1e49ec6cb5f77ca78c5770d1a35315e6" + dependencies: + is-what "^3.3.1" + merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" @@ -12543,7 +12693,7 @@ source-map@^0.4.2, source-map@~0.4.1: dependencies: amdefine ">=0.0.4" -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1, source-map@~0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -12940,6 +13090,32 @@ style-loader@^0.23.1: loader-utils "^1.1.0" schema-utils "^1.0.0" +styled-components@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.4.0.tgz#4e381e2dab831d0e6ea431c2840a96323e84e21b" + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@emotion/is-prop-valid" "^0.8.1" + "@emotion/unitless" "^0.7.0" + babel-plugin-styled-components ">= 1" + css-to-react-native "^2.2.2" + memoize-one "^5.0.0" + merge-anything "^2.2.4" + prop-types "^15.5.4" + react-is "^16.6.0" + stylis "^3.5.0" + stylis-rule-sheet "^0.0.10" + supports-color "^5.5.0" + +stylis-rule-sheet@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" + +stylis@^3.5.0: + version "3.5.4" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" + superagent@^1.7.2: version "1.8.5" resolved "https://registry.yarnpkg.com/superagent/-/superagent-1.8.5.tgz#1c0ddc3af30e80eb84ebc05cb2122da8fe940b55" @@ -12983,7 +13159,7 @@ supports-color@^4.2.1: dependencies: has-flag "^2.0.0" -supports-color@^5.0.0, supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.0.0, supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" dependencies: @@ -13164,6 +13340,10 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + to-iso-string@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1"