@forgebuild/hotal-ui 0.23.80 → 0.23.88
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 +4548 -4295
- package/dist/index.d.ts +83 -12
- package/package.json +1 -1
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 {
|
|
@@ -1365,15 +1413,24 @@ export interface AiChatWidgetElement extends HTMLElement {
|
|
|
1365
1413
|
phone?: string;
|
|
1366
1414
|
}
|
|
1367
1415
|
|
|
1368
|
-
/** One purchasable
|
|
1416
|
+
/** One purchasable combination within a variant group -- a real, distinct
|
|
1369
1417
|
* catalogue item (own id, own price, own stock on the host's backend), just
|
|
1370
|
-
* presented as a pill
|
|
1371
|
-
* card of its own. */
|
|
1418
|
+
* presented as a pill (or a pill pair, one per axis) under the group's
|
|
1419
|
+
* single card instead of a separate card of its own. */
|
|
1372
1420
|
export interface ProshopVariant {
|
|
1373
1421
|
id: string;
|
|
1374
|
-
/** e.g. "Blue"
|
|
1375
|
-
|
|
1422
|
+
/** First axis value, e.g. a color: "Blue". */
|
|
1423
|
+
option1: string;
|
|
1424
|
+
/** Second, independent axis value, e.g. a size: "Small". Omit when this
|
|
1425
|
+
* group only varies along one axis -- the second pill row never renders
|
|
1426
|
+
* unless at least one variant sets this. */
|
|
1427
|
+
option2?: string;
|
|
1376
1428
|
price: number | null;
|
|
1429
|
+
/** Swaps the card's photo when this variant becomes selected -- e.g. a
|
|
1430
|
+
* different photo per color. Omit on a variant that doesn't change the
|
|
1431
|
+
* photo (e.g. a size-only difference): the card falls back to the group
|
|
1432
|
+
* item's own `image` whenever the selected variant has none of its own. */
|
|
1433
|
+
image?: string | null;
|
|
1377
1434
|
}
|
|
1378
1435
|
|
|
1379
1436
|
export interface ProshopItem {
|
|
@@ -1386,14 +1443,19 @@ export interface ProshopItem {
|
|
|
1386
1443
|
/** When set, the photo + name link here (e.g. a product detail page).
|
|
1387
1444
|
* Omit for a catalogue with no such page -- the card stays static. */
|
|
1388
1445
|
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
|
|
1446
|
+
/** Renders this card as a variant group: one pill row per axis (e.g.
|
|
1447
|
+
* color, and independently size) beneath the description, switching
|
|
1448
|
+
* which real item id/price the qty stepper and cart operate on.
|
|
1449
|
+
* `id`/`price` above are only the initial (first-variant) display
|
|
1450
|
+
* values. Each entry is a genuinely separate catalogue item, so per-
|
|
1451
|
+
* variant stock still works with no other change -- the host just
|
|
1452
|
+
* supplies N real items grouped under one display card instead of N
|
|
1453
|
+
* separate cards. */
|
|
1396
1454
|
variants?: ProshopVariant[];
|
|
1455
|
+
/** Header shown above each pill row, e.g. ["Color", "Size"]. Purely
|
|
1456
|
+
* cosmetic -- omit for no header, or supply just the first to label
|
|
1457
|
+
* only a single-axis group. */
|
|
1458
|
+
variantAxisLabels?: [string, string?];
|
|
1397
1459
|
}
|
|
1398
1460
|
|
|
1399
1461
|
export interface ProshopCartItem {
|
|
@@ -1428,6 +1490,14 @@ export interface ProshopCatalogueElement extends HTMLElement {
|
|
|
1428
1490
|
* Reactive, not mount-only -- reassign it (a new array) after mount to
|
|
1429
1491
|
* re-sync quantities a host changed elsewhere, e.g. a checkout sidebar. */
|
|
1430
1492
|
initial?: { id: string; quantity: number }[];
|
|
1493
|
+
/** Adds a leading tab (before every real category) that shows every item
|
|
1494
|
+
* across all categories in one grid, and becomes the default active tab.
|
|
1495
|
+
* Omit (default false) to keep the default of the first real category
|
|
1496
|
+
* with no all-items tab. */
|
|
1497
|
+
showAllTab?: boolean;
|
|
1498
|
+
/** Label for the all-items tab. Only used when `showAllTab` is true.
|
|
1499
|
+
* Default: `'All'`. */
|
|
1500
|
+
allTabLabel?: string;
|
|
1431
1501
|
}
|
|
1432
1502
|
|
|
1433
1503
|
export interface InstagramFeedPost {
|
|
@@ -1512,6 +1582,7 @@ declare global {
|
|
|
1512
1582
|
reservationchange: CustomEvent<{ date: string; guests: number; time: string }>;
|
|
1513
1583
|
'booking-confirmed': CustomEvent<{ date: string; time: string; guests: number }>;
|
|
1514
1584
|
'inquiry-submitted': CustomEvent<EventInquiryPayload>;
|
|
1585
|
+
'order-found': CustomEvent<{ reference: string }>;
|
|
1515
1586
|
'booking-submitted': CustomEvent<SpaBookingPayload>;
|
|
1516
1587
|
'cancel-requested': CustomEvent<ReservationCancelPayload>;
|
|
1517
1588
|
'cancel-confirmed': CustomEvent<{ token: string }>;
|