|
@@ -5,6 +5,7 @@ import { TextInput, Image, Button } from 'react-native';
|
|
|
|
|
|
import TextEditor from '../Components/TextEditor';
|
|
import TextEditor from '../Components/TextEditor';
|
|
import Alignment from '../Components/Alignment';
|
|
import Alignment from '../Components/Alignment';
|
|
|
|
+import ContainerEditor from '../Components/ContainerEditor';
|
|
|
|
|
|
// import Numbers from '../Components/Numbers';
|
|
// import Numbers from '../Components/Numbers';
|
|
// import ColorEditor from '../Components/ColorEditor';
|
|
// import ColorEditor from '../Components/ColorEditor';
|
|
@@ -38,8 +39,12 @@ export default class SideBar extends BaseSystem {
|
|
super();
|
|
super();
|
|
this.CoreSystem = CoreSystem;
|
|
this.CoreSystem = CoreSystem;
|
|
this.ToolBox = ToolBox;
|
|
this.ToolBox = ToolBox;
|
|
|
|
+ this.showAllData = false;
|
|
|
|
+ }
|
|
|
|
+ toggleAll() {
|
|
|
|
+ this.showAllData = !this.showAllData;
|
|
|
|
+ this.forceUpdate();
|
|
}
|
|
}
|
|
-
|
|
|
|
import() {
|
|
import() {
|
|
let CurrentView = this.CoreSystem.getCurrentView();
|
|
let CurrentView = this.CoreSystem.getCurrentView();
|
|
let text = window.prompt("Feed me plz");
|
|
let text = window.prompt("Feed me plz");
|
|
@@ -120,7 +125,6 @@ export default class SideBar extends BaseSystem {
|
|
this.ContainerNode = selectedNode;
|
|
this.ContainerNode = selectedNode;
|
|
if(selectedNode.content && selectedNode.content.value) {
|
|
if(selectedNode.content && selectedNode.content.value) {
|
|
let ctor = ModuleSystem.fromViewNode(selectedNode.content);
|
|
let ctor = ModuleSystem.fromViewNode(selectedNode.content);
|
|
-
|
|
|
|
styles = ctor.Styles;
|
|
styles = ctor.Styles;
|
|
viewNodeProps = ModuleSystem.validateProps(ctor, selectedNode.content.props);
|
|
viewNodeProps = ModuleSystem.validateProps(ctor, selectedNode.content.props);
|
|
Structure = ctor.Inputs;
|
|
Structure = ctor.Inputs;
|
|
@@ -154,9 +158,27 @@ export default class SideBar extends BaseSystem {
|
|
|
|
|
|
return (
|
|
return (
|
|
<View>
|
|
<View>
|
|
- <Alignment onSelect={(style) => this.editNodeStyle(selectedNode, style)} />
|
|
|
|
|
|
+ {this.ContainerNode ?
|
|
|
|
+ [
|
|
|
|
+ <Alignment onSelect={(style) => this.editNodeStyle(selectedNode, style)} />,
|
|
|
|
+ <ContainerEditor structure={Structure}
|
|
|
|
+ nodeProps={nodeProps}
|
|
|
|
+ key={this.ContainerNode.id}
|
|
|
|
+ onChange={(k,v) => this.editNode(selectedNode, v, k)}/>,
|
|
|
|
|
|
|
|
+ <View style={PropertiesContainer.container}>
|
|
|
|
+ {contentData}
|
|
|
|
+ </View>,
|
|
|
|
+
|
|
|
|
+ <View style={SideBarStyle.title}>
|
|
|
|
+ <Text style={{cursor: 'pointer'}} onClick={() => this.toggleAll()}>Show All</Text>
|
|
|
|
+ </View>
|
|
|
|
|
|
|
|
+ ]
|
|
|
|
+ : <Text>Click on elements</Text>}
|
|
|
|
+
|
|
|
|
+ {this.showAllData ?
|
|
|
|
+ <View>
|
|
{StyleData.length > 0 ? (
|
|
{StyleData.length > 0 ? (
|
|
<View key={Math.random()}>
|
|
<View key={Math.random()}>
|
|
<select onChange={(event) => {
|
|
<select onChange={(event) => {
|
|
@@ -191,8 +213,8 @@ export default class SideBar extends BaseSystem {
|
|
<View style={PropertiesContainer.container}>
|
|
<View style={PropertiesContainer.container}>
|
|
{contentData}
|
|
{contentData}
|
|
</View>
|
|
</View>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ </View>
|
|
|
|
+ : null}
|
|
|
|
|
|
</View>
|
|
</View>
|
|
)
|
|
)
|
|
@@ -211,7 +233,6 @@ const SelectedStyle = StyleSheet.create({
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
const PropertiesContainer = StyleSheet.create({
|
|
const PropertiesContainer = StyleSheet.create({
|
|
container:{
|
|
container:{
|
|
marginTop:20,
|
|
marginTop:20,
|
|
@@ -229,13 +250,12 @@ const SideBarStyle = StyleSheet.create({
|
|
flex:1,
|
|
flex:1,
|
|
flexDirection:'row',
|
|
flexDirection:'row',
|
|
},
|
|
},
|
|
- title:{
|
|
|
|
- fontSize:20,
|
|
|
|
- textAlign:'center',
|
|
|
|
- fontFamily:'halvetica',
|
|
|
|
- color:'black',
|
|
|
|
- borderBottomWidth:1,
|
|
|
|
- borderBottomColor:'black'
|
|
|
|
|
|
+ title: {
|
|
|
|
+ padding: 24,
|
|
|
|
+ fontSize: 12,
|
|
|
|
+ letterSpacing: 0.5,
|
|
|
|
+ color: "#BFBFBF",
|
|
|
|
+ opacity: 1
|
|
},
|
|
},
|
|
body:{
|
|
body:{
|
|
paddingLeft:5,
|
|
paddingLeft:5,
|