rc-picker
Advanced tools
Comparing version 4.0.0-alpha.39 to 4.0.0-alpha.40
@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
import { formatValue, isSameDecade } from "../../utils/dateUtil"; | ||
import { formatValue } from "../../utils/dateUtil"; | ||
import { PanelContext, useInfo } from "../context"; | ||
@@ -21,5 +21,4 @@ import PanelBody from "../PanelBody"; | ||
var _useInfo = useInfo(props, 'decade'), | ||
_useInfo2 = _slicedToArray(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = _slicedToArray(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var startYear = Math.floor(generateConfig.getYear(pickerValue) / 100) * 100; | ||
@@ -50,5 +49,4 @@ var endYear = startYear + 99; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
var dateYear = generateConfig.getYear(date); | ||
return _ref = {}, _defineProperty(_ref, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear), _defineProperty(_ref, "".concat(prefixCls, "-cell-today"), isSameDecade(generateConfig, date, now)), _ref; | ||
return _defineProperty({}, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear); | ||
}; | ||
@@ -55,0 +53,0 @@ |
@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
import { formatValue, isSameMonth } from "../../utils/dateUtil"; | ||
import { formatValue } from "../../utils/dateUtil"; | ||
import { PanelContext, useInfo } from "../context"; | ||
@@ -22,5 +22,4 @@ import PanelBody from "../PanelBody"; | ||
var _useInfo = useInfo(props, 'month'), | ||
_useInfo2 = _slicedToArray(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = _slicedToArray(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var baseDate = generateConfig.setMonth(pickerValue, 0); | ||
@@ -43,5 +42,4 @@ | ||
}; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
return _ref = {}, _defineProperty(_ref, "".concat(prefixCls, "-cell-in-view"), true), _defineProperty(_ref, "".concat(prefixCls, "-cell-today"), isSameMonth(generateConfig, date, now)), _ref; | ||
var getCellClassName = function getCellClassName() { | ||
return _defineProperty({}, "".concat(prefixCls, "-cell-in-view"), true); | ||
}; | ||
@@ -48,0 +46,0 @@ |
@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
import { formatValue, isSameQuarter } from "../../utils/dateUtil"; | ||
import { formatValue } from "../../utils/dateUtil"; | ||
import { PanelContext, useInfo } from "../context"; | ||
@@ -21,5 +21,4 @@ import PanelBody from "../PanelBody"; | ||
var _useInfo = useInfo(props, 'quarter'), | ||
_useInfo2 = _slicedToArray(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = _slicedToArray(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var baseDate = generateConfig.setMonth(pickerValue, 0); | ||
@@ -38,5 +37,4 @@ | ||
}; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
return _ref = {}, _defineProperty(_ref, "".concat(prefixCls, "-cell-in-view"), true), _defineProperty(_ref, "".concat(prefixCls, "-cell-today"), isSameQuarter(generateConfig, date, now)), _ref; | ||
var getCellClassName = function getCellClassName() { | ||
return _defineProperty({}, "".concat(prefixCls, "-cell-in-view"), true); | ||
}; | ||
@@ -43,0 +41,0 @@ |
@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import * as React from 'react'; | ||
import { formatValue, isSameYear } from "../../utils/dateUtil"; | ||
import { formatValue } from "../../utils/dateUtil"; | ||
import { PanelContext, useInfo } from "../context"; | ||
@@ -22,5 +22,4 @@ import PanelBody from "../PanelBody"; | ||
var _useInfo = useInfo(props, 'year'), | ||
_useInfo2 = _slicedToArray(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = _slicedToArray(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var startYear = Math.floor(generateConfig.getYear(pickerValue) / 10) * 10; | ||
@@ -44,5 +43,4 @@ var endYear = startYear + 9; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
var dateYear = generateConfig.getYear(date); | ||
return _ref = {}, _defineProperty(_ref, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear), _defineProperty(_ref, "".concat(prefixCls, "-cell-today"), isSameYear(generateConfig, date, now)), _ref; | ||
return _defineProperty({}, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear); | ||
}; | ||
@@ -49,0 +47,0 @@ |
@@ -30,5 +30,4 @@ "use strict"; | ||
var _useInfo = (0, _context.useInfo)(props, 'decade'), | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var startYear = Math.floor(generateConfig.getYear(pickerValue) / 100) * 100; | ||
@@ -59,5 +58,4 @@ var endYear = startYear + 99; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
var dateYear = generateConfig.getYear(date); | ||
return _ref = {}, (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear), (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-today"), (0, _dateUtil.isSameDecade)(generateConfig, date, now)), _ref; | ||
return (0, _defineProperty2.default)({}, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear); | ||
}; | ||
@@ -64,0 +62,0 @@ |
@@ -31,5 +31,4 @@ "use strict"; | ||
var _useInfo = (0, _context.useInfo)(props, 'month'), | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var baseDate = generateConfig.setMonth(pickerValue, 0); | ||
@@ -52,5 +51,4 @@ | ||
}; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
return _ref = {}, (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-in-view"), true), (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-today"), (0, _dateUtil.isSameMonth)(generateConfig, date, now)), _ref; | ||
var getCellClassName = function getCellClassName() { | ||
return (0, _defineProperty2.default)({}, "".concat(prefixCls, "-cell-in-view"), true); | ||
}; | ||
@@ -57,0 +55,0 @@ |
@@ -30,5 +30,4 @@ "use strict"; | ||
var _useInfo = (0, _context.useInfo)(props, 'quarter'), | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var baseDate = generateConfig.setMonth(pickerValue, 0); | ||
@@ -47,5 +46,4 @@ | ||
}; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
return _ref = {}, (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-in-view"), true), (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-today"), (0, _dateUtil.isSameQuarter)(generateConfig, date, now)), _ref; | ||
var getCellClassName = function getCellClassName() { | ||
return (0, _defineProperty2.default)({}, "".concat(prefixCls, "-cell-in-view"), true); | ||
}; | ||
@@ -52,0 +50,0 @@ |
@@ -31,5 +31,4 @@ "use strict"; | ||
var _useInfo = (0, _context.useInfo)(props, 'year'), | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 2), | ||
info = _useInfo2[0], | ||
now = _useInfo2[1]; | ||
_useInfo2 = (0, _slicedToArray2.default)(_useInfo, 1), | ||
info = _useInfo2[0]; | ||
var startYear = Math.floor(generateConfig.getYear(pickerValue) / 10) * 10; | ||
@@ -53,5 +52,4 @@ var endYear = startYear + 9; | ||
var getCellClassName = function getCellClassName(date) { | ||
var _ref; | ||
var dateYear = generateConfig.getYear(date); | ||
return _ref = {}, (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear), (0, _defineProperty2.default)(_ref, "".concat(prefixCls, "-cell-today"), (0, _dateUtil.isSameYear)(generateConfig, date, now)), _ref; | ||
return (0, _defineProperty2.default)({}, "".concat(prefixCls, "-cell-in-view"), startYear <= dateYear && dateYear <= endYear); | ||
}; | ||
@@ -58,0 +56,0 @@ |
{ | ||
"name": "rc-picker", | ||
"version": "4.0.0-alpha.39", | ||
"version": "4.0.0-alpha.40", | ||
"description": "React date & time picker", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
884858
21454