1 |
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _Module2=_interopRequireDefault(require("../../lib/Module"));var _reactNative=require("react-native");var _Types=_interopRequireDefault(require("../../lib/Types"));var _index=_interopRequireDefault(require("../BaseContainer/index"));var _index2=_interopRequireDefault(require("../Image/index"));var _index3=_interopRequireDefault(require("../Text/index"));var _ViewSystem=require("../../lib/systems/ViewSystem");var _jsxFileName="C:\\Users\\Karteri\\Desktop\\Development\\TrapiLib\\src\\modules\\BlogFeed\\index.js";var BlogFeed=function(_Module){(0,_inherits2.default)(BlogFeed,_Module);function BlogFeed(props){var _this;(0,_classCallCheck2.default)(this,BlogFeed);_this=(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(BlogFeed).call(this,props));_this.configure();return _this;}(0,_createClass2.default)(BlogFeed,[{key:"configure",value:function configure(){if(this.props.CoreSystem){var CurrentView=this.props.View;var node=CurrentView.getNode(this.props.NodeID);var NavContainer=NodeFactory({flexDirection:"row",justifyContent:"space-between",alignItems:'center'},'BaseContainer',{height:64,width:375,backgroundColor:'rgba(0, 84, 230, 1)'});var TitleWrapper=NodeFactory({flexDirection:"row",justifyContent:'center',alignItems:'center'},'BaseContainer',{height:41,width:327});var Title=NodeFactory({width:327},"Text",{fontSize:34,fontFamily:'bold',width:327,text:"Blog Feed"});var PostCont1=NodeFactory({flexDirection:'column',justifyContent:'center',alignItems:'center'},'BaseContainer',{height:236,width:327});var PostCont2=NodeFactory({flexDirection:'column',justifyContent:'center',alignItems:'center'},'BaseContainer',{height:236,width:327});var navIcon=NodeFactory({},'Icon',{name:"reorder",color:'rgba(255, 255, 255, 1)'});var navTitle=NodeFactory({},'Text',{text:"XDi",color:'rgba(255, 255, 255, 1)',fontSize:25});var navProfile=NodeFactory({},'Icon',{name:"perm-identity",color:'rgba(255, 255, 255, 1)'});var image1=NodeFactory({},'Image',{height:142,width:327});var wrapper1=NodeFactory({},'BaseContainer',{height:91,width:327});var title1=NodeFactory({},'Text',{text:"This is a titile ",fontFamily:"roboto-black",fontSize:18,color:"rgba(112, 112, 112, 1)"});var subtitle1=NodeFactory({},'Text',{text:"This is a subtitle",fontFamily:"roboto-black",fontSize:14,color:"rgba(193, 193, 193, 1)"});var date1=NodeFactory({alignSelf:'flex-end'},'Text',{text:"OCTOBER 9, 2019",fontFamily:"roboto-black",fontSize:10,color:"rgba(112, 112, 112, 1)"});var image2=NodeFactory({},'Image',{height:142,width:327});var wrapper2=NodeFactory({},'BaseContainer',{height:91,width:327});var title2=NodeFactory({},'Text',{text:"Thi is a title ",fontFamily:"roboto-black",fontSize:18,color:"rgba(112, 112, 112, 1)"});var subtitle2=NodeFactory({},'Text',{text:"This is a subtitle ",fontFamily:"roboto-black",fontSize:14,color:"rgba(193, 193, 193, 1)"});var date2=NodeFactory({alignSelf:'flex-end'},'Text',{text:"OCTOBER 9, 2019",fontFamily:"roboto-black",fontSize:10,color:"rgba(112, 112, 112, 1)"});if(!CurrentView.has(NavContainer))CurrentView.addViewNode(NavContainer,node);if(!CurrentView.has(TitleWrapper))CurrentView.addViewNode(TitleWrapper,node);if(!CurrentView.has(Title))CurrentView.addViewNode(Title,TitleWrapper);if(!CurrentView.has(PostCont1))CurrentView.addViewNode(PostCont1,node);if(!CurrentView.has(PostCont2)){CurrentView.addViewNode(PostCont2,node);}if(!CurrentView.has(navIcon))CurrentView.addViewNode(navIcon,NavContainer);if(!CurrentView.has(navTitle))CurrentView.addViewNode(navTitle,NavContainer);if(!CurrentView.has(navProfile))CurrentView.addViewNode(navProfile,NavContainer);if(!CurrentView.has(image1))CurrentView.addViewNode(image1,PostCont1);if(!CurrentView.has(wrapper1))CurrentView.addViewNode(wrapper1,PostCont1);if(!CurrentView.has(title1))CurrentView.addViewNode(title1,wrapper1);if(!CurrentView.has(subtitle1))CurrentView.addViewNode(subtitle1,wrapper1);if(!CurrentView.has(date1))CurrentView.addViewNode(date1,wrapper1);if(!CurrentView.has(image2))CurrentView.addViewNode(image2,PostCont2);if(!CurrentView.has(wrapper2))CurrentView.addViewNode(wrapper2,PostCont2);if(!CurrentView.has(title2))CurrentView.addViewNode(title2,wrapper2);if(!CurrentView.has(subtitle2))CurrentView.addViewNode(subtitle2,wrapper2);if(!CurrentView.has(date2)){CurrentView.addViewNode(date2,PostCont2);this.props.CoreSystem.forceUpdate();}}}},{key:"render",value:function render(){return _react.default.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:103}});}}]);return BlogFeed;}(_Module2.default);exports.default=BlogFeed;BlogFeed.Inputs={};var NodeFactory=function NodeFactory(){var containerStyle=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var component=arguments.length>1?arguments[1]:undefined;var componentStyle=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return new _ViewSystem.Node("SS"+Math.random(),containerStyle,new _ViewSystem.ViewNode("S"+Math.random(),component,componentStyle));};
|