@coreui/react-pro 4.12.1 → 4.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.es.js +9 -7
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/date-range-picker/CDateRangePicker.tsx +2 -2
- package/src/components/modal/CModal.tsx +5 -3
- package/src/components/time-picker/CTimePicker.tsx +2 -2
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
Several quick start options are available:
|
|
44
44
|
|
|
45
|
-
- [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v4.12.
|
|
45
|
+
- [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v4.12.3.zip)
|
|
46
46
|
- Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
|
|
47
47
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
|
|
48
48
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
|
package/dist/index.es.js
CHANGED
|
@@ -9196,7 +9196,7 @@ var CTimePicker = forwardRef(function (_a, ref) {
|
|
|
9196
9196
|
var inputRef = useRef(null);
|
|
9197
9197
|
var _v = useState(convertTimeToDate(time)), date = _v[0], setDate = _v[1];
|
|
9198
9198
|
var _w = useState(null), initialDate = _w[0], setInitialDate = _w[1];
|
|
9199
|
-
var _x = useState(valid
|
|
9199
|
+
var _x = useState(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined)), isValid = _x[0], setIsValid = _x[1];
|
|
9200
9200
|
var _y = useState(date ? getAmPm(new Date(date), locale) : 'am'), _ampm = _y[0], setAmPm = _y[1];
|
|
9201
9201
|
var _z = useState(visible), _visible = _z[0], setVisible = _z[1];
|
|
9202
9202
|
var _0 = useState({
|
|
@@ -9209,7 +9209,7 @@ var CTimePicker = forwardRef(function (_a, ref) {
|
|
|
9209
9209
|
setDate(convertTimeToDate(time));
|
|
9210
9210
|
}, [time]);
|
|
9211
9211
|
useEffect(function () {
|
|
9212
|
-
setIsValid(valid
|
|
9212
|
+
setIsValid(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined));
|
|
9213
9213
|
}, [valid, invalid]);
|
|
9214
9214
|
useEffect(function () {
|
|
9215
9215
|
setLocalizedTimePartials(getLocalizedTimePartials(locale, ampm));
|
|
@@ -9396,10 +9396,10 @@ var CDateRangePicker = forwardRef(function (_a, ref) {
|
|
|
9396
9396
|
var _5 = useState(endDate ? new Date(endDate) : null), initialEndDate = _5[0], setInitialEndDate = _5[1];
|
|
9397
9397
|
var _6 = useState(null), inputStartHoverValue = _6[0], setInputStartHoverValue = _6[1];
|
|
9398
9398
|
var _7 = useState(null), inputEndHoverValue = _7[0], setInputEndHoverValue = _7[1];
|
|
9399
|
-
var _8 = useState(valid
|
|
9399
|
+
var _8 = useState(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined)), isValid = _8[0], setIsValid = _8[1];
|
|
9400
9400
|
var _9 = useState(false), selectEndDate = _9[0], setSelectEndDate = _9[1];
|
|
9401
9401
|
useEffect(function () {
|
|
9402
|
-
setIsValid(valid
|
|
9402
|
+
setIsValid(valid !== null && valid !== void 0 ? valid : (invalid === true ? false : undefined));
|
|
9403
9403
|
}, [valid, invalid]);
|
|
9404
9404
|
useEffect(function () {
|
|
9405
9405
|
if (startDate) {
|
|
@@ -10486,10 +10486,12 @@ var CModal = forwardRef(function (_a, ref) {
|
|
|
10486
10486
|
setVisible(visible);
|
|
10487
10487
|
}, [visible]);
|
|
10488
10488
|
useEffect(function () {
|
|
10489
|
-
|
|
10490
|
-
|
|
10489
|
+
if (_visible) {
|
|
10490
|
+
document.addEventListener('mouseup', handleClickOutside);
|
|
10491
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
10492
|
+
}
|
|
10491
10493
|
return function () {
|
|
10492
|
-
document.removeEventListener('
|
|
10494
|
+
document.removeEventListener('mouseup', handleClickOutside);
|
|
10493
10495
|
document.removeEventListener('keydown', handleKeyDown);
|
|
10494
10496
|
};
|
|
10495
10497
|
}, [_visible]);
|