Skip to content

Commit 225c5f6

Browse files
committed
Reorganized component folder
1 parent d4b25b3 commit 225c5f6

32 files changed

+45
-46
lines changed

src/actions/actionCreators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
PropInt,
55
ChildInt,
66
Action,
7-
} from '../utils/Interfaces';
7+
} from '../intefaces/Interfaces';
88

99
import {
1010
LOAD_INIT_DATA,

src/components/AddChildProps.tsx renamed to src/components/bottom/AddChildProps.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from 'react';
22
import { connect } from 'react-redux';
3-
import { addProp, deleteProp } from '../actions/actionCreators';
3+
import { addProp, deleteProp } from '../../actions/actionCreators';
44
import MaterialTable from 'material-table';
55

66
const mapDispatchToProps = (dispatch: any) => ({

src/components/BottomPanel.tsx renamed to src/components/bottom/BottomPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { Component } from 'react';
22
import { connect } from 'react-redux';
3-
import { handleClose, deleteProp, addProp } from '../actions/actionCreators';
3+
import { handleClose, deleteProp, addProp } from '../../actions/actionCreators';
44
import BottomTabs from './BottomTabs';
5-
import { PropsInt, PropInt } from '../utils/Interfaces';
5+
import { PropsInt, PropInt } from '../../intefaces/Interfaces';
66

77
const IPC = require('electron').ipcRenderer;
88

src/components/BottomTabs.tsx renamed to src/components/bottom/BottomTabs.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import Props from './Props';
88
import HtmlAttr from './HtmlAttr';
99
import CodePreview from './CodePreview';
1010
import {
11-
ComponentInt,
1211
ComponentsInt,
1312
PropInt,
1413
PropsInt
15-
} from '../utils/Interfaces';
14+
} from '../../intefaces/Interfaces';
1615

1716
interface BottomTabsPropsInt extends PropsInt {
1817
deleteProp(id: number): void;

src/components/CodePreview.tsx renamed to src/components/bottom/CodePreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component } from 'react';
22
import { format } from 'prettier';
3-
import componentRender from '../utils/componentRender.util';
4-
import { ComponentInt, ComponentsInt } from '../utils/Interfaces';
3+
import componentRender from '../../utils/componentRender.util';
4+
import { ComponentInt, ComponentsInt } from '../../intefaces/Interfaces';
55
/** ** SortCHildren will be fixed , dont XXX the file *** */
66
// import SortChildren from './SortChildren.tsx';
77
import SyntaxHighlighter from 'react-syntax-highlighter';
File renamed without changes.

src/components/HtmlAttr.tsx renamed to src/components/bottom/HtmlAttr.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import Paper from '@material-ui/core/Paper';
99
import Select from '@material-ui/core/Select';
1010
import Fab from '@material-ui/core/Fab';
1111
import InputLabel from '@material-ui/core/InputLabel';
12-
import { updateHtmlAttr } from '../actions/actionCreators';
13-
import { HTMLelements } from '../utils/htmlElements.util';
14-
import { PropsInt, PropInt } from '../utils/Interfaces';
12+
import { updateHtmlAttr } from '../../actions/actionCreators';
13+
import { HTMLelements } from '../../utils/htmlElements.util';
14+
import { PropsInt, PropInt } from '../../intefaces/Interfaces';
1515

1616
interface HTMLAttrPropsInt extends PropsInt {
1717
updateHtmlAttr(arg: { attr: string; value: string }): void;

src/components/Props.tsx renamed to src/components/bottom/Props.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import TextField from '@material-ui/core/TextField';
77
import Button from '@material-ui/core/Button';
88
import Select from '@material-ui/core/Select';
99
import InputLabel from '@material-ui/core/InputLabel';
10-
import { addProp, deleteProp } from '../actions/actionCreators';
10+
import { addProp, deleteProp } from '../../actions/actionCreators';
1111
import DataTable from './DataTable';
12-
import { PropInt, PropsInt } from '../utils/Interfaces';
12+
import { PropInt, PropsInt } from '../../intefaces/Interfaces';
1313

1414
interface PropsPropsInt extends PropsInt {
1515
classes: any;

src/components/LeftColExpansionPanel.tsx renamed to src/components/left/LeftColExpansionPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import Tooltip from '@material-ui/core/Tooltip';
1414
import Collapse from '@material-ui/core/Collapse';
1515
import Switch from '@material-ui/core/Switch'; // for state/class toggling
1616
import InputLabel from '@material-ui/core/InputLabel'; // labeling of state/class toggles
17-
import { ComponentInt, ComponentsInt, PropsInt } from '../utils/Interfaces'; // unused
17+
import { ComponentInt, ComponentsInt, PropsInt } from '../../intefaces/Interfaces'; // unused
1818
interface LeftColExpPanPropsInt extends PropsInt {
1919
classes: any;
2020
id?: number;
File renamed without changes.

src/utils/createModal.util.tsx renamed to src/components/left/createModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import SimpleModal from '../components/SimpleModal';
2+
import SimpleModal from './SimpleModal';
33

44
type Props = {
55
closeModal: any;

src/components/GrandchildRectangle.tsx renamed to src/components/main/GrandchildRectangle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
ComponentInt,
66
ChildInt,
77
PropsInt,
8-
} from '../utils/Interfaces';
8+
} from '../../intefaces/Interfaces';
99

1010
//////////////////////////////////////////////////////////////////////////////
1111
/////Logic in this component is mainly the same as Rectangle.tsx./////////////

src/components/KonvaStage.tsx renamed to src/components/main/KonvaStage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import React, { Component } from 'react';
55
import { Stage, Layer, Line } from 'react-konva';
66
import Konva from 'konva';
77
import Rectangle from './Rectangle';
8-
import cloneDeep from '../utils/cloneDeep';
9-
import { ComponentInt, ChildInt, PropsInt } from '../utils/Interfaces';
10-
import isEmpty from '../utils/isEmpty';
8+
import cloneDeep from '../../helperFunctions/cloneDeep';
9+
import { ComponentInt, ChildInt, PropsInt } from '../../intefaces/Interfaces';
10+
import isEmpty from '../../helperFunctions/isEmpty';
1111
// import BottomPan from './BottomPanel';
1212

1313
interface KonvaStagePropsInt extends PropsInt {

src/components/Rectangle.tsx renamed to src/components/main/Rectangle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Konva from 'konva';
33
import { Rect, Group, Label, Text } from 'react-konva';
44
import TransformerComponent from './TransformerComponent';
55
import GrandchildRectangle from './GrandchildRectangle';
6-
import { ComponentInt, PropsInt, ChildInt } from '../utils/Interfaces';
6+
import { ComponentInt, PropsInt, ChildInt } from '../../intefaces/Interfaces';
77

88
interface RectanglePorpsInt extends PropsInt {
99
x: number;

src/components/TransformerComponent.tsx renamed to src/components/main/TransformerComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from 'react';
22
import { Transformer } from 'react-konva';
3-
import { ChildInt } from '../utils/Interfaces';
3+
import { ChildInt } from '../../intefaces/Interfaces';
44
import Konva from 'konva';
55

66
interface TCompPropsInt {

src/components/Tutorial.tsx renamed to src/components/main/Tutorial.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
22
import Backdrop from '@material-ui/core/Backdrop';
33
import Modal from '@material-ui/core/Modal';
44
import Fade from '@material-ui/core/Fade';
5-
import theme from '../components/theme';
5+
import theme from '../../theme';
66
import Button from '@material-ui/core/Button';
77

88
interface Props {

src/containers/AppContainer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import React, { Component } from 'react';
22
import { connect } from 'react-redux';
33
import { MuiThemeProvider } from '@material-ui/core/styles';
44
import LinearProgress from '@material-ui/core/LinearProgress';
5-
import Tutorial from '../components/Tutorial';
5+
import Tutorial from '../components/main/Tutorial';
66
import LeftContainer from './LeftContainer';
77
import MainContainer from './MainContainer';
8-
import theme from '../components/theme';
8+
import theme from '../theme';
99
import {
1010
ComponentInt,
1111
ComponentsInt,
1212
ApplicationStateInt,
13-
} from '../utils/Interfaces';
13+
} from '../intefaces/Interfaces';
1414
import * as actions from '../actions/actionCreators';
1515

1616
// ** Used with electron to render

src/containers/LeftContainer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import List from '@material-ui/core/List';
1111
import ListItem from '@material-ui/core/ListItem';
1212
import ListItemText from '@material-ui/core/ListItemText';
1313
import Fab from '@material-ui/core/Fab';
14-
import LeftColExpansionPanel from '../components/LeftColExpansionPanel';
15-
import HTMLComponentPanel from '../components/HTMLComponentPanel';
14+
import LeftColExpansionPanel from '../components/left/LeftColExpansionPanel';
15+
import HTMLComponentPanel from '../components/left/HTMLComponentPanel';
1616
import * as actions from '../actions/actionCreators';
17-
import { ComponentInt, ComponentsInt, PropsInt } from '../utils/Interfaces';
18-
import createModal from '../utils/createModal.util';
19-
import cloneDeep from '../utils/cloneDeep';
17+
import { ComponentInt, ComponentsInt, PropsInt } from '../intefaces/Interfaces';
18+
import createModal from '../components/left/createModal';
19+
import cloneDeep from '../helperFunctions/cloneDeep';
2020

2121
const IPC = require('electron').ipcRenderer;
2222

src/containers/MainContainer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
import React, { Component } from 'react';
55
import { connect } from 'react-redux';
66
import { MuiThemeProvider } from '@material-ui/core/styles';
7-
import BottomPanel from '../components/BottomPanel';
8-
import theme from '../components/theme';
7+
import BottomPanel from '../components/bottom/BottomPanel';
8+
import theme from '../theme';
99
import {
1010
handleTransform,
1111
changeFocusChild,
1212
changeComponentFocusChild,
1313
deleteChild,
1414
changeFocusComponent
1515
} from '../actions/actionCreators';
16-
import KonvaStage from '../components/KonvaStage';
17-
import { PropsInt, ApplicationStateInt } from '../utils/Interfaces';
16+
import KonvaStage from '../components/main/KonvaStage';
17+
import { PropsInt, ApplicationStateInt } from '../intefaces/Interfaces';
1818

1919
interface MainContPropsInt extends PropsInt {
2020
image: HTMLImageElement | null;
File renamed without changes.
File renamed without changes.

src/utils/helperFunctions.ts renamed to src/helperFunctions/createHistory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApplicationStateInt } from './Interfaces';
1+
import { ApplicationStateInt } from '../intefaces/Interfaces';
22
import cloneDeep from './cloneDeep';
33

44
/*Helper function that copies the state to be added on to the history

src/utils/getSelectable.util.ts renamed to src/helperFunctions/getSelectable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ComponentInt, ComponentsInt, ChildInt } from './Interfaces';
1+
import { ComponentInt, ComponentsInt, ChildInt } from '../intefaces/Interfaces';
22

33
interface getSelectableInt {
44
[key: string]: Array<number>;
File renamed without changes.
File renamed without changes.

src/localStorage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import localforage from 'localforage';
2-
import { ApplicationStateInt } from './utils/Interfaces';
2+
import { ApplicationStateInt } from './intefaces/Interfaces';
33

44
export const saveState = (state: ApplicationStateInt) =>
55
localforage.setItem('state-v1.0.1', state);

src/reducers/componentReducer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
ChildInt,
44
ApplicationStateInt,
55
Action,
6-
} from '../utils/Interfaces';
6+
} from '../intefaces/Interfaces';
77

88
import {
99
LOAD_INIT_DATA,
@@ -63,7 +63,7 @@ import {
6363
undo,
6464
redo
6565
} from '../utils/componentReducer.util';
66-
import cloneDeep from '../utils/cloneDeep';
66+
import cloneDeep from '../helperFunctions/cloneDeep';
6767

6868
const appComponent: ComponentInt = {
6969
id: 1,
File renamed without changes.

src/utils/componentReducer.util.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import getSelectable from './getSelectable.util';
2-
import getColor from './colors.util';
1+
import getSelectable from '../helperFunctions/getSelectable';
2+
import getColor from '../helperFunctions/colors';
33
import { getSize } from './htmlElements.util';
4-
import cloneDeep from './cloneDeep';
4+
import cloneDeep from '../helperFunctions/cloneDeep';
55
import {
66
ComponentInt,
77
ApplicationStateInt,
88
//ChildrenInt, //unused import//
99
ChildInt,
1010
ComponentsInt,
1111
PropInt,
12-
} from './Interfaces';
13-
import { createHistory } from './helperFunctions';
12+
} from '../intefaces/Interfaces';
13+
import { createHistory } from '../helperFunctions/createHistory';
1414

1515
//this is the default values for any component added to the app.
1616

src/utils/componentRender.util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import {
44
ChildInt,
55
ChildrenInt,
66
PropInt
7-
} from './Interfaces';
8-
import cloneDeep from './cloneDeep';
7+
} from '../intefaces/Interfaces';
8+
import cloneDeep from '../helperFunctions/cloneDeep';
99

1010
const componentRender = (
1111
component: ComponentInt,

0 commit comments

Comments
 (0)