@@ -31,10 +31,8 @@ var Page = (function (_super) {
3131 _super . apply ( this , arguments ) ;
3232 }
3333 Page . prototype . render = function ( ) {
34- var _a = this . props , page = _a . page , tasks = _a . tasks , taskPosition = _a . taskPosition , hintPosition = _a . hintPosition , testRun = _a . testRun , progress = _a . progress , pagePosition = _a . pagePosition ;
35- var task = taskPosition <= tasks . length ? tasks [ taskPosition ] : null ;
36- var completed = progress . pages [ pagePosition ] ;
37- return ( React . createElement ( "section" , { style : styles , className : 'cr-page' } , React . createElement ( index_1 . ContentCard , { title : page . title , content : page . description } ) , React . createElement ( Tasks_1 . default , { tasks : tasks , taskPosition : taskPosition , testRun : testRun , completed : completed , page : page } ) , React . createElement ( PageToolbar_1 . default , { tasks : tasks , taskPosition : taskPosition } , React . createElement ( Hints_1 . default , { task : task , hintPosition : hintPosition } ) , React . createElement ( ProgressBar_1 . default , { taskLength : tasks . length , taskPosition : taskPosition , completed : completed } ) ) ) ) ;
34+ var _a = this . props , page = _a . page , tasks = _a . tasks , taskPosition = _a . taskPosition , hintPosition = _a . hintPosition , testRun = _a . testRun , progress = _a . progress , pagePosition = _a . pagePosition , completed = _a . completed , task = _a . task , visibleTasks = _a . visibleTasks , taskProgress = _a . taskProgress ;
35+ return ( React . createElement ( "section" , { style : styles , className : 'cr-page' } , React . createElement ( index_1 . ContentCard , { title : page . title , content : page . description } ) , React . createElement ( Tasks_1 . default , { tasks : tasks . slice ( 0 , taskPosition + 1 ) , taskPosition : taskPosition , testRun : testRun , completed : completed , page : page } ) , React . createElement ( PageToolbar_1 . default , { tasks : tasks , taskPosition : taskPosition } , React . createElement ( Hints_1 . default , { task : task , hintPosition : hintPosition } ) , React . createElement ( ProgressBar_1 . default , { taskProgress : taskProgress , completed : completed } ) ) ) ) ;
3836 } ;
3937 Page = __decorate ( [
4038 react_redux_1 . connect ( function ( state ) { return ( {
@@ -45,6 +43,9 @@ var Page = (function (_super) {
4543 taskPosition : state . taskPosition ,
4644 hintPosition : state . hintPosition ,
4745 pagePosition : state . pagePosition ,
46+ completed : selectors_1 . pageCompletedSelector ( state ) ,
47+ task : selectors_1 . taskSelector ( state ) ,
48+ taskProgress : selectors_1 . taskProgressSelector ( state ) ,
4849 } ) ; } ) ,
4950 __metadata ( 'design:paramtypes' , [ ] )
5051 ] , Page ) ;
0 commit comments