@@ -10,9 +10,9 @@ var _reactRedux = require("react-redux");
1010var _redux = require ( "redux" ) ;
1111var _classnames = _interopRequireDefault ( require ( "classnames" ) ) ;
1212var _propTypes = _interopRequireDefault ( require ( "prop-types" ) ) ;
13- var _styles = require ( "@material-ui/core/ styles" ) ;
14- var _Tooltip = _interopRequireDefault ( require ( "@material-ui/core /Tooltip" ) ) ;
15- var _AddLocationOutlined = _interopRequireDefault ( require ( "@material-ui /icons/AddLocationOutlined" ) ) ;
13+ var _withStyles = _interopRequireDefault ( require ( "@mui/ styles/withStyles" ) ) ;
14+ var _Tooltip = _interopRequireDefault ( require ( "@mui/material /Tooltip" ) ) ;
15+ var _AddLocationOutlined = _interopRequireDefault ( require ( "@mui /icons-material /AddLocationOutlined" ) ) ;
1616var _ui = require ( "../../actions/ui" ) ;
1717var _cfg = _interopRequireDefault ( require ( "../../helpers/cfg" ) ) ;
1818var _common = require ( "./common" ) ;
@@ -62,7 +62,8 @@ const Peak = _ref => {
6262 }
6363 }
6464 return /*#__PURE__*/ _react . default . createElement ( "span" , {
65- className : classes . group
65+ className : classes . group ,
66+ "data-testid" : "Peak"
6667 } , /*#__PURE__*/ _react . default . createElement ( _Tooltip . default , {
6768 title : /*#__PURE__*/ _react . default . createElement ( "span" , {
6869 className : "txt-sv-tp"
@@ -83,7 +84,7 @@ const Peak = _ref => {
8384 onClick : onSweepPeakDELETE
8485 } , /*#__PURE__*/ _react . default . createElement ( "span" , {
8586 className : ( 0 , _classnames . default ) ( classes . txt , 'txt-sv-bar-rmpeak' )
86- } , "P-" ) ) ) ) , /*#__PURE__*/ _react . default . createElement ( _Tooltip . default , {
87+ } , "P-" ) ) ) ) , ! disableSetRefSt ? /*#__PURE__*/ _react . default . createElement ( _Tooltip . default , {
8788 title : /*#__PURE__*/ _react . default . createElement ( "span" , {
8889 className : "txt-sv-tp"
8990 } , "Set Reference" )
@@ -93,7 +94,7 @@ const Peak = _ref => {
9394 onClick : onSweepAnchorShift
9495 } , /*#__PURE__*/ _react . default . createElement ( _AddLocationOutlined . default , {
9596 className : classes . icon
96- } ) ) ) ) ) ;
97+ } ) ) ) ) : null ) ;
9798} ;
9899const mapStateToProps = ( state , _ ) => (
99100// eslint-disable-line
@@ -102,7 +103,7 @@ const mapStateToProps = (state, _) => (
102103 disableAddPeakSt : _cfg . default . btnCmdAddPeak ( state . layout ) ,
103104 isFocusRmPeakSt : state . ui . sweepType === _list_ui . LIST_UI_SWEEP_TYPE . PEAK_DELETE || state . ui . sweepType === _list_ui . LIST_UI_SWEEP_TYPE . CYCLIC_VOLTA_RM_MAX_PEAK || state . ui . sweepType === _list_ui . LIST_UI_SWEEP_TYPE . CYCLIC_VOLTA_RM_MIN_PEAK ,
104105 disableRmPeakSt : _cfg . default . btnCmdRmPeak ( state . layout ) ,
105- isFocusSetRefSt : state . ui . sweepType === _list_ui . LIST_UI_SWEEP_TYPE . ANCHOR_SHIFT ,
106+ isFocusSetRefSt : state . ui . sweepType === _list_ui . LIST_UI_SWEEP_TYPE . ANCHOR_SHIFT || state . ui . sweepType === _list_ui . LIST_UI_SWEEP_TYPE . CYCLIC_VOLTA_SET_REF ,
106107 disableSetRefSt : _cfg . default . btnCmdSetRef ( state . layout ) ,
107108 isHandleMaxAndMinPeaksSt : ! _cfg . default . hidePanelCyclicVolta ( state . layout ) ,
108109 cyclicVotaSt : state . cyclicvolta ,
@@ -124,4 +125,4 @@ Peak.propTypes = {
124125 cyclicVotaSt : _propTypes . default . object . isRequired ,
125126 curveSt : _propTypes . default . object . isRequired
126127} ;
127- var _default = exports . default = ( 0 , _redux . compose ) ( ( 0 , _reactRedux . connect ) ( mapStateToProps , mapDispatchToProps ) , ( 0 , _styles . withStyles ) ( styles ) ) ( Peak ) ;
128+ var _default = exports . default = ( 0 , _redux . compose ) ( ( 0 , _reactRedux . connect ) ( mapStateToProps , mapDispatchToProps ) , ( 0 , _withStyles . default ) ( styles ) ) ( Peak ) ;
0 commit comments