Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
value: function () {
[9500] Fix | Delete
function setCalendarInfoRef(ref) {
[9501] Fix | Delete
this.calendarInfo = ref;
[9502] Fix | Delete
}
[9503] Fix | Delete
[9504] Fix | Delete
return setCalendarInfoRef;
[9505] Fix | Delete
}()
[9506] Fix | Delete
}, {
[9507] Fix | Delete
key: 'setTransitionContainerRef',
[9508] Fix | Delete
value: function () {
[9509] Fix | Delete
function setTransitionContainerRef(ref) {
[9510] Fix | Delete
this.transitionContainer = ref;
[9511] Fix | Delete
}
[9512] Fix | Delete
[9513] Fix | Delete
return setTransitionContainerRef;
[9514] Fix | Delete
}()
[9515] Fix | Delete
}, {
[9516] Fix | Delete
key: 'maybeTransitionNextMonth',
[9517] Fix | Delete
value: function () {
[9518] Fix | Delete
function maybeTransitionNextMonth(newFocusedDate) {
[9519] Fix | Delete
var numberOfMonths = this.props.numberOfMonths;
[9520] Fix | Delete
var _state5 = this.state,
[9521] Fix | Delete
currentMonth = _state5.currentMonth,
[9522] Fix | Delete
focusedDate = _state5.focusedDate;
[9523] Fix | Delete
[9524] Fix | Delete
[9525] Fix | Delete
var newFocusedDateMonth = newFocusedDate.month();
[9526] Fix | Delete
var focusedDateMonth = focusedDate.month();
[9527] Fix | Delete
var isNewFocusedDateVisible = (0, _isDayVisible2['default'])(newFocusedDate, currentMonth, numberOfMonths);
[9528] Fix | Delete
if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) {
[9529] Fix | Delete
this.onNextMonthClick(newFocusedDate);
[9530] Fix | Delete
return true;
[9531] Fix | Delete
}
[9532] Fix | Delete
[9533] Fix | Delete
return false;
[9534] Fix | Delete
}
[9535] Fix | Delete
[9536] Fix | Delete
return maybeTransitionNextMonth;
[9537] Fix | Delete
}()
[9538] Fix | Delete
}, {
[9539] Fix | Delete
key: 'maybeTransitionPrevMonth',
[9540] Fix | Delete
value: function () {
[9541] Fix | Delete
function maybeTransitionPrevMonth(newFocusedDate) {
[9542] Fix | Delete
var numberOfMonths = this.props.numberOfMonths;
[9543] Fix | Delete
var _state6 = this.state,
[9544] Fix | Delete
currentMonth = _state6.currentMonth,
[9545] Fix | Delete
focusedDate = _state6.focusedDate;
[9546] Fix | Delete
[9547] Fix | Delete
[9548] Fix | Delete
var newFocusedDateMonth = newFocusedDate.month();
[9549] Fix | Delete
var focusedDateMonth = focusedDate.month();
[9550] Fix | Delete
var isNewFocusedDateVisible = (0, _isDayVisible2['default'])(newFocusedDate, currentMonth, numberOfMonths);
[9551] Fix | Delete
if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) {
[9552] Fix | Delete
this.onPrevMonthClick(newFocusedDate);
[9553] Fix | Delete
return true;
[9554] Fix | Delete
}
[9555] Fix | Delete
[9556] Fix | Delete
return false;
[9557] Fix | Delete
}
[9558] Fix | Delete
[9559] Fix | Delete
return maybeTransitionPrevMonth;
[9560] Fix | Delete
}()
[9561] Fix | Delete
}, {
[9562] Fix | Delete
key: 'multiplyScrollableMonths',
[9563] Fix | Delete
value: function () {
[9564] Fix | Delete
function multiplyScrollableMonths(e) {
[9565] Fix | Delete
var onMultiplyScrollableMonths = this.props.onMultiplyScrollableMonths;
[9566] Fix | Delete
[9567] Fix | Delete
if (e) e.preventDefault();
[9568] Fix | Delete
[9569] Fix | Delete
if (onMultiplyScrollableMonths) onMultiplyScrollableMonths(e);
[9570] Fix | Delete
[9571] Fix | Delete
this.setState(function (_ref) {
[9572] Fix | Delete
var scrollableMonthMultiple = _ref.scrollableMonthMultiple;
[9573] Fix | Delete
return {
[9574] Fix | Delete
scrollableMonthMultiple: scrollableMonthMultiple + 1
[9575] Fix | Delete
};
[9576] Fix | Delete
});
[9577] Fix | Delete
}
[9578] Fix | Delete
[9579] Fix | Delete
return multiplyScrollableMonths;
[9580] Fix | Delete
}()
[9581] Fix | Delete
}, {
[9582] Fix | Delete
key: 'isHorizontal',
[9583] Fix | Delete
value: function () {
[9584] Fix | Delete
function isHorizontal() {
[9585] Fix | Delete
var orientation = this.props.orientation;
[9586] Fix | Delete
[9587] Fix | Delete
return orientation === _constants.HORIZONTAL_ORIENTATION;
[9588] Fix | Delete
}
[9589] Fix | Delete
[9590] Fix | Delete
return isHorizontal;
[9591] Fix | Delete
}()
[9592] Fix | Delete
}, {
[9593] Fix | Delete
key: 'isVertical',
[9594] Fix | Delete
value: function () {
[9595] Fix | Delete
function isVertical() {
[9596] Fix | Delete
var orientation = this.props.orientation;
[9597] Fix | Delete
[9598] Fix | Delete
return orientation === _constants.VERTICAL_ORIENTATION || orientation === _constants.VERTICAL_SCROLLABLE;
[9599] Fix | Delete
}
[9600] Fix | Delete
[9601] Fix | Delete
return isVertical;
[9602] Fix | Delete
}()
[9603] Fix | Delete
}, {
[9604] Fix | Delete
key: 'updateStateAfterMonthTransition',
[9605] Fix | Delete
value: function () {
[9606] Fix | Delete
function updateStateAfterMonthTransition() {
[9607] Fix | Delete
var _this4 = this;
[9608] Fix | Delete
[9609] Fix | Delete
var _props7 = this.props,
[9610] Fix | Delete
onPrevMonthClick = _props7.onPrevMonthClick,
[9611] Fix | Delete
onNextMonthClick = _props7.onNextMonthClick,
[9612] Fix | Delete
numberOfMonths = _props7.numberOfMonths,
[9613] Fix | Delete
onMonthChange = _props7.onMonthChange,
[9614] Fix | Delete
onYearChange = _props7.onYearChange,
[9615] Fix | Delete
isRTL = _props7.isRTL;
[9616] Fix | Delete
var _state7 = this.state,
[9617] Fix | Delete
currentMonth = _state7.currentMonth,
[9618] Fix | Delete
monthTransition = _state7.monthTransition,
[9619] Fix | Delete
focusedDate = _state7.focusedDate,
[9620] Fix | Delete
nextFocusedDate = _state7.nextFocusedDate,
[9621] Fix | Delete
withMouseInteractions = _state7.withMouseInteractions,
[9622] Fix | Delete
calendarMonthWidth = _state7.calendarMonthWidth;
[9623] Fix | Delete
[9624] Fix | Delete
[9625] Fix | Delete
if (!monthTransition) return;
[9626] Fix | Delete
[9627] Fix | Delete
var newMonth = currentMonth.clone();
[9628] Fix | Delete
var firstDayOfWeek = this.getFirstDayOfWeek();
[9629] Fix | Delete
if (monthTransition === PREV_TRANSITION) {
[9630] Fix | Delete
newMonth.subtract(1, 'month');
[9631] Fix | Delete
if (onPrevMonthClick) onPrevMonthClick(newMonth);
[9632] Fix | Delete
var newInvisibleMonth = newMonth.clone().subtract(1, 'month');
[9633] Fix | Delete
var numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks2['default'])(newInvisibleMonth, firstDayOfWeek);
[9634] Fix | Delete
this.calendarMonthWeeks = [numberOfWeeks].concat(_toConsumableArray(this.calendarMonthWeeks.slice(0, -1)));
[9635] Fix | Delete
} else if (monthTransition === NEXT_TRANSITION) {
[9636] Fix | Delete
newMonth.add(1, 'month');
[9637] Fix | Delete
if (onNextMonthClick) onNextMonthClick(newMonth);
[9638] Fix | Delete
var _newInvisibleMonth = newMonth.clone().add(numberOfMonths, 'month');
[9639] Fix | Delete
var _numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks2['default'])(_newInvisibleMonth, firstDayOfWeek);
[9640] Fix | Delete
this.calendarMonthWeeks = [].concat(_toConsumableArray(this.calendarMonthWeeks.slice(1)), [_numberOfWeeks]);
[9641] Fix | Delete
} else if (monthTransition === MONTH_SELECTION_TRANSITION) {
[9642] Fix | Delete
if (onMonthChange) onMonthChange(newMonth);
[9643] Fix | Delete
} else if (monthTransition === YEAR_SELECTION_TRANSITION) {
[9644] Fix | Delete
if (onYearChange) onYearChange(newMonth);
[9645] Fix | Delete
}
[9646] Fix | Delete
[9647] Fix | Delete
var newFocusedDate = null;
[9648] Fix | Delete
if (nextFocusedDate) {
[9649] Fix | Delete
newFocusedDate = nextFocusedDate;
[9650] Fix | Delete
} else if (!focusedDate && !withMouseInteractions) {
[9651] Fix | Delete
newFocusedDate = this.getFocusedDay(newMonth);
[9652] Fix | Delete
}
[9653] Fix | Delete
[9654] Fix | Delete
this.setState({
[9655] Fix | Delete
currentMonth: newMonth,
[9656] Fix | Delete
monthTransition: null,
[9657] Fix | Delete
translationValue: isRTL && this.isHorizontal() ? -calendarMonthWidth : 0,
[9658] Fix | Delete
nextFocusedDate: null,
[9659] Fix | Delete
focusedDate: newFocusedDate
[9660] Fix | Delete
}, function () {
[9661] Fix | Delete
// we don't want to focus on the relevant calendar day after a month transition
[9662] Fix | Delete
// if the user is navigating around using a mouse
[9663] Fix | Delete
if (withMouseInteractions) {
[9664] Fix | Delete
var activeElement = (0, _getActiveElement2['default'])();
[9665] Fix | Delete
if (activeElement && activeElement !== document.body && _this4.container.contains(activeElement)) {
[9666] Fix | Delete
activeElement.blur();
[9667] Fix | Delete
}
[9668] Fix | Delete
}
[9669] Fix | Delete
});
[9670] Fix | Delete
}
[9671] Fix | Delete
[9672] Fix | Delete
return updateStateAfterMonthTransition;
[9673] Fix | Delete
}()
[9674] Fix | Delete
}, {
[9675] Fix | Delete
key: 'adjustDayPickerHeight',
[9676] Fix | Delete
value: function () {
[9677] Fix | Delete
function adjustDayPickerHeight(newMonthHeight) {
[9678] Fix | Delete
var _this5 = this;
[9679] Fix | Delete
[9680] Fix | Delete
var monthHeight = newMonthHeight + MONTH_PADDING;
[9681] Fix | Delete
if (monthHeight !== this.calendarMonthGridHeight) {
[9682] Fix | Delete
this.transitionContainer.style.height = String(monthHeight) + 'px';
[9683] Fix | Delete
if (!this.calendarMonthGridHeight) {
[9684] Fix | Delete
setTimeout(function () {
[9685] Fix | Delete
_this5.setState({ hasSetHeight: true });
[9686] Fix | Delete
}, 0);
[9687] Fix | Delete
}
[9688] Fix | Delete
this.calendarMonthGridHeight = monthHeight;
[9689] Fix | Delete
}
[9690] Fix | Delete
}
[9691] Fix | Delete
[9692] Fix | Delete
return adjustDayPickerHeight;
[9693] Fix | Delete
}()
[9694] Fix | Delete
}, {
[9695] Fix | Delete
key: 'calculateAndSetDayPickerHeight',
[9696] Fix | Delete
value: function () {
[9697] Fix | Delete
function calculateAndSetDayPickerHeight() {
[9698] Fix | Delete
var _props8 = this.props,
[9699] Fix | Delete
daySize = _props8.daySize,
[9700] Fix | Delete
numberOfMonths = _props8.numberOfMonths;
[9701] Fix | Delete
var monthTitleHeight = this.state.monthTitleHeight;
[9702] Fix | Delete
[9703] Fix | Delete
[9704] Fix | Delete
var visibleCalendarWeeks = this.calendarMonthWeeks.slice(1, numberOfMonths + 1);
[9705] Fix | Delete
var calendarMonthWeeksHeight = Math.max.apply(Math, [0].concat(_toConsumableArray(visibleCalendarWeeks))) * (daySize - 1);
[9706] Fix | Delete
var newMonthHeight = monthTitleHeight + calendarMonthWeeksHeight + 1;
[9707] Fix | Delete
[9708] Fix | Delete
if (this.isHorizontal()) {
[9709] Fix | Delete
this.adjustDayPickerHeight(newMonthHeight);
[9710] Fix | Delete
}
[9711] Fix | Delete
}
[9712] Fix | Delete
[9713] Fix | Delete
return calculateAndSetDayPickerHeight;
[9714] Fix | Delete
}()
[9715] Fix | Delete
}, {
[9716] Fix | Delete
key: 'openKeyboardShortcutsPanel',
[9717] Fix | Delete
value: function () {
[9718] Fix | Delete
function openKeyboardShortcutsPanel(onCloseCallBack) {
[9719] Fix | Delete
this.setState({
[9720] Fix | Delete
showKeyboardShortcuts: true,
[9721] Fix | Delete
onKeyboardShortcutsPanelClose: onCloseCallBack
[9722] Fix | Delete
});
[9723] Fix | Delete
}
[9724] Fix | Delete
[9725] Fix | Delete
return openKeyboardShortcutsPanel;
[9726] Fix | Delete
}()
[9727] Fix | Delete
}, {
[9728] Fix | Delete
key: 'closeKeyboardShortcutsPanel',
[9729] Fix | Delete
value: function () {
[9730] Fix | Delete
function closeKeyboardShortcutsPanel() {
[9731] Fix | Delete
var onKeyboardShortcutsPanelClose = this.state.onKeyboardShortcutsPanelClose;
[9732] Fix | Delete
[9733] Fix | Delete
[9734] Fix | Delete
if (onKeyboardShortcutsPanelClose) {
[9735] Fix | Delete
onKeyboardShortcutsPanelClose();
[9736] Fix | Delete
}
[9737] Fix | Delete
[9738] Fix | Delete
this.setState({
[9739] Fix | Delete
onKeyboardShortcutsPanelClose: null,
[9740] Fix | Delete
showKeyboardShortcuts: false
[9741] Fix | Delete
});
[9742] Fix | Delete
}
[9743] Fix | Delete
[9744] Fix | Delete
return closeKeyboardShortcutsPanel;
[9745] Fix | Delete
}()
[9746] Fix | Delete
}, {
[9747] Fix | Delete
key: 'renderNavigation',
[9748] Fix | Delete
value: function () {
[9749] Fix | Delete
function renderNavigation() {
[9750] Fix | Delete
var _this6 = this;
[9751] Fix | Delete
[9752] Fix | Delete
var _props9 = this.props,
[9753] Fix | Delete
navPrev = _props9.navPrev,
[9754] Fix | Delete
navNext = _props9.navNext,
[9755] Fix | Delete
noNavButtons = _props9.noNavButtons,
[9756] Fix | Delete
orientation = _props9.orientation,
[9757] Fix | Delete
phrases = _props9.phrases,
[9758] Fix | Delete
isRTL = _props9.isRTL;
[9759] Fix | Delete
[9760] Fix | Delete
[9761] Fix | Delete
if (noNavButtons) {
[9762] Fix | Delete
return null;
[9763] Fix | Delete
}
[9764] Fix | Delete
[9765] Fix | Delete
var onNextMonthClick = void 0;
[9766] Fix | Delete
if (orientation === _constants.VERTICAL_SCROLLABLE) {
[9767] Fix | Delete
onNextMonthClick = this.multiplyScrollableMonths;
[9768] Fix | Delete
} else {
[9769] Fix | Delete
onNextMonthClick = function () {
[9770] Fix | Delete
function onNextMonthClick(e) {
[9771] Fix | Delete
_this6.onNextMonthClick(null, e);
[9772] Fix | Delete
}
[9773] Fix | Delete
[9774] Fix | Delete
return onNextMonthClick;
[9775] Fix | Delete
}();
[9776] Fix | Delete
}
[9777] Fix | Delete
[9778] Fix | Delete
return _react2['default'].createElement(_DayPickerNavigation2['default'], {
[9779] Fix | Delete
onPrevMonthClick: function () {
[9780] Fix | Delete
function onPrevMonthClick(e) {
[9781] Fix | Delete
_this6.onPrevMonthClick(null, e);
[9782] Fix | Delete
}
[9783] Fix | Delete
[9784] Fix | Delete
return onPrevMonthClick;
[9785] Fix | Delete
}(),
[9786] Fix | Delete
onNextMonthClick: onNextMonthClick,
[9787] Fix | Delete
navPrev: navPrev,
[9788] Fix | Delete
navNext: navNext,
[9789] Fix | Delete
orientation: orientation,
[9790] Fix | Delete
phrases: phrases,
[9791] Fix | Delete
isRTL: isRTL
[9792] Fix | Delete
});
[9793] Fix | Delete
}
[9794] Fix | Delete
[9795] Fix | Delete
return renderNavigation;
[9796] Fix | Delete
}()
[9797] Fix | Delete
}, {
[9798] Fix | Delete
key: 'renderWeekHeader',
[9799] Fix | Delete
value: function () {
[9800] Fix | Delete
function renderWeekHeader(index) {
[9801] Fix | Delete
var _props10 = this.props,
[9802] Fix | Delete
daySize = _props10.daySize,
[9803] Fix | Delete
horizontalMonthPadding = _props10.horizontalMonthPadding,
[9804] Fix | Delete
orientation = _props10.orientation,
[9805] Fix | Delete
weekDayFormat = _props10.weekDayFormat,
[9806] Fix | Delete
styles = _props10.styles;
[9807] Fix | Delete
var calendarMonthWidth = this.state.calendarMonthWidth;
[9808] Fix | Delete
[9809] Fix | Delete
var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE;
[9810] Fix | Delete
var horizontalStyle = {
[9811] Fix | Delete
left: index * calendarMonthWidth
[9812] Fix | Delete
};
[9813] Fix | Delete
var verticalStyle = {
[9814] Fix | Delete
marginLeft: -calendarMonthWidth / 2
[9815] Fix | Delete
};
[9816] Fix | Delete
[9817] Fix | Delete
var weekHeaderStyle = {}; // no styles applied to the vertical-scrollable orientation
[9818] Fix | Delete
if (this.isHorizontal()) {
[9819] Fix | Delete
weekHeaderStyle = horizontalStyle;
[9820] Fix | Delete
} else if (this.isVertical() && !verticalScrollable) {
[9821] Fix | Delete
weekHeaderStyle = verticalStyle;
[9822] Fix | Delete
}
[9823] Fix | Delete
[9824] Fix | Delete
var firstDayOfWeek = this.getFirstDayOfWeek();
[9825] Fix | Delete
[9826] Fix | Delete
var header = [];
[9827] Fix | Delete
for (var i = 0; i < 7; i += 1) {
[9828] Fix | Delete
header.push(_react2['default'].createElement(
[9829] Fix | Delete
'li',
[9830] Fix | Delete
_extends({ key: i }, (0, _reactWithStyles.css)(styles.DayPicker_weekHeader_li, { width: daySize })),
[9831] Fix | Delete
_react2['default'].createElement(
[9832] Fix | Delete
'small',
[9833] Fix | Delete
null,
[9834] Fix | Delete
(0, _moment2['default'])().day((i + firstDayOfWeek) % 7).format(weekDayFormat)
[9835] Fix | Delete
)
[9836] Fix | Delete
));
[9837] Fix | Delete
}
[9838] Fix | Delete
[9839] Fix | Delete
return _react2['default'].createElement(
[9840] Fix | Delete
'div',
[9841] Fix | Delete
_extends({}, (0, _reactWithStyles.css)(styles.DayPicker_weekHeader, this.isVertical() && styles.DayPicker_weekHeader__vertical, verticalScrollable && styles.DayPicker_weekHeader__verticalScrollable, weekHeaderStyle, { padding: '0 ' + String(horizontalMonthPadding) + 'px' }), {
[9842] Fix | Delete
key: 'week-' + String(index)
[9843] Fix | Delete
}),
[9844] Fix | Delete
_react2['default'].createElement(
[9845] Fix | Delete
'ul',
[9846] Fix | Delete
(0, _reactWithStyles.css)(styles.DayPicker_weekHeader_ul),
[9847] Fix | Delete
header
[9848] Fix | Delete
)
[9849] Fix | Delete
);
[9850] Fix | Delete
}
[9851] Fix | Delete
[9852] Fix | Delete
return renderWeekHeader;
[9853] Fix | Delete
}()
[9854] Fix | Delete
}, {
[9855] Fix | Delete
key: 'render',
[9856] Fix | Delete
value: function () {
[9857] Fix | Delete
function render() {
[9858] Fix | Delete
var _this7 = this;
[9859] Fix | Delete
[9860] Fix | Delete
var _state8 = this.state,
[9861] Fix | Delete
calendarMonthWidth = _state8.calendarMonthWidth,
[9862] Fix | Delete
currentMonth = _state8.currentMonth,
[9863] Fix | Delete
monthTransition = _state8.monthTransition,
[9864] Fix | Delete
translationValue = _state8.translationValue,
[9865] Fix | Delete
scrollableMonthMultiple = _state8.scrollableMonthMultiple,
[9866] Fix | Delete
focusedDate = _state8.focusedDate,
[9867] Fix | Delete
showKeyboardShortcuts = _state8.showKeyboardShortcuts,
[9868] Fix | Delete
isTouch = _state8.isTouchDevice,
[9869] Fix | Delete
hasSetHeight = _state8.hasSetHeight,
[9870] Fix | Delete
calendarInfoWidth = _state8.calendarInfoWidth,
[9871] Fix | Delete
monthTitleHeight = _state8.monthTitleHeight;
[9872] Fix | Delete
var _props11 = this.props,
[9873] Fix | Delete
enableOutsideDays = _props11.enableOutsideDays,
[9874] Fix | Delete
numberOfMonths = _props11.numberOfMonths,
[9875] Fix | Delete
orientation = _props11.orientation,
[9876] Fix | Delete
modifiers = _props11.modifiers,
[9877] Fix | Delete
withPortal = _props11.withPortal,
[9878] Fix | Delete
onDayClick = _props11.onDayClick,
[9879] Fix | Delete
onDayMouseEnter = _props11.onDayMouseEnter,
[9880] Fix | Delete
onDayMouseLeave = _props11.onDayMouseLeave,
[9881] Fix | Delete
firstDayOfWeek = _props11.firstDayOfWeek,
[9882] Fix | Delete
renderMonthText = _props11.renderMonthText,
[9883] Fix | Delete
renderCalendarDay = _props11.renderCalendarDay,
[9884] Fix | Delete
renderDayContents = _props11.renderDayContents,
[9885] Fix | Delete
renderCalendarInfo = _props11.renderCalendarInfo,
[9886] Fix | Delete
renderMonthElement = _props11.renderMonthElement,
[9887] Fix | Delete
calendarInfoPosition = _props11.calendarInfoPosition,
[9888] Fix | Delete
hideKeyboardShortcutsPanel = _props11.hideKeyboardShortcutsPanel,
[9889] Fix | Delete
onOutsideClick = _props11.onOutsideClick,
[9890] Fix | Delete
monthFormat = _props11.monthFormat,
[9891] Fix | Delete
daySize = _props11.daySize,
[9892] Fix | Delete
isFocused = _props11.isFocused,
[9893] Fix | Delete
isRTL = _props11.isRTL,
[9894] Fix | Delete
styles = _props11.styles,
[9895] Fix | Delete
theme = _props11.theme,
[9896] Fix | Delete
phrases = _props11.phrases,
[9897] Fix | Delete
verticalHeight = _props11.verticalHeight,
[9898] Fix | Delete
dayAriaLabelFormat = _props11.dayAriaLabelFormat,
[9899] Fix | Delete
noBorder = _props11.noBorder,
[9900] Fix | Delete
transitionDuration = _props11.transitionDuration,
[9901] Fix | Delete
verticalBorderSpacing = _props11.verticalBorderSpacing,
[9902] Fix | Delete
horizontalMonthPadding = _props11.horizontalMonthPadding;
[9903] Fix | Delete
var dayPickerHorizontalPadding = theme.reactDates.spacing.dayPickerHorizontalPadding;
[9904] Fix | Delete
[9905] Fix | Delete
[9906] Fix | Delete
var isHorizontal = this.isHorizontal();
[9907] Fix | Delete
[9908] Fix | Delete
var numOfWeekHeaders = this.isVertical() ? 1 : numberOfMonths;
[9909] Fix | Delete
var weekHeaders = [];
[9910] Fix | Delete
for (var i = 0; i < numOfWeekHeaders; i += 1) {
[9911] Fix | Delete
weekHeaders.push(this.renderWeekHeader(i));
[9912] Fix | Delete
}
[9913] Fix | Delete
[9914] Fix | Delete
var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE;
[9915] Fix | Delete
var height = void 0;
[9916] Fix | Delete
if (isHorizontal) {
[9917] Fix | Delete
height = this.calendarMonthGridHeight;
[9918] Fix | Delete
} else if (this.isVertical() && !verticalScrollable && !withPortal) {
[9919] Fix | Delete
// If the user doesn't set a desired height,
[9920] Fix | Delete
// we default back to this kind of made-up value that generally looks good
[9921] Fix | Delete
height = verticalHeight || 1.75 * calendarMonthWidth;
[9922] Fix | Delete
}
[9923] Fix | Delete
[9924] Fix | Delete
var isCalendarMonthGridAnimating = monthTransition !== null;
[9925] Fix | Delete
[9926] Fix | Delete
var shouldFocusDate = !isCalendarMonthGridAnimating && isFocused;
[9927] Fix | Delete
[9928] Fix | Delete
var keyboardShortcutButtonLocation = _DayPickerKeyboardShortcuts.BOTTOM_RIGHT;
[9929] Fix | Delete
if (this.isVertical()) {
[9930] Fix | Delete
keyboardShortcutButtonLocation = withPortal ? _DayPickerKeyboardShortcuts.TOP_LEFT : _DayPickerKeyboardShortcuts.TOP_RIGHT;
[9931] Fix | Delete
}
[9932] Fix | Delete
[9933] Fix | Delete
var shouldAnimateHeight = isHorizontal && hasSetHeight;
[9934] Fix | Delete
[9935] Fix | Delete
var calendarInfoPositionTop = calendarInfoPosition === _constants.INFO_POSITION_TOP;
[9936] Fix | Delete
var calendarInfoPositionBottom = calendarInfoPosition === _constants.INFO_POSITION_BOTTOM;
[9937] Fix | Delete
var calendarInfoPositionBefore = calendarInfoPosition === _constants.INFO_POSITION_BEFORE;
[9938] Fix | Delete
var calendarInfoPositionAfter = calendarInfoPosition === _constants.INFO_POSITION_AFTER;
[9939] Fix | Delete
var calendarInfoIsInline = calendarInfoPositionBefore || calendarInfoPositionAfter;
[9940] Fix | Delete
[9941] Fix | Delete
var calendarInfo = renderCalendarInfo && _react2['default'].createElement(
[9942] Fix | Delete
'div',
[9943] Fix | Delete
_extends({
[9944] Fix | Delete
ref: this.setCalendarInfoRef
[9945] Fix | Delete
}, (0, _reactWithStyles.css)(calendarInfoIsInline && styles.DayPicker_calendarInfo__horizontal)),
[9946] Fix | Delete
renderCalendarInfo()
[9947] Fix | Delete
);
[9948] Fix | Delete
[9949] Fix | Delete
var calendarInfoPanelWidth = renderCalendarInfo && calendarInfoIsInline ? calendarInfoWidth : 0;
[9950] Fix | Delete
[9951] Fix | Delete
var firstVisibleMonthIndex = this.getFirstVisibleIndex();
[9952] Fix | Delete
var wrapperHorizontalWidth = calendarMonthWidth * numberOfMonths + 2 * dayPickerHorizontalPadding;
[9953] Fix | Delete
// Adding `1px` because of whitespace between 2 inline-block
[9954] Fix | Delete
var fullHorizontalWidth = wrapperHorizontalWidth + calendarInfoPanelWidth + 1;
[9955] Fix | Delete
[9956] Fix | Delete
var transitionContainerStyle = {
[9957] Fix | Delete
width: isHorizontal && wrapperHorizontalWidth,
[9958] Fix | Delete
height: height
[9959] Fix | Delete
};
[9960] Fix | Delete
[9961] Fix | Delete
var dayPickerWrapperStyle = {
[9962] Fix | Delete
width: isHorizontal && wrapperHorizontalWidth
[9963] Fix | Delete
};
[9964] Fix | Delete
[9965] Fix | Delete
var dayPickerStyle = {
[9966] Fix | Delete
width: isHorizontal && fullHorizontalWidth,
[9967] Fix | Delete
[9968] Fix | Delete
// These values are to center the datepicker (approximately) on the page
[9969] Fix | Delete
marginLeft: isHorizontal && withPortal ? -fullHorizontalWidth / 2 : null,
[9970] Fix | Delete
marginTop: isHorizontal && withPortal ? -calendarMonthWidth / 2 : null
[9971] Fix | Delete
};
[9972] Fix | Delete
[9973] Fix | Delete
return _react2['default'].createElement(
[9974] Fix | Delete
'div',
[9975] Fix | Delete
_extends({
[9976] Fix | Delete
role: 'application',
[9977] Fix | Delete
'aria-label': phrases.calendarLabel
[9978] Fix | Delete
}, (0, _reactWithStyles.css)(styles.DayPicker, isHorizontal && styles.DayPicker__horizontal, verticalScrollable && styles.DayPicker__verticalScrollable, isHorizontal && withPortal && styles.DayPicker_portal__horizontal, this.isVertical() && withPortal && styles.DayPicker_portal__vertical, dayPickerStyle, !monthTitleHeight && styles.DayPicker__hidden, !noBorder && styles.DayPicker__withBorder)),
[9979] Fix | Delete
_react2['default'].createElement(
[9980] Fix | Delete
_reactOutsideClickHandler2['default'],
[9981] Fix | Delete
{ onOutsideClick: onOutsideClick },
[9982] Fix | Delete
(calendarInfoPositionTop || calendarInfoPositionBefore) && calendarInfo,
[9983] Fix | Delete
_react2['default'].createElement(
[9984] Fix | Delete
'div',
[9985] Fix | Delete
(0, _reactWithStyles.css)(dayPickerWrapperStyle, calendarInfoIsInline && isHorizontal && styles.DayPicker_wrapper__horizontal),
[9986] Fix | Delete
_react2['default'].createElement(
[9987] Fix | Delete
'div',
[9988] Fix | Delete
_extends({}, (0, _reactWithStyles.css)(styles.DayPicker_weekHeaders, isHorizontal && styles.DayPicker_weekHeaders__horizontal), {
[9989] Fix | Delete
'aria-hidden': 'true',
[9990] Fix | Delete
role: 'presentation'
[9991] Fix | Delete
}),
[9992] Fix | Delete
weekHeaders
[9993] Fix | Delete
),
[9994] Fix | Delete
_react2['default'].createElement(
[9995] Fix | Delete
'div',
[9996] Fix | Delete
_extends({}, (0, _reactWithStyles.css)(styles.DayPicker_focusRegion), {
[9997] Fix | Delete
ref: this.setContainerRef,
[9998] Fix | Delete
onClick: function () {
[9999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function