@webless/agent 0.6.9 → 0.6.10
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/dist/{chunk-U2SU2CGF.js → chunk-NEI5GKGH.js} +29 -16
- package/dist/{chunk-U2SU2CGF.js.map → chunk-NEI5GKGH.js.map} +1 -1
- package/dist/embed.cjs +10 -3
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.js +1 -1
- package/dist/react.cjs +10 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
package/dist/embed.js
CHANGED
package/dist/react.cjs
CHANGED
|
@@ -3770,7 +3770,14 @@ function BookingCard({
|
|
|
3770
3770
|
const [startTime, setStartTime] = (0, import_react7.useState)("");
|
|
3771
3771
|
const [name, setName] = (0, import_react7.useState)("");
|
|
3772
3772
|
const [email, setEmail] = (0, import_react7.useState)("");
|
|
3773
|
+
const activeStepRef = (0, import_react7.useRef)(null);
|
|
3774
|
+
const previousStepRef = (0, import_react7.useRef)(step);
|
|
3773
3775
|
const stepIndex = BOOKING_STEPS.findIndex((item) => item.id === step);
|
|
3776
|
+
(0, import_react7.useEffect)(() => {
|
|
3777
|
+
if (previousStepRef.current === step) return;
|
|
3778
|
+
previousStepRef.current = step;
|
|
3779
|
+
activeStepRef.current?.scrollIntoView({ block: "nearest" });
|
|
3780
|
+
}, [step]);
|
|
3774
3781
|
const slots = (0, import_react7.useMemo)(
|
|
3775
3782
|
() => bookingSlotsForEventType(offer.slots, eventTypeUri),
|
|
3776
3783
|
[eventTypeUri, offer.slots]
|
|
@@ -3864,7 +3871,7 @@ function BookingCard({
|
|
|
3864
3871
|
},
|
|
3865
3872
|
item.id
|
|
3866
3873
|
)) }),
|
|
3867
|
-
step === "date" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step", children: [
|
|
3874
|
+
step === "date" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step", ref: activeStepRef, children: [
|
|
3868
3875
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "booking-card__title", children: selectedType?.name || "Pick a date" }),
|
|
3869
3876
|
timeZone ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { className: "booking-card__tz", children: [
|
|
3870
3877
|
"Times in ",
|
|
@@ -3954,7 +3961,7 @@ function BookingCard({
|
|
|
3954
3961
|
}
|
|
3955
3962
|
)
|
|
3956
3963
|
] }, "date") : null,
|
|
3957
|
-
step === "time" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step", children: [
|
|
3964
|
+
step === "time" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step", ref: activeStepRef, children: [
|
|
3958
3965
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step-bar", children: [
|
|
3959
3966
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3960
3967
|
"button",
|
|
@@ -3985,7 +3992,7 @@ function BookingCard({
|
|
|
3985
3992
|
slot.startTime
|
|
3986
3993
|
)) })
|
|
3987
3994
|
] }, "time") : null,
|
|
3988
|
-
step === "details" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step", children: [
|
|
3995
|
+
step === "details" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step", ref: activeStepRef, children: [
|
|
3989
3996
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "booking-card__step-bar", children: [
|
|
3990
3997
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3991
3998
|
"button",
|