@@ -93,63 +93,30 @@ var default_1 = (function (_super) {
9393 var tasks = visibleTasks ( this . props . tasks , taskPosition ) ;
9494 var currentTask = taskPosition <= tasks . length ? tasks [ taskPosition ] : null ;
9595 var allComplete = taskPosition >= tasks . length ;
96- return ( React . createElement ( material_ui_2 . Paper , { style : style , zDepth : 1 , className : 'cr-page' } ,
97- React . createElement ( content_1 . default , { page : page } ) ,
98- React . createElement ( material_ui_1 . Divider , null ) ,
99- React . createElement ( material_ui_1 . List , { subheader : 'Tasks' , className : 'cr-tasks' , ref : 'tasks' } ,
100- tasks . map ( function ( task , index ) {
101- var isCurrentTask = index === taskPosition ;
102- var isDisabledTask = index > taskPosition ;
103- var isCompletedTask = index < taskPosition ;
104- var isFinalTask = index >= tasks . length - 1 ;
105- var hints = hintsShown ( task , hintPosition ) ;
106- return ( React . createElement ( "div" , null ,
107- React . createElement ( material_ui_1 . ListItem , { ref : 'task' + index , className : classnames ( {
108- 'cr-task' : true ,
109- 'isCompletedTask' : isCompletedTask ,
110- 'isCurrentTask' : isCurrentTask ,
111- 'isDisabledTask' : isDisabledTask
112- } ) } ,
113- React . createElement ( TaskCheckbox , { index : index , taskPosition : taskPosition , runTests : _this . props . runTests } ) ,
114- React . createElement ( "span" , { className : 'cr-task-index' } ,
115- index + 1 ,
116- "." ) ,
117- React . createElement ( "div" , { className : 'cr-task-description' } ,
118- React . createElement ( _components_1 . MarkdownText , { text : task . description } )
119- ) ) ,
120- isCurrentTask && hints ?
121- hints . map ( function ( hint , indexHint ) {
122- return React . createElement ( material_ui_1 . ListItem , { className : 'cr-task-hint' , ref : 'hint' + indexHint } ,
123- React . createElement ( "div" , { class : 'cr-task-hint-box' } ,
124- React . createElement ( "span" , { className : 'cr-task-hint-index' } ,
125- indexHint + 1 ,
126- "." ) ,
127- React . createElement ( "div" , { className : 'cr-task-hint-description' } ,
128- React . createElement ( _components_1 . MarkdownText , { text : hint } )
129- ) )
130- ) ;
131- } )
132- : null ,
133- isFinalTask ? null : React . createElement ( material_ui_1 . Divider , null ) ) ) ;
134- } ) ,
135- page . completed && ! ! page . onPageComplete ? React . createElement ( material_ui_1 . ListItem , { className : 'cr-task-onComplete' , ref : 'onPageComplete' } ,
136- React . createElement ( "div" , { className : 'cr-task-onComplete-description' } ,
137- React . createElement ( _components_1 . MarkdownText , { text : page . onPageComplete } )
138- )
139- ) : null ,
140- React . createElement ( "div" , { ref : 'listEnd' } ) ) ,
141- React . createElement ( "section" , { className : 'cr-page-toolbar' } ,
142- React . createElement ( material_ui_2 . LinearProgress , { mode : 'determinate' , value : taskProgress ( taskPosition , tasks . length ) , style : { height : '6px' } } ) ,
143- React . createElement ( material_ui_2 . Toolbar , null ,
144- currentTask && currentTask . hints && currentTask . hints . length ?
145- React . createElement ( material_ui_2 . ToolbarGroup , { float : 'left' } , hintPosition <= currentTask . hints . length - 2 ?
146- React . createElement ( material_ui_2 . FlatButton , { className : 'cr-task-showHint' , icon : React . createElement ( InfoOutline , null ) , onClick : this . displayHint . bind ( this , currentTask ) } )
147- : React . createElement ( material_ui_2 . FlatButton , { className : 'cr-task-showHint-disabled' , icon : React . createElement ( Info , null ) , disabled : true } ) )
148- : null ,
149- React . createElement ( material_ui_2 . ToolbarGroup , { float : 'right' } , allComplete ?
150- React . createElement ( material_ui_2 . RaisedButton , { label : 'Continue' , primary : true , onClick : this . props . callNextPage } )
151- :
152- React . createElement ( material_ui_2 . RaisedButton , { label : 'Run' , secondary : true , onClick : this . props . callRunTests } ) ) ) ) ) ) ;
96+ return ( React . createElement ( material_ui_2 . Paper , { style : style , zDepth : 1 , className : 'cr-page' } , React . createElement ( content_1 . default , { page : page } ) , 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 ) {
97+ var isCurrentTask = index === taskPosition ;
98+ var isDisabledTask = index > taskPosition ;
99+ var isCompletedTask = index < taskPosition ;
100+ var isFinalTask = index >= tasks . length - 1 ;
101+ var hints = hintsShown ( task , hintPosition ) ;
102+ return ( React . createElement ( "div" , null , React . createElement ( material_ui_1 . ListItem , { ref : 'task' + index , className : classnames ( {
103+ 'cr-task' : true ,
104+ 'isCompletedTask' : isCompletedTask ,
105+ 'isCurrentTask' : isCurrentTask ,
106+ 'isDisabledTask' : isDisabledTask
107+ } ) } , React . createElement ( TaskCheckbox , { index : index , taskPosition : taskPosition , runTests : _this . props . runTests } ) , 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 ?
108+ hints . map ( function ( hint , indexHint ) {
109+ 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 } ) ) ) ) ;
110+ } )
111+ : null , isFinalTask ? null : React . createElement ( material_ui_1 . Divider , null ) ) ) ;
112+ } ) , page . completed && ! ! page . onPageComplete ? React . createElement ( material_ui_1 . ListItem , { className : 'cr-task-onComplete' , ref : 'onPageComplete' } , React . createElement ( "div" , { className : 'cr-task-onComplete-description' } , React . createElement ( _components_1 . MarkdownText , { text : page . onPageComplete } ) ) ) : null , React . createElement ( "div" , { ref : 'listEnd' } ) ) , React . createElement ( "section" , { className : 'cr-page-toolbar' } , React . createElement ( material_ui_2 . LinearProgress , { mode : 'determinate' , value : taskProgress ( taskPosition , tasks . length ) , style : { height : '6px' } } ) , React . createElement ( material_ui_2 . Toolbar , null , currentTask && currentTask . hints && currentTask . hints . length ?
113+ React . createElement ( material_ui_2 . ToolbarGroup , { float : 'left' } , hintPosition <= currentTask . hints . length - 2 ?
114+ React . createElement ( material_ui_2 . FlatButton , { className : 'cr-task-showHint' , icon : React . createElement ( InfoOutline , null ) , onClick : this . displayHint . bind ( this , currentTask ) } )
115+ : React . createElement ( material_ui_2 . FlatButton , { className : 'cr-task-showHint-disabled' , icon : React . createElement ( Info , null ) , disabled : true } ) )
116+ : null , React . createElement ( material_ui_2 . ToolbarGroup , { float : 'right' } , allComplete ?
117+ React . createElement ( material_ui_2 . RaisedButton , { label : 'Continue' , primary : true , onClick : this . props . callNextPage } )
118+ :
119+ React . createElement ( material_ui_2 . RaisedButton , { label : 'Run' , secondary : true , onClick : this . props . callRunTests } ) ) ) ) ) ) ;
153120 } ;
154121 default_1 = __decorate ( [
155122 react_redux_1 . connect ( null , function ( dispatch , state ) {
0 commit comments