@@ -4,10 +4,21 @@ 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+ } ;
716var React = require ( 'react' ) ;
8- var index_1 = require ( '../index' ) ;
17+ var react_redux_1 = require ( 'react-redux' ) ;
18+ var PageDescription_1 = require ( './PageDescription' ) ;
919var Tasks_1 = require ( './Tasks' ) ;
1020var Top_1 = require ( '../TopPanel/Top' ) ;
21+ var actions_1 = require ( '../../actions' ) ;
1122var styles = {
1223 width : '100%' ,
1324 overflowY : 'scroll' ,
@@ -24,13 +35,21 @@ var Page = (function (_super) {
2435 Top_1 . default . toggle ( false ) ;
2536 } ;
2637 Page . prototype . render = function ( ) {
27- var _a = this . props , tutorial = _a . tutorial , pagePosition = _a . pagePosition , packageJson = _a . packageJson ;
38+ var _a = this . props , tutorial = _a . tutorial , pagePosition = _a . pagePosition , packageJson = _a . packageJson , markdownOpen = _a . markdownOpen ;
2839 var page = tutorial . pages [ pagePosition ] ;
2940 if ( ! page ) {
3041 return null ;
3142 }
32- return ( React . createElement ( "section" , { style : styles , className : 'cr-page' } , React . createElement ( index_1 . ContentCard , { title : page . title , content : page . description , open : true } ) , React . createElement ( Tasks_1 . default , { tasks : page . tasks , page : page , config : packageJson . config , pagePosition : pagePosition } ) ) ) ;
43+ return ( React . createElement ( "section" , { style : styles , className : 'cr-page' } , React . createElement ( PageDescription_1 . default , { title : page . title , content : page . description , open : true , click : markdownOpen . bind ( this ) } ) , React . createElement ( Tasks_1 . default , { tasks : page . tasks , page : page , config : packageJson . config , pagePosition : pagePosition } ) ) ) ;
3344 } ;
45+ Page = __decorate ( [
46+ react_redux_1 . connect ( null , function ( dispatch ) {
47+ return {
48+ markdownOpen : function ( content ) { return dispatch ( actions_1 . editorMarkdownOpen ( null , content ) ) ; }
49+ } ;
50+ } ) ,
51+ __metadata ( 'design:paramtypes' , [ ] )
52+ ] , Page ) ;
3453 return Page ;
3554} ( React . Component ) ) ;
3655Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
0 commit comments