@uxf/datepicker 16.15.0 → 16.16.0
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/contexts/date-picker-context.d.ts +1 -1
- package/contexts/date-picker-context.js +2 -2
- package/contexts/date-range-picker-context.d.ts +1 -1
- package/contexts/date-range-picker-context.js +2 -2
- package/contexts/time-picker-context.js +2 -2
- package/hooks/use-date-picker-navigation.d.ts +2 -2
- package/hooks/use-date-picker-navigation.js +22 -22
- package/hooks/use-date-picker-navigation.test.js +7 -7
- package/hooks/use-date-picker.d.ts +2 -2
- package/hooks/use-date-picker.js +32 -32
- package/hooks/use-date-picker.test.js +7 -7
- package/hooks/use-date-range-picker.d.ts +2 -2
- package/hooks/use-date-range-picker.js +62 -62
- package/hooks/use-date-range-picker.test.js +16 -16
- package/hooks/use-day.d.ts +1 -1
- package/hooks/use-day.js +22 -22
- package/hooks/use-day.test.js +12 -12
- package/hooks/use-decade.d.ts +1 -1
- package/hooks/use-decade.js +8 -8
- package/hooks/use-decade.test.js +6 -6
- package/hooks/use-hour.test.js +3 -3
- package/hooks/use-hours.test.js +3 -3
- package/hooks/use-minute.test.js +3 -3
- package/hooks/use-minutes.test.js +3 -3
- package/hooks/use-month.d.ts +2 -2
- package/hooks/use-month.js +10 -10
- package/hooks/use-month.test.js +7 -7
- package/hooks/use-time-picker.test.js +5 -5
- package/hooks/use-year.d.ts +1 -1
- package/hooks/use-year.js +7 -7
- package/hooks/use-year.test.js +6 -6
- package/package.json +5 -5
- package/utils/can-select-range.d.ts +1 -1
- package/utils/can-select-range.js +8 -8
- package/utils/can-select-range.test.js +10 -10
- package/utils/date-string.d.ts +1 -1
- package/utils/date-string.js +6 -6
- package/utils/date-string.test.js +33 -33
- package/utils/dayjs-utils.d.ts +1 -1
- package/utils/dayjs-utils.js +8 -41
- package/utils/dst-robustness.test.js +74 -74
- package/utils/get-current-year-month-and-date.d.ts +1 -1
- package/utils/get-current-year-month-and-date.js +2 -2
- package/utils/get-current-year-month-and-date.test.js +3 -3
- package/utils/get-date-intervals.test.js +15 -15
- package/utils/get-date-invervals.js +4 -4
- package/utils/get-date-month-and-year.d.ts +1 -1
- package/utils/get-date-month-and-year.js +4 -4
- package/utils/get-date-month-and-year.test.js +3 -3
- package/utils/get-days.d.ts +1 -1
- package/utils/get-days.js +17 -17
- package/utils/get-days.test.js +5 -5
- package/utils/get-each.d.ts +1 -1
- package/utils/get-each.js +5 -5
- package/utils/get-each.test.js +11 -11
- package/utils/get-first-active-month.d.ts +1 -1
- package/utils/get-first-active-month.js +2 -2
- package/utils/get-first-active-month.test.js +5 -5
- package/utils/get-initial-months.d.ts +1 -1
- package/utils/get-initial-months.js +6 -6
- package/utils/get-initial-months.test.js +5 -5
- package/utils/get-months.js +9 -9
- package/utils/get-months.test.js +4 -4
- package/utils/get-next-active-month.d.ts +1 -1
- package/utils/get-next-active-month.js +6 -6
- package/utils/get-next-active-month.test.js +9 -9
- package/utils/get-weekday-labels.d.ts +1 -1
- package/utils/get-weekday-labels.js +6 -6
- package/utils/get-weekday-labels.test.d.ts +1 -1
- package/utils/get-weekday-labels.test.js +8 -8
- package/utils/get-years.js +6 -6
- package/utils/get-years.test.js +5 -5
- package/utils/is-date-blocked.d.ts +1 -1
- package/utils/is-date-blocked.js +5 -5
- package/utils/is-date-blocked.test.js +16 -16
- package/utils/is-date-hovered.d.ts +1 -1
- package/utils/is-date-hovered.js +7 -7
- package/utils/is-date-hovered.test.js +9 -9
- package/utils/is-date-inside-range.d.ts +1 -1
- package/utils/is-date-selected.test.js +13 -13
- package/utils/is-end-date.d.ts +1 -1
- package/utils/is-end-date.test.js +10 -10
- package/utils/is-first-or-last-selected-date.d.ts +1 -1
- package/utils/is-first-or-last-selected-date.test.js +10 -10
- package/utils/is-in-unavailable-dates.d.ts +1 -1
- package/utils/is-in-unavailable-dates.test.js +9 -9
- package/utils/is-start-date.d.ts +1 -1
- package/utils/is-start-date.test.js +10 -10
|
@@ -3,19 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.END_DATE = exports.START_DATE = void 0;
|
|
4
4
|
exports.useDateRangePicker = useDateRangePicker;
|
|
5
5
|
const compiler_runtime_1 = require("react/compiler-runtime");
|
|
6
|
-
const
|
|
6
|
+
const use_now_js_1 = require("@uxf/core-react/hooks/use-now.js");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
8
|
+
const can_select_range_ts_1 = require("../utils/can-select-range.js");
|
|
9
|
+
const date_string_ts_1 = require("../utils/date-string.js");
|
|
10
|
+
const get_initial_months_ts_1 = require("../utils/get-initial-months.js");
|
|
11
|
+
const is_date_blocked_ts_1 = require("../utils/is-date-blocked.js");
|
|
12
|
+
const is_date_hovered_ts_1 = require("../utils/is-date-hovered.js");
|
|
13
|
+
const is_date_inside_range_ts_1 = require("../utils/is-date-inside-range.js");
|
|
14
|
+
const is_end_date_ts_1 = require("../utils/is-end-date.js");
|
|
15
|
+
const is_first_or_last_selected_date_ts_1 = require("../utils/is-first-or-last-selected-date.js");
|
|
16
|
+
const is_in_unavailable_dates_ts_1 = require("../utils/is-in-unavailable-dates.js");
|
|
17
|
+
const is_start_date_ts_1 = require("../utils/is-start-date.js");
|
|
18
|
+
const use_date_picker_navigation_ts_1 = require("./use-date-picker-navigation.js");
|
|
19
19
|
exports.START_DATE = "startDate";
|
|
20
20
|
exports.END_DATE = "endDate";
|
|
21
21
|
function useDateRangePicker(t0) {
|
|
@@ -28,10 +28,10 @@ function useDateRangePicker(t0) {
|
|
|
28
28
|
const minBookingDays = t5 === undefined ? 1 : t5;
|
|
29
29
|
const numberOfMonths = t6 === undefined ? 2 : t6;
|
|
30
30
|
const unavailableDates = t7 === undefined ? [] : t7;
|
|
31
|
-
const now = (0,
|
|
31
|
+
const now = (0, use_now_js_1.useNow)();
|
|
32
32
|
let t8;
|
|
33
33
|
if ($[0] !== startDate) {
|
|
34
|
-
t8 = startDate ? (0,
|
|
34
|
+
t8 = startDate ? (0, date_string_ts_1.toDateString)(startDate) : null;
|
|
35
35
|
$[0] = startDate;
|
|
36
36
|
$[1] = t8;
|
|
37
37
|
}
|
|
@@ -39,14 +39,14 @@ function useDateRangePicker(t0) {
|
|
|
39
39
|
t8 = $[1];
|
|
40
40
|
}
|
|
41
41
|
const normalizedStartDate = t8;
|
|
42
|
-
const normalizedEndDate = endDate ? (0,
|
|
43
|
-
const normalizedMinBookingDate = minBookingDate ? (0,
|
|
44
|
-
const normalizedMaxBookingDate = maxBookingDate ? (0,
|
|
42
|
+
const normalizedEndDate = endDate ? (0, date_string_ts_1.toDateString)(endDate) : null;
|
|
43
|
+
const normalizedMinBookingDate = minBookingDate ? (0, date_string_ts_1.toDateString)(minBookingDate) : undefined;
|
|
44
|
+
const normalizedMaxBookingDate = maxBookingDate ? (0, date_string_ts_1.toDateString)(maxBookingDate) : undefined;
|
|
45
45
|
const disabledDatesFromConfig = datesConfig.filter(_temp).flatMap(_temp2);
|
|
46
|
-
const allDisabledDates = [...unavailableDates.map(
|
|
46
|
+
const allDisabledDates = [...unavailableDates.map(date_string_ts_1.toDateString), ...disabledDatesFromConfig.map(date_string_ts_1.toDateString)];
|
|
47
47
|
let t9;
|
|
48
48
|
if ($[2] !== initialVisibleMonth || $[3] !== now || $[4] !== numberOfMonths || $[5] !== startDate || $[6] !== timeZone) {
|
|
49
|
-
t9 = () => { var _a; return (0,
|
|
49
|
+
t9 = () => { var _a; return (0, get_initial_months_ts_1.getInitialMonths)(numberOfMonths, (_a = startDate !== null && startDate !== void 0 ? startDate : initialVisibleMonth) !== null && _a !== void 0 ? _a : (0, date_string_ts_1.fromDateString)((0, date_string_ts_1.todayDateString)(now, timeZone))); };
|
|
50
50
|
$[2] = initialVisibleMonth;
|
|
51
51
|
$[3] = now;
|
|
52
52
|
$[4] = numberOfMonths;
|
|
@@ -60,15 +60,15 @@ function useDateRangePicker(t0) {
|
|
|
60
60
|
const [activeMonths, setActiveMonths] = (0, react_1.useState)(t9);
|
|
61
61
|
const [hoveredDate, setHoveredDate] = (0, react_1.useState)(null);
|
|
62
62
|
const [focusedDate, setFocusedDate] = (0, react_1.useState)(normalizedStartDate);
|
|
63
|
-
const disabledDatesByUser = isDateBlockedProps || allDisabledDates.length > 0 ? date => { var _a; return (0,
|
|
63
|
+
const disabledDatesByUser = isDateBlockedProps || allDisabledDates.length > 0 ? date => { var _a; return (0, is_in_unavailable_dates_ts_1.isInUnavailableDates)(allDisabledDates, date) || ((_a = isDateBlockedProps === null || isDateBlockedProps === void 0 ? void 0 : isDateBlockedProps((0, date_string_ts_1.fromDateString)(date))) !== null && _a !== void 0 ? _a : false); } : null;
|
|
64
64
|
let t10;
|
|
65
65
|
if ($[8] !== activeMonths || $[9] !== focusedDate || $[10] !== numberOfMonths) {
|
|
66
66
|
t10 = date_0 => {
|
|
67
|
-
const dateStr = (0,
|
|
67
|
+
const dateStr = (0, date_string_ts_1.toDateString)(date_0);
|
|
68
68
|
setFocusedDate(dateStr);
|
|
69
|
-
const focusedYYYYMM = (0,
|
|
69
|
+
const focusedYYYYMM = (0, date_string_ts_1.toDateString)(date_0).slice(0, 7);
|
|
70
70
|
if (!focusedDate || !activeMonths.some(m => `${m.year}-${String(m.month + 1).padStart(2, "0")}` === focusedYYYYMM)) {
|
|
71
|
-
setActiveMonths((0,
|
|
71
|
+
setActiveMonths((0, get_initial_months_ts_1.getInitialMonths)(numberOfMonths, date_0));
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
$[8] = activeMonths;
|
|
@@ -81,12 +81,12 @@ function useDateRangePicker(t0) {
|
|
|
81
81
|
}
|
|
82
82
|
const onDateFocus = t10;
|
|
83
83
|
const _isDateSelected = date_1 => {
|
|
84
|
-
const dateStr_0 = (0,
|
|
85
|
-
return (0,
|
|
84
|
+
const dateStr_0 = (0, date_string_ts_1.toDateString)(date_1);
|
|
85
|
+
return (0, is_date_inside_range_ts_1.isDateInsideRange)(dateStr_0, normalizedStartDate, normalizedEndDate) || (0, is_first_or_last_selected_date_ts_1.isFirstOrLastSelectedDate)(dateStr_0, normalizedStartDate, normalizedEndDate);
|
|
86
86
|
};
|
|
87
87
|
let t11;
|
|
88
88
|
if ($[12] !== normalizedStartDate) {
|
|
89
|
-
t11 = date_2 => (0,
|
|
89
|
+
t11 = date_2 => (0, is_start_date_ts_1.isStartDate)((0, date_string_ts_1.toDateString)(date_2), normalizedStartDate);
|
|
90
90
|
$[12] = normalizedStartDate;
|
|
91
91
|
$[13] = t11;
|
|
92
92
|
}
|
|
@@ -94,10 +94,10 @@ function useDateRangePicker(t0) {
|
|
|
94
94
|
t11 = $[13];
|
|
95
95
|
}
|
|
96
96
|
const _isStartDate = t11;
|
|
97
|
-
const _isEndDate = date_3 => (0,
|
|
98
|
-
const _isDateInsideRange = date_4 => (0,
|
|
99
|
-
const _isDateBlocked = date_5 => (0,
|
|
100
|
-
date: (0,
|
|
97
|
+
const _isEndDate = date_3 => (0, is_end_date_ts_1.isEndDate)((0, date_string_ts_1.toDateString)(date_3), normalizedEndDate);
|
|
98
|
+
const _isDateInsideRange = date_4 => (0, is_date_inside_range_ts_1.isDateInsideRange)((0, date_string_ts_1.toDateString)(date_4), normalizedStartDate, normalizedEndDate);
|
|
99
|
+
const _isDateBlocked = date_5 => (0, is_date_blocked_ts_1.isDateBlocked)({
|
|
100
|
+
date: (0, date_string_ts_1.toDateString)(date_5),
|
|
101
101
|
minBookingDate: normalizedMinBookingDate,
|
|
102
102
|
maxBookingDate: normalizedMaxBookingDate,
|
|
103
103
|
startDate: normalizedStartDate,
|
|
@@ -108,7 +108,7 @@ function useDateRangePicker(t0) {
|
|
|
108
108
|
});
|
|
109
109
|
let t12;
|
|
110
110
|
if ($[14] !== focusedDate) {
|
|
111
|
-
t12 = date_6 => focusedDate !== null && (0,
|
|
111
|
+
t12 = date_6 => focusedDate !== null && (0, date_string_ts_1.toDateString)(date_6) === focusedDate;
|
|
112
112
|
$[14] = focusedDate;
|
|
113
113
|
$[15] = t12;
|
|
114
114
|
}
|
|
@@ -116,8 +116,8 @@ function useDateRangePicker(t0) {
|
|
|
116
116
|
t12 = $[15];
|
|
117
117
|
}
|
|
118
118
|
const isDateFocused = t12;
|
|
119
|
-
const _isDateHovered = date_7 => (0,
|
|
120
|
-
date: (0,
|
|
119
|
+
const _isDateHovered = date_7 => (0, is_date_hovered_ts_1.isDateHovered)({
|
|
120
|
+
date: (0, date_string_ts_1.toDateString)(date_7),
|
|
121
121
|
hoveredDate,
|
|
122
122
|
startDate: normalizedStartDate,
|
|
123
123
|
endDate: normalizedEndDate,
|
|
@@ -132,7 +132,7 @@ function useDateRangePicker(t0) {
|
|
|
132
132
|
if ((e.key === "ArrowRight" || e.key === "ArrowLeft" || e.key === "ArrowDown" || e.key === "ArrowUp") && !focusedDate) {
|
|
133
133
|
const activeMonthDate = (_b = (_a = activeMonths.at(0)) === null || _a === void 0 ? void 0 : _a.date) !== null && _b !== void 0 ? _b : new Date();
|
|
134
134
|
onDateFocus(activeMonthDate);
|
|
135
|
-
setActiveMonths((0,
|
|
135
|
+
setActiveMonths((0, get_initial_months_ts_1.getInitialMonths)(numberOfMonths, activeMonthDate));
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
$[16] = activeMonths;
|
|
@@ -187,8 +187,8 @@ function useDateRangePicker(t0) {
|
|
|
187
187
|
}
|
|
188
188
|
const onResetDates = t16;
|
|
189
189
|
const onDateSelect = function onDateSelect(date_8) {
|
|
190
|
-
const dateStr_1 = (0,
|
|
191
|
-
if ((focusedInput === exports.END_DATE || focusedInput === exports.START_DATE) && minBookingDays > 0 && exactMinBookingDays && (0,
|
|
190
|
+
const dateStr_1 = (0, date_string_ts_1.toDateString)(date_8);
|
|
191
|
+
if ((focusedInput === exports.END_DATE || focusedInput === exports.START_DATE) && minBookingDays > 0 && exactMinBookingDays && (0, can_select_range_ts_1.canSelectRange)({
|
|
192
192
|
minBookingDays,
|
|
193
193
|
exactMinBookingDays,
|
|
194
194
|
minBookingDate: normalizedMinBookingDate,
|
|
@@ -198,18 +198,18 @@ function useDateRangePicker(t0) {
|
|
|
198
198
|
endDate: null
|
|
199
199
|
})) {
|
|
200
200
|
onDatesChange({
|
|
201
|
-
startDate: (0,
|
|
202
|
-
endDate: (0,
|
|
201
|
+
startDate: (0, date_string_ts_1.fromDateString)(dateStr_1),
|
|
202
|
+
endDate: (0, date_string_ts_1.fromDateString)((0, date_string_ts_1.addDays)(dateStr_1, minBookingDays - 1)),
|
|
203
203
|
focusedInput: null
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
206
|
else {
|
|
207
|
-
if ((focusedInput === exports.END_DATE && normalizedStartDate && dateStr_1 < normalizedStartDate || focusedInput === exports.START_DATE && normalizedEndDate && dateStr_1 > normalizedEndDate) && !exactMinBookingDays && (0,
|
|
207
|
+
if ((focusedInput === exports.END_DATE && normalizedStartDate && dateStr_1 < normalizedStartDate || focusedInput === exports.START_DATE && normalizedEndDate && dateStr_1 > normalizedEndDate) && !exactMinBookingDays && (0, can_select_range_ts_1.canSelectRange)({
|
|
208
208
|
minBookingDays,
|
|
209
209
|
isDateBlocked: disabledDatesByUser,
|
|
210
210
|
startDate: dateStr_1,
|
|
211
211
|
endDate: null
|
|
212
|
-
}) || focusedInput === exports.START_DATE && !exactMinBookingDays && (0,
|
|
212
|
+
}) || focusedInput === exports.START_DATE && !exactMinBookingDays && (0, can_select_range_ts_1.canSelectRange)({
|
|
213
213
|
minBookingDays,
|
|
214
214
|
isDateBlocked: disabledDatesByUser,
|
|
215
215
|
endDate: normalizedEndDate,
|
|
@@ -217,12 +217,12 @@ function useDateRangePicker(t0) {
|
|
|
217
217
|
})) {
|
|
218
218
|
onDatesChange({
|
|
219
219
|
endDate: null,
|
|
220
|
-
startDate: (0,
|
|
220
|
+
startDate: (0, date_string_ts_1.fromDateString)(dateStr_1),
|
|
221
221
|
focusedInput: exports.END_DATE
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
224
|
else {
|
|
225
|
-
if (focusedInput === exports.START_DATE && !exactMinBookingDays && (0,
|
|
225
|
+
if (focusedInput === exports.START_DATE && !exactMinBookingDays && (0, can_select_range_ts_1.canSelectRange)({
|
|
226
226
|
minBookingDays,
|
|
227
227
|
isDateBlocked: disabledDatesByUser,
|
|
228
228
|
endDate: null,
|
|
@@ -230,20 +230,20 @@ function useDateRangePicker(t0) {
|
|
|
230
230
|
})) {
|
|
231
231
|
onDatesChange({
|
|
232
232
|
endDate: null,
|
|
233
|
-
startDate: (0,
|
|
233
|
+
startDate: (0, date_string_ts_1.fromDateString)(dateStr_1),
|
|
234
234
|
focusedInput: exports.END_DATE
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
else {
|
|
238
|
-
if (focusedInput === exports.END_DATE && normalizedStartDate && dateStr_1 >= normalizedStartDate && !exactMinBookingDays && (0,
|
|
238
|
+
if (focusedInput === exports.END_DATE && normalizedStartDate && dateStr_1 >= normalizedStartDate && !exactMinBookingDays && (0, can_select_range_ts_1.canSelectRange)({
|
|
239
239
|
minBookingDays,
|
|
240
240
|
isDateBlocked: disabledDatesByUser,
|
|
241
241
|
startDate: normalizedStartDate,
|
|
242
242
|
endDate: dateStr_1
|
|
243
243
|
})) {
|
|
244
244
|
onDatesChange({
|
|
245
|
-
startDate: (0,
|
|
246
|
-
endDate: (0,
|
|
245
|
+
startDate: (0, date_string_ts_1.fromDateString)(normalizedStartDate),
|
|
246
|
+
endDate: (0, date_string_ts_1.fromDateString)(dateStr_1),
|
|
247
247
|
focusedInput: null
|
|
248
248
|
});
|
|
249
249
|
}
|
|
@@ -251,13 +251,13 @@ function useDateRangePicker(t0) {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
if (focusedInput !== exports.END_DATE && (!focusedDate || dateStr_1.slice(0, 7) !== focusedDate.slice(0, 7)) && changeActiveMonthOnSelect) {
|
|
254
|
-
setActiveMonths((0,
|
|
254
|
+
setActiveMonths((0, get_initial_months_ts_1.getInitialMonths)(numberOfMonths, (0, date_string_ts_1.fromDateString)(dateStr_1)));
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
const onDatesSelect = function onDatesSelect(start, end) {
|
|
258
|
-
const startStr = (0,
|
|
259
|
-
const endStr = end ? (0,
|
|
260
|
-
if ((0,
|
|
258
|
+
const startStr = (0, date_string_ts_1.toDateString)(start);
|
|
259
|
+
const endStr = end ? (0, date_string_ts_1.toDateString)(end) : null;
|
|
260
|
+
if ((0, can_select_range_ts_1.canSelectRange)({
|
|
261
261
|
minBookingDays,
|
|
262
262
|
exactMinBookingDays,
|
|
263
263
|
minBookingDate: normalizedMinBookingDate,
|
|
@@ -267,13 +267,13 @@ function useDateRangePicker(t0) {
|
|
|
267
267
|
endDate: endStr
|
|
268
268
|
})) {
|
|
269
269
|
onDatesChange({
|
|
270
|
-
endDate: endStr ? (0,
|
|
271
|
-
startDate: (0,
|
|
270
|
+
endDate: endStr ? (0, date_string_ts_1.fromDateString)(endStr) : null,
|
|
271
|
+
startDate: (0, date_string_ts_1.fromDateString)(startStr),
|
|
272
272
|
focusedInput: exports.START_DATE
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
if (focusedInput !== exports.END_DATE && (!focusedDate || startStr.slice(0, 7) !== focusedDate.slice(0, 7)) && changeActiveMonthOnSelect) {
|
|
276
|
-
setActiveMonths((0,
|
|
276
|
+
setActiveMonths((0, get_initial_months_ts_1.getInitialMonths)(numberOfMonths, (0, date_string_ts_1.fromDateString)(startStr)));
|
|
277
277
|
}
|
|
278
278
|
};
|
|
279
279
|
const onDateHover = function onDateHover(date_9) {
|
|
@@ -281,16 +281,16 @@ function useDateRangePicker(t0) {
|
|
|
281
281
|
setHoveredDate(null);
|
|
282
282
|
}
|
|
283
283
|
else {
|
|
284
|
-
const dateStr_2 = (0,
|
|
284
|
+
const dateStr_2 = (0, date_string_ts_1.toDateString)(date_9);
|
|
285
285
|
const isNotBlocked = !_isDateBlocked(date_9) || normalizedStartDate && dateStr_2 === normalizedStartDate;
|
|
286
|
-
const isHoveredDateAfterOrEqualMinDate = normalizedMinBookingDate ? dateStr_2 >= (0,
|
|
286
|
+
const isHoveredDateAfterOrEqualMinDate = normalizedMinBookingDate ? dateStr_2 >= (0, date_string_ts_1.addDays)(normalizedMinBookingDate, -1) : true;
|
|
287
287
|
const isHoveredDateBeforeOrEqualMaxDate = normalizedMaxBookingDate ? dateStr_2 <= normalizedMaxBookingDate : true;
|
|
288
|
-
const potentialEndDateStr = (0,
|
|
288
|
+
const potentialEndDateStr = (0, date_string_ts_1.addDays)(dateStr_2, minBookingDays - 1);
|
|
289
289
|
const isPotentialEndDateAfterOrEqualMinDate = normalizedMinBookingDate ? potentialEndDateStr >= normalizedMinBookingDate : true;
|
|
290
290
|
const isPotentialEndDateBeforeOrEqualMaxDate = normalizedMaxBookingDate ? potentialEndDateStr <= normalizedMaxBookingDate : true;
|
|
291
291
|
const isExactAndInRange = exactMinBookingDays && minBookingDays > 1 && isHoveredDateAfterOrEqualMinDate && isHoveredDateBeforeOrEqualMaxDate && isPotentialEndDateAfterOrEqualMinDate && isPotentialEndDateBeforeOrEqualMaxDate;
|
|
292
292
|
const isInRange = normalizedStartDate && !normalizedEndDate && !exactMinBookingDays && isHoveredDateAfterOrEqualMinDate && isHoveredDateBeforeOrEqualMaxDate;
|
|
293
|
-
const isMinBookingDaysInRange = minBookingDays > 1 && normalizedStartDate ? dateStr_2 > normalizedStartDate && dateStr_2 < (0,
|
|
293
|
+
const isMinBookingDaysInRange = minBookingDays > 1 && normalizedStartDate ? dateStr_2 > normalizedStartDate && dateStr_2 < (0, date_string_ts_1.addDays)(normalizedStartDate, minBookingDays - 2) : true;
|
|
294
294
|
const isStartDateHoveredAndInRange = normalizedStartDate && dateStr_2 === normalizedStartDate && isMinBookingDaysInRange;
|
|
295
295
|
if (isNotBlocked && (isExactAndInRange || isInRange || isStartDateHoveredAndInRange)) {
|
|
296
296
|
setHoveredDate(dateStr_2);
|
|
@@ -304,13 +304,13 @@ function useDateRangePicker(t0) {
|
|
|
304
304
|
};
|
|
305
305
|
let t17;
|
|
306
306
|
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
307
|
-
t17 = d => setFocusedDate(d ? (0,
|
|
307
|
+
t17 = d => setFocusedDate(d ? (0, date_string_ts_1.toDateString)(d) : null);
|
|
308
308
|
$[26] = t17;
|
|
309
309
|
}
|
|
310
310
|
else {
|
|
311
311
|
t17 = $[26];
|
|
312
312
|
}
|
|
313
|
-
const t18 = (0,
|
|
313
|
+
const t18 = (0, use_date_picker_navigation_ts_1.useDatePickerNavigation)({
|
|
314
314
|
activeMonths,
|
|
315
315
|
maxBookingDate: normalizedMaxBookingDate,
|
|
316
316
|
minBookingDate: normalizedMinBookingDate,
|
|
@@ -320,7 +320,7 @@ function useDateRangePicker(t0) {
|
|
|
320
320
|
});
|
|
321
321
|
let t19;
|
|
322
322
|
if ($[27] !== focusedDate) {
|
|
323
|
-
t19 = focusedDate ? (0,
|
|
323
|
+
t19 = focusedDate ? (0, date_string_ts_1.fromDateString)(focusedDate) : null;
|
|
324
324
|
$[27] = focusedDate;
|
|
325
325
|
$[28] = t19;
|
|
326
326
|
}
|
|
@@ -329,14 +329,14 @@ function useDateRangePicker(t0) {
|
|
|
329
329
|
}
|
|
330
330
|
let t20;
|
|
331
331
|
if ($[29] !== hoveredDate) {
|
|
332
|
-
t20 = hoveredDate ? (0,
|
|
332
|
+
t20 = hoveredDate ? (0, date_string_ts_1.fromDateString)(hoveredDate) : null;
|
|
333
333
|
$[29] = hoveredDate;
|
|
334
334
|
$[30] = t20;
|
|
335
335
|
}
|
|
336
336
|
else {
|
|
337
337
|
t20 = $[30];
|
|
338
338
|
}
|
|
339
|
-
const t21 = allDisabledDates.map(
|
|
339
|
+
const t21 = allDisabledDates.map(date_string_ts_1.fromDateString);
|
|
340
340
|
let t22;
|
|
341
341
|
if ($[31] !== _isDateBlocked || $[32] !== _isDateHovered || $[33] !== _isDateInsideRange || $[34] !== _isDateSelected || $[35] !== _isEndDate || $[36] !== _isStartDate || $[37] !== activeMonths || $[38] !== datesConfig || $[39] !== firstDayOfWeek || $[40] !== isDateFocused || $[41] !== numberOfMonths || $[42] !== onDateFocus || $[43] !== onDateHover || $[44] !== onDateSelect || $[45] !== onDatesSelect || $[46] !== onResetDates || $[47] !== t18 || $[48] !== t19 || $[49] !== t20 || $[50] !== t21 || $[51] !== timeZone) {
|
|
342
342
|
t22 = {
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
/** @jest-environment jsdom */
|
|
4
4
|
const react_1 = require("@testing-library/react");
|
|
5
5
|
const react_2 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const use_date_range_picker_ts_1 = require("./use-date-range-picker.js");
|
|
7
7
|
beforeAll(() => {
|
|
8
8
|
jest.useFakeTimers();
|
|
9
9
|
jest.setSystemTime(new Date("2021-09-25"));
|
|
10
10
|
});
|
|
11
11
|
test("base data", () => {
|
|
12
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
12
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
13
13
|
startDate: null,
|
|
14
14
|
endDate: null,
|
|
15
15
|
onDatesChange: () => undefined,
|
|
@@ -30,7 +30,7 @@ test("date focus", () => {
|
|
|
30
30
|
const BASE_DATE = new Date("2021-09-15");
|
|
31
31
|
const { result: state } = (0, react_1.renderHook)(() => (0, react_2.useState)({ startDate: null, endDate: null, focusedInput: "startDate" }));
|
|
32
32
|
const [{ startDate, endDate, focusedInput }, onDatesChange] = state.current;
|
|
33
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
33
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
34
34
|
startDate,
|
|
35
35
|
endDate,
|
|
36
36
|
onDatesChange,
|
|
@@ -51,7 +51,7 @@ test("date select", () => {
|
|
|
51
51
|
const { result: state } = (0, react_1.renderHook)(() => (0, react_2.useState)({ startDate: null, endDate: null, focusedInput: "startDate" }));
|
|
52
52
|
const { result, rerender } = (0, react_1.renderHook)(() => {
|
|
53
53
|
const [{ startDate, endDate, focusedInput }, onDatesChange] = state.current;
|
|
54
|
-
return (0,
|
|
54
|
+
return (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
55
55
|
startDate,
|
|
56
56
|
endDate,
|
|
57
57
|
onDatesChange,
|
|
@@ -86,7 +86,7 @@ test("date range select - valid range", () => {
|
|
|
86
86
|
const { result: state } = (0, react_1.renderHook)(() => (0, react_2.useState)({ startDate: null, endDate: null, focusedInput: "startDate" }));
|
|
87
87
|
const { result, rerender } = (0, react_1.renderHook)(() => {
|
|
88
88
|
const [{ startDate, endDate, focusedInput }, onDatesChange] = state.current;
|
|
89
|
-
return (0,
|
|
89
|
+
return (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
90
90
|
startDate,
|
|
91
91
|
endDate,
|
|
92
92
|
onDatesChange,
|
|
@@ -108,7 +108,7 @@ test("date range select - with null end date", () => {
|
|
|
108
108
|
const { result: state } = (0, react_1.renderHook)(() => (0, react_2.useState)({ startDate: null, endDate: null, focusedInput: "startDate" }));
|
|
109
109
|
const { result, rerender } = (0, react_1.renderHook)(() => {
|
|
110
110
|
const [{ startDate, endDate, focusedInput }, onDatesChange] = state.current;
|
|
111
|
-
return (0,
|
|
111
|
+
return (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
112
112
|
startDate,
|
|
113
113
|
endDate,
|
|
114
114
|
onDatesChange,
|
|
@@ -129,7 +129,7 @@ test("date range select - with minBookingDays", () => {
|
|
|
129
129
|
const { result: state } = (0, react_1.renderHook)(() => (0, react_2.useState)({ startDate: null, endDate: null, focusedInput: "startDate" }));
|
|
130
130
|
const { result, rerender } = (0, react_1.renderHook)(() => {
|
|
131
131
|
const [{ startDate, endDate, focusedInput }, onDatesChange] = state.current;
|
|
132
|
-
return (0,
|
|
132
|
+
return (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
133
133
|
startDate,
|
|
134
134
|
endDate,
|
|
135
135
|
onDatesChange,
|
|
@@ -149,7 +149,7 @@ test("date range select - with minBookingDays", () => {
|
|
|
149
149
|
});
|
|
150
150
|
test("date range select - invalid range with minBookingDays", () => {
|
|
151
151
|
const onDatesChange = jest.fn();
|
|
152
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
152
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
153
153
|
startDate: null,
|
|
154
154
|
endDate: null,
|
|
155
155
|
onDatesChange,
|
|
@@ -169,7 +169,7 @@ test("date range select - with exactMinBookingDays", () => {
|
|
|
169
169
|
const { result: state } = (0, react_1.renderHook)(() => (0, react_2.useState)({ startDate: null, endDate: null, focusedInput: "startDate" }));
|
|
170
170
|
const { result, rerender } = (0, react_1.renderHook)(() => {
|
|
171
171
|
const [{ startDate, endDate, focusedInput }, onDatesChange] = state.current;
|
|
172
|
-
return (0,
|
|
172
|
+
return (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
173
173
|
startDate,
|
|
174
174
|
endDate,
|
|
175
175
|
onDatesChange,
|
|
@@ -190,7 +190,7 @@ test("date range select - with exactMinBookingDays", () => {
|
|
|
190
190
|
});
|
|
191
191
|
test("date range select - blocked dates in range", () => {
|
|
192
192
|
const onDatesChange = jest.fn();
|
|
193
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
193
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
194
194
|
startDate: null,
|
|
195
195
|
endDate: null,
|
|
196
196
|
onDatesChange,
|
|
@@ -211,7 +211,7 @@ test("date range select - with changeActiveMonthOnSelect", () => {
|
|
|
211
211
|
const { result: state } = (0, react_1.renderHook)(() => (0, react_2.useState)({ startDate: null, endDate: null, focusedInput: "startDate" }));
|
|
212
212
|
const { result, rerender } = (0, react_1.renderHook)(() => {
|
|
213
213
|
const [{ startDate, endDate, focusedInput }, onDatesChange] = state.current;
|
|
214
|
-
return (0,
|
|
214
|
+
return (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
215
215
|
startDate,
|
|
216
216
|
endDate,
|
|
217
217
|
onDatesChange,
|
|
@@ -234,7 +234,7 @@ test("date range select - with changeActiveMonthOnSelect", () => {
|
|
|
234
234
|
});
|
|
235
235
|
test("date range select - respects maxBookingDate", () => {
|
|
236
236
|
const onDatesChange = jest.fn();
|
|
237
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
237
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
238
238
|
startDate: null,
|
|
239
239
|
endDate: null,
|
|
240
240
|
onDatesChange,
|
|
@@ -253,7 +253,7 @@ test("date range select - respects maxBookingDate", () => {
|
|
|
253
253
|
test("date range select - with isDateBlocked callback", () => {
|
|
254
254
|
const onDatesChange = jest.fn();
|
|
255
255
|
const isDateBlocked = (date) => date.getDate() === 17;
|
|
256
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
256
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
257
257
|
startDate: null,
|
|
258
258
|
endDate: null,
|
|
259
259
|
onDatesChange,
|
|
@@ -274,7 +274,7 @@ describe("time zone", () => {
|
|
|
274
274
|
beforeEach(() => jest.setSystemTime(new Date("2026-11-30T23:30:00Z")));
|
|
275
275
|
afterAll(() => jest.setSystemTime(new Date("2021-09-25")));
|
|
276
276
|
test("opens on the month of today in the given time zone", () => {
|
|
277
|
-
const render = (timeZone) => (0, react_1.renderHook)(() => (0,
|
|
277
|
+
const render = (timeZone) => (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
278
278
|
startDate: null,
|
|
279
279
|
endDate: null,
|
|
280
280
|
onDatesChange: () => undefined,
|
|
@@ -286,7 +286,7 @@ describe("time zone", () => {
|
|
|
286
286
|
expect(render("Europe/Prague").timeZone).toBe("Europe/Prague");
|
|
287
287
|
});
|
|
288
288
|
test("opens on initialVisibleMonth rather than today when there is no start date", () => {
|
|
289
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
289
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
290
290
|
startDate: null,
|
|
291
291
|
endDate: null,
|
|
292
292
|
onDatesChange: () => undefined,
|
|
@@ -297,7 +297,7 @@ describe("time zone", () => {
|
|
|
297
297
|
expect(result.current.activeMonths[0]).toMatchObject({ year: 2023, month: 4 });
|
|
298
298
|
});
|
|
299
299
|
test("opens on the start date rather than initialVisibleMonth", () => {
|
|
300
|
-
const { result } = (0, react_1.renderHook)(() => (0,
|
|
300
|
+
const { result } = (0, react_1.renderHook)(() => (0, use_date_range_picker_ts_1.useDateRangePicker)({
|
|
301
301
|
startDate: new Date("2024-03-10"),
|
|
302
302
|
endDate: null,
|
|
303
303
|
onDatesChange: () => undefined,
|
package/hooks/use-day.d.ts
CHANGED
package/hooks/use-day.js
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useDay = useDay;
|
|
4
4
|
const compiler_runtime_1 = require("react/compiler-runtime");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const use_now_js_1 = require("@uxf/core-react/hooks/use-now.js");
|
|
6
|
+
const empty_array_js_1 = require("@uxf/core/constants/empty-array.js");
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const date_string_ts_1 = require("../utils/date-string.js");
|
|
9
|
+
const get_date_invervals_ts_1 = require("../utils/get-date-invervals.js");
|
|
10
10
|
function useDay(t0) {
|
|
11
11
|
var _a;
|
|
12
12
|
const $ = (0, compiler_runtime_1.c)(51);
|
|
13
13
|
const { date, datesConfig, dayRef, focusedDate, isDateBlocked, isDateFocused, isDateHovered, isDateInsideRange, isDateSelected, onDateFocus, onDateHover, onDateSelect, preventScroll, timeZone, unavailableDates: t1 } = t0;
|
|
14
|
-
const unavailableDates = t1 === undefined ?
|
|
15
|
-
const now = (0,
|
|
16
|
-
const disabledDatesFromConfig = (_a = datesConfig === null || datesConfig === void 0 ? void 0 : datesConfig.filter(_temp).flatMap(_temp2)) !== null && _a !== void 0 ? _a :
|
|
14
|
+
const unavailableDates = t1 === undefined ? empty_array_js_1.EMPTY_ARRAY : t1;
|
|
15
|
+
const now = (0, use_now_js_1.useNow)();
|
|
16
|
+
const disabledDatesFromConfig = (_a = datesConfig === null || datesConfig === void 0 ? void 0 : datesConfig.filter(_temp).flatMap(_temp2)) !== null && _a !== void 0 ? _a : empty_array_js_1.EMPTY_ARRAY;
|
|
17
17
|
const disabledDates = [...unavailableDates, ...disabledDatesFromConfig].filter(_temp3);
|
|
18
18
|
let t2;
|
|
19
19
|
if ($[0] !== date || $[1] !== onDateSelect) {
|
|
@@ -39,7 +39,7 @@ function useDay(t0) {
|
|
|
39
39
|
const onMouseEnter = t3;
|
|
40
40
|
let t4;
|
|
41
41
|
if ($[6] !== now || $[7] !== timeZone) {
|
|
42
|
-
t4 = (0,
|
|
42
|
+
t4 = (0, date_string_ts_1.todayDateString)(now, timeZone);
|
|
43
43
|
$[6] = now;
|
|
44
44
|
$[7] = timeZone;
|
|
45
45
|
$[8] = t4;
|
|
@@ -49,7 +49,7 @@ function useDay(t0) {
|
|
|
49
49
|
}
|
|
50
50
|
let t5;
|
|
51
51
|
if ($[9] !== date) {
|
|
52
|
-
t5 = (0,
|
|
52
|
+
t5 = (0, date_string_ts_1.toDateString)(date);
|
|
53
53
|
$[9] = date;
|
|
54
54
|
$[10] = t5;
|
|
55
55
|
}
|
|
@@ -88,22 +88,22 @@ function useDay(t0) {
|
|
|
88
88
|
bb48: switch (e.key) {
|
|
89
89
|
case "ArrowRight":
|
|
90
90
|
{
|
|
91
|
-
onDateFocus((0,
|
|
91
|
+
onDateFocus((0, date_string_ts_1.fromDateString)((0, date_string_ts_1.addDays)((0, date_string_ts_1.toDateString)(date), 1)));
|
|
92
92
|
break bb48;
|
|
93
93
|
}
|
|
94
94
|
case "ArrowLeft":
|
|
95
95
|
{
|
|
96
|
-
onDateFocus((0,
|
|
96
|
+
onDateFocus((0, date_string_ts_1.fromDateString)((0, date_string_ts_1.addDays)((0, date_string_ts_1.toDateString)(date), -1)));
|
|
97
97
|
break bb48;
|
|
98
98
|
}
|
|
99
99
|
case "ArrowUp":
|
|
100
100
|
{
|
|
101
|
-
onDateFocus((0,
|
|
101
|
+
onDateFocus((0, date_string_ts_1.fromDateString)((0, date_string_ts_1.addDays)((0, date_string_ts_1.toDateString)(date), -7)));
|
|
102
102
|
break bb48;
|
|
103
103
|
}
|
|
104
104
|
case "ArrowDown":
|
|
105
105
|
{
|
|
106
|
-
onDateFocus((0,
|
|
106
|
+
onDateFocus((0, date_string_ts_1.fromDateString)((0, date_string_ts_1.addDays)((0, date_string_ts_1.toDateString)(date), 7)));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -116,10 +116,10 @@ function useDay(t0) {
|
|
|
116
116
|
t8 = $[19];
|
|
117
117
|
}
|
|
118
118
|
const onKeyDown = t8;
|
|
119
|
-
const dateIntervals = (0,
|
|
119
|
+
const dateIntervals = (0, get_date_invervals_ts_1.getDateIntervals)(disabledDates);
|
|
120
120
|
let t9;
|
|
121
121
|
if ($[20] !== date) {
|
|
122
|
-
t9 = (0,
|
|
122
|
+
t9 = (0, date_string_ts_1.toDateString)(date);
|
|
123
123
|
$[20] = date;
|
|
124
124
|
$[21] = t9;
|
|
125
125
|
}
|
|
@@ -127,20 +127,20 @@ function useDay(t0) {
|
|
|
127
127
|
t9 = $[21];
|
|
128
128
|
}
|
|
129
129
|
const dateStr = t9;
|
|
130
|
-
const _isFirstUnavailableDate = () => dateIntervals.some(interval => (0,
|
|
131
|
-
const _isLastUnavailableDate = () => dateIntervals.some(interval_0 => (0,
|
|
130
|
+
const _isFirstUnavailableDate = () => dateIntervals.some(interval => (0, date_string_ts_1.toDateString)(interval.start) === dateStr);
|
|
131
|
+
const _isLastUnavailableDate = () => dateIntervals.some(interval_0 => (0, date_string_ts_1.toDateString)(interval_0.end) === dateStr);
|
|
132
132
|
let t10;
|
|
133
133
|
if ($[22] !== dateStr || $[23] !== datesConfig) {
|
|
134
|
-
const applicableDatesConfigs = datesConfig === null || datesConfig === void 0 ? void 0 : datesConfig.filter(config_1 => config_1.dates.some(configDay => (0,
|
|
134
|
+
const applicableDatesConfigs = datesConfig === null || datesConfig === void 0 ? void 0 : datesConfig.filter(config_1 => config_1.dates.some(configDay => (0, date_string_ts_1.toDateString)(configDay) === dateStr));
|
|
135
135
|
t10 = applicableDatesConfigs === null || applicableDatesConfigs === void 0 ? void 0 : applicableDatesConfigs.reduce((acc, curr) => {
|
|
136
136
|
if (!curr.flag) {
|
|
137
137
|
return acc;
|
|
138
138
|
}
|
|
139
|
-
const intervals = (0,
|
|
139
|
+
const intervals = (0, get_date_invervals_ts_1.getDateIntervals)(curr.dates);
|
|
140
140
|
acc.push({
|
|
141
141
|
flag: curr.flag,
|
|
142
|
-
isFirst: intervals.some(interval_1 => (0,
|
|
143
|
-
isLast: intervals.some(interval_2 => (0,
|
|
142
|
+
isFirst: intervals.some(interval_1 => (0, date_string_ts_1.toDateString)(interval_1.start) === dateStr),
|
|
143
|
+
isLast: intervals.some(interval_2 => (0, date_string_ts_1.toDateString)(interval_2.end) === dateStr)
|
|
144
144
|
});
|
|
145
145
|
return acc;
|
|
146
146
|
}, []);
|
|
@@ -175,7 +175,7 @@ function useDay(t0) {
|
|
|
175
175
|
t12 = $[31];
|
|
176
176
|
}
|
|
177
177
|
const isDisabled = t12;
|
|
178
|
-
const t13 = flags !== null && flags !== void 0 ? flags :
|
|
178
|
+
const t13 = flags !== null && flags !== void 0 ? flags : empty_array_js_1.EMPTY_ARRAY;
|
|
179
179
|
const t14 = _isFirstUnavailableDate();
|
|
180
180
|
let t15;
|
|
181
181
|
if ($[32] !== date || $[33] !== isDateInsideRange) {
|