Skip to content

Commit ddd737c

Browse files
committed
warning level for closure compiler changed to VERBOSE
1 parent 2f3dda0 commit ddd737c

File tree

8 files changed

+80
-7
lines changed

8 files changed

+80
-7
lines changed

gulpfile.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ gulp.task 'compile-datepicker', ->
6464
compilerFlags:
6565
closure_entry_point: 'misino.ui.datepicker.DatePickerInput'
6666
externs: paths.externs
67-
warning_level: 'QUIET'
67+
warning_level: 'VERBOSE'
6868

6969
gulp.task 'concat-all', ->
7070
este.concatAll

gulpfile.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/ui/datepicker/DatePicker.jsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,54 @@ goog.provide('misino.ui.datepicker.DatePicker');
44
goog.require('misino.ui.numberpicker.NumberPicker');
55
goog.require('misino.ui.datepicker.DayPicker');
66

7-
var DatePicker = React.createClass({
7+
var DatePicker = React.createClass(/** @lends {React.ReactComponent.prototype} */{
8+
/**
9+
*
10+
* @param {Date} date
11+
*/
812
onChangeVisibleDate: function(date) {
913
this.setState({visibleDate:date});
1014
},
15+
/**
16+
*
17+
* @param {Date} date
18+
*/
1119
onChangeSelectedDate: function(date) {
1220
this.setState({visibleDate:date});
1321
this.props.onChangeDate(date);
1422
},
23+
/**
24+
*
25+
* @returns {{selectedDate: Date, show: boolean, onChangeDate: onChangeDate}}
26+
*/
1527
getDefaultProps: function() {
1628
return({selectedDate:new Date(), show:true, onChangeDate: function(date) {
1729
console.log(date);
1830
}});
1931
},
32+
/**
33+
*
34+
* @returns {{visibleDate: Date}}
35+
*/
2036
getInitialState: function() {
2137
var date = new Date();
2238
date.setTime(this.props.selectedDate.getTime());
2339
return({visibleDate:date});
2440
},
41+
/**
42+
*
43+
* @param {number} year
44+
*/
2545
changeYear: function(year) {
2646
var date = new Date();
2747
date.setTime(this.state.visibleDate.getTime());
2848
date.setFullYear(year);
2949
this.setState({visibleDate:date});
3050
},
51+
/**
52+
*
53+
* @param {number} month
54+
*/
3155
changeMonth: function(month) {
3256
var date = new Date();
3357
date.setTime(this.state.visibleDate.getTime());

src/js/ui/datepicker/DatePickerInput.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
goog.provide('misino.ui.datepicker.DatePickerInput');
44
goog.require('misino.ui.datepicker.DatePicker');
55

6-
var DatePickerInput = React.createClass({
6+
var DatePickerInput = React.createClass(/** @lends {React.ReactComponent.prototype} */{
7+
/**
8+
*
9+
* @returns {{date: Date}}
10+
*/
711
getDefaultProps: function() {
812
return({date:new Date()});
913
},
14+
/**
15+
*
16+
* @returns {{show: boolean}}
17+
*/
1018
getInitialState: function() {
1119
return {show:false};
1220
},
@@ -16,6 +24,10 @@ var DatePickerInput = React.createClass({
1624
hideDatePicker: function() {
1725
this.setState({show:false});
1826
},
27+
/**
28+
*
29+
* @param {Date} date
30+
*/
1931
onChangeDate: function(date) {
2032
this.props.date = date;
2133
this.setState({show:false});

src/js/ui/datepicker/Day.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
goog.provide('misino.ui.datepicker.Day');
44

5-
var Day = React.createClass({
5+
var Day = React.createClass(/** @lends {React.ReactComponent.prototype} */{
6+
/**
7+
*
8+
* @param e
9+
*/
610
handleClick: function(e) {
711
e.preventDefault();
812
this.props.changeDate(this.props.date);
913
},
14+
/**
15+
*
16+
* @returns {{selected: boolean}}
17+
*/
1018
getDefaultProps: function() {
1119
return {selected:false};
1220
},

src/js/ui/datepicker/DayPicker.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ goog.provide('misino.ui.datepicker.DayPicker');
44
goog.require('misino.utils.DateUtils');
55
goog.require('misino.ui.datepicker.Day');
66

7-
var DayPicker = React.createClass({
7+
var DayPicker = React.createClass(/** @lends {React.ReactComponent.prototype} */{
8+
/**
9+
*
10+
* @param {Date} date
11+
*/
812
selectDay: function(date) {
913
this.props.selectDate(date);
1014
},

src/js/ui/numberpicker/NumberPicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
goog.provide('misino.ui.numberpicker.NumberPicker');
44

5-
var NumberPicker = React.createClass({
5+
var NumberPicker = React.createClass(/** @lends {React.ReactComponent.prototype} */{
66
getDefaultProps: function() {
77
return {number:0};
88
},

src/js/utils/DateUtils.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,48 @@
11
goog.provide('misino.utils.DateUtils');
22

33
var DateUtils = {
4+
/**
5+
* Gets count of days in current month.
6+
* @param {number} month January has number 1. February 2, ... and so on
7+
* @param {number} year
8+
* @returns {number}
9+
*/
410
daysInMonthCount: function(month, year) {
511
var d =new Date(year, month+1, 0);
612
return d.getDate();
713
},
14+
/**
15+
* Gets array of numbers starting from start to end
16+
* @param {number} start
17+
* @param {number} end
18+
* @returns {Array} array of numbers
19+
*/
820
getArrayByBoundary: function(start, end) {
921
var out = [];
1022
for(var i= start; i<=end; i++) {
1123
out.push(i);
1224
}
1325
return out;
1426
},
27+
/**
28+
* Creates new Date() instance.
29+
* @param {number} date day in month
30+
* @param {number} time
31+
* @returns {Date}
32+
*/
1533
createNewDay: function(date, time) {
1634
var newDate = new Date();
1735
newDate.setTime(time);
1836
newDate.setDate(date);
1937
return newDate;
2038
},
39+
/**
40+
* Creates new Date() instance.
41+
* @param {number} date day in month
42+
* @param {number} month
43+
* @param {number} time
44+
* @returns {Date}
45+
*/
2146
createNewDayMonth: function(date, month, time) {
2247
var newDate = new Date();
2348
newDate.setTime(time);

0 commit comments

Comments
 (0)