willba-component-library 0.2.79 → 0.2.81
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/assets/SpinnerSvg.d.ts +5 -0
- package/lib/components/FilterBar/components/buttons/close-button/CloseButton.d.ts +7 -0
- package/lib/components/FilterBar/components/buttons/submit-button/SubmitButton.d.ts +3 -0
- package/lib/components/FilterBar/components/calendar/Calendar.d.ts +14 -0
- package/lib/components/FilterBar/hooks/useCloseFilterSection.d.ts +8 -0
- package/lib/components/FilterBar/hooks/useUpdateTranslations.d.ts +5 -0
- package/lib/components/FilterBar/utils/parseDates.d.ts +6 -0
- package/lib/core/utils/handleOverlappingDates.d.ts +1 -0
- package/lib/core/utils/index.d.ts +3 -0
- package/lib/core/utils/nightsCount.d.ts +6 -0
- package/lib/core/utils/parseDate.d.ts +7 -0
- package/lib/core/utils/parseDates.d.ts +6 -0
- package/lib/index.esm.js +1 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +1 -1
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/hooks/useFilterBar.tsx +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DateRange } from 'react-day-picker';
|
|
3
|
+
import { CalendarOffset } from '../../FilterBarTypes';
|
|
4
|
+
import 'react-day-picker/dist/style.css';
|
|
5
|
+
import './Calendar.css';
|
|
6
|
+
type Props = {
|
|
7
|
+
calendarRange: DateRange | undefined;
|
|
8
|
+
setCalendarRange: (range: DateRange | undefined) => void;
|
|
9
|
+
calendarOffset?: CalendarOffset;
|
|
10
|
+
selectedPath: string;
|
|
11
|
+
locale?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const Calendar: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Props = {
|
|
3
|
+
handleSelectedFilter: (arg: boolean) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const useCloseFilterSection: ({ handleSelectedFilter }: Props) => {
|
|
6
|
+
filtersRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleOverlappingDates: () => void;
|
package/lib/index.esm.js
CHANGED
|
@@ -11778,7 +11778,7 @@ var useFilterBar = function (_a) {
|
|
|
11778
11778
|
finally { if (e_2) throw e_2.error; }
|
|
11779
11779
|
}
|
|
11780
11780
|
handleSelectedFilter(false);
|
|
11781
|
-
if (onSubmit && selectedPath
|
|
11781
|
+
if (onSubmit && window.location.href.includes(selectedPath)) {
|
|
11782
11782
|
onSubmit(newParams);
|
|
11783
11783
|
}
|
|
11784
11784
|
else {
|