1- import {
2- ComponentInt ,
3- ChildInt ,
4- ApplicationStateInt
5- } from "../utils/interfaces" ;
1+ import { ComponentInt , ChildInt , ApplicationStateInt } from '../utils/interfaces' ;
62
73import {
84 LOAD_INIT_DATA ,
@@ -27,8 +23,8 @@ import {
2723 ADD_PROP ,
2824 DELETE_PROP ,
2925 UPDATE_HTML_ATTR ,
30- UPDATE_CHILDREN_SORT
31- } from " ../actionTypes" ;
26+ UPDATE_CHILDREN_SORT ,
27+ } from ' ../actionTypes' ;
3228
3329import {
3430 addComponent ,
@@ -48,16 +44,16 @@ import {
4844 addProp ,
4945 deleteProp ,
5046 updateHtmlAttr ,
51- updateChildrenSort
52- } from " ../utils/componentReducer.util" ;
53- import cloneDeep from " ../utils/cloneDeep" ;
47+ updateChildrenSort ,
48+ } from ' ../utils/componentReducer.util' ;
49+ import cloneDeep from ' ../utils/cloneDeep' ;
5450
5551const appComponent : ComponentInt = {
5652 id : 1 ,
5753 stateful : false ,
58- title : " App" ,
54+ title : ' App' ,
5955 // parentIds: [],
60- color : " #FF6D00" ,
56+ color : ' #FF6D00' ,
6157 // draggable: true,
6258 // childrenIds: [],
6359 // selectableParents: [],
@@ -67,12 +63,12 @@ const appComponent: ComponentInt = {
6763 x : 25 ,
6864 y : 25 ,
6965 width : 600 ,
70- height : 400
66+ height : 400 ,
7167 } ,
7268
7369 childrenArray : [ ] ,
7470 nextChildId : 1 ,
75- focusChildId : 0
71+ focusChildId : 0 ,
7672} ;
7773
7874const initialApplicationFocusChild : ChildInt = {
@@ -82,15 +78,15 @@ const initialApplicationFocusChild: ChildInt = {
8278 x : 25 ,
8379 y : 25 ,
8480 width : 600 ,
85- height : 400
81+ height : 400 ,
8682 } ,
8783 // draggable: true,
8884 childType : null ,
8985 childSort : 0 ,
9086 childComponentId : 0 ,
9187 color : null ,
9288 htmlElement : null ,
93- HTMLInfo : null
89+ HTMLInfo : null ,
9490} ;
9591
9692const initialApplicationState : ApplicationStateInt = {
@@ -104,9 +100,8 @@ const initialApplicationState: ApplicationStateInt = {
104100 initialApplicationFocusChild,
105101 focusChild : cloneDeep ( initialApplicationFocusChild ) ,
106102 components : [ appComponent ] ,
107- appDir : "" ,
103+ appDir : '' ,
108104 loading : false ,
109- componentTree : { name : "App" , attributes : { } , children : { } }
110105} ;
111106
112107const componentReducer = ( state = initialApplicationState , action : any ) => {
@@ -116,9 +111,9 @@ const componentReducer = (state = initialApplicationState, action: any) => {
116111 ...state ,
117112 ...action . payload . data ,
118113 loading : false ,
119- appDir : "" ,
114+ appDir : '' ,
120115 successOpen : false ,
121- errorOpen : false
116+ errorOpen : false ,
122117 } ;
123118 case ADD_COMPONENT :
124119 return addComponent ( state , action . payload ) ;
0 commit comments