Skip to content

Commit

Permalink
built files
Browse files Browse the repository at this point in the history
  • Loading branch information
rolyatmax committed Oct 22, 2015
1 parent bc4be1d commit 3da3452
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 134 deletions.
77 changes: 39 additions & 38 deletions dist/DateRangePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Object.defineProperty(exports, '__esModule', {

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _reactAddons = require('react/addons');
var _react = require('react');

var _reactAddons2 = _interopRequireDefault(_reactAddons);
var _react2 = _interopRequireDefault(_react);

var _moment = require('moment');

Expand Down Expand Up @@ -52,45 +52,46 @@ var _utilsIsMomentRange = require('./utils/isMomentRange');

var _utilsIsMomentRange2 = _interopRequireDefault(_utilsIsMomentRange);

var PureRenderMixin = _reactAddons2['default'].addons.PureRenderMixin;
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin);

var absoluteMinimum = (0, _moment2['default'])(new Date(-8640000000000000 / 2)).startOf('day');
var absoluteMaximum = (0, _moment2['default'])(new Date(8640000000000000 / 2)).startOf('day');

_reactAddons2['default'].initializeTouchEvents(true);

function noop() {}

var DateRangePicker = _reactAddons2['default'].createClass({
var DateRangePicker = _react2['default'].createClass({
displayName: 'DateRangePicker',

mixins: [_utilsBemMixin2['default'], PureRenderMixin],
mixins: [_utilsBemMixin2['default'], _reactAddonsPureRenderMixin2['default']],

propTypes: {
bemBlock: _reactAddons2['default'].PropTypes.string,
bemNamespace: _reactAddons2['default'].PropTypes.string,
dateStates: _reactAddons2['default'].PropTypes.array, // an array of date ranges and their states
defaultState: _reactAddons2['default'].PropTypes.string,
disableNavigation: _reactAddons2['default'].PropTypes.bool,
firstOfWeek: _reactAddons2['default'].PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
helpMessage: _reactAddons2['default'].PropTypes.string,
initialDate: _reactAddons2['default'].PropTypes.instanceOf(Date),
initialFromValue: _reactAddons2['default'].PropTypes.bool,
initialMonth: _reactAddons2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange
initialRange: _reactAddons2['default'].PropTypes.object,
initialYear: _reactAddons2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange
maximumDate: _reactAddons2['default'].PropTypes.instanceOf(Date),
minimumDate: _reactAddons2['default'].PropTypes.instanceOf(Date),
numberOfCalendars: _reactAddons2['default'].PropTypes.number,
onHighlightDate: _reactAddons2['default'].PropTypes.func, // triggered when a date is highlighted (hovered)
onHighlightRange: _reactAddons2['default'].PropTypes.func, // triggered when a range is highlighted (hovered)
onSelect: _reactAddons2['default'].PropTypes.func, // triggered when a date or range is selectec
onSelectStart: _reactAddons2['default'].PropTypes.func, // triggered when the first date in a range is selected
paginationArrowComponent: _reactAddons2['default'].PropTypes.func,
selectedLabel: _reactAddons2['default'].PropTypes.string,
selectionType: _reactAddons2['default'].PropTypes.oneOf(['single', 'range']),
singleDateRange: _reactAddons2['default'].PropTypes.bool,
showLegend: _reactAddons2['default'].PropTypes.bool,
stateDefinitions: _reactAddons2['default'].PropTypes.object,
bemBlock: _react2['default'].PropTypes.string,
bemNamespace: _react2['default'].PropTypes.string,
dateStates: _react2['default'].PropTypes.array, // an array of date ranges and their states
defaultState: _react2['default'].PropTypes.string,
disableNavigation: _react2['default'].PropTypes.bool,
firstOfWeek: _react2['default'].PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
helpMessage: _react2['default'].PropTypes.string,
initialDate: _react2['default'].PropTypes.instanceOf(Date),
initialFromValue: _react2['default'].PropTypes.bool,
initialMonth: _react2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange
initialRange: _react2['default'].PropTypes.object,
initialYear: _react2['default'].PropTypes.number, // Overrides values derived from initialDate/initialRange
maximumDate: _react2['default'].PropTypes.instanceOf(Date),
minimumDate: _react2['default'].PropTypes.instanceOf(Date),
numberOfCalendars: _react2['default'].PropTypes.number,
onHighlightDate: _react2['default'].PropTypes.func, // triggered when a date is highlighted (hovered)
onHighlightRange: _react2['default'].PropTypes.func, // triggered when a range is highlighted (hovered)
onSelect: _react2['default'].PropTypes.func, // triggered when a date or range is selectec
onSelectStart: _react2['default'].PropTypes.func, // triggered when the first date in a range is selected
paginationArrowComponent: _react2['default'].PropTypes.func,
selectedLabel: _react2['default'].PropTypes.string,
selectionType: _react2['default'].PropTypes.oneOf(['single', 'range']),
singleDateRange: _react2['default'].PropTypes.bool,
showLegend: _react2['default'].PropTypes.bool,
stateDefinitions: _react2['default'].PropTypes.object,
value: _utilsCustomPropTypes2['default'].momentOrMomentRange
},

Expand Down Expand Up @@ -553,7 +554,7 @@ var DateRangePicker = _reactAddons2['default'].createClass({
dateComponent: _calendarCalendarDate2['default']
};

return _reactAddons2['default'].createElement(_calendarCalendarMonth2['default'], props);
return _react2['default'].createElement(_calendarCalendarMonth2['default'], props);
},

render: function render() {
Expand All @@ -567,18 +568,18 @@ var DateRangePicker = _reactAddons2['default'].createClass({

var calendars = _immutable2['default'].Range(0, numberOfCalendars).map(this.renderCalendar);

return _reactAddons2['default'].createElement(
return _react2['default'].createElement(
'div',
{ className: this.cx({ element: null }) },
_reactAddons2['default'].createElement(PaginationArrowComponent, { direction: 'previous', onTrigger: this.moveBack, disabled: !this.canMoveBack() }),
_react2['default'].createElement(PaginationArrowComponent, { direction: 'previous', onTrigger: this.moveBack, disabled: !this.canMoveBack() }),
calendars.toJS(),
_reactAddons2['default'].createElement(PaginationArrowComponent, { direction: 'next', onTrigger: this.moveForward, disabled: !this.canMoveForward() }),
helpMessage ? _reactAddons2['default'].createElement(
_react2['default'].createElement(PaginationArrowComponent, { direction: 'next', onTrigger: this.moveForward, disabled: !this.canMoveForward() }),
helpMessage ? _react2['default'].createElement(
'span',
{ className: this.cx({ element: 'HelpMessage' }) },
helpMessage
) : null,
showLegend ? _reactAddons2['default'].createElement(_Legend2['default'], { stateDefinitions: stateDefinitions, selectedLabel: selectedLabel }) : null
showLegend ? _react2['default'].createElement(_Legend2['default'], { stateDefinitions: stateDefinitions, selectedLabel: selectedLabel }) : null
);
}
});
Expand Down
30 changes: 16 additions & 14 deletions dist/Legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@ Object.defineProperty(exports, '__esModule', {

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _reactAddons = require('react/addons');
var _react = require('react');

var _reactAddons2 = _interopRequireDefault(_reactAddons);
var _react2 = _interopRequireDefault(_react);

var _utilsBemMixin = require('./utils/BemMixin');

var _utilsBemMixin2 = _interopRequireDefault(_utilsBemMixin);

var PureRenderMixin = _reactAddons2['default'].addons.PureRenderMixin;
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

var Legend = _reactAddons2['default'].createClass({
var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin);

var Legend = _react2['default'].createClass({
displayName: 'Legend',

mixins: [_utilsBemMixin2['default'], PureRenderMixin],
mixins: [_utilsBemMixin2['default'], _reactAddonsPureRenderMixin2['default']],

propTypes: {
selectedLabel: _reactAddons2['default'].PropTypes.string.isRequired,
stateDefinitions: _reactAddons2['default'].PropTypes.object.isRequired
selectedLabel: _react2['default'].PropTypes.string.isRequired,
stateDefinitions: _react2['default'].PropTypes.object.isRequired
},

render: function render() {
Expand All @@ -42,11 +44,11 @@ var Legend = _reactAddons2['default'].createClass({
style = {
backgroundColor: def.color
};
items.push(_reactAddons2['default'].createElement(
items.push(_react2['default'].createElement(
'li',
{ className: this.cx({ element: 'LegendItem' }), key: name },
_reactAddons2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor' }), style: style }),
_reactAddons2['default'].createElement(
_react2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor' }), style: style }),
_react2['default'].createElement(
'span',
{ className: this.cx({ element: 'LegendItemLabel' }) },
def.label
Expand All @@ -55,14 +57,14 @@ var Legend = _reactAddons2['default'].createClass({
}
}

return _reactAddons2['default'].createElement(
return _react2['default'].createElement(
'ul',
{ className: this.cx() },
_reactAddons2['default'].createElement(
_react2['default'].createElement(
'li',
{ className: this.cx({ element: 'LegendItem' }) },
_reactAddons2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor', modifiers: { 'selection': true } }) }),
_reactAddons2['default'].createElement(
_react2['default'].createElement('span', { className: this.cx({ element: 'LegendItemColor', modifiers: { 'selection': true } }) }),
_react2['default'].createElement(
'span',
{ className: this.cx({ element: 'LegendItemLabel' }) },
selectedLabel
Expand Down
22 changes: 12 additions & 10 deletions dist/PaginationArrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var _reactAddons = require('react/addons');
var _react = require('react');

var _reactAddons2 = _interopRequireDefault(_reactAddons);
var _react2 = _interopRequireDefault(_react);

var _utilsBemMixin = require('./utils/BemMixin');

var _utilsBemMixin2 = _interopRequireDefault(_utilsBemMixin);

var PureRenderMixin = _reactAddons2['default'].addons.PureRenderMixin;
var _reactAddonsPureRenderMixin = require('react-addons-pure-render-mixin');

var PaginationArrow = _reactAddons2['default'].createClass({
var _reactAddonsPureRenderMixin2 = _interopRequireDefault(_reactAddonsPureRenderMixin);

var PaginationArrow = _react2['default'].createClass({
displayName: 'PaginationArrow',

mixins: [_utilsBemMixin2['default'], PureRenderMixin],
mixins: [_utilsBemMixin2['default'], _reactAddonsPureRenderMixin2['default']],

propTypes: {
disabled: _reactAddons2['default'].PropTypes.bool,
onTrigger: _reactAddons2['default'].PropTypes.func,
direction: _reactAddons2['default'].PropTypes.oneOf(['next', 'previous'])
disabled: _react2['default'].PropTypes.bool,
onTrigger: _react2['default'].PropTypes.func,
direction: _react2['default'].PropTypes.oneOf(['next', 'previous'])
},

getDefaultProps: function getDefaultProps() {
Expand Down Expand Up @@ -61,10 +63,10 @@ var PaginationArrow = _reactAddons2['default'].createClass({
states: states
};

return _reactAddons2['default'].createElement(
return _react2['default'].createElement(
'div',
_extends({ className: this.cx(elementOpts) }, props, { onClick: onTrigger }),
_reactAddons2['default'].createElement('div', { className: this.cx(iconOpts) })
_react2['default'].createElement('div', { className: this.cx(iconOpts) })
);
}
});
Expand Down
56 changes: 28 additions & 28 deletions dist/calendar/CalendarDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Object.defineProperty(exports, '__esModule', {

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _reactAddons = require('react/addons');
var _react = require('react');

var _reactAddons2 = _interopRequireDefault(_reactAddons);
var _react2 = _interopRequireDefault(_react);

var _immutable = require('immutable');

Expand Down Expand Up @@ -42,35 +42,35 @@ var _CalendarSelection = require('./CalendarSelection');

var _CalendarSelection2 = _interopRequireDefault(_CalendarSelection);

var CalendarDate = _reactAddons2['default'].createClass({
var CalendarDate = _react2['default'].createClass({
displayName: 'CalendarDate',

mixins: [_utilsBemMixin2['default'], _utilsPureRenderMixin2['default']],

propTypes: {
date: _utilsCustomPropTypes2['default'].moment,

firstOfMonth: _reactAddons2['default'].PropTypes.object.isRequired,
firstOfMonth: _react2['default'].PropTypes.object.isRequired,

isSelectedDate: _reactAddons2['default'].PropTypes.bool,
isSelectedRangeStart: _reactAddons2['default'].PropTypes.bool,
isSelectedRangeEnd: _reactAddons2['default'].PropTypes.bool,
isInSelectedRange: _reactAddons2['default'].PropTypes.bool,
isSelectedDate: _react2['default'].PropTypes.bool,
isSelectedRangeStart: _react2['default'].PropTypes.bool,
isSelectedRangeEnd: _react2['default'].PropTypes.bool,
isInSelectedRange: _react2['default'].PropTypes.bool,

isHighlightedDate: _reactAddons2['default'].PropTypes.bool,
isHighlightedRangeStart: _reactAddons2['default'].PropTypes.bool,
isHighlightedRangeEnd: _reactAddons2['default'].PropTypes.bool,
isInHighlightedRange: _reactAddons2['default'].PropTypes.bool,
isHighlightedDate: _react2['default'].PropTypes.bool,
isHighlightedRangeStart: _react2['default'].PropTypes.bool,
isHighlightedRangeEnd: _react2['default'].PropTypes.bool,
isInHighlightedRange: _react2['default'].PropTypes.bool,

highlightedDate: _reactAddons2['default'].PropTypes.object,
dateStates: _reactAddons2['default'].PropTypes.instanceOf(_immutable2['default'].List),
isDisabled: _reactAddons2['default'].PropTypes.bool,
isToday: _reactAddons2['default'].PropTypes.bool,
highlightedDate: _react2['default'].PropTypes.object,
dateStates: _react2['default'].PropTypes.instanceOf(_immutable2['default'].List),
isDisabled: _react2['default'].PropTypes.bool,
isToday: _react2['default'].PropTypes.bool,

dateRangesForDate: _reactAddons2['default'].PropTypes.func,
onHighlightDate: _reactAddons2['default'].PropTypes.func,
onUnHighlightDate: _reactAddons2['default'].PropTypes.func,
onSelectDate: _reactAddons2['default'].PropTypes.func
dateRangesForDate: _react2['default'].PropTypes.func,
onHighlightDate: _react2['default'].PropTypes.func,
onUnHighlightDate: _react2['default'].PropTypes.func,
onSelectDate: _react2['default'].PropTypes.func
},

getInitialState: function getInitialState() {
Expand Down Expand Up @@ -234,28 +234,28 @@ var CalendarDate = _reactAddons2['default'].createClass({
}
}

return _reactAddons2['default'].createElement(
return _react2['default'].createElement(
'td',
{ className: this.cx({ element: 'Date', modifiers: bemModifiers, states: bemStates }),
style: cellStyle,
onTouchStart: this.touchStart,
onMouseEnter: this.mouseEnter,
onMouseLeave: this.mouseLeave,
onMouseDown: this.mouseDown },
numStates > 1 && _reactAddons2['default'].createElement(
numStates > 1 && _react2['default'].createElement(
'div',
{ className: this.cx({ element: "HalfDateStates" }) },
_reactAddons2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'am', color: amColor }),
_reactAddons2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'pm', color: pmColor })
_react2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'am', color: amColor }),
_react2['default'].createElement(_CalendarDatePeriod2['default'], { period: 'pm', color: pmColor })
),
numStates === 1 && _reactAddons2['default'].createElement('div', { className: this.cx({ element: "FullDateStates" }), style: style }),
_reactAddons2['default'].createElement(
numStates === 1 && _react2['default'].createElement('div', { className: this.cx({ element: "FullDateStates" }), style: style }),
_react2['default'].createElement(
'span',
{ className: this.cx({ element: "DateLabel" }) },
date.format('D')
),
selectionModifier ? _reactAddons2['default'].createElement(_CalendarSelection2['default'], { modifier: selectionModifier, pending: pending }) : null,
highlightModifier ? _reactAddons2['default'].createElement(_CalendarHighlight2['default'], { modifier: highlightModifier }) : null
selectionModifier ? _react2['default'].createElement(_CalendarSelection2['default'], { modifier: selectionModifier, pending: pending }) : null,
highlightModifier ? _react2['default'].createElement(_CalendarHighlight2['default'], { modifier: highlightModifier }) : null
);
}
});
Expand Down
12 changes: 6 additions & 6 deletions dist/calendar/CalendarDatePeriod.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var _reactAddons = require('react/addons');
var _react = require('react');

var _reactAddons2 = _interopRequireDefault(_reactAddons);
var _react2 = _interopRequireDefault(_react);

var _utilsBemMixin = require('../utils/BemMixin');

Expand All @@ -20,14 +20,14 @@ var _utilsPureRenderMixin = require('../utils/PureRenderMixin');

var _utilsPureRenderMixin2 = _interopRequireDefault(_utilsPureRenderMixin);

var CalendarDatePeriod = _reactAddons2['default'].createClass({
var CalendarDatePeriod = _react2['default'].createClass({
displayName: 'CalendarDatePeriod',

mixins: [_utilsBemMixin2['default'], _utilsPureRenderMixin2['default']],

propTypes: {
color: _reactAddons2['default'].PropTypes.string,
period: _reactAddons2['default'].PropTypes.string
color: _react2['default'].PropTypes.string,
period: _react2['default'].PropTypes.string
},

render: function render() {
Expand All @@ -42,7 +42,7 @@ var CalendarDatePeriod = _reactAddons2['default'].createClass({
style = { backgroundColor: color };
}

return _reactAddons2['default'].createElement('div', { style: style, className: this.cx({ modifiers: modifiers }) });
return _react2['default'].createElement('div', { style: style, className: this.cx({ modifiers: modifiers }) });
}
});

Expand Down
Loading

0 comments on commit 3da3452

Please sign in to comment.