@voyant-travel/catalog-react 0.135.3 → 0.135.4
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/admin/index.d.ts +6 -6
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +3 -4
- package/dist/admin/product-detail-host.d.ts +7 -8
- package/dist/admin/product-detail-host.d.ts.map +1 -1
- package/dist/admin/product-detail-host.js +9 -39
- package/dist/booking-engine/use-booking-quote.d.ts +9 -9
- package/package.json +6 -6
package/dist/admin/index.d.ts
CHANGED
|
@@ -42,8 +42,9 @@ declare module "@voyant-travel/admin" {
|
|
|
42
42
|
surface: CatalogDetailSurface;
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
|
-
* A catalog surface's dedicated detail page. `adults`/`nights`
|
|
46
|
-
*
|
|
45
|
+
* A catalog surface's dedicated detail page. `adults`/`nights` are retained
|
|
46
|
+
* for older package-offer links; sourced catalog details resolve runtime
|
|
47
|
+
* availability from the content/slots routes.
|
|
47
48
|
*/
|
|
48
49
|
"catalog.detail": {
|
|
49
50
|
surface: CatalogDetailSurface;
|
|
@@ -76,10 +77,9 @@ export type { ProductDetailHostProps } from "./product-detail-host.js";
|
|
|
76
77
|
export type { ScheduledCatalogHostProps } from "./scheduled-catalog-host.js";
|
|
77
78
|
export type { VerticalDetailHostProps } from "./vertical-detail-host.js";
|
|
78
79
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* same contract.
|
|
80
|
+
* Back-compatible search context carried onto product detail URLs. Generic
|
|
81
|
+
* sourced product detail uses the content/slots routes; `adults`/`nights`
|
|
82
|
+
* remain accepted so existing package-offer links keep validating.
|
|
83
83
|
*/
|
|
84
84
|
export declare const productDetailSearchSchema: z.ZodObject<{
|
|
85
85
|
adults: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EAEzB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAElE;;;;;;;GAOG;AACH,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,iBAAiB;QACzB;;;;;;;WAOG;QACH,sBAAsB,EAAE;YACtB,iFAAiF;YACjF,YAAY,EAAE,MAAM,CAAA;YACpB,QAAQ,EAAE,MAAM,CAAA;YAChB,0EAA0E;YAC1E,UAAU,CAAC,EAAE,MAAM,CAAA;YACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;YAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;YAClB,WAAW,CAAC,EAAE,MAAM,CAAA;YACpB,6BAA6B;YAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;YACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;YACjB,UAAU,CAAC,EAAE,MAAM,CAAA;YACnB,UAAU,CAAC,EAAE,MAAM,CAAA;YACnB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,UAAU,CAAC,EAAE,MAAM,CAAA;YACnB,cAAc,CAAC,EAAE,MAAM,CAAA;SACxB,CAAA;QACD,gEAAgE;QAChE,gBAAgB,EAAE;YAAE,OAAO,EAAE,oBAAoB,CAAA;SAAE,CAAA;QACnD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EAEzB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAElE;;;;;;;GAOG;AAC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U,CAAC,EAAE,MAAM,CAAA;QACnB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,cAAc,CAAC,EAAE,MAAM,CAAA;KACxB,CAAA;CACF;AAED,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACrE,YAAY,CAAC,EAAE,IAAI,CACjB,kCAAkC,EAClC,eAAe,GAAG,eAAe,GAAG,mBAAmB,GAAG,eAAe,CAC1E,CAAA;CACF;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,GAAE,kCAAuC,GAC/C,cAAc,CA2HhB"}
|
package/dist/admin/index.js
CHANGED
|
@@ -18,10 +18,9 @@ export { catalogSearchSchema } from "../catalog-search-params.js";
|
|
|
18
18
|
// their TYPES re-export here.
|
|
19
19
|
export { catalogDetailSurfaces, catalogSurfaceVertical, catalogVerticalPageIds, } from "../catalog-surfaces.js";
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* same contract.
|
|
21
|
+
* Back-compatible search context carried onto product detail URLs. Generic
|
|
22
|
+
* sourced product detail uses the content/slots routes; `adults`/`nights`
|
|
23
|
+
* remain accepted so existing package-offer links keep validating.
|
|
25
24
|
*/
|
|
26
25
|
export const productDetailSearchSchema = z.object({
|
|
27
26
|
adults: z.coerce.number().int().min(1).optional(),
|
|
@@ -5,14 +5,13 @@ export interface ProductDetailHostProps {
|
|
|
5
5
|
locale?: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Generic package/product detail host. `/catalog/products/:id` is a catalog
|
|
9
|
+
* product route, so it uses the same sourced content and booking path as the
|
|
10
|
+
* tour/excursion detail pages instead of the Connect package-offer endpoint.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* shell registered.
|
|
12
|
+
* `adults`/`nights` remain on the public props for URL/search-param
|
|
13
|
+
* compatibility with older package-offer links. Generic sourced product detail
|
|
14
|
+
* resolves availability through catalog slots instead.
|
|
16
15
|
*/
|
|
17
|
-
export declare function ProductDetailHost({ productId,
|
|
16
|
+
export declare function ProductDetailHost({ productId, locale }: ProductDetailHostProps): import("react").JSX.Element;
|
|
18
17
|
//# sourceMappingURL=product-detail-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-detail-host.d.ts","sourceRoot":"","sources":["../../src/admin/product-detail-host.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-detail-host.d.ts","sourceRoot":"","sources":["../../src/admin/product-detail-host.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,sBAAsB,+BAE9E"}
|
|
@@ -1,45 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
import { ProductDetailPage } from "../components/product-detail-page.js";
|
|
3
|
+
import { VerticalDetailHost } from "./vertical-detail-host.js";
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Generic package/product detail host. `/catalog/products/:id` is a catalog
|
|
6
|
+
* product route, so it uses the same sourced content and booking path as the
|
|
7
|
+
* tour/excursion detail pages instead of the Connect package-offer endpoint.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* shell registered.
|
|
9
|
+
* `adults`/`nights` remain on the public props for URL/search-param
|
|
10
|
+
* compatibility with older package-offer links. Generic sourced product detail
|
|
11
|
+
* resolves availability through catalog slots instead.
|
|
15
12
|
*/
|
|
16
|
-
export function ProductDetailHost({ productId,
|
|
17
|
-
|
|
18
|
-
const navigateTo = useAdminNavigate();
|
|
19
|
-
const productsLabel = useOperatorAdminMessages().nav.catalogProducts;
|
|
20
|
-
const productsHref = resolveHref("catalog.browse", { surface: "products" });
|
|
21
|
-
const [crumbs, setCrumbs] = useState([
|
|
22
|
-
{ label: productsLabel, href: productsHref },
|
|
23
|
-
]);
|
|
24
|
-
useAdminBreadcrumbs(crumbs);
|
|
25
|
-
return (_jsx(ProductDetailPage, { productId: productId, adults: adults, nights: nights, locale: locale, productsLabel: productsLabel, productsHref: productsHref, onBreadcrumbs: setCrumbs,
|
|
26
|
-
// Product detail → the unified journey. Preserve the resolved source
|
|
27
|
-
// pointer when available; otherwise the journey APIs resolve provenance
|
|
28
|
-
// server-side from (entityModule, entityId).
|
|
29
|
-
onBook: (id, source, selection) => {
|
|
30
|
-
const sourceKind = source.kind?.trim();
|
|
31
|
-
return navigateTo("bookingJourney.start", {
|
|
32
|
-
entityModule: "products",
|
|
33
|
-
entityId: id,
|
|
34
|
-
...(sourceKind ? { sourceKind } : {}),
|
|
35
|
-
...(source.connectionId ? { sourceConnectionId: source.connectionId } : {}),
|
|
36
|
-
...(source.ref ? { sourceRef: source.ref } : {}),
|
|
37
|
-
...(selection?.checkIn ? { departureDate: selection.checkIn.slice(0, 10) } : {}),
|
|
38
|
-
...(selection?.roomTypeId ? { roomTypeId: selection.roomTypeId } : {}),
|
|
39
|
-
...(selection?.ratePlanId ? { ratePlanId: selection.ratePlanId } : {}),
|
|
40
|
-
...(selection?.board ? { board: selection.board } : {}),
|
|
41
|
-
...(selection?.name ? { entityName: selection.name } : {}),
|
|
42
|
-
...(selection?.heroImageUrl ? { entityImageUrl: selection.heroImageUrl } : {}),
|
|
43
|
-
});
|
|
44
|
-
} }));
|
|
13
|
+
export function ProductDetailHost({ productId, locale }) {
|
|
14
|
+
return _jsx(VerticalDetailHost, { surface: "products", id: productId, locale: locale });
|
|
45
15
|
}
|
|
@@ -191,7 +191,7 @@ export declare function useBookingQuote(options: UseBookingQuoteOptions): {
|
|
|
191
191
|
catalog?: {
|
|
192
192
|
id: string;
|
|
193
193
|
name: string;
|
|
194
|
-
kind: "
|
|
194
|
+
kind: "excursions" | "extras" | "insurance";
|
|
195
195
|
description?: string | null | undefined;
|
|
196
196
|
groupKey?: string | null | undefined;
|
|
197
197
|
pricingMode?: string | null | undefined;
|
|
@@ -204,13 +204,13 @@ export declare function useBookingQuote(options: UseBookingQuoteOptions): {
|
|
|
204
204
|
defaultQuantity?: number | null | undefined;
|
|
205
205
|
}[] | undefined;
|
|
206
206
|
groups?: {
|
|
207
|
-
kind: "
|
|
207
|
+
kind: "excursions" | "extras" | "insurance";
|
|
208
208
|
label: string;
|
|
209
209
|
perGuestSelection: boolean;
|
|
210
210
|
items: {
|
|
211
211
|
id: string;
|
|
212
212
|
name: string;
|
|
213
|
-
kind: "
|
|
213
|
+
kind: "excursions" | "extras" | "insurance";
|
|
214
214
|
description?: string | null | undefined;
|
|
215
215
|
groupKey?: string | null | undefined;
|
|
216
216
|
pricingMode?: string | null | undefined;
|
|
@@ -420,7 +420,7 @@ export declare function useBookingQuote(options: UseBookingQuoteOptions): {
|
|
|
420
420
|
catalog?: {
|
|
421
421
|
id: string;
|
|
422
422
|
name: string;
|
|
423
|
-
kind: "
|
|
423
|
+
kind: "excursions" | "extras" | "insurance";
|
|
424
424
|
description?: string | null | undefined;
|
|
425
425
|
groupKey?: string | null | undefined;
|
|
426
426
|
pricingMode?: string | null | undefined;
|
|
@@ -433,13 +433,13 @@ export declare function useBookingQuote(options: UseBookingQuoteOptions): {
|
|
|
433
433
|
defaultQuantity?: number | null | undefined;
|
|
434
434
|
}[] | undefined;
|
|
435
435
|
groups?: {
|
|
436
|
-
kind: "
|
|
436
|
+
kind: "excursions" | "extras" | "insurance";
|
|
437
437
|
label: string;
|
|
438
438
|
perGuestSelection: boolean;
|
|
439
439
|
items: {
|
|
440
440
|
id: string;
|
|
441
441
|
name: string;
|
|
442
|
-
kind: "
|
|
442
|
+
kind: "excursions" | "extras" | "insurance";
|
|
443
443
|
description?: string | null | undefined;
|
|
444
444
|
groupKey?: string | null | undefined;
|
|
445
445
|
pricingMode?: string | null | undefined;
|
|
@@ -647,7 +647,7 @@ export declare function useBookingQuote(options: UseBookingQuoteOptions): {
|
|
|
647
647
|
catalog?: {
|
|
648
648
|
id: string;
|
|
649
649
|
name: string;
|
|
650
|
-
kind: "
|
|
650
|
+
kind: "excursions" | "extras" | "insurance";
|
|
651
651
|
description?: string | null | undefined;
|
|
652
652
|
groupKey?: string | null | undefined;
|
|
653
653
|
pricingMode?: string | null | undefined;
|
|
@@ -660,13 +660,13 @@ export declare function useBookingQuote(options: UseBookingQuoteOptions): {
|
|
|
660
660
|
defaultQuantity?: number | null | undefined;
|
|
661
661
|
}[] | undefined;
|
|
662
662
|
groups?: {
|
|
663
|
-
kind: "
|
|
663
|
+
kind: "excursions" | "extras" | "insurance";
|
|
664
664
|
label: string;
|
|
665
665
|
perGuestSelection: boolean;
|
|
666
666
|
items: {
|
|
667
667
|
id: string;
|
|
668
668
|
name: string;
|
|
669
|
-
kind: "
|
|
669
|
+
kind: "excursions" | "extras" | "insurance";
|
|
670
670
|
description?: string | null | undefined;
|
|
671
671
|
groupKey?: string | null | undefined;
|
|
672
672
|
pricingMode?: string | null | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/catalog-react",
|
|
3
|
-
"version": "0.135.
|
|
3
|
+
"version": "0.135.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"zod": "^4.0.0",
|
|
79
79
|
"@voyant-travel/admin": "^0.115.3",
|
|
80
80
|
"@voyant-travel/commerce-react": "^0.19.0",
|
|
81
|
+
"@voyant-travel/inventory-react": "^0.19.2",
|
|
81
82
|
"@voyant-travel/distribution-react": "^0.127.2",
|
|
82
|
-
"@voyant-travel/ui": "^0.108.4"
|
|
83
|
-
"@voyant-travel/inventory-react": "^0.19.2"
|
|
83
|
+
"@voyant-travel/ui": "^0.108.4"
|
|
84
84
|
},
|
|
85
85
|
"peerDependenciesMeta": {
|
|
86
86
|
"@tanstack/react-table": {
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@voyant-travel/i18n": "^0.109.0",
|
|
110
109
|
"@voyant-travel/catalog-contracts": "^0.108.0",
|
|
110
|
+
"@voyant-travel/i18n": "^0.109.0",
|
|
111
111
|
"@voyant-travel/react": "^0.104.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
"@voyant-travel/commerce-react": "^0.19.0",
|
|
128
128
|
"@voyant-travel/inventory-react": "^0.19.2",
|
|
129
129
|
"@voyant-travel/react": "^0.104.1",
|
|
130
|
+
"@voyant-travel/ui": "^0.108.4",
|
|
130
131
|
"@voyant-travel/distribution-react": "^0.127.2",
|
|
131
|
-
"@voyant-travel/voyant-typescript-config": "^0.1.0"
|
|
132
|
-
"@voyant-travel/ui": "^0.108.4"
|
|
132
|
+
"@voyant-travel/voyant-typescript-config": "^0.1.0"
|
|
133
133
|
},
|
|
134
134
|
"files": [
|
|
135
135
|
"dist",
|