@forgebuild/hotal-ui 0.23.136 → 0.23.152
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/hotal-ui.js +9618 -9488
- package/dist/index.d.ts +37 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -387,6 +387,11 @@ export interface SpaTreatment {
|
|
|
387
387
|
price: number;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
+
export interface SpaTherapist {
|
|
391
|
+
id: string;
|
|
392
|
+
name: string;
|
|
393
|
+
}
|
|
394
|
+
|
|
390
395
|
export interface SpaAvailabilityDay {
|
|
391
396
|
date: string;
|
|
392
397
|
slots: { time: string }[];
|
|
@@ -396,6 +401,9 @@ export interface SpaBookingPayload {
|
|
|
396
401
|
treatmentId: string;
|
|
397
402
|
date: string;
|
|
398
403
|
time: string;
|
|
404
|
+
/** The Therapist filter's selection at submit time, if any -- omitted on
|
|
405
|
+
* "Any therapist" or when no therapist list was ever provided. */
|
|
406
|
+
therapistId?: string;
|
|
399
407
|
name: string;
|
|
400
408
|
email: string;
|
|
401
409
|
phone: string;
|
|
@@ -415,6 +423,8 @@ export interface SpaBookingWidgetStrings {
|
|
|
415
423
|
eveningLabel: string;
|
|
416
424
|
pickDayHint: string;
|
|
417
425
|
noSlotsForDay: string;
|
|
426
|
+
therapistFilterLabel: string;
|
|
427
|
+
anyTherapistLabel: string;
|
|
418
428
|
staffRowLabel: string;
|
|
419
429
|
totalLabel: string;
|
|
420
430
|
continueLabel: string;
|
|
@@ -431,6 +441,7 @@ export interface SpaBookingWidgetStrings {
|
|
|
431
441
|
notesPlaceholder: string;
|
|
432
442
|
confirmingLabel: string;
|
|
433
443
|
confirmLabel: string;
|
|
444
|
+
confirmRescheduleLabel: string;
|
|
434
445
|
notWiredError: string;
|
|
435
446
|
genericSubmitError: string;
|
|
436
447
|
successMessage: string;
|
|
@@ -447,6 +458,12 @@ export interface SpaBookingWidgetElement extends HTMLElement {
|
|
|
447
458
|
* a free service (e.g. a consultation call) where showing "£0.00"
|
|
448
459
|
* throughout would read oddly. */
|
|
449
460
|
hidePrice?: boolean;
|
|
461
|
+
/** Skips the "Details" (name/email/phone/notes) step -- for editing an
|
|
462
|
+
* existing booking (a reschedule) rather than collecting a new guest's
|
|
463
|
+
* contact info. "Continue" on the datetime step submits directly using
|
|
464
|
+
* initialName/initialEmail/initialPhone (if set) and empty notes; the
|
|
465
|
+
* "← Change service" link is hidden. */
|
|
466
|
+
skipDetailsStep?: boolean;
|
|
450
467
|
/** JS `Date#getDay()` values (0 = Sunday) to gray out on the calendar,
|
|
451
468
|
* e.g. `[2]` for a Tuesday closure. Visual hint only -- fetchAvailability
|
|
452
469
|
* is the real source of truth for what's bookable. */
|
|
@@ -467,9 +484,14 @@ export interface SpaBookingWidgetElement extends HTMLElement {
|
|
|
467
484
|
initialPhone?: string;
|
|
468
485
|
strings?: Partial<SpaBookingWidgetStrings>;
|
|
469
486
|
fetchTreatments?: () => Promise<SpaTreatment[]>;
|
|
487
|
+
/** Optional therapist list for the datetime step's "Therapist" filter.
|
|
488
|
+
* Omit to hide the filter entirely. */
|
|
489
|
+
fetchTherapists?: () => Promise<SpaTherapist[]>;
|
|
470
490
|
/** Host-provided loader for one calendar month at a time:
|
|
471
|
-
* (fromISO, toISO, treatmentId) => per-day bookable start
|
|
472
|
-
|
|
491
|
+
* (fromISO, toISO, treatmentId, therapistId) => per-day bookable start
|
|
492
|
+
* times. therapistId is the "Therapist" filter's current selection --
|
|
493
|
+
* undefined on "Any therapist" or when fetchTherapists was never provided. */
|
|
494
|
+
fetchAvailability?: (fromISO: string, toISO: string, treatmentId: string, therapistId?: string) => Promise<SpaAvailabilityDay[]>;
|
|
473
495
|
submitBooking?: (payload: SpaBookingPayload) => Promise<SpaBookingResult>;
|
|
474
496
|
}
|
|
475
497
|
|
|
@@ -662,6 +684,19 @@ export interface LiveSpaBookingsFeedElement extends HTMLElement {
|
|
|
662
684
|
/** Symbol prefixed to price ('€', '$', ...); the payload carries no
|
|
663
685
|
* currency of its own. Default empty (bare amount). */
|
|
664
686
|
currency?: string;
|
|
687
|
+
/** Forwarded straight through to the <spa-booking-widget> rendered in
|
|
688
|
+
* the "change booking" sheet -- see SpaBookingWidgetElement's own
|
|
689
|
+
* fetchTreatments/fetchTherapists/fetchAvailability for what each
|
|
690
|
+
* receives/returns. This component never calls the API itself, same
|
|
691
|
+
* reasoning as fetchBookings above. */
|
|
692
|
+
fetchTreatments?: () => Promise<SpaTreatment[]>;
|
|
693
|
+
fetchTherapists?: () => Promise<SpaTherapist[]>;
|
|
694
|
+
fetchAvailability?: (fromISO: string, toISO: string, treatmentId: string, therapistId?: string) => Promise<SpaAvailabilityDay[]>;
|
|
695
|
+
/** Unlike the widget's own submitBooking (which books a *new*
|
|
696
|
+
* appointment), this one is rescheduling an *existing* one -- the
|
|
697
|
+
* payload is SpaBookingPayload plus appointmentId, which this
|
|
698
|
+
* component injects itself (the booking being edited's id). */
|
|
699
|
+
submitBooking?: (payload: SpaBookingPayload & { appointmentId: string }) => Promise<SpaBookingResult>;
|
|
665
700
|
}
|
|
666
701
|
|
|
667
702
|
export interface GolfShopItem {
|