@wix/bookings 1.0.1779 → 1.0.1781

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.
@@ -2795,7 +2795,7 @@ function $l({ onlyAvailableSlots: e2, selectedTimeZone: t2, setSelectedTimeZone:
2795
2795
  (e3 === null || at2.some((t3) => t3.id === e3)) && (tt2(false), $e2(e3), St2 !== null && e3 !== null && !dt2(St2, e3) && (yt2(null), xt2(false)));
2796
2796
  }, [at2, St2, dt2]), Kt2 = !!(i2 && !Te2.isLoading && Te2.displayTimeZonePolicy.customerCanChange && g2 && Fe2 && g2 !== Fe2), H2 = i2 ? Kt2 && t2 && (t2 === g2 || t2 === Fe2) ? t2 : we2 ?? g2 ?? Fe2 : null, qt2 = r((e3) => {
2797
2797
  Kt2 && (e3 === g2 || e3 === Fe2) && n2(e3);
2798
- }, [Kt2, g2, Fe2, n2]), Jt2 = o(() => i2 && !M2 && xe2 ? Date.now() : void 0, [i2, M2, P2, be2, H2]), Yt2 = Jt2 !== void 0 && H2 ? Ao(new Date(Jt2), H2) : null, { range: Xt2, daysAvailability: Zt2, isLoading: Qt2, hasError: $t2, setRange: en2, nextRange: tn2, previousRange: nn2 } = tl({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: be2, timeZone: H2, today: Yt2, locationId: B2, staffId: V2, customerChoices: Bt2, minRemainingCapacity: Nt2, loadInitially: d2, onlyAvailableSlots: e2 }), rn2 = fe2?.slice(0, 10) ?? null, an2 = o(() => rn2 ? Zt2.map((e3) => e3.date > rn2 ? { ...e3, availability: `none` } : e3) : Zt2, [Zt2, rn2]), on2 = fe2 && H2 ? No(new Date(fe2), H2) : null, { query: U2, selectedDate: sn2, timeSlots: cn2, isLoading: ln2, error: un2, selectDate: dn2, findNextAvailableDate: fn2 } = nl({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: be2, timeZone: H2, today: Yt2, locationId: B2, staffId: V2, customerChoices: Bt2, minRemainingCapacity: Nt2, onlyAvailableSlots: e2, serviceLoading: M2 }), pn2 = s(true), mn2 = s(null);
2798
+ }, [Kt2, g2, Fe2, n2]), Jt2 = o(() => i2 && !M2 && xe2 ? Date.now() : void 0, [i2, M2, P2, be2, H2]), Yt2 = Jt2 !== void 0 && H2 ? Ao(new Date(Jt2), H2) : null, { range: Xt2, daysAvailability: Zt2, isLoading: Qt2, hasError: $t2, setRange: en2, nextRange: tn2, previousRange: nn2 } = tl({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: be2, timeZone: H2, today: Yt2, locationId: B2, staffId: V2, customerChoices: Bt2, minRemainingCapacity: Nt2, loadInitially: d2, onlyAvailableSlots: e2 }), rn2 = fe2?.slice(0, 10) ?? null, an2 = o(() => rn2 ? Zt2.map((e3) => e3.date > rn2 ? { ...e3, availability: `none` } : e3) : Zt2, [Zt2, rn2]), on2 = fe2 && H2 ? No(new Date(fe2), H2) : null, { query: U2, selectedDate: sn2, timeSlots: cn2, isLoading: ln2, error: un2, selectDate: dn2, findNextAvailableDate: fn2 } = nl({ enabled: i2, serviceId: P2, serviceType: C2, multiServiceRequest: be2, timeZone: H2, today: Yt2, locationId: B2, staffId: V2, customerChoices: Bt2, minRemainingCapacity: Nt2, onlyAvailableSlots: e2, serviceLoading: M2 || le2 }), pn2 = s(true), mn2 = s(null);
2799
2799
  a(() => {
2800
2800
  if (pn2.current) {
2801
2801
  pn2.current = false;
@@ -2806,7 +2806,7 @@ function $l({ onlyAvailableSlots: e2, selectedTimeZone: t2, setSelectedTimeZone:
2806
2806
  let hn2 = r(async () => {
2807
2807
  let e3 = await fn2();
2808
2808
  return e3.outcome === `found` ? rn2 && e3.date > rn2 ? `none` : (await Promise.all([dn2(e3.date), Xt2 && Wo(e3.date, Xt2) ? Promise.resolve() : en2(Vo(e3.date))]), `found`) : e3.outcome;
2809
- }, [fn2, rn2, dn2, Xt2, en2]), gn2 = !!(i2 && !M2 && xe2 && H2 && Yt2), W2 = i2 && !M2 && !xe2, [_n2, vn2] = c(false), [yn2, bn2] = c(0), xn2 = s(false), Sn2 = s([]), Cn2 = s(0), wn2 = r(() => {
2809
+ }, [fn2, rn2, dn2, Xt2, en2]), gn2 = !!(i2 && !M2 && xe2 && H2 && Yt2), W2 = i2 && !M2 && !le2 && !xe2, [_n2, vn2] = c(false), [yn2, bn2] = c(0), xn2 = s(false), Sn2 = s([]), Cn2 = s(0), wn2 = r(() => {
2810
2810
  vn2(false);
2811
2811
  let e3 = Sn2.current;
2812
2812
  return Sn2.current = [], e3;