@@ -4,11 +4,23 @@ var __extends = (this && this.__extends) || function (d, b) {
44 function __ ( ) { this . constructor = d ; }
55 d . prototype = b === null ? Object . create ( b ) : ( __ . prototype = b . prototype , new __ ( ) ) ;
66} ;
7+ var __decorate = ( this && this . __decorate ) || function ( decorators , target , key , desc ) {
8+ var c = arguments . length , r = c < 3 ? target : desc === null ? desc = Object . getOwnPropertyDescriptor ( target , key ) : desc , d ;
9+ if ( typeof Reflect === "object" && typeof Reflect . decorate === "function" ) r = Reflect . decorate ( decorators , target , key , desc ) ;
10+ else for ( var i = decorators . length - 1 ; i >= 0 ; i -- ) if ( d = decorators [ i ] ) r = ( c < 3 ? d ( r ) : c > 3 ? d ( target , key , r ) : d ( target , key ) ) || r ;
11+ return c > 3 && r && Object . defineProperty ( target , key , r ) , r ;
12+ } ;
13+ var __metadata = ( this && this . __metadata ) || function ( k , v ) {
14+ if ( typeof Reflect === "object" && typeof Reflect . metadata === "function" ) return Reflect . metadata ( k , v ) ;
15+ } ;
16+ var _this = this ;
717var React = require ( 'react' ) ;
18+ var react_redux_1 = require ( 'react-redux' ) ;
819var Stepper_1 = require ( 'material-ui/Stepper' ) ;
920var index_1 = require ( '../../index' ) ;
1021var AddButton_1 = require ( '../AddButton' ) ;
1122var task_object_1 = require ( './task-object' ) ;
23+ var actions_1 = require ( '../../../actions' ) ;
1224var TaskActions = ( function ( _super ) {
1325 __extends ( TaskActions , _super ) ;
1426 function TaskActions ( props ) {
@@ -19,12 +31,20 @@ var TaskActions = (function (_super) {
1931 }
2032 TaskActions . prototype . render = function ( ) {
2133 var _this = this ;
22- var actions = this . props . actions ;
34+ var _a = this . props , actions = _a . actions , addAction = _a . addAction ;
2335 var stepIndex = this . state . stepIndex ;
2436 var actionList = actions . map ( function ( a ) { return task_object_1 . default ( a ) ; } ) ;
2537 return ( React . createElement ( Stepper_1 . Stepper , { activeStep : stepIndex , linear : false , orientation : 'vertical' } , actionList . map ( function ( a , index ) { return ( React . createElement ( Stepper_1 . Step , null , React . createElement ( Stepper_1 . StepButton , { onClick : function ( ) { return _this . setState ( { stepIndex : index } ) ; } } , a . action + ( a . singleLine ? ' ' + a . content : '' ) ) , React . createElement ( Stepper_1 . StepContent , null , a . singleLine ? ''
26- : React . createElement ( index_1 . Markdown , null , '```js\n' + a . content + '\n```' ) ) ) ) ; } ) , React . createElement ( AddButton_1 . default , null ) ) ) ;
38+ : React . createElement ( index_1 . Markdown , null , '```js\n' + a . content + '\n```' ) ) ) ) ; } ) , React . createElement ( AddButton_1 . default , { callback : addAction . bind ( this , 'test(`test`)' ) } ) ) ) ;
2739 } ;
40+ TaskActions = __decorate ( [
41+ react_redux_1 . connect ( null , function ( dispatch ) {
42+ return {
43+ addAction : function ( actionString ) { return dispatch ( actions_1 . tutorialActionAdd ( _this . props . taskPosition , actionString ) ) ; }
44+ } ;
45+ } ) ,
46+ __metadata ( 'design:paramtypes' , [ Object ] )
47+ ] , TaskActions ) ;
2848 return TaskActions ;
2949} ( React . Component ) ) ;
3050Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
0 commit comments