@forgebuild/hotal-ui 0.23.80 → 0.23.136
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 +6564 -5096
- package/dist/index.d.ts +95 -12
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -249,10 +249,36 @@ export interface EventInquiryPayload {
|
|
|
249
249
|
eventType: string;
|
|
250
250
|
format: string;
|
|
251
251
|
message: string;
|
|
252
|
+
/** The order found via showOrderLookup, or null when the lookup is
|
|
253
|
+
* hidden / nothing was looked up. */
|
|
254
|
+
orderReference: string | null;
|
|
255
|
+
/** Ticked lines from that order (empty when none) -- the host decides
|
|
256
|
+
* what an enquiry with items on it means, e.g. a return request. */
|
|
257
|
+
returnItems: { orderItemId: string; quantity: number }[];
|
|
252
258
|
}
|
|
253
259
|
|
|
254
260
|
export type SubmitInquiryResult = { ok: true } | { ok: false; error?: string };
|
|
255
261
|
|
|
262
|
+
export interface ReturnableOrderItem {
|
|
263
|
+
/** The order line's own id -- echoed back as returnItems[].orderItemId. */
|
|
264
|
+
id: string;
|
|
265
|
+
name: string;
|
|
266
|
+
/** e.g. "Grey — L"; omitted for a plain item. */
|
|
267
|
+
variant?: string;
|
|
268
|
+
/** Quantity that can come back -- the cap on the stepper. */
|
|
269
|
+
quantity: number;
|
|
270
|
+
/** Unit price; null hides the price. */
|
|
271
|
+
price: number | null;
|
|
272
|
+
image?: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export interface ReturnableOrder {
|
|
276
|
+
reference: string;
|
|
277
|
+
items: ReturnableOrderItem[];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export type LookupOrderResult = { ok: true; order: ReturnableOrder } | { ok: false; error?: string };
|
|
281
|
+
|
|
256
282
|
export interface EventContactFormStrings {
|
|
257
283
|
nameLabel: string;
|
|
258
284
|
namePlaceholder: string;
|
|
@@ -281,6 +307,18 @@ export interface EventContactFormStrings {
|
|
|
281
307
|
notWiredError: string;
|
|
282
308
|
genericSubmitError: string;
|
|
283
309
|
successMessage: string;
|
|
310
|
+
orderLabel: string;
|
|
311
|
+
orderPlaceholder: string;
|
|
312
|
+
findOrderLabel: string;
|
|
313
|
+
findingOrderLabel: string;
|
|
314
|
+
clearOrderLabel: string;
|
|
315
|
+
orderEmailFirstError: string;
|
|
316
|
+
orderLookupError: string;
|
|
317
|
+
returnItemsLabel: string;
|
|
318
|
+
/** `{count}` is replaced with the quantity bought. */
|
|
319
|
+
boughtLabel: string;
|
|
320
|
+
decreaseReturnAriaLabel: string;
|
|
321
|
+
increaseReturnAriaLabel: string;
|
|
284
322
|
}
|
|
285
323
|
|
|
286
324
|
export interface EventContactFormElement extends HTMLElement {
|
|
@@ -328,8 +366,18 @@ export interface EventContactFormElement extends HTMLElement {
|
|
|
328
366
|
/** BCP 47 locale (e.g. "fr-FR") used to format month/weekday names in the
|
|
329
367
|
* calendar; defaults to the browser's own locale. */
|
|
330
368
|
locale?: string;
|
|
369
|
+
/** Adds an "Order number" input with a Find button (shops: return or
|
|
370
|
+
* exchange enquiries). Finding an order via `lookupOrder` lists its lines
|
|
371
|
+
* as a tick list under the input; ticked lines go out on the payload as
|
|
372
|
+
* returnItems. Default false. */
|
|
373
|
+
showOrderLookup?: boolean;
|
|
374
|
+
/** ISO 4217 for the looked-up lines' unit prices. Default 'USD'. */
|
|
375
|
+
currency?: string;
|
|
331
376
|
strings?: Partial<EventContactFormStrings>;
|
|
332
377
|
submitInquiry?: (payload: EventInquiryPayload) => Promise<SubmitInquiryResult>;
|
|
378
|
+
/** Resolves an order number + the email typed in the form to its returnable
|
|
379
|
+
* lines. Only used when showOrderLookup is true. */
|
|
380
|
+
lookupOrder?: (reference: string, email: string) => Promise<LookupOrderResult>;
|
|
333
381
|
}
|
|
334
382
|
|
|
335
383
|
export interface SpaTreatment {
|
|
@@ -795,6 +843,16 @@ export interface VenueCarouselSlide {
|
|
|
795
843
|
label?: string;
|
|
796
844
|
tag?: string;
|
|
797
845
|
description?: string;
|
|
846
|
+
/** A second, real <a href> action alongside the reserve button --
|
|
847
|
+
* omitted (not rendered) when unset. */
|
|
848
|
+
bookUrl?: string;
|
|
849
|
+
/** An optional street-sign-style badge over the top corner of this
|
|
850
|
+
* slide's photo. Omitted (not rendered) when unset. */
|
|
851
|
+
badge?: {
|
|
852
|
+
title: string;
|
|
853
|
+
code: string;
|
|
854
|
+
caption?: string;
|
|
855
|
+
};
|
|
798
856
|
}
|
|
799
857
|
|
|
800
858
|
export interface VenueCarouselSlideEventDetail {
|
|
@@ -806,6 +864,8 @@ export interface VenueCarouselElement extends HTMLElement {
|
|
|
806
864
|
slides?: VenueCarouselSlide[];
|
|
807
865
|
activeIndex?: number;
|
|
808
866
|
reserveLabel?: string;
|
|
867
|
+
/** Only rendered for slides that set their own bookUrl. */
|
|
868
|
+
bookLabel?: string;
|
|
809
869
|
previousLabel?: string;
|
|
810
870
|
nextLabel?: string;
|
|
811
871
|
}
|
|
@@ -1365,15 +1425,24 @@ export interface AiChatWidgetElement extends HTMLElement {
|
|
|
1365
1425
|
phone?: string;
|
|
1366
1426
|
}
|
|
1367
1427
|
|
|
1368
|
-
/** One purchasable
|
|
1428
|
+
/** One purchasable combination within a variant group -- a real, distinct
|
|
1369
1429
|
* catalogue item (own id, own price, own stock on the host's backend), just
|
|
1370
|
-
* presented as a pill
|
|
1371
|
-
* card of its own. */
|
|
1430
|
+
* presented as a pill (or a pill pair, one per axis) under the group's
|
|
1431
|
+
* single card instead of a separate card of its own. */
|
|
1372
1432
|
export interface ProshopVariant {
|
|
1373
1433
|
id: string;
|
|
1374
|
-
/** e.g. "Blue"
|
|
1375
|
-
|
|
1434
|
+
/** First axis value, e.g. a color: "Blue". */
|
|
1435
|
+
option1: string;
|
|
1436
|
+
/** Second, independent axis value, e.g. a size: "Small". Omit when this
|
|
1437
|
+
* group only varies along one axis -- the second pill row never renders
|
|
1438
|
+
* unless at least one variant sets this. */
|
|
1439
|
+
option2?: string;
|
|
1376
1440
|
price: number | null;
|
|
1441
|
+
/** Swaps the card's photo when this variant becomes selected -- e.g. a
|
|
1442
|
+
* different photo per color. Omit on a variant that doesn't change the
|
|
1443
|
+
* photo (e.g. a size-only difference): the card falls back to the group
|
|
1444
|
+
* item's own `image` whenever the selected variant has none of its own. */
|
|
1445
|
+
image?: string | null;
|
|
1377
1446
|
}
|
|
1378
1447
|
|
|
1379
1448
|
export interface ProshopItem {
|
|
@@ -1386,14 +1455,19 @@ export interface ProshopItem {
|
|
|
1386
1455
|
/** When set, the photo + name link here (e.g. a product detail page).
|
|
1387
1456
|
* Omit for a catalogue with no such page -- the card stays static. */
|
|
1388
1457
|
href?: string | null;
|
|
1389
|
-
/** Renders this card as a variant group:
|
|
1390
|
-
*
|
|
1391
|
-
* qty stepper and cart operate on.
|
|
1392
|
-
* initial (first-variant) display
|
|
1393
|
-
* separate catalogue item, so per-
|
|
1394
|
-
* other change -- the host just
|
|
1395
|
-
* display card instead of N
|
|
1458
|
+
/** Renders this card as a variant group: one pill row per axis (e.g.
|
|
1459
|
+
* color, and independently size) beneath the description, switching
|
|
1460
|
+
* which real item id/price the qty stepper and cart operate on.
|
|
1461
|
+
* `id`/`price` above are only the initial (first-variant) display
|
|
1462
|
+
* values. Each entry is a genuinely separate catalogue item, so per-
|
|
1463
|
+
* variant stock still works with no other change -- the host just
|
|
1464
|
+
* supplies N real items grouped under one display card instead of N
|
|
1465
|
+
* separate cards. */
|
|
1396
1466
|
variants?: ProshopVariant[];
|
|
1467
|
+
/** Header shown above each pill row, e.g. ["Color", "Size"]. Purely
|
|
1468
|
+
* cosmetic -- omit for no header, or supply just the first to label
|
|
1469
|
+
* only a single-axis group. */
|
|
1470
|
+
variantAxisLabels?: [string, string?];
|
|
1397
1471
|
}
|
|
1398
1472
|
|
|
1399
1473
|
export interface ProshopCartItem {
|
|
@@ -1428,6 +1502,14 @@ export interface ProshopCatalogueElement extends HTMLElement {
|
|
|
1428
1502
|
* Reactive, not mount-only -- reassign it (a new array) after mount to
|
|
1429
1503
|
* re-sync quantities a host changed elsewhere, e.g. a checkout sidebar. */
|
|
1430
1504
|
initial?: { id: string; quantity: number }[];
|
|
1505
|
+
/** Adds a leading tab (before every real category) that shows every item
|
|
1506
|
+
* across all categories in one grid, and becomes the default active tab.
|
|
1507
|
+
* Omit (default false) to keep the default of the first real category
|
|
1508
|
+
* with no all-items tab. */
|
|
1509
|
+
showAllTab?: boolean;
|
|
1510
|
+
/** Label for the all-items tab. Only used when `showAllTab` is true.
|
|
1511
|
+
* Default: `'All'`. */
|
|
1512
|
+
allTabLabel?: string;
|
|
1431
1513
|
}
|
|
1432
1514
|
|
|
1433
1515
|
export interface InstagramFeedPost {
|
|
@@ -1512,6 +1594,7 @@ declare global {
|
|
|
1512
1594
|
reservationchange: CustomEvent<{ date: string; guests: number; time: string }>;
|
|
1513
1595
|
'booking-confirmed': CustomEvent<{ date: string; time: string; guests: number }>;
|
|
1514
1596
|
'inquiry-submitted': CustomEvent<EventInquiryPayload>;
|
|
1597
|
+
'order-found': CustomEvent<{ reference: string }>;
|
|
1515
1598
|
'booking-submitted': CustomEvent<SpaBookingPayload>;
|
|
1516
1599
|
'cancel-requested': CustomEvent<ReservationCancelPayload>;
|
|
1517
1600
|
'cancel-confirmed': CustomEvent<{ token: string }>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgebuild/hotal-ui",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.136",
|
|
4
4
|
"description": "Reusable Svelte UI components for booking and reservation experiences.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"ai": "^7.0.91",
|
|
28
28
|
"gsap": "^3.15.0",
|
|
29
29
|
"libphonenumber-js": "^1.12.41",
|
|
30
|
-
"svelte": "^5.56.8"
|
|
30
|
+
"svelte": "^5.56.8",
|
|
31
|
+
"swiper": "^14.2.0"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|