Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5a977fc

Browse files
committed
repair typings
1 parent16b35dc commit5a977fc

File tree

16 files changed

+84
-86
lines changed

16 files changed

+84
-86
lines changed
Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +0,0 @@
1-
"use strict";
2-
varpath_1=require('path');
3-
varReact=require('react');
4-
varmode_edit_1=require('material-ui/svg-icons/editor/mode-edit');
5-
vareditStyle={
6-
position:'absolute',
7-
top:'10px',
8-
right:'10px',
9-
};
10-
varEditPage=function(_a){
11-
vartutorial=_a.tutorial;
12-
if(tutorial&&tutorial.edit&&tutorial.repo){
13-
varrepoPath=path_1.join(tutorial.repo,'edit','master',tutorial.repo);
14-
return(React.createElement("a",{href:repoPath},
15-
React.createElement(mode_edit_1.default,{style:editStyle})
16-
));
17-
}
18-
};
19-
Object.defineProperty(exports,"__esModule",{value:true});
20-
exports.default=EditPage;

‎lib/components/Page/Hints/HintButton.js‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ var __extends = (this && this.__extends) || function (d, b) {
55
d.prototype=b===null ?Object.create(b) :(__.prototype=b.prototype,new__());
66
};
77
varReact=require('react');
8-
varreact_redux_1=require('react-redux');
9-
varactions_1=require('../../../actions');
10-
varselectors_1=require('../../../selectors');
118
varFlatButton_1=require('material-ui/FlatButton');
129
varHintButton=(function(_super){
1310
__extends(HintButton,_super);
@@ -27,10 +24,5 @@ var HintButton = (function (_super) {
2724
};
2825
returnHintButton;
2926
}(React.Component));
30-
varmapStateToProps=function(state){return({
31-
hintPosition:state.hintPosition,
32-
hintsLength:selectors_1.hintsSelector(state).length,
33-
});};
34-
varmapDispatchToProps={hintPositionSet:actions_1.hintPositionSet};
3527
Object.defineProperty(exports,"__esModule",{value:true});
36-
exports.default=react_redux_1.connect(mapStateToProps,mapDispatchToProps)(HintButton);
28+
exports.default=HintButton;

‎lib/components/Page/Hints/index.js‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ var index_1 = require('../../index');
1111
varHintButton_1=require('./HintButton');
1212
varCard_1=require('material-ui/Card');
1313
varhelp_1=require('material-ui/svg-icons/action/help');
14+
varactions_1=require('../../../actions');
15+
varselectors_2=require('../../../selectors');
1416
varstyles={
1517
position:'relative',
1618
margin:'5px auto 10px',
@@ -23,23 +25,26 @@ var Hints = (function (_super) {
2325
_super.apply(this,arguments);
2426
}
2527
Hints.prototype.render=function(){
26-
varhint=this.props.hint;
28+
var_a=this.props,hint=_a.hint,hintPosition=_a.hintPosition,hintsLength=_a.hintsLength,hintPositionSet=_a.hintPositionSet;
2729
if(!hint){
2830
returnnull;
2931
}
3032
return(React.createElement(Card_1.Card,{style:styles},
3133
React.createElement(Card_1.CardHeader,{title:'Hints',avatar:React.createElement(help_1.default,null),actAsExpander:true,showExpandableButton:true}),
3234
React.createElement(Card_1.CardText,{className:'cr-task-hint',expandable:true},
33-
React.createElement(index_1.Markdown,null,hint)
35+
React.createElement(index_1.Markdown,{children:hint})
3436
),
3537
React.createElement(Card_1.CardActions,{style:{paddingBottom:'30px !important'},expandable:true,className:'cr-task-hints-actions'},
36-
React.createElement(HintButton_1.default,{type:'prev',label:'Previous'}),
37-
React.createElement(HintButton_1.default,{type:'next',label:'Next'}))));
38+
React.createElement(HintButton_1.default,{type:'prev',label:'Previous',hintPosition:hintPosition,hintsLength:hintsLength,hintPositionSet:hintPositionSet}),
39+
React.createElement(HintButton_1.default,{type:'next',label:'Next',hintPosition:hintPosition,hintsLength:hintsLength,hintPositionSet:hintPositionSet}))));
3840
};
3941
returnHints;
4042
}(React.Component));
4143
varmapStateToProps=function(state){return({
4244
hint:selectors_1.hintSelector(state),
45+
hintPosition:state.hintPosition,
46+
hintsLength:selectors_2.hintsSelector(state).length,
4347
});};
48+
varmapDispatchToProps={hintPositionSet:actions_1.hintPositionSet};
4449
Object.defineProperty(exports,"__esModule",{value:true});
45-
exports.default=react_redux_1.connect(mapStateToProps)(Hints);
50+
exports.default=react_redux_1.connect(mapStateToProps,mapDispatchToProps)(Hints);

‎lib/components/common/ContentCard.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var ContentCard = function (_a) {
1212
return(React.createElement(Card_1.Card,{style:styles.card},
1313
title ?React.createElement(Card_1.CardHeader,{title:title}) :null,
1414
React.createElement(Card_1.CardText,null,
15-
React.createElement(index_1.Markdown,null,content||'')
15+
React.createElement(index_1.Markdown,{children:content||''})
1616
)));
1717
};
1818
Object.defineProperty(exports,"__esModule",{value:true});

‎src/components/AppMenu/MenuLink/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const styles = {
1010
};
1111

1212
classMenuLinkextendsReact.Component<{
13-
route:string,title?:string,routeSet:any
13+
route:string,title?:string,routeSet?:any
1414
},{}>{
1515
publicrender(){
1616
const{route, title, routeSet}=this.props;
Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
import{join}from'path';
2-
import*asReactfrom'react';
1+
//import { join } from 'path';
2+
//import * as React from 'react';
33

4-
importModeEditfrom'material-ui/svg-icons/editor/mode-edit';
5-
importNavigationClosefrom'material-ui/svg-icons/navigation/close';
4+
//import ModeEdit from 'material-ui/svg-icons/editor/mode-edit';
5+
//import NavigationClose from 'material-ui/svg-icons/navigation/close';
66

7-
consteditStyle={
8-
position:'absolute',
9-
top:'10px',
10-
right:'10px',
11-
};
7+
//const editStyle = {
8+
// position: 'absolute',
9+
// top: '10px',
10+
// right: '10px',
11+
//};
1212

13-
constEditPage:React.StatelessComponent<{
14-
tutorial:Tutorial.Config
15-
}>=({tutorial})=>{
16-
if(tutorial&&tutorial.edit&&tutorial.repo){
17-
constrepoPath=join(tutorial.repo,'edit','master',tutorial.repo);
18-
return(
19-
<ahref={repoPath}>
20-
<ModeEditstyle={editStyle}/>
21-
</a>
22-
);
23-
}
24-
};
25-
exportdefaultEditPage;
13+
// class EditPage extends React.Component<{
14+
// tutorial: Tutorial.Config
15+
// }, {}> {
16+
// render() {
17+
// const { tutorial } = this.props;
18+
// if (tutorial && tutorial.edit && tutorial.repo) {
19+
// const repoPath = join(tutorial.repo, 'edit', 'master', tutorial.repo);
20+
// return (
21+
// <a href={repoPath}>
22+
// <ModeEdit style={editStyle}/>
23+
// </a>
24+
// );
25+
// }
26+
// }
27+
// };
28+
// export default EditPage;

‎src/components/Page/Hints/HintButton.tsx‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
import*asReactfrom'react';
2-
import{connect}from'react-redux';
3-
4-
import{hintPositionSet}from'../../../actions';
5-
import{hintsSelector}from'../../../selectors';
62
importFlatButtonfrom'material-ui/FlatButton';
73

84
classHintButtonextendsReact.Component<{
95
hintPosition:number,hintsLength:number,type:'next'|'prev',
106
label:string,hintPositionSet:any
117
},{}>{
12-
render(){
8+
publicrender():any{
139
const{hintPosition, hintsLength, label, type, hintPositionSet}=this.props;
1410
switch(type){
1511
case'next':
@@ -34,11 +30,5 @@ class HintButton extends React.Component<{
3430
}
3531
}
3632

37-
constmapStateToProps=state=>({
38-
hintPosition:state.hintPosition,
39-
hintsLength:hintsSelector(state).length,
40-
});
41-
42-
constmapDispatchToProps={hintPositionSet};
4333

44-
exportdefaultconnect(mapStateToProps,mapDispatchToProps)(HintButton);
34+
exportdefaultHintButton;

‎src/components/Page/Hints/index.tsx‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import HintButton from './HintButton';
77
import{Card,CardActions,CardHeader,CardText}from'material-ui/Card';
88
importHelpfrom'material-ui/svg-icons/action/help';
99

10+
import{hintPositionSet}from'../../../actions';
11+
import{hintsSelector}from'../../../selectors';
12+
1013
conststyles={
1114
position:'relative',
1215
margin:'5px auto 10px',
@@ -15,10 +18,10 @@ const styles = {
1518
};
1619

1720
classHintsextendsReact.Component<{
18-
hintsLength:number,hint:string
21+
hint:string,hintPosition:number,hintsLength:number,hintPositionSet:any,
1922
},{}>{
20-
publicrender(){
21-
const{hint}=this.props;
23+
render():any{
24+
const{hint, hintPosition, hintsLength, hintPositionSet}=this.props;
2225
if(!hint){
2326
returnnull;
2427
}
@@ -34,7 +37,7 @@ class Hints extends React.Component<{
3437
className='cr-task-hint'
3538
expandable={true}
3639
>
37-
<Markdown>{hint}</Markdown>
40+
<Markdownchildren={hint}/>
3841
</CardText>
3942
<CardActions
4043
style={{paddingBottom:'30px !important'}}
@@ -44,10 +47,16 @@ class Hints extends React.Component<{
4447
<HintButton
4548
type='prev'
4649
label='Previous'
50+
hintPosition={hintPosition}
51+
hintsLength={hintsLength}
52+
hintPositionSet={hintPositionSet}
4753
/>
4854
<HintButton
4955
type='next'
5056
label='Next'
57+
hintPosition={hintPosition}
58+
hintsLength={hintsLength}
59+
hintPositionSet={hintPositionSet}
5160
/>
5261
</CardActions>
5362
</Card>
@@ -57,6 +66,11 @@ class Hints extends React.Component<{
5766

5867
constmapStateToProps=state=>({
5968
hint:hintSelector(state),
69+
hintPosition:state.hintPosition,
70+
hintsLength:hintsSelector(state).length,
6071
});
6172

62-
exportdefaultconnect(mapStateToProps)(Hints);
73+
constmapDispatchToProps={hintPositionSet};
74+
75+
exportdefaultconnect(mapStateToProps,mapDispatchToProps)(Hints);
76+

‎src/components/common/ContentCard.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ContentCard: React.StatelessComponent<{
1515
<Cardstyle={styles.card}>
1616
{title ?<CardHeadertitle={title}/> :null}
1717
<CardText>
18-
<Markdown>{content||''}</Markdown>
18+
<Markdownchildren={content||''}/>
1919
</CardText>
2020
</Card>
2121
);

‎src/typings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"jest":"registry:dt/jest#0.9.0+20160706021812",
1010
"jquery":"registry:dt/jquery#1.10.0+20160908203239",
1111
"marked":"registry:dt/marked#0.0.0+20160325085301",
12-
"material-ui":"registry:dt/material-ui#0.15.1+20160824122606",
12+
"material-ui":"registry:dt/material-ui#0.15.1+20160908103128",
1313
"mixto":"registry:dt/mixto#0.0.0+20160317120654",
1414
"node":"registry:dt/node#6.0.0+20160831021119",
1515
"pathwatcher":"registry:dt/pathwatcher#0.0.0+20160317120654",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp