@webless/agent 0.8.0 → 0.9.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/README.md +33 -5
- package/dist/chunk-5BCSXCLT.js +297 -0
- package/dist/chunk-5BCSXCLT.js.map +1 -0
- package/dist/{chunk-JZPXXG76.js → chunk-QMTI5646.js} +23 -2
- package/dist/{chunk-JZPXXG76.js.map → chunk-QMTI5646.js.map} +1 -1
- package/dist/embed.cjs +19 -1
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.css +42 -0
- package/dist/embed.css.map +1 -1
- package/dist/embed.js +1 -1
- package/dist/index.d.cts +3 -180
- package/dist/index.d.ts +3 -180
- package/dist/index.js +9 -288
- package/dist/index.js.map +1 -1
- package/dist/presentation.cjs +850 -0
- package/dist/presentation.cjs.map +1 -0
- package/dist/presentation.d.cts +160 -0
- package/dist/presentation.d.ts +160 -0
- package/dist/presentation.js +549 -0
- package/dist/presentation.js.map +1 -0
- package/dist/react.cjs +123 -9
- package/dist/react.cjs.map +1 -1
- package/dist/react.css +42 -0
- package/dist/react.css.map +1 -1
- package/dist/react.d.cts +15 -4
- package/dist/react.d.ts +15 -4
- package/dist/react.js +108 -9
- package/dist/react.js.map +1 -1
- package/dist/types-ohWeTG9i.d.cts +181 -0
- package/dist/types-ohWeTG9i.d.ts +181 -0
- package/package.json +7 -2
package/dist/embed.cjs
CHANGED
|
@@ -4369,7 +4369,23 @@ function calendarCells(year, month) {
|
|
|
4369
4369
|
function BookingCardLoader() {
|
|
4370
4370
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("section", { className: "booking-card", "aria-label": "Book a meeting", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "booking-card__loading", role: "status", children: "Finding available times\u2026" }) });
|
|
4371
4371
|
}
|
|
4372
|
-
function BookingCard({
|
|
4372
|
+
function BookingCard(props) {
|
|
4373
|
+
if (!props.readOnly) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InteractiveBookingCard, { ...props });
|
|
4374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "booking-card", "aria-label": "Recorded available times", children: [
|
|
4375
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "booking-card__title", children: "Available times offered" }),
|
|
4376
|
+
props.offer.slots.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("ul", { children: props.offer.slots.map((slot, index) => {
|
|
4377
|
+
const eventType = props.offer.eventTypes.find(
|
|
4378
|
+
(item) => item.uri === slot.eventTypeUri
|
|
4379
|
+
);
|
|
4380
|
+
const label = Number.isFinite(Date.parse(slot.startTime)) ? formatSlotLabel(slot.startTime) : "Time unavailable";
|
|
4381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { children: [
|
|
4382
|
+
eventType ? `${eventType.name} \xB7 ` : "",
|
|
4383
|
+
label
|
|
4384
|
+
] }, `${slot.eventTypeUri ?? ""}:${slot.startTime}:${index}`);
|
|
4385
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { children: "No available times were recorded." })
|
|
4386
|
+
] });
|
|
4387
|
+
}
|
|
4388
|
+
function InteractiveBookingCard({
|
|
4373
4389
|
disabled = false,
|
|
4374
4390
|
offer,
|
|
4375
4391
|
onBook
|
|
@@ -4735,6 +4751,7 @@ function MessageBubble({
|
|
|
4735
4751
|
message,
|
|
4736
4752
|
brandLogoUrl,
|
|
4737
4753
|
bookingDisabled = false,
|
|
4754
|
+
bookingReadOnly = false,
|
|
4738
4755
|
offer,
|
|
4739
4756
|
onBook
|
|
4740
4757
|
}) {
|
|
@@ -4801,6 +4818,7 @@ function MessageBubble({
|
|
|
4801
4818
|
BookingCard,
|
|
4802
4819
|
{
|
|
4803
4820
|
disabled: bookingDisabled,
|
|
4821
|
+
readOnly: bookingReadOnly,
|
|
4804
4822
|
offer: nextOffer,
|
|
4805
4823
|
onBook
|
|
4806
4824
|
},
|