index.js 5.2 KB

1
  1. var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));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=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _Types=_interopRequireDefault(require("../../lib/Types"));var _jsxFileName="C:\\Users\\Karteri\\Desktop\\Development\\TrapiLib\\src\\modules\\BaseHolder\\index.js";var BaseHolder=function(_React$Component){(0,_inherits2.default)(BaseHolder,_React$Component);function BaseHolder(props){(0,_classCallCheck2.default)(this,BaseHolder);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(BaseHolder).call(this,props));}(0,_createClass2.default)(BaseHolder,[{key:"render",value:function render(){var _this$props=this.props,children=_this$props.children,selected=_this$props.selected,justifyContent=_this$props.justifyContent,alignItems=_this$props.alignItems,alignContent=_this$props.alignContent,flexDirection=_this$props.flexDirection,flexWrap=_this$props.flexWrap,order=_this$props.order,alignSelf=_this$props.alignSelf,flexGrow=_this$props.flexGrow,flexShrink=_this$props.flexShrink,flexBasis=_this$props.flexBasis,width=_this$props.width,height=_this$props.height,minWidth=_this$props.minWidth,minHeight=_this$props.minHeight,paddingTop=_this$props.paddingTop,paddingBottom=_this$props.paddingBottom,paddingLeft=_this$props.paddingLeft,paddingRight=_this$props.paddingRight,marginLeft=_this$props.marginLeft,marginRight=_this$props.marginRight,marginTop=_this$props.marginTop,marginBottom=_this$props.marginBottom,overflow=_this$props.overflow,CoreSystem=_this$props.CoreSystem,stretchContainer=_this$props.stretchContainer,content=_this$props.content,restProps=(0,_objectWithoutProperties2.default)(_this$props,["children","selected","justifyContent","alignItems","alignContent","flexDirection","flexWrap","order","alignSelf","flexGrow","flexShrink","flexBasis","width","height","minWidth","minHeight","paddingTop","paddingBottom","paddingLeft","paddingRight","marginLeft","marginRight","marginTop","marginBottom","overflow","CoreSystem","stretchContainer","content"]);if(!width)width=undefined;if(!height)height=undefined;var styl=[styles.base];if(CoreSystem&&CoreSystem._devMode&&selected)styl.push(styles.selected);if(stretchContainer)styl.push(styles.stretchToContent);return _react.default.createElement(_reactNative.View,(0,_extends2.default)({},restProps,{style:[styl,{alignSelf:alignSelf,flexGrow:flexGrow,flexShrink:flexShrink,flexBasis:flexBasis,width:width,height:height,minWidth:minWidth,minHeight:minHeight,paddingTop:paddingTop,paddingBottom:paddingBottom,paddingRight:paddingRight,paddingLeft:paddingLeft,marginLeft:marginLeft,marginRight:marginRight,marginTop:marginTop,marginBottom:marginBottom,overflow:overflow,pointerEvents:'auto'}],__source:{fileName:_jsxFileName,lineNumber:54}}),content,_react.default.createElement(_reactNative.View,{WRAPPER:true,style:[!!content||stretchContainer?styles.stretchToContent:{},{pointerEvents:'none',justifyContent:justifyContent,alignItems:alignItems,alignContent:alignContent,flexDirection:flexDirection,flexWrap:flexWrap}],__source:{fileName:_jsxFileName,lineNumber:76}},children));}}]);return BaseHolder;}(_react.default.Component);exports.default=BaseHolder;var styles=_reactNative.StyleSheet.create({base:{minHeight:10},stretchToContent:{position:'absolute',top:0,left:0,bottom:0,right:0},contentWrapper:{},selected:{borderWidth:1,borderColor:'#f28d8d',shadowColor:"rgba(250,10,0,0.81)",shadowOffset:{width:0,height:4},shadowOpacity:0.30,shadowRadius:4.65,elevation:8}});BaseHolder.Inputs={minWidth:new _Types.default.Integer(),minHeight:new _Types.default.Integer(),width:new _Types.default.Integer(),height:new _Types.default.Integer(),paddingTop:new _Types.default.Integer(),paddingBottom:new _Types.default.Integer(),paddingLeft:new _Types.default.Integer(),paddingRight:new _Types.default.Integer(),marginTop:new _Types.default.Integer(),marginBottom:new _Types.default.Integer(),marginLeft:new _Types.default.Integer(),marginRight:new _Types.default.Integer(),stretchContainer:new _Types.default.Bool().default(false),overflow:new _Types.default.Text().default('visible'),justifyContent:new _Types.default.Text().default("flex-start"),alignItems:new _Types.default.Text(),alignContent:new _Types.default.Text(),flexDirection:new _Types.default.Text(),flexWrap:new _Types.default.Text(),alignSelf:new _Types.default.Text(),flexGrow:new _Types.default.Real(),flexShrink:new _Types.default.Real(),flexBasis:new _Types.default.Real()};