rc-picker
Advanced tools
Comparing version 0.0.1-alpha.46 to 0.0.1-alpha.47
@@ -29,15 +29,21 @@ "use strict"; | ||
var nextDate = offsetCell(currentDate, 1); | ||
var isRangeHovered = dateUtil_1.isInRange(generateConfig, miscUtil_1.getValue(hoverRangedValue, 0), miscUtil_1.getValue(hoverRangedValue, 1), currentDate); | ||
var rangeStart = miscUtil_1.getValue(rangedValue, 0); | ||
var rangeEnd = miscUtil_1.getValue(rangedValue, 1); | ||
var hoverStart = miscUtil_1.getValue(hoverRangedValue, 0); | ||
var hoverEnd = miscUtil_1.getValue(hoverRangedValue, 1); | ||
var isRangeHovered = dateUtil_1.isInRange(generateConfig, hoverStart, hoverEnd, currentDate); | ||
function isRangeStart(date) { | ||
return isSameCell(miscUtil_1.getValue(rangedValue, 0), date); | ||
return isSameCell(rangeStart, date); | ||
} | ||
function isRangeEnd(date) { | ||
return isSameCell(miscUtil_1.getValue(rangedValue, 1), date); | ||
return isSameCell(rangeEnd, date); | ||
} | ||
var isHoverStart = isSameCell(miscUtil_1.getValue(hoverRangedValue, 0), currentDate); | ||
var isHoverEnd = isSameCell(miscUtil_1.getValue(hoverRangedValue, 1), currentDate); | ||
return _ref2 = {}, _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-view"), isInView(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-range"), dateUtil_1.isInRange(generateConfig, miscUtil_1.getValue(rangedValue, 0), miscUtil_1.getValue(rangedValue, 1), currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start"), isRangeStart(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end"), isRangeEnd(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover"), isRangeHovered), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-start"), isHoverStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-end"), isHoverEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-start"), (isRangeHovered || isHoverEnd) && (!isInView(prevDate) || isRangeEnd(prevDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-end"), (isRangeHovered || isHoverStart) && (!isInView(nextDate) || isRangeStart(nextDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-today"), isSameCell(today, currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-selected"), isSameCell(value, currentDate)), _ref2; | ||
var isHoverStart = isSameCell(hoverStart, currentDate); | ||
var isHoverEnd = isSameCell(hoverEnd, currentDate); | ||
var isHoverEdgeStart = (isRangeHovered || isHoverEnd) && (!isInView(prevDate) || isRangeEnd(prevDate)); | ||
var isHoverEdgeEnd = (isRangeHovered || isHoverStart) && (!isInView(nextDate) || isRangeStart(nextDate)); | ||
return _ref2 = {}, _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-view"), isInView(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-range"), dateUtil_1.isInRange(generateConfig, rangeStart, rangeEnd, currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start"), isRangeStart(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end"), isRangeEnd(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start-single"), isRangeStart(currentDate) && !rangeEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end-single"), isRangeEnd(currentDate) && !rangeStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start-near-hover"), isRangeStart(currentDate) && (isSameCell(prevDate, hoverStart) || dateUtil_1.isInRange(generateConfig, hoverStart, hoverEnd, prevDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end-near-hover"), isRangeEnd(currentDate) && (isSameCell(nextDate, hoverEnd) || dateUtil_1.isInRange(generateConfig, hoverStart, hoverEnd, nextDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover"), isRangeHovered), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-start"), isHoverStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-end"), isHoverEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-start"), isHoverEdgeStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-end"), isHoverEdgeEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-start-near-range"), isHoverEdgeStart && isSameCell(prevDate, rangeEnd)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-end-near-range"), isHoverEdgeEnd && isSameCell(nextDate, rangeStart)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-today"), isSameCell(today, currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-selected"), isSameCell(value, currentDate)), _ref2; | ||
} | ||
@@ -44,0 +50,0 @@ |
@@ -29,15 +29,21 @@ "use strict"; | ||
var nextDate = offsetCell(currentDate, 1); | ||
var isRangeHovered = dateUtil_1.isInRange(generateConfig, miscUtil_1.getValue(hoverRangedValue, 0), miscUtil_1.getValue(hoverRangedValue, 1), currentDate); | ||
var rangeStart = miscUtil_1.getValue(rangedValue, 0); | ||
var rangeEnd = miscUtil_1.getValue(rangedValue, 1); | ||
var hoverStart = miscUtil_1.getValue(hoverRangedValue, 0); | ||
var hoverEnd = miscUtil_1.getValue(hoverRangedValue, 1); | ||
var isRangeHovered = dateUtil_1.isInRange(generateConfig, hoverStart, hoverEnd, currentDate); | ||
function isRangeStart(date) { | ||
return isSameCell(miscUtil_1.getValue(rangedValue, 0), date); | ||
return isSameCell(rangeStart, date); | ||
} | ||
function isRangeEnd(date) { | ||
return isSameCell(miscUtil_1.getValue(rangedValue, 1), date); | ||
return isSameCell(rangeEnd, date); | ||
} | ||
var isHoverStart = isSameCell(miscUtil_1.getValue(hoverRangedValue, 0), currentDate); | ||
var isHoverEnd = isSameCell(miscUtil_1.getValue(hoverRangedValue, 1), currentDate); | ||
return _ref2 = {}, _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-view"), isInView(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-range"), dateUtil_1.isInRange(generateConfig, miscUtil_1.getValue(rangedValue, 0), miscUtil_1.getValue(rangedValue, 1), currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start"), isRangeStart(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end"), isRangeEnd(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover"), isRangeHovered), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-start"), isHoverStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-end"), isHoverEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-start"), (isRangeHovered || isHoverEnd) && (!isInView(prevDate) || isRangeEnd(prevDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-end"), (isRangeHovered || isHoverStart) && (!isInView(nextDate) || isRangeStart(nextDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-today"), isSameCell(today, currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-selected"), isSameCell(value, currentDate)), _ref2; | ||
var isHoverStart = isSameCell(hoverStart, currentDate); | ||
var isHoverEnd = isSameCell(hoverEnd, currentDate); | ||
var isHoverEdgeStart = (isRangeHovered || isHoverEnd) && (!isInView(prevDate) || isRangeEnd(prevDate)); | ||
var isHoverEdgeEnd = (isRangeHovered || isHoverStart) && (!isInView(nextDate) || isRangeStart(nextDate)); | ||
return _ref2 = {}, _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-view"), isInView(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-in-range"), dateUtil_1.isInRange(generateConfig, rangeStart, rangeEnd, currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start"), isRangeStart(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end"), isRangeEnd(currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start-single"), isRangeStart(currentDate) && !rangeEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end-single"), isRangeEnd(currentDate) && !rangeStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-start-near-hover"), isRangeStart(currentDate) && (isSameCell(prevDate, hoverStart) || dateUtil_1.isInRange(generateConfig, hoverStart, hoverEnd, prevDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-end-near-hover"), isRangeEnd(currentDate) && (isSameCell(nextDate, hoverEnd) || dateUtil_1.isInRange(generateConfig, hoverStart, hoverEnd, nextDate))), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover"), isRangeHovered), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-start"), isHoverStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-end"), isHoverEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-start"), isHoverEdgeStart), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-end"), isHoverEdgeEnd), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-start-near-range"), isHoverEdgeStart && isSameCell(prevDate, rangeEnd)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-range-hover-edge-end-near-range"), isHoverEdgeEnd && isSameCell(nextDate, rangeStart)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-today"), isSameCell(today, currentDate)), _defineProperty(_ref2, "".concat(cellPrefixCls, "-selected"), isSameCell(value, currentDate)), _ref2; | ||
} | ||
@@ -44,0 +50,0 @@ |
{ | ||
"name": "rc-picker", | ||
"version": "0.0.1-alpha.46", | ||
"version": "0.0.1-alpha.47", | ||
"description": "React date & time picker", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
557551
13277