Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
[44500] Fix | Delete
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
[44501] Fix | Delete
[44502] Fix | Delete
var _object = __webpack_require__("Koq/");
[44503] Fix | Delete
[44504] Fix | Delete
var _object2 = _interopRequireDefault(_object);
[44505] Fix | Delete
[44506] Fix | Delete
var _react = __webpack_require__("cDcd");
[44507] Fix | Delete
[44508] Fix | Delete
var _react2 = _interopRequireDefault(_react);
[44509] Fix | Delete
[44510] Fix | Delete
var _propTypes = __webpack_require__("17x9");
[44511] Fix | Delete
[44512] Fix | Delete
var _propTypes2 = _interopRequireDefault(_propTypes);
[44513] Fix | Delete
[44514] Fix | Delete
var _reactMomentProptypes = __webpack_require__("XGBb");
[44515] Fix | Delete
[44516] Fix | Delete
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
[44517] Fix | Delete
[44518] Fix | Delete
var _airbnbPropTypes = __webpack_require__("Hsqg");
[44519] Fix | Delete
[44520] Fix | Delete
var _moment = __webpack_require__("wy2R");
[44521] Fix | Delete
[44522] Fix | Delete
var _moment2 = _interopRequireDefault(_moment);
[44523] Fix | Delete
[44524] Fix | Delete
var _object3 = __webpack_require__("4cSd");
[44525] Fix | Delete
[44526] Fix | Delete
var _object4 = _interopRequireDefault(_object3);
[44527] Fix | Delete
[44528] Fix | Delete
var _isTouchDevice = __webpack_require__("LTAC");
[44529] Fix | Delete
[44530] Fix | Delete
var _isTouchDevice2 = _interopRequireDefault(_isTouchDevice);
[44531] Fix | Delete
[44532] Fix | Delete
var _defaultPhrases = __webpack_require__("vV+G");
[44533] Fix | Delete
[44534] Fix | Delete
var _getPhrasePropTypes = __webpack_require__("yc2e");
[44535] Fix | Delete
[44536] Fix | Delete
var _getPhrasePropTypes2 = _interopRequireDefault(_getPhrasePropTypes);
[44537] Fix | Delete
[44538] Fix | Delete
var _isSameDay = __webpack_require__("pRvc");
[44539] Fix | Delete
[44540] Fix | Delete
var _isSameDay2 = _interopRequireDefault(_isSameDay);
[44541] Fix | Delete
[44542] Fix | Delete
var _isAfterDay = __webpack_require__("Nho6");
[44543] Fix | Delete
[44544] Fix | Delete
var _isAfterDay2 = _interopRequireDefault(_isAfterDay);
[44545] Fix | Delete
[44546] Fix | Delete
var _getVisibleDays = __webpack_require__("u5Fq");
[44547] Fix | Delete
[44548] Fix | Delete
var _getVisibleDays2 = _interopRequireDefault(_getVisibleDays);
[44549] Fix | Delete
[44550] Fix | Delete
var _isDayVisible = __webpack_require__("IgE5");
[44551] Fix | Delete
[44552] Fix | Delete
var _isDayVisible2 = _interopRequireDefault(_isDayVisible);
[44553] Fix | Delete
[44554] Fix | Delete
var _toISODateString = __webpack_require__("pYxT");
[44555] Fix | Delete
[44556] Fix | Delete
var _toISODateString2 = _interopRequireDefault(_toISODateString);
[44557] Fix | Delete
[44558] Fix | Delete
var _toISOMonthString = __webpack_require__("jenk");
[44559] Fix | Delete
[44560] Fix | Delete
var _toISOMonthString2 = _interopRequireDefault(_toISOMonthString);
[44561] Fix | Delete
[44562] Fix | Delete
var _ScrollableOrientationShape = __webpack_require__("aE6U");
[44563] Fix | Delete
[44564] Fix | Delete
var _ScrollableOrientationShape2 = _interopRequireDefault(_ScrollableOrientationShape);
[44565] Fix | Delete
[44566] Fix | Delete
var _DayOfWeekShape = __webpack_require__("2S2E");
[44567] Fix | Delete
[44568] Fix | Delete
var _DayOfWeekShape2 = _interopRequireDefault(_DayOfWeekShape);
[44569] Fix | Delete
[44570] Fix | Delete
var _CalendarInfoPositionShape = __webpack_require__("oR9Z");
[44571] Fix | Delete
[44572] Fix | Delete
var _CalendarInfoPositionShape2 = _interopRequireDefault(_CalendarInfoPositionShape);
[44573] Fix | Delete
[44574] Fix | Delete
var _constants = __webpack_require__("Fv1B");
[44575] Fix | Delete
[44576] Fix | Delete
var _DayPicker = __webpack_require__("Nloh");
[44577] Fix | Delete
[44578] Fix | Delete
var _DayPicker2 = _interopRequireDefault(_DayPicker);
[44579] Fix | Delete
[44580] Fix | Delete
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
[44581] Fix | Delete
[44582] Fix | Delete
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; }
[44583] Fix | Delete
[44584] Fix | Delete
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
[44585] Fix | Delete
[44586] Fix | Delete
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
[44587] Fix | Delete
[44588] Fix | Delete
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
[44589] Fix | Delete
[44590] Fix | Delete
var propTypes = (0, _airbnbPropTypes.forbidExtraProps)({
[44591] Fix | Delete
date: _reactMomentProptypes2['default'].momentObj,
[44592] Fix | Delete
onDateChange: _propTypes2['default'].func,
[44593] Fix | Delete
[44594] Fix | Delete
focused: _propTypes2['default'].bool,
[44595] Fix | Delete
onFocusChange: _propTypes2['default'].func,
[44596] Fix | Delete
onClose: _propTypes2['default'].func,
[44597] Fix | Delete
[44598] Fix | Delete
keepOpenOnDateSelect: _propTypes2['default'].bool,
[44599] Fix | Delete
isOutsideRange: _propTypes2['default'].func,
[44600] Fix | Delete
isDayBlocked: _propTypes2['default'].func,
[44601] Fix | Delete
isDayHighlighted: _propTypes2['default'].func,
[44602] Fix | Delete
[44603] Fix | Delete
// DayPicker props
[44604] Fix | Delete
renderMonthText: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'),
[44605] Fix | Delete
renderMonthElement: (0, _airbnbPropTypes.mutuallyExclusiveProps)(_propTypes2['default'].func, 'renderMonthText', 'renderMonthElement'),
[44606] Fix | Delete
enableOutsideDays: _propTypes2['default'].bool,
[44607] Fix | Delete
numberOfMonths: _propTypes2['default'].number,
[44608] Fix | Delete
orientation: _ScrollableOrientationShape2['default'],
[44609] Fix | Delete
withPortal: _propTypes2['default'].bool,
[44610] Fix | Delete
initialVisibleMonth: _propTypes2['default'].func,
[44611] Fix | Delete
firstDayOfWeek: _DayOfWeekShape2['default'],
[44612] Fix | Delete
hideKeyboardShortcutsPanel: _propTypes2['default'].bool,
[44613] Fix | Delete
daySize: _airbnbPropTypes.nonNegativeInteger,
[44614] Fix | Delete
verticalHeight: _airbnbPropTypes.nonNegativeInteger,
[44615] Fix | Delete
noBorder: _propTypes2['default'].bool,
[44616] Fix | Delete
verticalBorderSpacing: _airbnbPropTypes.nonNegativeInteger,
[44617] Fix | Delete
transitionDuration: _airbnbPropTypes.nonNegativeInteger,
[44618] Fix | Delete
horizontalMonthPadding: _airbnbPropTypes.nonNegativeInteger,
[44619] Fix | Delete
[44620] Fix | Delete
navPrev: _propTypes2['default'].node,
[44621] Fix | Delete
navNext: _propTypes2['default'].node,
[44622] Fix | Delete
[44623] Fix | Delete
onPrevMonthClick: _propTypes2['default'].func,
[44624] Fix | Delete
onNextMonthClick: _propTypes2['default'].func,
[44625] Fix | Delete
onOutsideClick: _propTypes2['default'].func,
[44626] Fix | Delete
renderCalendarDay: _propTypes2['default'].func,
[44627] Fix | Delete
renderDayContents: _propTypes2['default'].func,
[44628] Fix | Delete
renderCalendarInfo: _propTypes2['default'].func,
[44629] Fix | Delete
calendarInfoPosition: _CalendarInfoPositionShape2['default'],
[44630] Fix | Delete
[44631] Fix | Delete
// accessibility
[44632] Fix | Delete
onBlur: _propTypes2['default'].func,
[44633] Fix | Delete
isFocused: _propTypes2['default'].bool,
[44634] Fix | Delete
showKeyboardShortcuts: _propTypes2['default'].bool,
[44635] Fix | Delete
[44636] Fix | Delete
// i18n
[44637] Fix | Delete
monthFormat: _propTypes2['default'].string,
[44638] Fix | Delete
weekDayFormat: _propTypes2['default'].string,
[44639] Fix | Delete
phrases: _propTypes2['default'].shape((0, _getPhrasePropTypes2['default'])(_defaultPhrases.DayPickerPhrases)),
[44640] Fix | Delete
dayAriaLabelFormat: _propTypes2['default'].string,
[44641] Fix | Delete
[44642] Fix | Delete
isRTL: _propTypes2['default'].bool
[44643] Fix | Delete
});
[44644] Fix | Delete
[44645] Fix | Delete
var defaultProps = {
[44646] Fix | Delete
date: undefined, // TODO: use null
[44647] Fix | Delete
onDateChange: function () {
[44648] Fix | Delete
function onDateChange() {}
[44649] Fix | Delete
[44650] Fix | Delete
return onDateChange;
[44651] Fix | Delete
}(),
[44652] Fix | Delete
[44653] Fix | Delete
[44654] Fix | Delete
focused: false,
[44655] Fix | Delete
onFocusChange: function () {
[44656] Fix | Delete
function onFocusChange() {}
[44657] Fix | Delete
[44658] Fix | Delete
return onFocusChange;
[44659] Fix | Delete
}(),
[44660] Fix | Delete
onClose: function () {
[44661] Fix | Delete
function onClose() {}
[44662] Fix | Delete
[44663] Fix | Delete
return onClose;
[44664] Fix | Delete
}(),
[44665] Fix | Delete
[44666] Fix | Delete
[44667] Fix | Delete
keepOpenOnDateSelect: false,
[44668] Fix | Delete
isOutsideRange: function () {
[44669] Fix | Delete
function isOutsideRange() {}
[44670] Fix | Delete
[44671] Fix | Delete
return isOutsideRange;
[44672] Fix | Delete
}(),
[44673] Fix | Delete
isDayBlocked: function () {
[44674] Fix | Delete
function isDayBlocked() {}
[44675] Fix | Delete
[44676] Fix | Delete
return isDayBlocked;
[44677] Fix | Delete
}(),
[44678] Fix | Delete
isDayHighlighted: function () {
[44679] Fix | Delete
function isDayHighlighted() {}
[44680] Fix | Delete
[44681] Fix | Delete
return isDayHighlighted;
[44682] Fix | Delete
}(),
[44683] Fix | Delete
[44684] Fix | Delete
[44685] Fix | Delete
// DayPicker props
[44686] Fix | Delete
renderMonthText: null,
[44687] Fix | Delete
enableOutsideDays: false,
[44688] Fix | Delete
numberOfMonths: 1,
[44689] Fix | Delete
orientation: _constants.HORIZONTAL_ORIENTATION,
[44690] Fix | Delete
withPortal: false,
[44691] Fix | Delete
hideKeyboardShortcutsPanel: false,
[44692] Fix | Delete
initialVisibleMonth: null,
[44693] Fix | Delete
firstDayOfWeek: null,
[44694] Fix | Delete
daySize: _constants.DAY_SIZE,
[44695] Fix | Delete
verticalHeight: null,
[44696] Fix | Delete
noBorder: false,
[44697] Fix | Delete
verticalBorderSpacing: undefined,
[44698] Fix | Delete
transitionDuration: undefined,
[44699] Fix | Delete
horizontalMonthPadding: 13,
[44700] Fix | Delete
[44701] Fix | Delete
navPrev: null,
[44702] Fix | Delete
navNext: null,
[44703] Fix | Delete
[44704] Fix | Delete
onPrevMonthClick: function () {
[44705] Fix | Delete
function onPrevMonthClick() {}
[44706] Fix | Delete
[44707] Fix | Delete
return onPrevMonthClick;
[44708] Fix | Delete
}(),
[44709] Fix | Delete
onNextMonthClick: function () {
[44710] Fix | Delete
function onNextMonthClick() {}
[44711] Fix | Delete
[44712] Fix | Delete
return onNextMonthClick;
[44713] Fix | Delete
}(),
[44714] Fix | Delete
onOutsideClick: function () {
[44715] Fix | Delete
function onOutsideClick() {}
[44716] Fix | Delete
[44717] Fix | Delete
return onOutsideClick;
[44718] Fix | Delete
}(),
[44719] Fix | Delete
[44720] Fix | Delete
[44721] Fix | Delete
renderCalendarDay: undefined,
[44722] Fix | Delete
renderDayContents: null,
[44723] Fix | Delete
renderCalendarInfo: null,
[44724] Fix | Delete
renderMonthElement: null,
[44725] Fix | Delete
calendarInfoPosition: _constants.INFO_POSITION_BOTTOM,
[44726] Fix | Delete
[44727] Fix | Delete
// accessibility
[44728] Fix | Delete
onBlur: function () {
[44729] Fix | Delete
function onBlur() {}
[44730] Fix | Delete
[44731] Fix | Delete
return onBlur;
[44732] Fix | Delete
}(),
[44733] Fix | Delete
[44734] Fix | Delete
isFocused: false,
[44735] Fix | Delete
showKeyboardShortcuts: false,
[44736] Fix | Delete
[44737] Fix | Delete
// i18n
[44738] Fix | Delete
monthFormat: 'MMMM YYYY',
[44739] Fix | Delete
weekDayFormat: 'dd',
[44740] Fix | Delete
phrases: _defaultPhrases.DayPickerPhrases,
[44741] Fix | Delete
dayAriaLabelFormat: undefined,
[44742] Fix | Delete
[44743] Fix | Delete
isRTL: false
[44744] Fix | Delete
};
[44745] Fix | Delete
[44746] Fix | Delete
var DayPickerSingleDateController = function (_React$Component) {
[44747] Fix | Delete
_inherits(DayPickerSingleDateController, _React$Component);
[44748] Fix | Delete
[44749] Fix | Delete
function DayPickerSingleDateController(props) {
[44750] Fix | Delete
_classCallCheck(this, DayPickerSingleDateController);
[44751] Fix | Delete
[44752] Fix | Delete
var _this = _possibleConstructorReturn(this, (DayPickerSingleDateController.__proto__ || Object.getPrototypeOf(DayPickerSingleDateController)).call(this, props));
[44753] Fix | Delete
[44754] Fix | Delete
_this.isTouchDevice = false;
[44755] Fix | Delete
_this.today = (0, _moment2['default'])();
[44756] Fix | Delete
[44757] Fix | Delete
_this.modifiers = {
[44758] Fix | Delete
today: function () {
[44759] Fix | Delete
function today(day) {
[44760] Fix | Delete
return _this.isToday(day);
[44761] Fix | Delete
}
[44762] Fix | Delete
[44763] Fix | Delete
return today;
[44764] Fix | Delete
}(),
[44765] Fix | Delete
blocked: function () {
[44766] Fix | Delete
function blocked(day) {
[44767] Fix | Delete
return _this.isBlocked(day);
[44768] Fix | Delete
}
[44769] Fix | Delete
[44770] Fix | Delete
return blocked;
[44771] Fix | Delete
}(),
[44772] Fix | Delete
'blocked-calendar': function () {
[44773] Fix | Delete
function blockedCalendar(day) {
[44774] Fix | Delete
return props.isDayBlocked(day);
[44775] Fix | Delete
}
[44776] Fix | Delete
[44777] Fix | Delete
return blockedCalendar;
[44778] Fix | Delete
}(),
[44779] Fix | Delete
'blocked-out-of-range': function () {
[44780] Fix | Delete
function blockedOutOfRange(day) {
[44781] Fix | Delete
return props.isOutsideRange(day);
[44782] Fix | Delete
}
[44783] Fix | Delete
[44784] Fix | Delete
return blockedOutOfRange;
[44785] Fix | Delete
}(),
[44786] Fix | Delete
'highlighted-calendar': function () {
[44787] Fix | Delete
function highlightedCalendar(day) {
[44788] Fix | Delete
return props.isDayHighlighted(day);
[44789] Fix | Delete
}
[44790] Fix | Delete
[44791] Fix | Delete
return highlightedCalendar;
[44792] Fix | Delete
}(),
[44793] Fix | Delete
valid: function () {
[44794] Fix | Delete
function valid(day) {
[44795] Fix | Delete
return !_this.isBlocked(day);
[44796] Fix | Delete
}
[44797] Fix | Delete
[44798] Fix | Delete
return valid;
[44799] Fix | Delete
}(),
[44800] Fix | Delete
hovered: function () {
[44801] Fix | Delete
function hovered(day) {
[44802] Fix | Delete
return _this.isHovered(day);
[44803] Fix | Delete
}
[44804] Fix | Delete
[44805] Fix | Delete
return hovered;
[44806] Fix | Delete
}(),
[44807] Fix | Delete
selected: function () {
[44808] Fix | Delete
function selected(day) {
[44809] Fix | Delete
return _this.isSelected(day);
[44810] Fix | Delete
}
[44811] Fix | Delete
[44812] Fix | Delete
return selected;
[44813] Fix | Delete
}(),
[44814] Fix | Delete
'first-day-of-week': function () {
[44815] Fix | Delete
function firstDayOfWeek(day) {
[44816] Fix | Delete
return _this.isFirstDayOfWeek(day);
[44817] Fix | Delete
}
[44818] Fix | Delete
[44819] Fix | Delete
return firstDayOfWeek;
[44820] Fix | Delete
}(),
[44821] Fix | Delete
'last-day-of-week': function () {
[44822] Fix | Delete
function lastDayOfWeek(day) {
[44823] Fix | Delete
return _this.isLastDayOfWeek(day);
[44824] Fix | Delete
}
[44825] Fix | Delete
[44826] Fix | Delete
return lastDayOfWeek;
[44827] Fix | Delete
}()
[44828] Fix | Delete
};
[44829] Fix | Delete
[44830] Fix | Delete
var _this$getStateForNewM = _this.getStateForNewMonth(props),
[44831] Fix | Delete
currentMonth = _this$getStateForNewM.currentMonth,
[44832] Fix | Delete
visibleDays = _this$getStateForNewM.visibleDays;
[44833] Fix | Delete
[44834] Fix | Delete
_this.state = {
[44835] Fix | Delete
hoverDate: null,
[44836] Fix | Delete
currentMonth: currentMonth,
[44837] Fix | Delete
visibleDays: visibleDays
[44838] Fix | Delete
};
[44839] Fix | Delete
[44840] Fix | Delete
_this.onDayMouseEnter = _this.onDayMouseEnter.bind(_this);
[44841] Fix | Delete
_this.onDayMouseLeave = _this.onDayMouseLeave.bind(_this);
[44842] Fix | Delete
_this.onDayClick = _this.onDayClick.bind(_this);
[44843] Fix | Delete
[44844] Fix | Delete
_this.onPrevMonthClick = _this.onPrevMonthClick.bind(_this);
[44845] Fix | Delete
_this.onNextMonthClick = _this.onNextMonthClick.bind(_this);
[44846] Fix | Delete
_this.onMonthChange = _this.onMonthChange.bind(_this);
[44847] Fix | Delete
_this.onYearChange = _this.onYearChange.bind(_this);
[44848] Fix | Delete
[44849] Fix | Delete
_this.getFirstFocusableDay = _this.getFirstFocusableDay.bind(_this);
[44850] Fix | Delete
return _this;
[44851] Fix | Delete
}
[44852] Fix | Delete
[44853] Fix | Delete
_createClass(DayPickerSingleDateController, [{
[44854] Fix | Delete
key: 'componentDidMount',
[44855] Fix | Delete
value: function () {
[44856] Fix | Delete
function componentDidMount() {
[44857] Fix | Delete
this.isTouchDevice = (0, _isTouchDevice2['default'])();
[44858] Fix | Delete
}
[44859] Fix | Delete
[44860] Fix | Delete
return componentDidMount;
[44861] Fix | Delete
}()
[44862] Fix | Delete
}, {
[44863] Fix | Delete
key: 'componentWillReceiveProps',
[44864] Fix | Delete
value: function () {
[44865] Fix | Delete
function componentWillReceiveProps(nextProps) {
[44866] Fix | Delete
var _this2 = this;
[44867] Fix | Delete
[44868] Fix | Delete
var date = nextProps.date,
[44869] Fix | Delete
focused = nextProps.focused,
[44870] Fix | Delete
isOutsideRange = nextProps.isOutsideRange,
[44871] Fix | Delete
isDayBlocked = nextProps.isDayBlocked,
[44872] Fix | Delete
isDayHighlighted = nextProps.isDayHighlighted,
[44873] Fix | Delete
initialVisibleMonth = nextProps.initialVisibleMonth,
[44874] Fix | Delete
numberOfMonths = nextProps.numberOfMonths,
[44875] Fix | Delete
enableOutsideDays = nextProps.enableOutsideDays;
[44876] Fix | Delete
var _props = this.props,
[44877] Fix | Delete
prevIsOutsideRange = _props.isOutsideRange,
[44878] Fix | Delete
prevIsDayBlocked = _props.isDayBlocked,
[44879] Fix | Delete
prevIsDayHighlighted = _props.isDayHighlighted,
[44880] Fix | Delete
prevNumberOfMonths = _props.numberOfMonths,
[44881] Fix | Delete
prevEnableOutsideDays = _props.enableOutsideDays,
[44882] Fix | Delete
prevInitialVisibleMonth = _props.initialVisibleMonth,
[44883] Fix | Delete
prevFocused = _props.focused,
[44884] Fix | Delete
prevDate = _props.date;
[44885] Fix | Delete
var visibleDays = this.state.visibleDays;
[44886] Fix | Delete
[44887] Fix | Delete
[44888] Fix | Delete
var recomputeOutsideRange = false;
[44889] Fix | Delete
var recomputeDayBlocked = false;
[44890] Fix | Delete
var recomputeDayHighlighted = false;
[44891] Fix | Delete
[44892] Fix | Delete
if (isOutsideRange !== prevIsOutsideRange) {
[44893] Fix | Delete
this.modifiers['blocked-out-of-range'] = function (day) {
[44894] Fix | Delete
return isOutsideRange(day);
[44895] Fix | Delete
};
[44896] Fix | Delete
recomputeOutsideRange = true;
[44897] Fix | Delete
}
[44898] Fix | Delete
[44899] Fix | Delete
if (isDayBlocked !== prevIsDayBlocked) {
[44900] Fix | Delete
this.modifiers['blocked-calendar'] = function (day) {
[44901] Fix | Delete
return isDayBlocked(day);
[44902] Fix | Delete
};
[44903] Fix | Delete
recomputeDayBlocked = true;
[44904] Fix | Delete
}
[44905] Fix | Delete
[44906] Fix | Delete
if (isDayHighlighted !== prevIsDayHighlighted) {
[44907] Fix | Delete
this.modifiers['highlighted-calendar'] = function (day) {
[44908] Fix | Delete
return isDayHighlighted(day);
[44909] Fix | Delete
};
[44910] Fix | Delete
recomputeDayHighlighted = true;
[44911] Fix | Delete
}
[44912] Fix | Delete
[44913] Fix | Delete
var recomputePropModifiers = recomputeOutsideRange || recomputeDayBlocked || recomputeDayHighlighted;
[44914] Fix | Delete
[44915] Fix | Delete
if (numberOfMonths !== prevNumberOfMonths || enableOutsideDays !== prevEnableOutsideDays || initialVisibleMonth !== prevInitialVisibleMonth && !prevFocused && focused) {
[44916] Fix | Delete
var newMonthState = this.getStateForNewMonth(nextProps);
[44917] Fix | Delete
var currentMonth = newMonthState.currentMonth;
[44918] Fix | Delete
visibleDays = newMonthState.visibleDays;
[44919] Fix | Delete
[44920] Fix | Delete
this.setState({
[44921] Fix | Delete
currentMonth: currentMonth,
[44922] Fix | Delete
visibleDays: visibleDays
[44923] Fix | Delete
});
[44924] Fix | Delete
}
[44925] Fix | Delete
[44926] Fix | Delete
var didDateChange = date !== prevDate;
[44927] Fix | Delete
var didFocusChange = focused !== prevFocused;
[44928] Fix | Delete
[44929] Fix | Delete
var modifiers = {};
[44930] Fix | Delete
[44931] Fix | Delete
if (didDateChange) {
[44932] Fix | Delete
modifiers = this.deleteModifier(modifiers, prevDate, 'selected');
[44933] Fix | Delete
modifiers = this.addModifier(modifiers, date, 'selected');
[44934] Fix | Delete
}
[44935] Fix | Delete
[44936] Fix | Delete
if (didFocusChange || recomputePropModifiers) {
[44937] Fix | Delete
(0, _object4['default'])(visibleDays).forEach(function (days) {
[44938] Fix | Delete
Object.keys(days).forEach(function (day) {
[44939] Fix | Delete
var momentObj = (0, _moment2['default'])(day);
[44940] Fix | Delete
if (_this2.isBlocked(momentObj)) {
[44941] Fix | Delete
modifiers = _this2.addModifier(modifiers, momentObj, 'blocked');
[44942] Fix | Delete
} else {
[44943] Fix | Delete
modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked');
[44944] Fix | Delete
}
[44945] Fix | Delete
[44946] Fix | Delete
if (didFocusChange || recomputeOutsideRange) {
[44947] Fix | Delete
if (isOutsideRange(momentObj)) {
[44948] Fix | Delete
modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-out-of-range');
[44949] Fix | Delete
} else {
[44950] Fix | Delete
modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-out-of-range');
[44951] Fix | Delete
}
[44952] Fix | Delete
}
[44953] Fix | Delete
[44954] Fix | Delete
if (didFocusChange || recomputeDayBlocked) {
[44955] Fix | Delete
if (isDayBlocked(momentObj)) {
[44956] Fix | Delete
modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-calendar');
[44957] Fix | Delete
} else {
[44958] Fix | Delete
modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-calendar');
[44959] Fix | Delete
}
[44960] Fix | Delete
}
[44961] Fix | Delete
[44962] Fix | Delete
if (didFocusChange || recomputeDayHighlighted) {
[44963] Fix | Delete
if (isDayHighlighted(momentObj)) {
[44964] Fix | Delete
modifiers = _this2.addModifier(modifiers, momentObj, 'highlighted-calendar');
[44965] Fix | Delete
} else {
[44966] Fix | Delete
modifiers = _this2.deleteModifier(modifiers, momentObj, 'highlighted-calendar');
[44967] Fix | Delete
}
[44968] Fix | Delete
}
[44969] Fix | Delete
});
[44970] Fix | Delete
});
[44971] Fix | Delete
}
[44972] Fix | Delete
[44973] Fix | Delete
var today = (0, _moment2['default'])();
[44974] Fix | Delete
if (!(0, _isSameDay2['default'])(this.today, today)) {
[44975] Fix | Delete
modifiers = this.deleteModifier(modifiers, this.today, 'today');
[44976] Fix | Delete
modifiers = this.addModifier(modifiers, today, 'today');
[44977] Fix | Delete
this.today = today;
[44978] Fix | Delete
}
[44979] Fix | Delete
[44980] Fix | Delete
if (Object.keys(modifiers).length > 0) {
[44981] Fix | Delete
this.setState({
[44982] Fix | Delete
visibleDays: (0, _object2['default'])({}, visibleDays, modifiers)
[44983] Fix | Delete
});
[44984] Fix | Delete
}
[44985] Fix | Delete
}
[44986] Fix | Delete
[44987] Fix | Delete
return componentWillReceiveProps;
[44988] Fix | Delete
}()
[44989] Fix | Delete
}, {
[44990] Fix | Delete
key: 'componentWillUpdate',
[44991] Fix | Delete
value: function () {
[44992] Fix | Delete
function componentWillUpdate() {
[44993] Fix | Delete
this.today = (0, _moment2['default'])();
[44994] Fix | Delete
}
[44995] Fix | Delete
[44996] Fix | Delete
return componentWillUpdate;
[44997] Fix | Delete
}()
[44998] Fix | Delete
}, {
[44999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function