@@ -53,7 +53,6 @@ var TaskActions = (function (_super) {
5353 } ) ;
5454 } ;
5555 TaskActions . prototype . handleText = function ( event ) {
56- console . log ( event ) ;
5756 this . setState ( {
5857 stepIndex : this . state . stepIndex ,
5958 as : {
@@ -64,22 +63,15 @@ var TaskActions = (function (_super) {
6463 } ;
6564 TaskActions . prototype . render = function ( ) {
6665 var _this = this ;
67- var _a = this . props , actions = _a . actions , addAction = _a . addAction , markdownOpen = _a . markdownOpen ;
66+ var _a = this . props , actions = _a . actions , tutorialActionAdd = _a . tutorialActionAdd , editorMarkdownOpen = _a . editorMarkdownOpen ;
6867 var stepIndex = this . state . stepIndex ;
6968 var actionList = actions . map ( function ( a ) { return task_object_1 . default ( a ) ; } ) ;
7069 return ( React . createElement ( "section" , null , React . createElement ( Stepper_1 . Stepper , { activeStep : stepIndex , linear : false , orientation : 'vertical' } , actionList . map ( function ( a , index ) { return ( React . createElement ( Stepper_1 . Step , { key : index } , React . createElement ( Stepper_1 . StepButton , { onClick : function ( ) { return _this . setState ( {
7170 stepIndex : index , as : _this . state . as } ) ; } } , a . action + ( a . singleLine ? ' ' + a . content : '' ) ) , React . createElement ( Stepper_1 . StepContent , null , a . singleLine ? ''
72- : React . createElement ( "div" , { onClick : markdownOpen . bind ( _this , a . content ) } , React . createElement ( index_1 . Markdown , null , '```js\n' + a . content + '\n```' ) ) ) ) ) ; } ) ) , React . createElement ( "span" , { style : styles . form } , React . createElement ( SelectField_1 . default , { value : this . state . as . action , onChange : this . handleSelect . bind ( this ) , style : styles . select } , React . createElement ( MenuItem_1 . default , { key : 'open' , value : 'open' , primaryText : 'open' } ) , React . createElement ( MenuItem_1 . default , { key : 'set' , value : 'set' , primaryText : 'set' } ) , React . createElement ( MenuItem_1 . default , { key : 'insert' , value : 'insert' , primaryText : 'insert' } ) ) , React . createElement ( TextField_1 . default , { hintText : 'Content' , value : this . state . as . content , onChange : this . handleText . bind ( this ) } ) ) ) ) ;
71+ : React . createElement ( "div" , { onClick : editorMarkdownOpen . bind ( _this , a . content , null ) } , React . createElement ( index_1 . Markdown , null , '```js\n' + a . content + '\n```' ) ) ) ) ) ; } ) ) , React . createElement ( "span" , { style : styles . form } , React . createElement ( SelectField_1 . default , { value : this . state . as . action , onChange : this . handleSelect . bind ( this ) , style : styles . select } , React . createElement ( MenuItem_1 . default , { key : 'open' , value : 'open' , primaryText : 'open' } ) , React . createElement ( MenuItem_1 . default , { key : 'set' , value : 'set' , primaryText : 'set' } ) , React . createElement ( MenuItem_1 . default , { key : 'insert' , value : 'insert' , primaryText : 'insert' } ) ) , React . createElement ( TextField_1 . default , { hintText : 'Content' , value : this . state . as . content , onChange : this . handleText . bind ( this ) } ) ) ) ) ;
7372 } ;
7473 TaskActions = __decorate ( [
75- react_redux_1 . connect ( null , function ( dispatch ) { return ( {
76- addAction : function ( actionString ) {
77- dispatch ( actions_1 . tutorialActionAdd ( this . props . taskPosition , actionString ) ) ;
78- } ,
79- markdownOpen : function ( content ) {
80- dispatch ( actions_1 . editorMarkdownOpen ( null , content ) ) ;
81- } ,
82- } ) ; } ) ,
74+ react_redux_1 . connect ( null , { tutorialActionAdd : actions_1 . tutorialActionAdd , editorMarkdownOpen : actions_1 . editorMarkdownOpen } ) ,
8375 __metadata ( 'design:paramtypes' , [ Object ] )
8476 ] , TaskActions ) ;
8577 return TaskActions ;
0 commit comments