refactors all client paths to incorporate new import structure
This commit is contained in:
61
components.js
Normal file
61
components.js
Normal file
@@ -0,0 +1,61 @@
|
||||
import App from './src/client/components/App';
|
||||
import Button from './src/client/components/controls/Button';
|
||||
import Group from './src/client/components/field-types/Group';
|
||||
import Input from './src/client/components/field-types/Input';
|
||||
import Textarea from './src/client/components/field-types/Textarea';
|
||||
import MeasureWindow from './src/client/components/utilities/MeasureWindow';
|
||||
import MeasureScroll from './src/client/components/utilities/MeasureScroll';
|
||||
import LoadContent from './src/client/components/utilities/LoadContent';
|
||||
import Dashboard from './src/client/components/views/Dashboard';
|
||||
import CollectionRoutes from './src/client/components/routes/Collections';
|
||||
import DefaultTemplate from './src/client/components/layout/DefaultTemplate';
|
||||
import Login from './src/client/components/views/Login';
|
||||
import AddView from './src/client/components/views/collections/Add';
|
||||
import ArchiveView from './src/client/components/views/collections/Archive';
|
||||
import HeadingButton from './src/client/components/modules/HeadingButton';
|
||||
import Filter from './src/client/components/modules/Filter';
|
||||
import EditView from './src/client/components/views/collections/Edit';
|
||||
import StickOnScroll from './src/client/components/layout/StickOnScroll';
|
||||
import APIUrl from './src/client/components/modules/APIUrl';
|
||||
import Form from './src/client/components/forms/Form';
|
||||
import PayloadIcon from './src/client/components/graphics/PayloadIcon';
|
||||
import PayloadLogo from './src/client/components/graphics/PayloadLogo';
|
||||
import Tooltip from './src/client/components/modules/Tooltip';
|
||||
import Sidebar from './src/client/components/layout/Sidebar';
|
||||
import StepNav from './src/client/components/modules/StepNav';
|
||||
import Arrow from './src/client/components/graphics/Arrow';
|
||||
import Label from './src/client/components/type/Label';
|
||||
import SetStepNav from './src/client/components/utilities/SetStepNav';
|
||||
import ContentBlock from './src/client/components/layout/ContentBlock';
|
||||
|
||||
export {
|
||||
App,
|
||||
Button,
|
||||
Group,
|
||||
Input,
|
||||
Textarea,
|
||||
MeasureWindow,
|
||||
MeasureScroll,
|
||||
LoadContent,
|
||||
Dashboard,
|
||||
CollectionRoutes,
|
||||
DefaultTemplate,
|
||||
Login,
|
||||
AddView,
|
||||
ArchiveView,
|
||||
HeadingButton,
|
||||
Filter,
|
||||
EditView,
|
||||
StickOnScroll,
|
||||
APIUrl,
|
||||
Form,
|
||||
PayloadIcon,
|
||||
PayloadLogo,
|
||||
Tooltip,
|
||||
Sidebar,
|
||||
StepNav,
|
||||
Arrow,
|
||||
Label,
|
||||
SetStepNav,
|
||||
ContentBlock
|
||||
};
|
||||
@@ -2,10 +2,10 @@ import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Route, Switch, withRouter } from 'react-router-dom';
|
||||
|
||||
import CollectionRoutes from 'payload/client/components/routes/Collections';
|
||||
import DefaultTemplate from 'payload/client/components/layout/DefaultTemplate';
|
||||
import Dashboard from 'payload/client/components/views/Dashboard';
|
||||
import Login from 'payload/client/components/views/Login';
|
||||
import { CollectionRoutes } from 'payload/components';
|
||||
import { DefaultTemplate } from 'payload/components';
|
||||
import { Dashboard } from 'payload/components';
|
||||
import { Login } from 'payload/components';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
collections: state.collections.all
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import AddView from 'payload/client/components/views/collections/Add';
|
||||
import { AddView } from 'payload/components';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
collections: state.collections.all
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import ArchiveView from 'payload/client/components/views/collections/Archive';
|
||||
import HeadingButton from 'payload/client/components/modules/HeadingButton';
|
||||
import Filter from 'payload/client/components/modules/Filter';
|
||||
import { ArchiveView } from 'payload/components';
|
||||
import { HeadingButton } from 'payload/components';
|
||||
import { Filter } from 'payload/components';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
collections: state.collections.all
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import EditView from 'payload/client/components/views/collections/Edit';
|
||||
import { EditView } from 'payload/components';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
collections: state.collections.all
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import AddView from 'payload/client/components/views/collections/Add';
|
||||
import StickOnScroll from 'payload/client/components/layout/StickOnScroll';
|
||||
import APIUrl from 'payload/client/components/modules/APIUrl';
|
||||
import Button from 'payload/client/components/controls/Button';
|
||||
import Form from 'payload/client/components/forms/Form';
|
||||
import Input from 'payload/client/components/field-types/Input';
|
||||
import Textarea from 'payload/client/components/field-types/Textarea';
|
||||
import Group from 'payload/client/components/field-types/Group';
|
||||
import { AddView } from 'payload/components';
|
||||
import { StickOnScroll } from 'payload/components';
|
||||
import { APIUrl } from 'payload/components';
|
||||
import { Button } from 'payload/components';
|
||||
import { Form } from 'payload/components';
|
||||
import { Input } from 'payload/components';
|
||||
import { Textarea } from 'payload/components';
|
||||
import { Group } from 'payload/components';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
collections: state.collections.all
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import ArchiveView from 'payload/client/components/views/collections/Archive';
|
||||
import HeadingButton from 'payload/client/components/modules/HeadingButton';
|
||||
import Filter from 'payload/client/components/modules/Filter';
|
||||
import { ArchiveView } from 'payload/components';
|
||||
import { HeadingButton } from 'payload/components';
|
||||
import { Filter } from 'payload/components';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
collections: state.collections.all
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import EditView from 'payload/client/components/views/collections/Edit';
|
||||
import { EditView } from 'payload/components';
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
collections: state.collections.all
|
||||
|
||||
@@ -18,4 +18,4 @@ export default {
|
||||
Archive: PagesArchive,
|
||||
Edit: PagesEdit
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
|
||||
import PayloadLogo from 'payload/client/components/graphics/PayloadLogo';
|
||||
import { PayloadLogo } from 'payload/components';
|
||||
|
||||
export default props => {
|
||||
export default () => {
|
||||
return (
|
||||
<div className="logo-wrap">
|
||||
<PayloadLogo />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
|
||||
import { Test, Test2 } from 'payload';
|
||||
import { App } from 'payload/components';
|
||||
|
||||
// import App from 'payload/client/components/App';
|
||||
|
||||
// import Routes from './Routes';
|
||||
// import store from './store';
|
||||
|
||||
console.log(Test);
|
||||
import Routes from './Routes';
|
||||
import store from './store';
|
||||
|
||||
const Index = () => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Test />
|
||||
<Test2 />
|
||||
</React.Fragment>
|
||||
<App store={store}>
|
||||
<Routes />
|
||||
</App>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createStore, combineReducers } from 'redux';
|
||||
import common from 'payload/client/reducers/common';
|
||||
import collections from 'payload/client/reducers/collections';
|
||||
import { common } from 'payload/redux';
|
||||
import { collections } from 'payload/redux';
|
||||
|
||||
const reducer = combineReducers({
|
||||
common,
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
@import '_vars';
|
||||
|
||||
body {
|
||||
background: white;
|
||||
color: $black;
|
||||
}
|
||||
6
index.js
6
index.js
@@ -1 +1,5 @@
|
||||
export * from './src/client/Components';
|
||||
import ajax from './src/client/ajax';
|
||||
|
||||
export {
|
||||
ajax
|
||||
};
|
||||
|
||||
7
redux.js
Normal file
7
redux.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import common from './src/client/reducers/common';
|
||||
import collections from './src/client/reducers/collections';
|
||||
|
||||
export {
|
||||
common,
|
||||
collections
|
||||
};
|
||||
@@ -1,11 +1,11 @@
|
||||
import React, { Component } from 'react';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import MeasureWindow from 'payload/client/components/utilities/MeasureWindow';
|
||||
import MeasureScroll from 'payload/client/components/utilities/MeasureScroll';
|
||||
import LoadContent from 'payload/client/components/utilities/LoadContent';
|
||||
import { MeasureWindow } from 'payload/components';
|
||||
import { MeasureScroll } from 'payload/components';
|
||||
import { LoadContent } from 'payload/components';
|
||||
|
||||
import 'payload/client/scss/app.css';
|
||||
import '../scss/app.css';
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
const Test = () => {
|
||||
return (
|
||||
<h1>Test</h1>
|
||||
);
|
||||
};
|
||||
|
||||
export default Test;
|
||||
@@ -1,7 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<h1>Test2</h1>
|
||||
);
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import Tooltip from '../../modules/Tooltip';
|
||||
import { Tooltip } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import Tooltip from '../../modules/Tooltip';
|
||||
import { Tooltip } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
import ajax from '../../../ajax';
|
||||
import { ajax } from 'payload';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import Test from './Test';
|
||||
import Test2 from './Test2';
|
||||
|
||||
export {
|
||||
Test,
|
||||
Test2
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import Sidebar from '../Sidebar';
|
||||
import StepNav from '../../modules/StepNav';
|
||||
import { Sidebar } from 'payload/components';
|
||||
import { StepNav } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@ import React, { Component } from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { connect } from 'react-redux';
|
||||
import { NavLink, Link } from 'react-router-dom';
|
||||
import { Arrow } from 'payload/components';
|
||||
import { Label } from 'payload/components';
|
||||
|
||||
import Icon from 'local/client/components/graphics/Icon';
|
||||
import Arrow from 'payload/client/components/graphics/Arrow';
|
||||
import Label from 'payload/client/components/type/Label';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import Label from 'payload/client/components/type/Label';
|
||||
import { Label } from 'payload/components';
|
||||
|
||||
export default props => {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react';
|
||||
import Input from 'payload/client/components/field-types/Input';
|
||||
import { Input } from 'payload/components';
|
||||
|
||||
class Filter extends Component {
|
||||
render() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import Button from 'payload/client/components/controls/Button';
|
||||
import { Button } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Link } from 'react-router-dom';
|
||||
import Label from 'payload/client/components/type/Label';
|
||||
import Arrow from 'payload/client/components/graphics/Arrow';
|
||||
import { Label } from 'payload/components';
|
||||
import { Arrow } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ import React from 'react';
|
||||
import './Tooltip.css';
|
||||
|
||||
export default (props) => {
|
||||
|
||||
let className = props.className ? `tooltip ${props.className}` : 'tooltip';
|
||||
|
||||
return (
|
||||
@@ -12,4 +11,4 @@ export default (props) => {
|
||||
<span></span>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import SetStepNav from 'payload/client/components/utilities/SetStepNav';
|
||||
import { SetStepNav } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import ContentBlock from 'payload/client/components/layout/ContentBlock';
|
||||
import { ContentBlock } from 'payload/components';
|
||||
import { Form } from 'payload/components';
|
||||
import { Input } from 'payload/components';
|
||||
import { Button } from 'payload/components';
|
||||
|
||||
import Logo from 'local/client/components/graphics/Logo';
|
||||
import Form from 'payload/client/components/forms/Form';
|
||||
import Input from 'payload/client/components/field-types/Input';
|
||||
import Button from 'payload/client/components/controls/Button';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import SetStepNav from 'payload/client/components/utilities/SetStepNav';
|
||||
import { SetStepNav } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import SetStepNav from 'payload/client/components/utilities/SetStepNav';
|
||||
import { SetStepNav } from 'payload/components';
|
||||
|
||||
import './index.css';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import SetStepNav from 'payload/client/components/utilities/SetStepNav';
|
||||
import { SetStepNav } from 'payload/components';
|
||||
|
||||
export default props => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user