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

Commit9755237

Browse files
committed
fix React deprecations/warnings
1 parent4e46600 commit9755237

File tree

23 files changed

+68
-64
lines changed

23 files changed

+68
-64
lines changed

‎lib/components/Alert/index.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict';
1+
"use strict";
22
var__extends=(this&&this.__extends)||function(d,b){
33
for(varpinb)if(b.hasOwnProperty(p))d[p]=b[p];
44
function__(){this.constructor=d;}
@@ -15,7 +15,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
1515
};
1616
varReact=require('react');
1717
varreact_redux_1=require('react-redux');
18-
varAction=require('../../actions');
18+
varactions_1=require('../../actions');
1919
varSnackbar_1=require('material-ui/Snackbar');
2020
varclassNames=require('classnames');
2121
vardefaultAlert={
@@ -35,7 +35,7 @@ var Alert = (function (_super) {
3535
Alert=__decorate([
3636
react_redux_1.connect(null,function(dispatch){
3737
return{
38-
alertToggle:function(){returndispatch(Action.alertToggle());},
38+
alertToggle:function(){returndispatch(actions_1.alertToggle());},
3939
};
4040
}),
4141
__metadata('design:paramtypes',[])

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var styles = {
77
backgroundColor:colors_1.cyan500,
88
zIndex:'0',
99
position:'fixed',
10-
bottom:'20px',
1110
padding:'10px 15px 30px',
1211
right:'0px',
1312
margin:'0',

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ var Continue_1 = require('./Continue');
77
varstyles={
88
zIndex:'1000',
99
position:'fixed',
10-
bottom:'0',
11-
right:'0',
10+
bottom:'0px',
11+
right:'0px',
1212
height:'60px',
1313
width:'400px',
1414
};

‎lib/components/Page/Tasks/Task.js‎renamed to ‎lib/components/Page/Task/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
varReact=require('react');
33
varindex_1=require('../../index');
4-
varTaskCheckbox_1=require('./TaskCheckbox');
4+
vartaskCheckbox_1=require('./taskCheckbox');
55
varList_1=require('material-ui/List');
66
varcolors_1=require('material-ui/styles/colors');
77
varstyles={
@@ -27,5 +27,5 @@ function getStatus(index, taskPosition, testRun) {
2727
exports.Task=function(_a){
2828
vartask=_a.task,taskPosition=_a.taskPosition,index=_a.index,testRun=_a.testRun;
2929
varbackgroundColor=getStatus(index,taskPosition,testRun);
30-
return(React.createElement(List_1.ListItem,{key:index,style:Object.assign({},styles,{backgroundColor:backgroundColor})},testRun ?React.createElement(TaskCheckbox_1.TaskCheckbox,null) :null,React.createElement("span",{style:indexStyles},index+1,"."),React.createElement("div",{style:descriptionStyles},React.createElement(index_1.Markdown,null,task.description))));
30+
return(React.createElement(List_1.ListItem,{key:index,style:Object.assign({},styles,{backgroundColor:backgroundColor})},taskCheckbox_1.taskCheckbox(testRun),React.createElement("span",{style:indexStyles},index+1,"."),React.createElement("div",{style:descriptionStyles},React.createElement(index_1.Markdown,null,task.description))));
3131
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"use strict";
2+
varReact=require('react');
3+
varcolors_1=require('material-ui/styles/colors');
4+
varindeterminate_check_box_1=require('material-ui/svg-icons/toggle/indeterminate-check-box');
5+
varstyles={
6+
position:'absolute',
7+
top:'15px'
8+
};
9+
functiontaskCheckbox(testRun){
10+
if(!testRun){
11+
returnnull;
12+
}
13+
return(React.createElement("span",{style:styles},React.createElement(indeterminate_check_box_1.default,{color:colors_1.orange500})));
14+
}
15+
exports.taskCheckbox=taskCheckbox;
16+
;

‎lib/components/Page/Tasks/TaskCheckbox.js‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ var React = require('react');
33
varList_1=require('material-ui/List');
44
varCard_1=require('material-ui/Card');
55
varSubheader_1=require('material-ui/Subheader');
6-
varTask_1=require('./Task');
6+
varTask_1=require('../Task');
77
varcolors_1=require('material-ui/styles/colors');
88
functionvisibleTasks(tasks,taskPosition){
99
returntasks.slice(0,taskPosition+1);
1010
}
11+
varmargin='10px 5px';
1112
exports.Tasks=function(_a){
1213
vartasks=_a.tasks,taskPosition=_a.taskPosition,testRun=_a.testRun,completed=_a.completed;
1314
varvisTasks=visibleTasks(tasks,taskPosition);
14-
varbg=completed ?colors_1.lightGreen200 :'white';
15-
return(React.createElement(Card_1.Card,{style:{margin:'10px 5px',backGroundColor:bg}},React.createElement(List_1.List,null,React.createElement(Subheader_1.default,null,"Tasks"),visTasks.map(function(task,index){return(React.createElement(Task_1.Task,{key:index,index:index,task:task,taskPosition:taskPosition,testRun:testRun}));}))));
15+
varbackgroundColor=completed ?colors_1.lightGreen200 :'white';
16+
return(React.createElement(Card_1.Card,{style:{backgroundColor:backgroundColor,margin:margin}},React.createElement(List_1.List,null,React.createElement(Subheader_1.default,null,"Tasks"),visTasks.map(function(task,index){return(React.createElement(Task_1.Task,{key:index,index:index,task:task,taskPosition:taskPosition,testRun:testRun}));}))));
1617
};

‎lib/components/Progress/ProgressChapter/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ var List_1 = require('material-ui/List');
44
varProgressPage_1=require('../ProgressPage');
55
varindex_1=require('../../index');
66
varstyles={
7-
marginBottom:'0'
7+
marginBottom:'0px'
88
};
99
vardescriptionStyles={
1010
fontSize:'14px'
1111
};
1212
exports.ProgressChapter=function(_a){
1313
varchapter=_a.chapter,chapterIndex=_a.chapterIndex,position=_a.position;
1414
varisActive=chapterIndex===position.chapter;
15-
return(React.createElement(List_1.ListItem,{key:'c'+chapterIndex,className:isActive ?'isActive' :null,style:styles,initiallyOpen:chapterIndex===0,primaryTogglesNestedList:chapterIndex===position.chapter&&!chapter.completed,nestedItems:chapter.pages.map(function(page,pageIndex){return(React.createElement(ProgressPage_1.ProgressPage,{key:chapterIndex+'_'+pageIndex,pageIndex:pageIndex,page:page,chapterIndex:chapterIndex,position:position}));})},React.createElement("h3",null,chapterIndex+1,". ",chapter.title),React.createElement("span",{style:descriptionStyles},React.createElement(index_1.Markdown,null,chapter.description))));
15+
return(React.createElement(List_1.ListItem,{key:chapterIndex,className:isActive ?'isActive' :null,style:styles,initiallyOpen:chapterIndex===0,primaryTogglesNestedList:chapterIndex===position.chapter&&!chapter.completed,nestedItems:chapter.pages.map(function(page,pageIndex){return(React.createElement(ProgressPage_1.ProgressPage,{key:pageIndex,pageIndex:pageIndex,page:page,chapterIndex:chapterIndex,position:position}));})},React.createElement("h3",null,chapterIndex+1,". ",chapter.title),React.createElement("span",{style:descriptionStyles},React.createElement(index_1.Markdown,null,chapter.description))));
1616
};

‎lib/components/Progress/ProgresPage/index.js‎renamed to ‎lib/components/Progress/ProgressPage/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var progressIcon_1 = require('../progressIcon');
2121
varcolors_1=require('material-ui/styles/colors');
2222
varstyles={
2323
paddingLeft:'15px',
24-
marginTop:'0',
24+
marginTop:'0px',
2525
};
2626
varProgressPage=(function(_super){
2727
__extends(ProgressPage,_super);
@@ -40,7 +40,7 @@ var ProgressPage = (function (_super) {
4040
var_a=this.props,page=_a.page,position=_a.position,chapterIndex=_a.chapterIndex,pageIndex=_a.pageIndex,selectPage=_a.selectPage;
4141
varisActive=chapterIndex===position.chapter&&pageIndex===position.page;
4242
varcanActivate=this.canActivate(isActive);
43-
return(React.createElement(List_1.ListItem,{style:Object.assign({},styles,!canActivate ?{color:colors_1.grey400} :{}),primaryText:(pageIndex+1)+". "+page.title,secondaryText:canActivate ?page.description :'',leftIcon:progressIcon_1.progressIcon(page.completed,isActive),onClick:canActivate
43+
return(React.createElement(List_1.ListItem,{key:pageIndex,style:Object.assign({},styles,!canActivate ?{color:colors_1.grey400} :{}),primaryText:(pageIndex+1)+". "+page.title,secondaryText:canActivate ?page.description :'',leftIcon:progressIcon_1.progressIcon(page.completed,isActive),onClick:canActivate
4444
?selectPage.bind(this,{
4545
chapter:chapterIndex,
4646
page:pageIndex

‎lib/components/Progress/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ var Subheader_1 = require('material-ui/Subheader');
66
varProgressChapter_1=require('./ProgressChapter');
77
varpageStyle={
88
width:'100%',
9-
margin:0,
9+
margin:'0px',
1010
};
1111
exports.Progress=function(_a){
1212
varprogress=_a.progress,position=_a.position,info=_a.info;
13-
return(React.createElement(Paper_1.default,{className:'cr-progress',style:pageStyle,zDepth:1},React.createElement(List_1.List,null,React.createElement(Subheader_1.default,null,info.title),progress.chapters.map(function(chapter,chapterIndex){return(React.createElement(ProgressChapter_1.ProgressChapter,{chapter:chapter,chapterIndex:chapterIndex,position:position}));}))));
13+
return(React.createElement(Paper_1.default,{style:pageStyle},React.createElement(List_1.List,null,React.createElement(Subheader_1.default,null,info.title),progress.chapters.map(function(chapter,chapterIndex){return(React.createElement(ProgressChapter_1.ProgressChapter,{key:chapterIndex,chapter:chapter,chapterIndex:chapterIndex,position:position}));}))));
1414
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp