@mailstep/design-system 0.7.69 → 0.7.71
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/package.json +1 -1
- package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.js +1 -0
- package/ui/Blocks/SideMenu/MenuItem.js +3 -3
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +6 -0
- package/ui/index.es.js +16281 -15651
- package/ui/index.umd.js +445 -445
package/package.json
CHANGED
|
@@ -54,6 +54,7 @@ var DatePickerRange = function (props) {
|
|
|
54
54
|
var firstDate = new Date();
|
|
55
55
|
firstDate.setHours(0, 0, 0, 0);
|
|
56
56
|
var secondDate = new Date();
|
|
57
|
+
secondDate.setHours(23, 59, 59, 0);
|
|
57
58
|
if (initialView === 'future') {
|
|
58
59
|
secondDate.setMonth(secondDate.getMonth() + 1);
|
|
59
60
|
}
|
|
@@ -41,10 +41,10 @@ var MenuItem = function (_a) {
|
|
|
41
41
|
itemLinkWrapClassName += ' separator';
|
|
42
42
|
}
|
|
43
43
|
var isActive = useCallback(function (match, location) {
|
|
44
|
-
var childSelected = !!(items === null || items === void 0 ? void 0 : items.find(function (item) { var _a; return ((_a = item.link) === null || _a === void 0 ? void 0 : _a.replace(removeOptionalEnd, '')) === location.pathname; }));
|
|
45
|
-
var isActive = !!matchPath(location.pathname, { path: match === null || match === void 0 ? void 0 : match.path });
|
|
44
|
+
var childSelected = !!(items === null || items === void 0 ? void 0 : items.find(function (item) { var _a; return ((_a = item.link) === null || _a === void 0 ? void 0 : _a.replace(removeOptionalEnd, '')) === (location === null || location === void 0 ? void 0 : location.pathname); }));
|
|
45
|
+
var isActive = !!matchPath(location === null || location === void 0 ? void 0 : location.pathname, { path: match === null || match === void 0 ? void 0 : match.path });
|
|
46
46
|
// partial match helps to match paths with parameters which are not matched by matchPath above
|
|
47
|
-
var partialMatch = location.pathname.startsWith(link.slice(0, -1)) && location.pathname.includes('/settings/');
|
|
47
|
+
var partialMatch = (location === null || location === void 0 ? void 0 : location.pathname.startsWith(link.slice(0, -1))) && (location === null || location === void 0 ? void 0 : location.pathname.includes('/settings/'));
|
|
48
48
|
return isActive || childSelected || partialMatch;
|
|
49
49
|
}, [items, link]);
|
|
50
50
|
return (_jsxs(_Fragment, { children: [separator && _jsx(ItemsSeparator, {}), _jsxs(MenuItemContainer, { ref: parentRef, "$isCompact": isCompact, "$lightMode": lightMode, hasChildren: hasChildren, isHovering: isHovering, children: [_jsxs(ItemLinkWrap, __assign({}, linkProps, { onMouseOver: handleMouseOver, exact: true, activeClassName: hasChildren ? 'selected' : undefined, onClick: toggleChildren, "$isCompact": isCompact, className: itemLinkWrapClassName,
|
|
@@ -56,6 +56,12 @@ export var Timepicker = function (_a) {
|
|
|
56
56
|
useEffect(function () {
|
|
57
57
|
!!value && setTime('minutes', minutes);
|
|
58
58
|
}, [minutes]);
|
|
59
|
+
useEffect(function () {
|
|
60
|
+
setHours(initialHours);
|
|
61
|
+
}, [initialHours]);
|
|
62
|
+
useEffect(function () {
|
|
63
|
+
setMinutes(initialMinutes);
|
|
64
|
+
}, [initialMinutes]);
|
|
59
65
|
return (_jsxs(FooterRow, { disabled: disabled, children: [_jsxs("div", { children: [_jsx(Icon, { icon: "clock" }), _jsx(FooterRowLabel, { children: i18n._({ id: 'dataGrid.filterCell.time', message: 'Time' }) })] }), _jsx(x.div, { display: "flex", flexDirection: "column", alignItems: "flex-start", pt: "4px", w: "fit-content", children: _jsxs(x.div, { display: "flex", alignItems: "center", children: [_jsxs(x.div, { display: "flex", flexDirection: "column", children: [_jsx(Btn, { disabled: disabled, onClick: increaseHour, type: "button", children: "\u2039" }), _jsx(Btn, { disabled: disabled, onClick: decreaseHour, type: "button", children: "\u203A" })] }), _jsxs(TimeWrapper, { children: [_jsx(Hours, { value: String(hours).padStart(2, '0'), disabled: disabled, onChange: onHoursChange }), _jsx(x.div, { mx: "1px", children: ":" }), _jsx(Minutes, { value: String(minutes).padStart(2, '0'), disabled: disabled, onChange: onMinutesChange })] }), _jsxs(x.div, { display: "flex", flexDirection: "column", children: [_jsx(Btn, { disabled: disabled, onClick: increaseMinutes, type: "button", children: "\u2039" }), _jsx(Btn, { disabled: disabled, onClick: decreaseMinutes, type: "button", children: "\u203A" })] })] }) })] }));
|
|
60
66
|
};
|
|
61
67
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|