willba-component-library 0.2.60 → 0.2.61

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.js CHANGED
@@ -547,7 +547,7 @@ function useTheme(_a) {
547
547
  return themePalette;
548
548
  }
549
549
 
550
- var css_248z$c = "@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');\n\n.will-root * {\n font-family: 'Montserrat', sans-serif;\n}\n\n.will-root {\n \n box-sizing: border-box;\n font-size: 14px;\n \n color: #1E1E1E;\n \n /* Palette */\n --will-primary: #374269;\n --will-secondary: #374269;\n --will-grey: #ABA7AF;\n --will-white: #fff;\n --will-white-transparent: #ffffffcf;\n --will-black: #000;\n --will-onahau: #CDEEFF;\n --will-text: #5A5959;\n --will-charcoal-blue: #384265;\n --will-transparent-white: rgba(255, 255, 255, 0.30);\n --will-transparent-black: rgba(171, 167, 175, 0.30);\n --will-error: #d32f2f;\n\n /*Color mix*/\n --will-primary-lighter: color-mix(in srgb, var(--will-primary), white 20%);\n --will-primary-lightest: color-mix(in srgb, var(--will-primary), white 80%);\n\n\n /* Confines */\n --will-box-shadow-dark: 0px 2px 12px 2px #a1a1a180;\n --will-box-shadow-light: 0px 2px 12px 2px #bcb9b980;\n\n /* Breakpoints */\n\n --will-lg: 1140px;\n --will-md: 960px;\n --will-sm: 600px;\n --will-xl: 1280px;\n --will-xs: 0px;\n}\n\n/* Typography */\n\n.will-root h1, h2, h3, h4, h5, h6 {\n font-weight: 700;\n} \n\n.will-root p, h1, h2, h3, h4, h5, h6, span {\n margin: 0;\n padding: 0;\n}\n\n\n/* Integration fixes */\n\n.will-root p {\n margin: 0 !important;\n}\n\n.will-root button {\n line-height: normal !important;\n}\n";
550
+ var css_248z$c = "@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');\n\n.will-root * {\n font-family: 'Montserrat', sans-serif;\n}\n\n.will-root {\n \n box-sizing: border-box;\n font-size: 14px;\n \n color: #1E1E1E;\n \n /* Palette */\n --will-primary: #374269;\n --will-secondary: #374269;\n --will-grey: #ABA7AF;\n --will-white: #fff;\n --will-white-transparent: #ffffffcf;\n --will-black: #000;\n --will-onahau: #CDEEFF;\n --will-text: #5A5959;\n --will-charcoal-blue: #384265;\n --will-transparent-white: rgba(255, 255, 255, 0.30);\n --will-transparent-black: rgba(171, 167, 175, 0.30);\n --will-error: #d32f2f;\n\n /*Color mix*/\n --will-primary-lighter: color-mix(in srgb, var(--will-primary), white 50%);\n --will-primary-lightest: color-mix(in srgb, var(--will-primary), white 80%);\n\n\n /* Confines */\n --will-box-shadow-dark: 0px 2px 12px 2px #a1a1a180;\n --will-box-shadow-light: 0px 2px 12px 2px #bcb9b980;\n\n /* Breakpoints */\n\n --will-lg: 1140px;\n --will-md: 960px;\n --will-sm: 600px;\n --will-xl: 1280px;\n --will-xs: 0px;\n}\n\n/* Typography */\n\n.will-root h1, h2, h3, h4, h5, h6 {\n font-weight: 700;\n} \n\n.will-root p, h1, h2, h3, h4, h5, h6, span {\n margin: 0;\n padding: 0;\n}\n\n\n/* Integration fixes */\n\n.will-root p {\n margin: 0 !important;\n}\n\n.will-root button {\n line-height: normal !important;\n}\n";
551
551
  styleInject(css_248z$c);
552
552
 
553
553
  var useAwaitRender = function () {
@@ -3778,86 +3778,6 @@ function differenceInCalendarWeeks(dirtyDateLeft, dirtyDateRight, options) {
3778
3778
  return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK$4);
3779
3779
  }
3780
3780
 
3781
- // for accurate equality comparisons of UTC timestamps that end up
3782
- // having the same representation in local time, e.g. one hour before
3783
- // DST ends vs. the instant that DST ends.
3784
- function compareLocalAsc(dateLeft, dateRight) {
3785
- var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();
3786
- if (diff < 0) {
3787
- return -1;
3788
- } else if (diff > 0) {
3789
- return 1;
3790
- // Return 0 if diff is 0; return NaN if diff is NaN
3791
- } else {
3792
- return diff;
3793
- }
3794
- }
3795
-
3796
- /**
3797
- * @name differenceInDays
3798
- * @category Day Helpers
3799
- * @summary Get the number of full days between the given dates.
3800
- *
3801
- * @description
3802
- * Get the number of full day periods between two dates. Fractional days are
3803
- * truncated towards zero.
3804
- *
3805
- * One "full day" is the distance between a local time in one day to the same
3806
- * local time on the next or previous day. A full day can sometimes be less than
3807
- * or more than 24 hours if a daylight savings change happens between two dates.
3808
- *
3809
- * To ignore DST and only measure exact 24-hour periods, use this instead:
3810
- * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.
3811
- *
3812
- *
3813
- * @param {Date|Number} dateLeft - the later date
3814
- * @param {Date|Number} dateRight - the earlier date
3815
- * @returns {Number} the number of full days according to the local timezone
3816
- * @throws {TypeError} 2 arguments required
3817
- *
3818
- * @example
3819
- * // How many full days are between
3820
- * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
3821
- * const result = differenceInDays(
3822
- * new Date(2012, 6, 2, 0, 0),
3823
- * new Date(2011, 6, 2, 23, 0)
3824
- * )
3825
- * //=> 365
3826
- * // How many full days are between
3827
- * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
3828
- * const result = differenceInDays(
3829
- * new Date(2011, 6, 3, 0, 1),
3830
- * new Date(2011, 6, 2, 23, 59)
3831
- * )
3832
- * //=> 0
3833
- * // How many full days are between
3834
- * // 1 March 2020 0:00 and 1 June 2020 0:00 ?
3835
- * // Note: because local time is used, the
3836
- * // result will always be 92 days, even in
3837
- * // time zones where DST starts and the
3838
- * // period has only 92*24-1 hours.
3839
- * const result = differenceInDays(
3840
- * new Date(2020, 5, 1),
3841
- * new Date(2020, 2, 1)
3842
- * )
3843
- //=> 92
3844
- */
3845
- function differenceInDays(dirtyDateLeft, dirtyDateRight) {
3846
- requiredArgs(2, arguments);
3847
- var dateLeft = toDate(dirtyDateLeft);
3848
- var dateRight = toDate(dirtyDateRight);
3849
- var sign = compareLocalAsc(dateLeft, dateRight);
3850
- var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));
3851
- dateLeft.setDate(dateLeft.getDate() - sign * difference);
3852
-
3853
- // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full
3854
- // If so, result must be decreased by 1 in absolute value
3855
- var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);
3856
- var result = sign * (difference - isLastDayNotFull);
3857
- // Prevent negative zero
3858
- return result === 0 ? 0 : result;
3859
- }
3860
-
3861
3781
  /**
3862
3782
  * @name endOfDay
3863
3783
  * @category Day Helpers
@@ -3910,6 +3830,62 @@ function endOfMonth(dirtyDate) {
3910
3830
  return date;
3911
3831
  }
3912
3832
 
3833
+ /**
3834
+ * @name eachDayOfInterval
3835
+ * @category Interval Helpers
3836
+ * @summary Return the array of dates within the specified time interval.
3837
+ *
3838
+ * @description
3839
+ * Return the array of dates within the specified time interval.
3840
+ *
3841
+ * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}
3842
+ * @param {Object} [options] - an object with options.
3843
+ * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.
3844
+ * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end
3845
+ * @throws {TypeError} 1 argument required
3846
+ * @throws {RangeError} `options.step` must be a number greater than 1
3847
+ * @throws {RangeError} The start of an interval cannot be after its end
3848
+ * @throws {RangeError} Date in interval cannot be `Invalid Date`
3849
+ *
3850
+ * @example
3851
+ * // Each day between 6 October 2014 and 10 October 2014:
3852
+ * const result = eachDayOfInterval({
3853
+ * start: new Date(2014, 9, 6),
3854
+ * end: new Date(2014, 9, 10)
3855
+ * })
3856
+ * //=> [
3857
+ * // Mon Oct 06 2014 00:00:00,
3858
+ * // Tue Oct 07 2014 00:00:00,
3859
+ * // Wed Oct 08 2014 00:00:00,
3860
+ * // Thu Oct 09 2014 00:00:00,
3861
+ * // Fri Oct 10 2014 00:00:00
3862
+ * // ]
3863
+ */
3864
+ function eachDayOfInterval(dirtyInterval, options) {
3865
+ var _options$step;
3866
+ requiredArgs(1, arguments);
3867
+ var interval = dirtyInterval || {};
3868
+ var startDate = toDate(interval.start);
3869
+ var endDate = toDate(interval.end);
3870
+ var endTime = endDate.getTime();
3871
+
3872
+ // Throw an exception if start date is after end date or if any date is `Invalid Date`
3873
+ if (!(startDate.getTime() <= endTime)) {
3874
+ throw new RangeError('Invalid interval');
3875
+ }
3876
+ var dates = [];
3877
+ var currentDate = startDate;
3878
+ currentDate.setHours(0, 0, 0, 0);
3879
+ var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1);
3880
+ if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');
3881
+ while (currentDate.getTime() <= endTime) {
3882
+ dates.push(toDate(currentDate));
3883
+ currentDate.setDate(currentDate.getDate() + step);
3884
+ currentDate.setHours(0, 0, 0, 0);
3885
+ }
3886
+ return dates;
3887
+ }
3888
+
3913
3889
  /**
3914
3890
  * @name startOfMonth
3915
3891
  * @category Month Helpers
@@ -6499,6 +6475,58 @@ function isSameYear(dirtyDateLeft, dirtyDateRight) {
6499
6475
  return dateLeft.getFullYear() === dateRight.getFullYear();
6500
6476
  }
6501
6477
 
6478
+ /**
6479
+ * @name isWithinInterval
6480
+ * @category Interval Helpers
6481
+ * @summary Is the given date within the interval?
6482
+ *
6483
+ * @description
6484
+ * Is the given date within the interval? (Including start and end.)
6485
+ *
6486
+ * @param {Date|Number} date - the date to check
6487
+ * @param {Interval} interval - the interval to check
6488
+ * @returns {Boolean} the date is within the interval
6489
+ * @throws {TypeError} 2 arguments required
6490
+ * @throws {RangeError} The start of an interval cannot be after its end
6491
+ * @throws {RangeError} Date in interval cannot be `Invalid Date`
6492
+ *
6493
+ * @example
6494
+ * // For the date within the interval:
6495
+ * isWithinInterval(new Date(2014, 0, 3), {
6496
+ * start: new Date(2014, 0, 1),
6497
+ * end: new Date(2014, 0, 7)
6498
+ * })
6499
+ * //=> true
6500
+ *
6501
+ * @example
6502
+ * // For the date outside of the interval:
6503
+ * isWithinInterval(new Date(2014, 0, 10), {
6504
+ * start: new Date(2014, 0, 1),
6505
+ * end: new Date(2014, 0, 7)
6506
+ * })
6507
+ * //=> false
6508
+ *
6509
+ * @example
6510
+ * // For date equal to interval start:
6511
+ * isWithinInterval(date, { start, end: date }) // => true
6512
+ *
6513
+ * @example
6514
+ * // For date equal to interval end:
6515
+ * isWithinInterval(date, { start: date, end }) // => true
6516
+ */
6517
+ function isWithinInterval(dirtyDate, interval) {
6518
+ requiredArgs(2, arguments);
6519
+ var time = toDate(dirtyDate).getTime();
6520
+ var startTime = toDate(interval.start).getTime();
6521
+ var endTime = toDate(interval.end).getTime();
6522
+
6523
+ // Throw an exception if start date is after end date or if any date is `Invalid Date`
6524
+ if (!(startTime <= endTime)) {
6525
+ throw new RangeError('Invalid interval');
6526
+ }
6527
+ return time >= startTime && time <= endTime;
6528
+ }
6529
+
6502
6530
  /**
6503
6531
  * @name subDays
6504
6532
  * @category Day Helpers
@@ -11036,7 +11064,8 @@ var calendarSelectionRules = function (_a) {
11036
11064
  return setCalendarRange(undefined);
11037
11065
  }
11038
11066
  if (
11039
- // 2. If selected "start" is after "range context end", clear selection and display error
11067
+ // 2. If selected "start" is after "range context end", clear selection and display error.
11068
+ // Also, if there are unavailable dates between the rangeContext "start" and "end", do not allow a fully overlapping selection.
11040
11069
  (rangeFrom && rangeContextTo && isAfter(rangeFrom, rangeContextTo)) ||
11041
11070
  (calendarRangeFrom &&
11042
11071
  calendarRangeTo &&
@@ -11057,6 +11086,16 @@ var calendarSelectionRules = function (_a) {
11057
11086
  }
11058
11087
  // 5. Handle gap selection backwards and forwards
11059
11088
  if (
11089
+ // In the range context case, every date selection that is after selected "start" last checkout,
11090
+ // clear selection and prompt error
11091
+ rangeContext &&
11092
+ rangeTo &&
11093
+ (checkOutRange === null || checkOutRange === void 0 ? void 0 : checkOutRange.lastCheckOut) &&
11094
+ isAfter(rangeTo, endOfDay(checkOutRange.lastCheckOut))) {
11095
+ setCalendarHasError && setCalendarHasError(true);
11096
+ return setCalendarRange(undefined);
11097
+ }
11098
+ if (
11060
11099
  // Enforce on every date selection before current "start", mark as "start" selection
11061
11100
  rangeFrom &&
11062
11101
  calendarRangeFrom &&
@@ -11131,62 +11170,85 @@ var disabledDatesByPage = function (_a) {
11131
11170
  var handleCalendarModifiers = function (_a) {
11132
11171
  var _b;
11133
11172
  var newDisableCalendarDates = _a.newDisableCalendarDates, calendarRange = _a.calendarRange, disabledDatesByPage = _a.disabledDatesByPage, disabledDates = _a.disabledDates, overlappingDate = _a.overlappingDate, rangeContext = _a.rangeContext, firstPossibleRangeContextCheckIn = _a.firstPossibleRangeContextCheckIn, lastPossibleRangeContextCheckOut = _a.lastPossibleRangeContextCheckOut, findFirstPossibleRangeContextCheckIn = _a.findFirstPossibleRangeContextCheckIn, findLastPossibleRangeContextCheckOut = _a.findLastPossibleRangeContextCheckOut, currentSelectionLastCheckoutDate = _a.currentSelectionLastCheckoutDate;
11173
+ // Parse data
11174
+ var calendarRangeFrom = (calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.from) && endOfDay(calendarRange.from);
11175
+ var calendarRangeTo = (calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.to) && endOfDay(calendarRange.to);
11176
+ var rangeContextFrom = (rangeContext === null || rangeContext === void 0 ? void 0 : rangeContext.from) && endOfDay(rangeContext.from);
11177
+ var rangeContextTo = (rangeContext === null || rangeContext === void 0 ? void 0 : rangeContext.to) && endOfDay(rangeContext.to);
11134
11178
  // Create range for range context middle selection and current overlapping selection
11135
- var rangeContextMiddleSelection = (rangeContext === null || rangeContext === void 0 ? void 0 : rangeContext.from) && (rangeContext === null || rangeContext === void 0 ? void 0 : rangeContext.to)
11136
- ? Array.from({ length: differenceInDays(rangeContext.to, rangeContext.from) - 1 }, function (_, i) { return ({
11137
- from: addDays(rangeContext.from, i + 1),
11138
- to: addDays(rangeContext.from, i + 1),
11139
- }); }).filter(function (date) {
11140
- return !(((calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.from) &&
11141
- isEqual(endOfDay(calendarRange.from), endOfDay(date.from))) ||
11142
- ((calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.to) &&
11143
- isEqual(endOfDay(calendarRange.to), endOfDay(date.from))));
11179
+ var rangeContextMiddleSelection = rangeContextFrom && rangeContextTo
11180
+ ? eachDayOfInterval({
11181
+ start: addDays(rangeContextFrom, 1),
11182
+ end: addDays(rangeContextTo, -1),
11183
+ }).filter(function (date) {
11184
+ return !((calendarRangeFrom &&
11185
+ isEqual(endOfDay(calendarRangeFrom), endOfDay(date))) ||
11186
+ (calendarRangeTo &&
11187
+ isEqual(endOfDay(calendarRangeTo), endOfDay(date))) ||
11188
+ (calendarRangeFrom &&
11189
+ !calendarRangeTo &&
11190
+ (currentSelectionLastCheckoutDate === null || currentSelectionLastCheckoutDate === void 0 ? void 0 : currentSelectionLastCheckoutDate.lastCheckOut) &&
11191
+ isAfter(calendarRangeFrom, rangeContextFrom) &&
11192
+ isBefore(currentSelectionLastCheckoutDate === null || currentSelectionLastCheckoutDate === void 0 ? void 0 : currentSelectionLastCheckoutDate.lastCheckOut, rangeContextTo) &&
11193
+ isWithinInterval(date, {
11194
+ start: currentSelectionLastCheckoutDate.checkIn,
11195
+ end: currentSelectionLastCheckoutDate.lastCheckOut,
11196
+ })) ||
11197
+ (calendarRangeFrom &&
11198
+ calendarRangeTo &&
11199
+ isAfter(calendarRangeFrom, rangeContextFrom) &&
11200
+ isBefore(calendarRangeTo, rangeContextTo) &&
11201
+ isWithinInterval(date, {
11202
+ start: calendarRangeFrom,
11203
+ end: calendarRangeTo,
11204
+ })));
11144
11205
  })
11145
11206
  : [];
11207
+ console.log();
11146
11208
  return {
11147
11209
  booked: disabledDatesByPage.length
11148
11210
  ? disabledDatesByPage
11149
11211
  : (disabledDates === null || disabledDates === void 0 ? void 0 : disabledDates.length)
11150
11212
  ? __spreadArray$1(__spreadArray$1(__spreadArray$1([], __read(disabledDates), false), __read(firstPossibleRangeContextCheckIn), false), __read(lastPossibleRangeContextCheckOut), false) : ((_b = newDisableCalendarDates === null || newDisableCalendarDates === void 0 ? void 0 : newDisableCalendarDates.disabledDates) === null || _b === void 0 ? void 0 : _b.length)
11151
11213
  ? __spreadArray$1(__spreadArray$1(__spreadArray$1([], __read(newDisableCalendarDates === null || newDisableCalendarDates === void 0 ? void 0 : newDisableCalendarDates.disabledDates), false), __read(firstPossibleRangeContextCheckIn), false), __read(lastPossibleRangeContextCheckOut), false) : [],
11152
- disabledAfterCheckIn: (calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.from)
11153
- ? [{ after: calendarRange.from }]
11214
+ disabledAfterCheckIn: calendarRangeFrom
11215
+ ? [{ after: calendarRangeFrom }]
11154
11216
  : [],
11155
- overlappingDate: __spreadArray$1([], __read((!(calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.from) && !!(overlappingDate === null || overlappingDate === void 0 ? void 0 : overlappingDate.length)
11217
+ overlappingDate: __spreadArray$1([], __read((!calendarRangeFrom && !!(overlappingDate === null || overlappingDate === void 0 ? void 0 : overlappingDate.length)
11156
11218
  ? overlappingDate.map(function (date) { return ({ from: date.from }); })
11157
11219
  : [])), false),
11158
- noActiveSelectionStart: (rangeContext === null || rangeContext === void 0 ? void 0 : rangeContext.from) &&
11159
- !(((calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.from) &&
11160
- isEqual(endOfDay(rangeContext.from), endOfDay(calendarRange.from))) ||
11161
- ((calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.to) &&
11162
- isEqual(endOfDay(rangeContext.from), endOfDay(calendarRange.to))))
11163
- ? rangeContext.from
11164
- : [],
11165
- noActiveSelectionEnd: (rangeContext === null || rangeContext === void 0 ? void 0 : rangeContext.to) &&
11166
- !(((calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.from) &&
11167
- isEqual(endOfDay(rangeContext.to), endOfDay(calendarRange.from))) ||
11168
- ((calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.to) &&
11169
- isEqual(endOfDay(rangeContext.to), endOfDay(calendarRange.to))))
11170
- ? rangeContext.to
11220
+ noActiveSelectionStart: rangeContextFrom &&
11221
+ !(calendarRangeFrom &&
11222
+ rangeContextFrom &&
11223
+ isEqual(endOfDay(rangeContextFrom), endOfDay(calendarRangeFrom)))
11224
+ ? rangeContextFrom
11171
11225
  : [],
11172
11226
  noActiveSelectionMid: __spreadArray$1([], __read((rangeContextMiddleSelection.length
11173
11227
  ? rangeContextMiddleSelection
11174
11228
  : [])), false),
11175
- checkoutOptionsMid: __spreadArray$1([], __read(((calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.from) &&
11176
- !(calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.to) &&
11229
+ noActiveSelectionEnd: rangeContextTo &&
11230
+ !(calendarRangeFrom &&
11231
+ rangeContextTo &&
11232
+ isEqual(endOfDay(rangeContextTo), endOfDay(calendarRangeFrom)))
11233
+ ? rangeContextTo
11234
+ : [],
11235
+ checkoutOptionsMid: __spreadArray$1([], __read((calendarRangeFrom &&
11236
+ !calendarRangeTo &&
11177
11237
  (currentSelectionLastCheckoutDate === null || currentSelectionLastCheckoutDate === void 0 ? void 0 : currentSelectionLastCheckoutDate.lastCheckOut)
11178
11238
  ? [
11179
11239
  {
11180
- after: calendarRange.from,
11240
+ after: calendarRangeFrom,
11181
11241
  before: addDays(currentSelectionLastCheckoutDate.lastCheckOut, 1),
11182
11242
  },
11183
11243
  ]
11184
11244
  : [])), false),
11185
- checkInOnly: __spreadArray$1([], __read(((findFirstPossibleRangeContextCheckIn === null || findFirstPossibleRangeContextCheckIn === void 0 ? void 0 : findFirstPossibleRangeContextCheckIn.checkIn) && rangeContext
11245
+ checkInOnly: __spreadArray$1([], __read(((findFirstPossibleRangeContextCheckIn === null || findFirstPossibleRangeContextCheckIn === void 0 ? void 0 : findFirstPossibleRangeContextCheckIn.checkIn) &&
11246
+ rangeContext &&
11247
+ rangeContextFrom
11186
11248
  ? [
11187
11249
  {
11188
11250
  from: findFirstPossibleRangeContextCheckIn.checkIn,
11189
- to: addDays(rangeContext.from, -1),
11251
+ to: addDays(rangeContextFrom, -1),
11190
11252
  },
11191
11253
  ]
11192
11254
  : [])), false),