|
@@ -43,6 +43,7 @@ export default class SideBar{
|
|
let CurrentView = this.CoreSystem.getCurrentView();
|
|
let CurrentView = this.CoreSystem.getCurrentView();
|
|
let Routing = this.CoreSystem.Routing;
|
|
let Routing = this.CoreSystem.Routing;
|
|
let Structure = {};
|
|
let Structure = {};
|
|
|
|
+ let viewNodeProps = {};
|
|
if (tool) {
|
|
if (tool) {
|
|
console.log(tool)
|
|
console.log(tool)
|
|
if (tool.selectedNode && tool.selectedNode.isCol && CurrentView.has(tool.selectedNode)) {
|
|
if (tool.selectedNode && tool.selectedNode.isCol && CurrentView.has(tool.selectedNode)) {
|
|
@@ -52,11 +53,14 @@ export default class SideBar{
|
|
if(tool.selectedNode.content && tool.selectedNode.content.value) {
|
|
if(tool.selectedNode.content && tool.selectedNode.content.value) {
|
|
this.viewNode = tool.selectedNode.content;
|
|
this.viewNode = tool.selectedNode.content;
|
|
console.log("NEVERRRRRRRRRRRRRRRR")
|
|
console.log("NEVERRRRRRRRRRRRRRRR")
|
|
|
|
+ let ctor = ModuleSystem.get(this.viewNode.value, this.viewNode.namespace);
|
|
|
|
+ viewNodeProps = ModuleSystem.validateProps(ctor, this.viewNode.props);
|
|
|
|
+ console.log(viewNodeProps)
|
|
Structure = ModuleSystem.fromViewNode(this.viewNode).Inputs;
|
|
Structure = ModuleSystem.fromViewNode(this.viewNode).Inputs;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- let data = Object.keys(Structure || {}).map((key) => {
|
|
|
|
|
|
+ let data = Object.keys(Structure || {}).map((key,index) => {
|
|
let Editor = TypeHandler(Structure[key]);
|
|
let Editor = TypeHandler(Structure[key]);
|
|
let editorProps = {
|
|
let editorProps = {
|
|
title: key,
|
|
title: key,
|
|
@@ -65,19 +69,18 @@ export default class SideBar{
|
|
this.editNode(value, key);
|
|
this.editNode(value, key);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- console.log(DataTypes)
|
|
|
|
switch(Structure[key].type){
|
|
switch(Structure[key].type){
|
|
case DataTypes.Types.Integer:
|
|
case DataTypes.Types.Integer:
|
|
- editorProps.number = this.viewNode.props[key];
|
|
|
|
|
|
+ editorProps.number = viewNodeProps[key];
|
|
break;
|
|
break;
|
|
case DataTypes.Types.Text:
|
|
case DataTypes.Types.Text:
|
|
- editorProps.text = this.viewNode.props[key];
|
|
|
|
|
|
+ editorProps.text = viewNodeProps[key];
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
//Must create a generic Vuiew Component
|
|
//Must create a generic Vuiew Component
|
|
return (<View></View>)
|
|
return (<View></View>)
|
|
}
|
|
}
|
|
- return <Editor {...editorProps}/>
|
|
|
|
|
|
+ return <Editor {...editorProps} key={index + key + this.ColNode.id}/>
|
|
})
|
|
})
|
|
return (
|
|
return (
|
|
<View>
|
|
<View>
|