@skedulo/sked-ui 21.6.0 → 21.6.1
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.
|
@@ -110,13 +110,13 @@ export interface DatepickerProps {
|
|
|
110
110
|
onCalendarClose?: () => void;
|
|
111
111
|
}
|
|
112
112
|
declare type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
113
|
-
onBlurCustom: () => void;
|
|
113
|
+
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
114
114
|
openCalendar: (open: boolean) => void;
|
|
115
115
|
onBackspace: () => void;
|
|
116
116
|
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
|
117
117
|
};
|
|
118
118
|
export declare const CustomInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
119
|
-
onBlurCustom: () => void;
|
|
119
|
+
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
120
120
|
openCalendar: (open: boolean) => void;
|
|
121
121
|
onBackspace: () => void;
|
|
122
122
|
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -17949,7 +17949,7 @@ var CustomInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](
|
|
|
17949
17949
|
};
|
|
17950
17950
|
|
|
17951
17951
|
var blurEvents = function blurEvents(event) {
|
|
17952
|
-
onBlurCustom();
|
|
17952
|
+
onBlurCustom(event);
|
|
17953
17953
|
onBlur(event);
|
|
17954
17954
|
};
|
|
17955
17955
|
|
|
@@ -18025,7 +18025,7 @@ var Datepicker = function Datepicker(_ref3) {
|
|
|
18025
18025
|
date = _React$useState6[0],
|
|
18026
18026
|
setDate = _React$useState6[1];
|
|
18027
18027
|
|
|
18028
|
-
var callOnChangeFunctions = function callOnChangeFunctions() {
|
|
18028
|
+
var callOnChangeFunctions = function callOnChangeFunctions(event) {
|
|
18029
18029
|
if (calendarRef !== null && calendarRef !== void 0 && calendarRef.current.isCalendarOpen() && !inline) {
|
|
18030
18030
|
return;
|
|
18031
18031
|
}
|
|
@@ -18033,7 +18033,15 @@ var Datepicker = function Datepicker(_ref3) {
|
|
|
18033
18033
|
if (selectWeek && !!onWeekSelect) {
|
|
18034
18034
|
onWeekSelect(weekDates(date ? new Date(date) : date, selectedRange));
|
|
18035
18035
|
} else if (formatDateValue(date) !== inputDateValue || date === null) {
|
|
18036
|
-
|
|
18036
|
+
var parsedDate = Object(date_fns__WEBPACK_IMPORTED_MODULE_11__["parse"])(event === null || event === void 0 ? void 0 : event.target.value, dateFormat, new Date(), {
|
|
18037
|
+
locale: localeObject
|
|
18038
|
+
});
|
|
18039
|
+
|
|
18040
|
+
if (parsedDate && Object(date_fns__WEBPACK_IMPORTED_MODULE_11__["isValid"])(parsedDate)) {
|
|
18041
|
+
onChange(parsedDate);
|
|
18042
|
+
} else {
|
|
18043
|
+
onChange(date ? new Date(date) : date);
|
|
18044
|
+
}
|
|
18037
18045
|
}
|
|
18038
18046
|
|
|
18039
18047
|
setInputDateValue(formatDateValue(date));
|
|
@@ -64809,7 +64817,9 @@ var IntersectionObserverWrapper = function IntersectionObserverWrapper(_ref) {
|
|
|
64809
64817
|
});
|
|
64810
64818
|
observer.observe(domRef.current);
|
|
64811
64819
|
return function () {
|
|
64812
|
-
|
|
64820
|
+
if (domRef.current) {
|
|
64821
|
+
observer.unobserve(domRef.current);
|
|
64822
|
+
}
|
|
64813
64823
|
};
|
|
64814
64824
|
}, [root, rootMargin, threshold]);
|
|
64815
64825
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](as, {
|