monthFormat: 'MMMM YYYY', // english locale
phrases: _defaultPhrases.CalendarDayPhrases,
dayAriaLabelFormat: undefined,
verticalBorderSpacing: undefined
var CalendarMonth = function (_React$Component) {
_inherits(CalendarMonth, _React$Component);
function CalendarMonth(props) {
_classCallCheck(this, CalendarMonth);
var _this = _possibleConstructorReturn(this, (CalendarMonth.__proto__ || Object.getPrototypeOf(CalendarMonth)).call(this, props));
weeks: (0, _getCalendarMonthWeeks2['default'])(props.month, props.enableOutsideDays, props.firstDayOfWeek == null ? _moment2['default'].localeData().firstDayOfWeek() : props.firstDayOfWeek)
_this.setCaptionRef = _this.setCaptionRef.bind(_this);
_this.setMonthTitleHeight = _this.setMonthTitleHeight.bind(_this);
_createClass(CalendarMonth, [{
key: 'componentDidMount',
function componentDidMount() {
this.setMonthTitleHeightTimeout = setTimeout(this.setMonthTitleHeight, 0);
return componentDidMount;
key: 'componentWillReceiveProps',
function componentWillReceiveProps(nextProps) {
var month = nextProps.month,
enableOutsideDays = nextProps.enableOutsideDays,
firstDayOfWeek = nextProps.firstDayOfWeek;
prevMonth = _props.month,
prevEnableOutsideDays = _props.enableOutsideDays,
prevFirstDayOfWeek = _props.firstDayOfWeek;
if (!month.isSame(prevMonth) || enableOutsideDays !== prevEnableOutsideDays || firstDayOfWeek !== prevFirstDayOfWeek) {
weeks: (0, _getCalendarMonthWeeks2['default'])(month, enableOutsideDays, firstDayOfWeek == null ? _moment2['default'].localeData().firstDayOfWeek() : firstDayOfWeek)
return componentWillReceiveProps;
key: 'shouldComponentUpdate',
function shouldComponentUpdate(nextProps, nextState) {
return (0, _reactAddonsShallowCompare2['default'])(this, nextProps, nextState);
return shouldComponentUpdate;
key: 'componentWillUnmount',
function componentWillUnmount() {
if (this.setMonthTitleHeightTimeout) {
clearTimeout(this.setMonthTitleHeightTimeout);
return componentWillUnmount;
key: 'setMonthTitleHeight',
function setMonthTitleHeight() {
var setMonthTitleHeight = this.props.setMonthTitleHeight;
if (setMonthTitleHeight) {
var captionHeight = (0, _calculateDimension2['default'])(this.captionRef, 'height', true, true);
setMonthTitleHeight(captionHeight);
return setMonthTitleHeight;
function setCaptionRef(ref) {
var _props2 = this.props,
dayAriaLabelFormat = _props2.dayAriaLabelFormat,
daySize = _props2.daySize,
focusedDate = _props2.focusedDate,
horizontalMonthPadding = _props2.horizontalMonthPadding,
isFocused = _props2.isFocused,
isVisible = _props2.isVisible,
modifiers = _props2.modifiers,
monthFormat = _props2.monthFormat,
onDayClick = _props2.onDayClick,
onDayMouseEnter = _props2.onDayMouseEnter,
onDayMouseLeave = _props2.onDayMouseLeave,
onMonthSelect = _props2.onMonthSelect,
onYearSelect = _props2.onYearSelect,
orientation = _props2.orientation,
phrases = _props2.phrases,
renderCalendarDay = _props2.renderCalendarDay,
renderDayContents = _props2.renderDayContents,
renderMonthElement = _props2.renderMonthElement,
renderMonthText = _props2.renderMonthText,
verticalBorderSpacing = _props2.verticalBorderSpacing;
var weeks = this.state.weeks;
var monthTitle = renderMonthText ? renderMonthText(month) : month.format(monthFormat);
var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE;
return _react2['default'].createElement(
_extends({}, (0, _reactWithStyles.css)(styles.CalendarMonth, { padding: '0 ' + String(horizontalMonthPadding) + 'px' }), {
'data-visible': isVisible
_react2['default'].createElement(
}, (0, _reactWithStyles.css)(styles.CalendarMonth_caption, verticalScrollable && styles.CalendarMonth_caption__verticalScrollable)),
renderMonthElement ? renderMonthElement({ month: month, onMonthSelect: onMonthSelect, onYearSelect: onYearSelect }) : _react2['default'].createElement(
_react2['default'].createElement(
_extends({}, (0, _reactWithStyles.css)(!verticalBorderSpacing && styles.CalendarMonth_table, verticalBorderSpacing && styles.CalendarMonth_verticalSpacing, verticalBorderSpacing && { borderSpacing: '0px ' + String(verticalBorderSpacing) + 'px' }), {
_react2['default'].createElement(
weeks.map(function (week, i) {
return _react2['default'].createElement(
_CalendarWeek2['default'],
week.map(function (day, dayOfWeek) {
return renderCalendarDay({
isOutsideDay: !day || day.month() !== month.month(),
tabIndex: isVisible && (0, _isSameDay2['default'])(day, focusedDate) ? 0 : -1,
onDayMouseEnter: onDayMouseEnter,
onDayMouseLeave: onDayMouseLeave,
renderDayContents: renderDayContents,
modifiers: modifiers[(0, _toISODateString2['default'])(day)],
ariaLabelFormat: dayAriaLabelFormat
}(_react2['default'].Component);
CalendarMonth.propTypes = propTypes;
CalendarMonth.defaultProps = defaultProps;
exports['default'] = (0, _reactWithStyles.withStyles)(function (_ref) {
var _ref$reactDates = _ref.reactDates,
color = _ref$reactDates.color,
font = _ref$reactDates.font,
spacing = _ref$reactDates.spacing;
background: color.background,
borderCollapse: 'collapse',
CalendarMonth_verticalSpacing: {
borderCollapse: 'separate'
fontSize: font.captionSize,
paddingTop: spacing.captionPaddingTop,
paddingBottom: spacing.captionPaddingBottom,
CalendarMonth_caption__verticalScrollable: {
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("U8pU");
/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("JX7q");
function _possibleConstructorReturn(self, call) {
if (call && (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
return Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return TOOLBAR_KEYS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TOOLBAR_ITEM_KEYS; });
/* unused harmony export b */
// Automatically generated
var TOOLBAR_STATE_KEYS = ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"];
var TOOLBAR_KEYS = TOOLBAR_STATE_KEYS;
var TOOLBAR_ITEM_KEYS = TOOLBAR_KEYS;
var TOOLBAR_SEPARATOR_KEYS = TOOLBAR_ITEM_KEYS;
/***/ (function(module, exports, __webpack_require__) {
var define = __webpack_require__("82c2");
var implementation = __webpack_require__("nRDI");
var getPolyfill = __webpack_require__("5yQQ");
var polyfill = getPolyfill();
var shim = __webpack_require__("Gn0q");
var boundContains = function contains(node, other) {
return polyfill.apply(node, [other]);
getPolyfill: getPolyfill,
implementation: implementation,
module.exports = boundContains;
/***/ (function(module, __webpack_exports__, __webpack_require__) {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isObject; });
* Checks whether `arg` is an object or not.
return typeof arg === "object" && arg != null;
/***/ (function(module, exports, __webpack_require__) {
var GetIntrinsic = __webpack_require__("AM7I");
var $abs = GetIntrinsic('%Math.abs%');
// http://ecma-international.org/ecma-262/5.1/#sec-5.2
module.exports = function abs(x) {
/***/ (function(module, exports) {
Object.defineProperty(exports, "__esModule", {
exports['default'] = getClassName;
* Construct a class name.
* namespace {String} Used to construct unique class names.
* styleName {String} Name identifying the specific style.
function getClassName(namespace, styleName) {
var namespaceSegment = namespace.length > 0 ? String(namespace) + '__' : '';
return '' + namespaceSegment + String(styleName);
/***/ (function(module, exports, __webpack_require__) {
module.exports = function contains(other) {
if (arguments.length < 1) {
throw new TypeError('1 argument is required');
if (typeof other !== 'object') {
throw new TypeError('Argument 1 (”other“) to Node.contains must be an instance of Node');
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__("Kz5y");
/** Built-in value references. */
var Symbol = root.Symbol;
/***/ (function(module, exports, __webpack_require__) {
var bind = __webpack_require__("D3zA");
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
/***/ (function(module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", {
exports['default'] = getPhrase;
function getPhrase(phrase, args) {
if (typeof phrase === 'string') return phrase;
if (typeof phrase === 'function') {
/***/ (function(module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", {
var _propTypes = __webpack_require__("17x9");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _constants = __webpack_require__("Fv1B");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
exports['default'] = _propTypes2['default'].oneOf([_constants.INFO_POSITION_TOP, _constants.INFO_POSITION_BOTTOM, _constants.INFO_POSITION_BEFORE, _constants.INFO_POSITION_AFTER]);
/***/ (function(module, __webpack_exports__, __webpack_require__) {
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("wx14");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("ODXe");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("Ff2n");
// EXTERNAL MODULE: external ["wp","element"]
var external_wp_element_ = __webpack_require__("GRId");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/react-merge-refs/dist/react-merge-refs.esm.js
var react_merge_refs_esm = __webpack_require__("LFnd");
// EXTERNAL MODULE: external ["wp","dom"]
var external_wp_dom_ = __webpack_require__("1CF3");
// EXTERNAL MODULE: external ["wp","keycodes"]
var external_wp_keycodes_ = __webpack_require__("RxS6");
// EXTERNAL MODULE: external ["wp","deprecated"]
var external_wp_deprecated_ = __webpack_require__("NMb1");
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_);
// EXTERNAL MODULE: external ["wp","compose"]
var external_wp_compose_ = __webpack_require__("K9lf");
// EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
var library_close = __webpack_require__("w95h");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");