willba-component-library 0.1.70 → 0.1.72
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/lib/index.esm.js +4 -8
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +4 -8
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +4 -8
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/FilterBar.stories.tsx +1 -1
- package/src/components/FilterBar/components/calendar/Calendar.tsx +7 -7
package/lib/index.umd.js
CHANGED
|
@@ -11067,22 +11067,18 @@
|
|
|
11067
11067
|
styleInject(css_248z$3);
|
|
11068
11068
|
|
|
11069
11069
|
var Calendar = React__default.forwardRef(function (_a, ref) {
|
|
11070
|
-
var
|
|
11070
|
+
var _b;
|
|
11071
|
+
var calendarRange = _a.calendarRange, setCalendarRange = _a.setCalendarRange, calendarOffset = _a.calendarOffset, selectedPath = _a.selectedPath, locale = _a.locale;
|
|
11071
11072
|
var isTablet = reactResponsiveExports.useMediaQuery({ maxWidth: 960 });
|
|
11072
11073
|
React__default.useEffect(function () {
|
|
11073
11074
|
if (!calendarRange)
|
|
11074
11075
|
setCalendarRange(undefined);
|
|
11075
11076
|
}, []);
|
|
11076
11077
|
var today = startOfDay(new Date());
|
|
11077
|
-
|
|
11078
|
-
// calendarOffset && typeof calendarOffset === 'object'
|
|
11079
|
-
// ? Object.entries(calendarOffset).find(
|
|
11080
|
-
// (page) => selectedPath.substring(1) === page[0]
|
|
11081
|
-
// )
|
|
11082
|
-
// : null
|
|
11078
|
+
var daysToOffsetCalendar = (_b = Object.entries(calendarOffset)) === null || _b === void 0 ? void 0 : _b.find(function (page) { return selectedPath.substring(1) === page[0]; });
|
|
11083
11079
|
var disabledDays = [
|
|
11084
11080
|
{
|
|
11085
|
-
from: addDays(today, -2),
|
|
11081
|
+
from: addDays(today, !!(daysToOffsetCalendar === null || daysToOffsetCalendar === void 0 ? void 0 : daysToOffsetCalendar.length) ? daysToOffsetCalendar[1] : -2),
|
|
11086
11082
|
to: addDays(today, -100),
|
|
11087
11083
|
},
|
|
11088
11084
|
];
|