sxoinas12 5 years ago
parent
commit
f1d5094604

File diff suppressed because it is too large
+ 0 - 0
dist/lib/Module.js


File diff suppressed because it is too large
+ 0 - 0
dist/modules/BlogFeed/index.js


File diff suppressed because it is too large
+ 0 - 0
dist/modules/Button/index.js


File diff suppressed because it is too large
+ 0 - 0
dist/modules/Icon/index.js


BIN
dist/modules/Image/assets/profile.png


File diff suppressed because it is too large
+ 0 - 0
dist/modules/Image/index.js


+ 1 - 1
dist/modules/index.js

@@ -1 +1 @@
-"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _BaseContainer=_interopRequireDefault(require("./BaseContainer"));var _BaseHolder=_interopRequireDefault(require("./BaseHolder"));var _Button=_interopRequireDefault(require("./Button"));var _Form=_interopRequireDefault(require("./Form"));var _Image=_interopRequireDefault(require("./Image"));var _RootComp=_interopRequireDefault(require("./RootComp"));var _Text=_interopRequireDefault(require("./Text"));var _BlogFeed=_interopRequireDefault(require("./BlogFeed"));var _default={BaseContainer:_BaseContainer["default"],BaseHolder:_BaseHolder["default"],Button:_Button["default"],Form:_Form["default"],Image:_Image["default"],RootComp:_RootComp["default"],Text:_Text["default"],BlogFeed:_BlogFeed["default"]};exports["default"]=_default;
+"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _BaseContainer=_interopRequireDefault(require("./BaseContainer"));var _BaseHolder=_interopRequireDefault(require("./BaseHolder"));var _Button=_interopRequireDefault(require("./Button"));var _Form=_interopRequireDefault(require("./Form"));var _Image=_interopRequireDefault(require("./Image"));var _RootComp=_interopRequireDefault(require("./RootComp"));var _Text=_interopRequireDefault(require("./Text"));var _BlogFeed=_interopRequireDefault(require("./BlogFeed"));var _Icon=_interopRequireDefault(require("./Icon"));var _default={BaseContainer:_BaseContainer["default"],BaseHolder:_BaseHolder["default"],Button:_Button["default"],Form:_Form["default"],Image:_Image["default"],RootComp:_RootComp["default"],Text:_Text["default"],BlogFeed:_BlogFeed["default"],Icon:_Icon["default"]};exports["default"]=_default;

+ 58 - 10
modules/BlogFeed/index.js

@@ -13,7 +13,7 @@ import { ViewNode, Node } from '../../lib/systems/ViewSystem';
 let base2 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer",  {width:320,height:209}))
 let Image1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Image",  {width:320,height:209}))
 let Text1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:"hi there"}))*/
-
+const defaultText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla eget sapien justo. Nunc justo nunc, tristique sollicitudin sodales et, rhoncus vel augue. Mauris vel elit turpis. Vivamus hendrerit faucibus tortor, eget molestie turpis mattis vel. Cras maximus nibh vitae euismod lobortis. Sed iaculis quis lectus non rhoncus. Quisque non purus vel risus venenatis convallis eu at turpis. Cras accumsan quam eu dolor dignissim accumsan. Vestibulum sed orci facilisis, lacinia nibh vitae, egestas massa. Integer sit amet dui velit. Suspendisse ut nibh massa. Fusce condimentum semper odio, et hendrerit nisi venenatis consequat. Nam sed nibh eros. Nulla facilisi."
 
 export default class BlogFeed extends Module {
 
@@ -31,23 +31,71 @@ export default class BlogFeed extends Module {
 			let CurrentView = this.props.CoreSystem.getCurrentView();
 		 	let node = CurrentView.getNode(this.props.NodeID)
 		 	let children = CurrentView.getChildren(node);
-			let base1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer",  {width:370,height:209}))
-			let base2 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer",  {width:370,height:209}))
-			let Image1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Image",  {width:370,height:209}))
-			let Text1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:"This is the post Title",color:"rgba(112, 112, 112, 1)",fontSize:17}))
-		 	let subtitle = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:"This is the subtitle",color:"rgba(112, 112, 112, 1)",fontSize:14}))
+			let base1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer",  {width:375,height:209}))
+			let base2 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "BaseContainer",  {width:375,height:209}))
+			let Image1 = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Image"))
+			
+			let wrapper = new Node("SS"+ Math.random(), {flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end",height:40},new ViewNode("S"+Math.random(), "BaseContainer", {}))
+			let Title = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:"This is the post Title",color:"rgba(112, 112, 112, 1)",fontSize:17,fontFamily:"bold"}))
+		 	let BookMark = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Icon", {}))
+
+		 	let subtitle = new Node("SS"+ Math.random(), {height:25},new ViewNode("S"+Math.random(), "Text", {text:"This is the subtitle",color:"rgba(112, 112, 112, 1)",fontSize:14,fontFamily:"thin"}))
+		 	let MainText = new Node("SS"+ Math.random(), {},new ViewNode("S"+Math.random(), "Text", {text:defaultText,color:"rgba(112, 112, 112, 1)",fontSize:14}))
+		 	
+
+
+		 	let wrapperProfile = new Node("SS"+ Math.random(), {flexDirection:"row",height:40},new ViewNode("S"+Math.random(), "BaseContainer", {}))
+			
+		 	let ImageProfile = new Node("SS"+ Math.random(), {width:34,height:34},new ViewNode("S"+Math.random(), "Image",{source:require('../Image/assets/profile.png'),width:32,height:32}))
+		 	let ImageWrapper = new Node("SS"+ Math.random(), {flexDirection:"row",justifyContent:"center",alignItems:'center',height:40},new ViewNode("S"+Math.random(), "BaseContainer", {}))
+			
+		 	let UserWrapper = new Node("SS"+ Math.random(), {flexDirection:"column",height:40,flexGrow:1},new ViewNode("S"+Math.random(), "BaseContainer", {}))
+			
+		 	let user = new Node("SS"+ Math.random(), {height:20},new ViewNode("S"+Math.random(), "Text", {text:"Alexandra papadopoulou ",color:"rgba(112, 112, 112, 1)",fontSize:14,fontFamily:"thin"}))
+		 	let userjob = new Node("SS"+ Math.random(), {height:20},new ViewNode("S"+Math.random(), "Text", {text:"Market Analyst ",color:"rgba(112, 112, 112, 1)",fontSize:14,fontFamily:"thin"}))
+		 	
+
 		 	if(!CurrentView.has(base1)) CurrentView.addViewNode(base1 , node );
+		 	
 		 	if(!CurrentView.has(base2.id)) CurrentView.addViewNode( base2 ,node);
 		 	if(!CurrentView.has(Image1.id)) CurrentView.addViewNode(Image1,base1)
-			if(!CurrentView.has(Text1.id)) {
-				CurrentView.addViewNode(Text1 , base2);
+			
+
+			if(!CurrentView.has(wrapper.id)) CurrentView.addViewNode(wrapper , base2);
 		 		
-		 	}
+		 	if(!CurrentView.has(Title.id)) CurrentView.addViewNode(Title , wrapper);
+		 	if(!CurrentView.has(BookMark.id)) CurrentView.addViewNode(BookMark , wrapper);
+
+
+
 		 	if(!CurrentView.has(subtitle.id)) {
 				CurrentView.addViewNode(subtitle , base2);
-		 		this.props.CoreSystem.forceUpdate();
+		 		
+		 	}
+
+		 	// #######################
+
+		 	if(!CurrentView.has(wrapperProfile.id)){
+		 		CurrentView.addViewNode(wrapperProfile,base2);
+		 		
 		 	}
+
+		 	if(!CurrentView.has(ImageWrapper)) CurrentView.addViewNode(ImageWrapper,wrapperProfile);
+			if(!CurrentView.has(ImageProfile)) CurrentView.addViewNode(ImageProfile,ImageWrapper);
+			if(!CurrentView.has(UserWrapper)) CurrentView.addViewNode(UserWrapper,wrapperProfile);
+
+
+		 	if(!CurrentView.has(user)) CurrentView.addViewNode(user,UserWrapper)
+		 	if(!CurrentView.has(userjob)) {
+		 		CurrentView.addViewNode(userjob,UserWrapper)
+				this.props.CoreSystem.forceUpdate();
+		 	};
 		 	
+
+		 	if(!CurrentView.has(MainText.id)){
+		 		CurrentView.addViewNode(MainText , base2);
+		 		this.props.CoreSystem.forceUpdate();
+		 	}	
 	 	}
 	}
 

+ 1 - 2
modules/Button/index.js

@@ -2,11 +2,10 @@ import React from 'react';
 import Module from '../../lib/Module';
 import { View , StyleSheet , Text} from 'react-native';
 import Types from '../../lib/Types';
-import {Button} from 'react-native-elements'
+import { Button } from 'react-native-elements'
 import Styles from './styles';
 
 
-
 export default class ButtonComp extends Module {
 	constructor(props) {
 		super(props);

+ 37 - 0
modules/Icon/index.js

@@ -0,0 +1,37 @@
+import React from 'react';
+import Module from '../../lib/Module';
+import { View , StyleSheet , Text} from 'react-native';
+import Types from '../../lib/Types';
+import {Icon} from 'react-native-elements'
+
+
+
+
+export default class IconComp extends Module{
+	constructor(props){
+		super(props)
+	}
+	press(e){
+		console.log("######You must over write this function@@@@@")
+	}
+	display(){
+		return(
+			<View>
+			<Icon 
+			name = {this.props.name}
+			type = {this.props.type}
+			color = {this.props.color}
+			onPress = {(e) => this.press(e)}/>
+			
+			</View>)
+	}
+}
+
+
+IconComp.Inputs = {
+	name: new Types.Text().require().default("bookmark"),
+	color: new Types.Text().require().color().default('rgba(112, 112, 112, 1)'),
+	type: new Types.Text().require().default('material'),
+	width: new Types.Integer().require(),
+	height: new Types.Integer().require()
+}

BIN
modules/Image/assets/profile.png


+ 5 - 3
modules/Image/index.js

@@ -16,12 +16,13 @@ export default class ImageComp extends Module {
 			width,
 			height,
 			resizeMode,
-			source
+			source,
+			borderRadius
 		} = this.props;
 		console.log(width);
 		if(!width) width = "100%";
 		return 	<Image
-			          style={{width, height, paddingTop: height ? '0' : '56.25%'}}
+			          style={{borderRadius,width, height, paddingTop: height ? '0' : '56.25%'}}
 			          resizeMode={resizeMode}
 			          source={source || image}
 			        />
@@ -33,5 +34,6 @@ ImageComp.Inputs = {
 	source: new Types.Text(),
 	width: new Types.Integer(),
 	height: new Types.Integer(),
-	resizeMode: new Types.Text().require().default('cover')
+	resizeMode: new Types.Text().require().default('cover'),
+	borderRadius: new Types.Integer()
 }

+ 3 - 2
modules/index.js

@@ -6,7 +6,7 @@ import Image from './Image';
 import RootComp from './RootComp';
 import Text from './Text';
 import BlogFeed from './BlogFeed';
-
+import Icon from './Icon'
 export default {
 BaseContainer,
 BaseHolder,
@@ -15,5 +15,6 @@ Form,
 Image,
 RootComp,
 Text,
-BlogFeed
+BlogFeed,
+Icon
 }

Some files were not shown because too many files changed in this diff