@@ -77,6 +77,8 @@ var _Terrain = _interopRequireDefault(require("@material-ui/icons/Terrain"));
7777
7878var _History = _interopRequireDefault ( require ( "@material-ui/icons/History" ) ) ;
7979
80+ var _InfoOutlined = _interopRequireDefault ( require ( "@material-ui/icons/InfoOutlined" ) ) ;
81+
8082var _MyLocation = _interopRequireDefault ( require ( "@material-ui/icons/MyLocation" ) ) ;
8183
8284var _NotInterested = _interopRequireDefault ( require ( "@material-ui/icons/NotInterested" ) ) ;
@@ -131,8 +133,6 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
131133
132134function _extends ( ) { _extends = Object . assign || function ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] ; for ( var key in source ) { if ( Object . prototype . hasOwnProperty . call ( source , key ) ) { target [ key ] = source [ key ] ; } } } return target ; } ; return _extends . apply ( this , arguments ) ; }
133135
134- function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
135-
136136var ucWord = function ucWord ( word ) {
137137 return "" . concat ( word . slice ( 0 , 1 ) ) . concat ( word . slice ( 1 ) . toLowerCase ( ) ) ;
138138} ;
@@ -152,8 +152,6 @@ var ICON_SVGS = {
152152*/
153153
154154var useStyles = ( 0 , _styles . makeStyles ) ( function ( theme ) {
155- var _siteCard ;
156-
157155 return {
158156 root : {
159157 flexGrow : 1 ,
@@ -199,15 +197,12 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
199197 alignContent : 'flex-start' ,
200198 flexFlow : 'row wrap'
201199 } ,
202- siteCard : ( _siteCard = {
200+ siteCard : {
201+ width : '100%' ,
203202 padding : theme . spacing ( 1.5 , 2 , 1.5 , 2 ) ,
204203 backgroundColor : theme . palette . grey [ 50 ] ,
205204 marginTop : theme . spacing ( 3 )
206- } , _defineProperty ( _siteCard , theme . breakpoints . up ( 'lg' ) , {
207- marginRight : theme . spacing ( 3 )
208- } ) , _defineProperty ( _siteCard , theme . breakpoints . down ( 'md' ) , {
209- width : '100%'
210- } ) , _siteCard ) ,
205+ } ,
211206 siteTitleContainer : {
212207 display : 'flex' ,
213208 justifyContent : 'space-between' ,
@@ -240,17 +235,24 @@ var useStyles = (0, _styles.makeStyles)(function (theme) {
240235 } ,
241236 positionsTitleContainer : {
242237 display : 'flex' ,
243- justifyContent : 'space-between' ,
244- alignItems : 'center'
238+ justifyContent : 'flex-start' ,
239+ alignItems : 'center' ,
240+ marginTop : theme . spacing ( 2 )
241+ } ,
242+ positionsCardContainer : {
243+ display : 'flex' ,
244+ justifyContent : 'flex-start' ,
245+ alignItems : 'flex-start' ,
246+ flexWrap : 'wrap'
245247 } ,
246248 positionCard : {
247249 display : 'flex' ,
248250 alignItems : 'center' ,
249251 justifyContent : 'flex-start' ,
250252 padding : theme . spacing ( 0.5 , 2 , 0.5 , 0.5 ) ,
251- width : '100%' ,
252253 backgroundColor : theme . palette . grey [ 100 ] ,
253- marginTop : theme . spacing ( 1.5 )
254+ marginTop : theme . spacing ( 1.5 ) ,
255+ marginRight : theme . spacing ( 3 )
254256 } ,
255257 startFlex : {
256258 display : 'flex' ,
@@ -378,6 +380,8 @@ var OptionDefaultProps = {
378380 innerRef : null ,
379381 isDisabled : false
380382} ;
383+ var positionsDescription = "\n Positions are distinct physical sensor locations at a given site. The x, y, and z coordinates\n describe where the sensor is located relative to the ground-level reference point for the site.\n Positions may change over time.\n" ;
384+ var positionsSeriesDescription = "\n Each position selected will become a distinct series in the chart for each variable (example: 2\n positions \xD7 3 variables = 6 distinct series).\n" ;
381385/**
382386 PositionHistoryButton - button that opens a dialog to show all history for a given position
383387*/
@@ -432,7 +436,7 @@ function PositionHistoryButton(props) {
432436 id : "position-history-dialog-description" ,
433437 tabIndex : - 1 ,
434438 variant : "body2"
435- } , "Positions are distinct physical sensor locations at a given site. The x, y, and z coordinates describe where the sensor is located relative to the ground-level reference point for the site. Positions may change over time. The table below shows changes to the physical location of this position since its creation." ) , /*#__PURE__*/ _react . default . createElement ( _TableContainer . default , null , /*#__PURE__*/ _react . default . createElement ( _Table . default , {
439+ } , "" . concat ( positionsDescription , " The table below shows changes to the physical location of this position since its creation.") ) , /*#__PURE__*/ _react . default . createElement ( _TableContainer . default , null , /*#__PURE__*/ _react . default . createElement ( _Table . default , {
436440 className : classes . table ,
437441 "aria-label" : "simple table"
438442 } , /*#__PURE__*/ _react . default . createElement ( _TableHead . default , null , /*#__PURE__*/ _react . default . createElement ( _TableRow . default , {
@@ -615,7 +619,11 @@ function PositionDetail(props) {
615619 } ) , /*#__PURE__*/ _react . default . createElement ( _Typography . default , {
616620 variant : "body2" ,
617621 style : _extends ( { } , fadeStyle )
618- } , "" . concat ( elevation , "m" ) ) ) ) , /*#__PURE__*/ _react . default . createElement ( "div" , null , /*#__PURE__*/ _react . default . createElement ( _Typography . default , {
622+ } , "" . concat ( elevation , "m" ) ) ) ) , /*#__PURE__*/ _react . default . createElement ( "div" , {
623+ style : {
624+ marginRight : _Theme . default . spacing ( 3 )
625+ }
626+ } , /*#__PURE__*/ _react . default . createElement ( _Typography . default , {
619627 variant : "body2"
620628 } , /*#__PURE__*/ _react . default . createElement ( "span" , {
621629 style : _extends ( { } , axisStyle )
@@ -625,7 +633,6 @@ function PositionDetail(props) {
625633 style : _extends ( { } , axisStyle )
626634 } , "z:" ) , "" . concat ( zOffset , "m" ) ) ) , /*#__PURE__*/ _react . default . createElement ( "div" , {
627635 style : {
628- flexGrow : 1 ,
629636 textAlign : 'right'
630637 }
631638 } , /*#__PURE__*/ _react . default . createElement ( PositionHistoryButton , {
@@ -666,6 +673,7 @@ function SelectedPosition(props) {
666673 "aria-label" : "remove position " . concat ( position , " from " ) . concat ( siteCode ) ,
667674 disabled : disabled ,
668675 style : {
676+ marginLeft : _Theme . default . spacing ( 1 ) ,
669677 marginRight : _Theme . default . spacing ( 1 )
670678 } ,
671679 onClick : function onClick ( ) {
@@ -759,6 +767,9 @@ function SelectPositionsButton(props) {
759767 size : "small" ,
760768 variant : "outlined" ,
761769 startIcon : /*#__PURE__*/ _react . default . createElement ( _TouchApp . default , null ) ,
770+ style : {
771+ marginLeft : _Theme . default . spacing ( 4 )
772+ } ,
762773 onClick : function onClick ( ) {
763774 setLocalSelectedPositions ( selectedPositions ) ;
764775 setSelectDialogOpen ( true ) ;
@@ -801,7 +812,7 @@ function SelectPositionsButton(props) {
801812 id : "add-positions-dialog-description" ,
802813 tabIndex : - 1 ,
803814 variant : "body2"
804- } , "Positions are distinct physical sensor locations at a given site. The x, y, and z coordinates describe where the sensor is located relative to the ground-level reference point for the site. Each position selected will become a distinct series in the chart for each variable (example: 2 positions \xD7 3 variables = 6 distinct series)." ) , /*#__PURE__*/ _react . default . createElement ( _List . default , null , availablePositions . map ( function ( position ) {
815+ } , positionsDescription , /*#__PURE__*/ _react . default . createElement ( "br" , null ) , /*#__PURE__*/ _react . default . createElement ( "br" , null ) , positionsSeriesDescription ) , /*#__PURE__*/ _react . default . createElement ( _List . default , null , availablePositions . map ( function ( position ) {
805816 var labelId = "position-list-label-" . concat ( position ) ;
806817 return /*#__PURE__*/ _react . default . createElement ( _ListItem . default , {
807818 key : position ,
@@ -1121,17 +1132,28 @@ function SelectedSite(props) {
11211132 } , selectedSiteContent , positions . length ? /*#__PURE__*/ _react . default . createElement ( "div" , null , /*#__PURE__*/ _react . default . createElement ( "div" , {
11221133 className : classes . positionsTitleContainer
11231134 } , /*#__PURE__*/ _react . default . createElement ( _Typography . default , {
1124- variant : "h6"
1125- } , "Position(s):" ) , /*#__PURE__*/ _react . default . createElement ( SelectPositionsButton , {
1135+ variant : "subtitle2"
1136+ } , "Position(s)" ) , /*#__PURE__*/ _react . default . createElement ( _Tooltip . default , {
1137+ title : /*#__PURE__*/ _react . default . createElement ( _react . default . Fragment , null , positionsDescription , /*#__PURE__*/ _react . default . createElement ( "br" , null ) , /*#__PURE__*/ _react . default . createElement ( "br" , null ) , positionsSeriesDescription )
1138+ } , /*#__PURE__*/ _react . default . createElement ( _IconButton . default , {
1139+ size : "small" ,
1140+ style : {
1141+ marginLeft : _Theme . default . spacing ( 1 )
1142+ }
1143+ } , /*#__PURE__*/ _react . default . createElement ( _InfoOutlined . default , {
1144+ fontSize : "small"
1145+ } ) ) ) , /*#__PURE__*/ _react . default . createElement ( SelectPositionsButton , {
11261146 selectedSite : site
1127- } ) ) , positions . map ( function ( position ) {
1147+ } ) ) , /*#__PURE__*/ _react . default . createElement ( "div" , {
1148+ className : classes . positionsCardContainer
1149+ } , positions . map ( function ( position ) {
11281150 return /*#__PURE__*/ _react . default . createElement ( SelectedPosition , {
11291151 key : position ,
11301152 siteCode : siteCode ,
11311153 position : position ,
11321154 disabled : positions . length < 2
11331155 } ) ;
1134- } ) ) : /*#__PURE__*/ _react . default . createElement ( "div" , null , /*#__PURE__*/ _react . default . createElement ( "div" , {
1156+ } ) ) ) : /*#__PURE__*/ _react . default . createElement ( "div" , null , /*#__PURE__*/ _react . default . createElement ( "div" , {
11351157 className : classes . startFlex ,
11361158 style : {
11371159 alignItems : 'center'
0 commit comments