willba-component-library 0.2.37 → 0.2.39

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willba-component-library",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "description": "A custom UI component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -99,7 +99,7 @@ export default function FilterCalendar({
99
99
  <div>
100
100
  <span>
101
101
  {parseDate({
102
- date: calendarRange?.from,
102
+ date: initialCalendarRange?.from || calendarRange?.from,
103
103
  dateFormat: 'EEEEEE d.M.yyyy',
104
104
  language,
105
105
  }) || t('common:checkIn')}
@@ -109,7 +109,7 @@ export default function FilterCalendar({
109
109
  </span>
110
110
  <span>
111
111
  {parseDate({
112
- date: calendarRange?.to,
112
+ date: initialCalendarRange?.to || calendarRange?.to,
113
113
  dateFormat: 'EEEEEE d.M.yyyy',
114
114
  language,
115
115
  }) || t('common:checkOut')}
@@ -156,7 +156,6 @@ export const Calendar = forwardRef<HTMLDivElement, CalendarTypes>(
156
156
 
157
157
  const tooltipClonesCheckIn: Element[] = []
158
158
  const tooltipClonesCheckOut: Element[] = []
159
- const tooltipClonesSpinner: Element[] = []
160
159
  const tooltipClonesOverlappingDates: Element[] = []
161
160
 
162
161
  if (calendarTooltip && calendarButtons.length > 0) {
@@ -180,9 +179,7 @@ export const Calendar = forwardRef<HTMLDivElement, CalendarTypes>(
180
179
  }
181
180
 
182
181
  if (loadingSpinner && calendarMonthContainer) {
183
- const tooltipClone: Element = loadingSpinner.cloneNode(true) as Element
184
- calendarMonthContainer.appendChild(tooltipClone)
185
- tooltipClonesSpinner.push(tooltipClone)
182
+ calendarMonthContainer.appendChild(loadingSpinner)
186
183
  }
187
184
 
188
185
  if (
@@ -200,7 +197,6 @@ export const Calendar = forwardRef<HTMLDivElement, CalendarTypes>(
200
197
  return () => {
201
198
  tooltipClonesCheckIn.forEach((clone) => clone.remove())
202
199
  tooltipClonesCheckOut.forEach((clone) => clone.remove())
203
- tooltipClonesSpinner.forEach((clone) => clone.remove())
204
200
  tooltipClonesOverlappingDates.forEach((clone) => clone.remove())
205
201
  }
206
202
  }, [