@@ -95,60 +95,30 @@ var default_1 = (function (_super) {
9595 var taskPosition = this . props . taskPosition ;
9696 var currentTask = taskPosition <= tasks . length ? tasks [ taskPosition ] : null ;
9797 var allComplete = taskPosition >= tasks . length ;
98- return ( React . createElement ( material_ui_1 . Paper , { style : style , zDepth : 1 , className : 'cr-page' } ,
99- React . createElement ( material_ui_1 . Card , null ,
100- React . createElement ( material_ui_1 . CardHeader , { title : page . title , subtitle : page . description } ) ,
101- React . createElement ( material_ui_1 . CardText , null ,
102- React . createElement ( _components_1 . MarkdownText , { text : page . explanation } )
103- ) ) ,
104- React . createElement ( material_ui_1 . Divider , null ) ,
105- React . createElement ( material_ui_1 . List , { subheader : 'Tasks' , className : 'cr-tasks' , ref : 'tasks' } , tasks . map ( function ( task , index ) {
106- var isCurrentTask = index === taskPosition ;
107- var isDisabledTask = index > taskPosition ;
108- var isCompletedTask = index < taskPosition ;
109- var isFinalTask = index >= tasks . length - 1 ;
110- var hints = _this . hintsShown ( task ) ;
111- return ( React . createElement ( "div" , null ,
112- React . createElement ( material_ui_1 . ListItem , { ref : 'task' + index , className : classNames ( {
113- 'cr-task' : true ,
114- 'isCompletedTask' : isCompletedTask ,
115- 'isCurrentTask' : isCurrentTask ,
116- 'isDisabledTask' : isDisabledTask
117- } ) } ,
118- React . createElement ( "span" , { className : 'cr-task-checkbox' } , _this . getIcon ( index , taskPosition ) ) ,
119- React . createElement ( "span" , { className : 'cr-task-index' } ,
120- index + 1 ,
121- "." ) ,
122- React . createElement ( "div" , { className : 'cr-task-description' } ,
123- React . createElement ( _components_1 . MarkdownText , { text : task . description } )
124- ) ) ,
125- isCurrentTask && hints ?
126- hints . map ( function ( hint , indexHint ) {
127- return React . createElement ( material_ui_1 . ListItem , { className : 'cr-task-hint' , ref : 'hint' + indexHint } ,
128- React . createElement ( "div" , { class : 'cr-task-hint-box' } ,
129- React . createElement ( "span" , { className : 'cr-task-hint-index' } ,
130- indexHint + 1 ,
131- "." ) ,
132- React . createElement ( "div" , { className : 'cr-task-hint-description' } ,
133- React . createElement ( _components_1 . MarkdownText , { text : hint } )
134- ) )
135- ) ;
136- } )
137- : null ,
138- isFinalTask ? null : React . createElement ( material_ui_1 . Divider , null ) ) ) ;
139- } ) ) ,
140- React . createElement ( "section" , { className : 'cr-page-toolbar' } ,
141- React . createElement ( material_ui_1 . LinearProgress , { mode : 'determinate' , value : taskProgress ( taskPosition , tasks . length ) , style : { height : '6px' } } ) ,
142- React . createElement ( material_ui_1 . Toolbar , null ,
143- currentTask && currentTask . hints && currentTask . hints . length ?
144- React . createElement ( material_ui_1 . ToolbarGroup , { float : 'left' } , this . state . hintPos <= currentTask . hints . length - 2 ?
145- React . createElement ( material_ui_1 . FlatButton , { className : 'cr-task-showHint' , icon : React . createElement ( InfoOutline , null ) , onClick : this . displayHint . bind ( this , currentTask ) } )
146- : React . createElement ( material_ui_1 . FlatButton , { className : 'cr-task-showHint-disabled' , icon : React . createElement ( Info , null ) , disabled : true } ) )
147- : null ,
148- React . createElement ( material_ui_1 . ToolbarGroup , { float : 'right' } , allComplete ?
149- React . createElement ( material_ui_1 . RaisedButton , { label : 'Continue' , primary : true , onClick : this . props . callNextPage } )
150- :
151- React . createElement ( material_ui_1 . RaisedButton , { label : 'Run' , secondary : true , onClick : this . props . callRunTests } ) ) ) ) ) ) ;
98+ return ( React . createElement ( material_ui_1 . Paper , { style : style , zDepth : 1 , className : 'cr-page' } , React . createElement ( material_ui_1 . Card , null , React . createElement ( material_ui_1 . CardHeader , { title : page . title , subtitle : page . description } ) , React . createElement ( material_ui_1 . CardText , null , React . createElement ( _components_1 . MarkdownText , { text : page . explanation } ) ) ) , React . createElement ( material_ui_1 . Divider , null ) , React . createElement ( material_ui_1 . List , { subheader : 'Tasks' , className : 'cr-tasks' , ref : 'tasks' } , tasks . map ( function ( task , index ) {
99+ var isCurrentTask = index === taskPosition ;
100+ var isDisabledTask = index > taskPosition ;
101+ var isCompletedTask = index < taskPosition ;
102+ var isFinalTask = index >= tasks . length - 1 ;
103+ var hints = _this . hintsShown ( task ) ;
104+ return ( React . createElement ( "div" , null , React . createElement ( material_ui_1 . ListItem , { ref : 'task' + index , className : classNames ( {
105+ 'cr-task' : true ,
106+ 'isCompletedTask' : isCompletedTask ,
107+ 'isCurrentTask' : isCurrentTask ,
108+ 'isDisabledTask' : isDisabledTask
109+ } ) } , React . createElement ( "span" , { className : 'cr-task-checkbox' } , _this . getIcon ( index , taskPosition ) ) , React . createElement ( "span" , { className : 'cr-task-index' } , index + 1 , "." ) , React . createElement ( "div" , { className : 'cr-task-description' } , React . createElement ( _components_1 . MarkdownText , { text : task . description } ) ) ) , isCurrentTask && hints ?
110+ hints . map ( function ( hint , indexHint ) {
111+ return React . createElement ( material_ui_1 . ListItem , { className : 'cr-task-hint' , ref : 'hint' + indexHint } , React . createElement ( "div" , { class : 'cr-task-hint-box' } , React . createElement ( "span" , { className : 'cr-task-hint-index' } , indexHint + 1 , "." ) , React . createElement ( "div" , { className : 'cr-task-hint-description' } , React . createElement ( _components_1 . MarkdownText , { text : hint } ) ) ) ) ;
112+ } )
113+ : null , isFinalTask ? null : React . createElement ( material_ui_1 . Divider , null ) ) ) ;
114+ } ) ) , React . createElement ( "section" , { className : 'cr-page-toolbar' } , React . createElement ( material_ui_1 . LinearProgress , { mode : 'determinate' , value : taskProgress ( taskPosition , tasks . length ) , style : { height : '6px' } } ) , React . createElement ( material_ui_1 . Toolbar , null , currentTask && currentTask . hints && currentTask . hints . length ?
115+ React . createElement ( material_ui_1 . ToolbarGroup , { float : 'left' } , this . state . hintPos <= currentTask . hints . length - 2 ?
116+ React . createElement ( material_ui_1 . FlatButton , { className : 'cr-task-showHint' , icon : React . createElement ( InfoOutline , null ) , onClick : this . displayHint . bind ( this , currentTask ) } )
117+ : React . createElement ( material_ui_1 . FlatButton , { className : 'cr-task-showHint-disabled' , icon : React . createElement ( Info , null ) , disabled : true } ) )
118+ : null , React . createElement ( material_ui_1 . ToolbarGroup , { float : 'right' } , allComplete ?
119+ React . createElement ( material_ui_1 . RaisedButton , { label : 'Continue' , primary : true , onClick : this . props . callNextPage } )
120+ :
121+ React . createElement ( material_ui_1 . RaisedButton , { label : 'Run' , secondary : true , onClick : this . props . callRunTests } ) ) ) ) ) ) ;
152122 } ;
153123 default_1 = __decorate ( [
154124 react_redux_1 . connect ( null , function ( dispatch , state ) {
0 commit comments