@flamingo-stack/openframe-frontend-core 0.0.575 → 0.0.576
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/components/meeting-scheduler/index.cjs +9 -5
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +10 -6
- package/dist/components/meeting-scheduler/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/meeting-scheduler/index.tsx +16 -14
|
@@ -27,6 +27,7 @@ require('../../chunk-GQWM3ECA.cjs');
|
|
|
27
27
|
require('../../chunk-TON3YCCW.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
|
|
30
31
|
var _chunk2BFZHTSDcjs = require('../../chunk-2BFZHTSD.cjs');
|
|
31
32
|
require('../../chunk-D55IENZJ.cjs');
|
|
32
33
|
require('../../chunk-7Z64COGD.cjs');
|
|
@@ -1079,6 +1080,7 @@ function HubSpotMeetingScheduler({
|
|
|
1079
1080
|
const [confirmation, setConfirmation] = _react.useState.call(void 0, null);
|
|
1080
1081
|
const [bookingError, setBookingError] = _react.useState.call(void 0, null);
|
|
1081
1082
|
const { honeypotInputProps, getSignals, resetSignals } = _chunk2BFZHTSDcjs.useHumanitySignals.call(void 0, );
|
|
1083
|
+
const { toast } = _chunk2BFZHTSDcjs.useToast.call(void 0, );
|
|
1082
1084
|
const autoAdvanceCount = _react.useRef.call(void 0, 0);
|
|
1083
1085
|
const [machineFor, setMachineFor] = _react.useState.call(void 0, meetingId);
|
|
1084
1086
|
if (machineFor !== meetingId) {
|
|
@@ -1140,9 +1142,15 @@ function HubSpotMeetingScheduler({
|
|
|
1140
1142
|
setStep("slot");
|
|
1141
1143
|
resetSignals();
|
|
1142
1144
|
void refetchAvailability();
|
|
1145
|
+
} else {
|
|
1146
|
+
toast({
|
|
1147
|
+
variant: "error",
|
|
1148
|
+
title: "Booking failed",
|
|
1149
|
+
description: _nullishCoalesce(BOOKING_ERROR_COPY[code], () => ( BOOKING_ERROR_COPY.VALIDATION))
|
|
1150
|
+
});
|
|
1143
1151
|
}
|
|
1144
1152
|
},
|
|
1145
|
-
[book, onBooked, refetchAvailability, resetSignals]
|
|
1153
|
+
[book, onBooked, refetchAvailability, resetSignals, toast]
|
|
1146
1154
|
);
|
|
1147
1155
|
const escapeHatch = fallbackUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkS6LZN66Dcjs.Button, { variant: "outline", size: "small-legacy", href: fallbackUrl, openInNewTab: true, children: "Open in HubSpot" }) : null;
|
|
1148
1156
|
if (isLoadingAvailability && !availability) {
|
|
@@ -1201,10 +1209,6 @@ function HubSpotMeetingScheduler({
|
|
|
1201
1209
|
"\xB7 ",
|
|
1202
1210
|
_chunkSPAAKHQAcjs.formatDurationCompact.call(void 0, durationMs / 1e3)
|
|
1203
1211
|
] }),
|
|
1204
|
-
bookingError && bookingError !== "SLOT_TAKEN" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQDOBY3TPcjs.Alert, { variant: "error", className: "flex flex-col items-start gap-[var(--spacing-system-xs)]", children: [
|
|
1205
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQDOBY3TPcjs.AlertDescription, { children: _nullishCoalesce(BOOKING_ERROR_COPY[bookingError], () => ( BOOKING_ERROR_COPY.VALIDATION)) }),
|
|
1206
|
-
escapeHatch
|
|
1207
|
-
] }),
|
|
1208
1212
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1209
1213
|
BookingForm,
|
|
1210
1214
|
{
|