@voyant-travel/catalog-react 0.117.2
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/LICENSE +201 -0
- package/README.md +36 -0
- package/dist/admin/catalog-vertical-host.d.ts +45 -0
- package/dist/admin/catalog-vertical-host.d.ts.map +1 -0
- package/dist/admin/catalog-vertical-host.js +230 -0
- package/dist/admin/cruise-detail-host.d.ts +11 -0
- package/dist/admin/cruise-detail-host.d.ts.map +1 -0
- package/dist/admin/cruise-detail-host.js +33 -0
- package/dist/admin/dynamic-catalog-host.d.ts +13 -0
- package/dist/admin/dynamic-catalog-host.d.ts.map +1 -0
- package/dist/admin/dynamic-catalog-host.js +17 -0
- package/dist/admin/index.d.ts +133 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +144 -0
- package/dist/admin/open-in-new-tab.d.ts +7 -0
- package/dist/admin/open-in-new-tab.d.ts.map +1 -0
- package/dist/admin/open-in-new-tab.js +10 -0
- package/dist/admin/pages/catalog-accommodations-detail-page.d.ts +4 -0
- package/dist/admin/pages/catalog-accommodations-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-accommodations-detail-page.js +7 -0
- package/dist/admin/pages/catalog-accommodations-index-page.d.ts +8 -0
- package/dist/admin/pages/catalog-accommodations-index-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-accommodations-index-page.js +17 -0
- package/dist/admin/pages/catalog-cruises-detail-page.d.ts +4 -0
- package/dist/admin/pages/catalog-cruises-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-cruises-detail-page.js +7 -0
- package/dist/admin/pages/catalog-cruises-index-page.d.ts +8 -0
- package/dist/admin/pages/catalog-cruises-index-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-cruises-index-page.js +19 -0
- package/dist/admin/pages/catalog-excursions-detail-page.d.ts +4 -0
- package/dist/admin/pages/catalog-excursions-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-excursions-detail-page.js +7 -0
- package/dist/admin/pages/catalog-excursions-index-page.d.ts +8 -0
- package/dist/admin/pages/catalog-excursions-index-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-excursions-index-page.js +12 -0
- package/dist/admin/pages/catalog-products-detail-page.d.ts +8 -0
- package/dist/admin/pages/catalog-products-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-products-detail-page.js +12 -0
- package/dist/admin/pages/catalog-products-index-page.d.ts +8 -0
- package/dist/admin/pages/catalog-products-index-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-products-index-page.js +12 -0
- package/dist/admin/pages/catalog-tours-detail-page.d.ts +4 -0
- package/dist/admin/pages/catalog-tours-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-tours-detail-page.js +7 -0
- package/dist/admin/pages/catalog-tours-index-page.d.ts +8 -0
- package/dist/admin/pages/catalog-tours-index-page.d.ts.map +1 -0
- package/dist/admin/pages/catalog-tours-index-page.js +12 -0
- package/dist/admin/product-detail-host.d.ts +18 -0
- package/dist/admin/product-detail-host.d.ts.map +1 -0
- package/dist/admin/product-detail-host.js +40 -0
- package/dist/admin/scheduled-catalog-host.d.ts +15 -0
- package/dist/admin/scheduled-catalog-host.d.ts.map +1 -0
- package/dist/admin/scheduled-catalog-host.js +19 -0
- package/dist/admin/vertical-detail-host.d.ts +13 -0
- package/dist/admin/vertical-detail-host.d.ts.map +1 -0
- package/dist/admin/vertical-detail-host.js +62 -0
- package/dist/booking-engine/index.d.ts +26 -0
- package/dist/booking-engine/index.d.ts.map +1 -0
- package/dist/booking-engine/index.js +25 -0
- package/dist/booking-engine/use-booking-commit.d.ts +61 -0
- package/dist/booking-engine/use-booking-commit.d.ts.map +1 -0
- package/dist/booking-engine/use-booking-commit.js +47 -0
- package/dist/booking-engine/use-booking-draft-shape.d.ts +20 -0
- package/dist/booking-engine/use-booking-draft-shape.d.ts.map +1 -0
- package/dist/booking-engine/use-booking-draft-shape.js +9 -0
- package/dist/booking-engine/use-booking-draft.d.ts +102 -0
- package/dist/booking-engine/use-booking-draft.d.ts.map +1 -0
- package/dist/booking-engine/use-booking-draft.js +93 -0
- package/dist/booking-engine/use-booking-hold.d.ts +30 -0
- package/dist/booking-engine/use-booking-hold.d.ts.map +1 -0
- package/dist/booking-engine/use-booking-hold.js +44 -0
- package/dist/booking-engine/use-booking-journey-api.d.ts +23 -0
- package/dist/booking-engine/use-booking-journey-api.d.ts.map +1 -0
- package/dist/booking-engine/use-booking-journey-api.js +24 -0
- package/dist/booking-engine/use-booking-quote.d.ts +711 -0
- package/dist/booking-engine/use-booking-quote.d.ts.map +1 -0
- package/dist/booking-engine/use-booking-quote.js +122 -0
- package/dist/catalog-enrichment-mappers.d.ts +162 -0
- package/dist/catalog-enrichment-mappers.d.ts.map +1 -0
- package/dist/catalog-enrichment-mappers.js +190 -0
- package/dist/catalog-enrichment.d.ts +203 -0
- package/dist/catalog-enrichment.d.ts.map +1 -0
- package/dist/catalog-enrichment.js +130 -0
- package/dist/catalog-offers-client.d.ts +58 -0
- package/dist/catalog-offers-client.d.ts.map +1 -0
- package/dist/catalog-offers-client.js +61 -0
- package/dist/catalog-search-params.d.ts +45 -0
- package/dist/catalog-search-params.d.ts.map +1 -0
- package/dist/catalog-search-params.js +30 -0
- package/dist/catalog-surfaces.d.ts +17 -0
- package/dist/catalog-surfaces.d.ts.map +1 -0
- package/dist/catalog-surfaces.js +26 -0
- package/dist/client.d.ts +20 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +65 -0
- package/dist/components/availability-calendar.d.ts +33 -0
- package/dist/components/availability-calendar.d.ts.map +1 -0
- package/dist/components/availability-calendar.js +65 -0
- package/dist/components/catalog-browse-page.d.ts +41 -0
- package/dist/components/catalog-browse-page.d.ts.map +1 -0
- package/dist/components/catalog-browse-page.js +47 -0
- package/dist/components/catalog-card.d.ts +68 -0
- package/dist/components/catalog-card.d.ts.map +1 -0
- package/dist/components/catalog-card.js +52 -0
- package/dist/components/catalog-detail-cruise-cards.d.ts +16 -0
- package/dist/components/catalog-detail-cruise-cards.d.ts.map +1 -0
- package/dist/components/catalog-detail-cruise-cards.js +54 -0
- package/dist/components/catalog-detail-departures.d.ts +25 -0
- package/dist/components/catalog-detail-departures.d.ts.map +1 -0
- package/dist/components/catalog-detail-departures.js +240 -0
- package/dist/components/catalog-detail-parts.d.ts +70 -0
- package/dist/components/catalog-detail-parts.d.ts.map +1 -0
- package/dist/components/catalog-detail-parts.js +282 -0
- package/dist/components/catalog-detail-sheet.d.ts +93 -0
- package/dist/components/catalog-detail-sheet.d.ts.map +1 -0
- package/dist/components/catalog-detail-sheet.js +68 -0
- package/dist/components/catalog-detail-view.d.ts +39 -0
- package/dist/components/catalog-detail-view.d.ts.map +1 -0
- package/dist/components/catalog-detail-view.js +157 -0
- package/dist/components/catalog-enrichment-fetchers.d.ts +8 -0
- package/dist/components/catalog-enrichment-fetchers.d.ts.map +1 -0
- package/dist/components/catalog-enrichment-fetchers.js +7 -0
- package/dist/components/catalog-faceted-filter.d.ts +30 -0
- package/dist/components/catalog-faceted-filter.d.ts.map +1 -0
- package/dist/components/catalog-faceted-filter.js +24 -0
- package/dist/components/catalog-filter-rail.d.ts +25 -0
- package/dist/components/catalog-filter-rail.d.ts.map +1 -0
- package/dist/components/catalog-filter-rail.js +88 -0
- package/dist/components/catalog-gallery.d.ts +27 -0
- package/dist/components/catalog-gallery.d.ts.map +1 -0
- package/dist/components/catalog-gallery.js +66 -0
- package/dist/components/catalog-hit.d.ts +27 -0
- package/dist/components/catalog-hit.d.ts.map +1 -0
- package/dist/components/catalog-hit.js +57 -0
- package/dist/components/catalog-page-cards.d.ts +21 -0
- package/dist/components/catalog-page-cards.d.ts.map +1 -0
- package/dist/components/catalog-page-cards.js +174 -0
- package/dist/components/catalog-page-config.d.ts +17 -0
- package/dist/components/catalog-page-config.d.ts.map +1 -0
- package/dist/components/catalog-page-config.js +369 -0
- package/dist/components/catalog-page.d.ts +88 -0
- package/dist/components/catalog-page.d.ts.map +1 -0
- package/dist/components/catalog-page.js +148 -0
- package/dist/components/catalog-range-filter.d.ts +34 -0
- package/dist/components/catalog-range-filter.d.ts.map +1 -0
- package/dist/components/catalog-range-filter.js +72 -0
- package/dist/components/catalog-search-page.d.ts +239 -0
- package/dist/components/catalog-search-page.d.ts.map +1 -0
- package/dist/components/catalog-search-page.js +63 -0
- package/dist/components/catalog-search-tab-panel.d.ts +42 -0
- package/dist/components/catalog-search-tab-panel.d.ts.map +1 -0
- package/dist/components/catalog-search-tab-panel.js +199 -0
- package/dist/components/catalog-vertical-detail-page.d.ts +33 -0
- package/dist/components/catalog-vertical-detail-page.d.ts.map +1 -0
- package/dist/components/catalog-vertical-detail-page.js +100 -0
- package/dist/components/cruise-detail-page-parts.d.ts +72 -0
- package/dist/components/cruise-detail-page-parts.d.ts.map +1 -0
- package/dist/components/cruise-detail-page-parts.js +146 -0
- package/dist/components/cruise-detail-page.d.ts +21 -0
- package/dist/components/cruise-detail-page.d.ts.map +1 -0
- package/dist/components/cruise-detail-page.js +201 -0
- package/dist/components/dynamic-catalog-page-parts.d.ts +40 -0
- package/dist/components/dynamic-catalog-page-parts.d.ts.map +1 -0
- package/dist/components/dynamic-catalog-page-parts.js +43 -0
- package/dist/components/dynamic-catalog-page.d.ts +23 -0
- package/dist/components/dynamic-catalog-page.d.ts.map +1 -0
- package/dist/components/dynamic-catalog-page.js +270 -0
- package/dist/components/media-gallery.d.ts +13 -0
- package/dist/components/media-gallery.d.ts.map +1 -0
- package/dist/components/media-gallery.js +42 -0
- package/dist/components/product-detail-page-parts.d.ts +106 -0
- package/dist/components/product-detail-page-parts.d.ts.map +1 -0
- package/dist/components/product-detail-page-parts.js +130 -0
- package/dist/components/product-detail-page.d.ts +57 -0
- package/dist/components/product-detail-page.d.ts.map +1 -0
- package/dist/components/product-detail-page.js +175 -0
- package/dist/components/scheduled-catalog-page.d.ts +34 -0
- package/dist/components/scheduled-catalog-page.d.ts.map +1 -0
- package/dist/components/scheduled-catalog-page.js +6 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/use-catalog-offers.d.ts +186 -0
- package/dist/hooks/use-catalog-offers.d.ts.map +1 -0
- package/dist/hooks/use-catalog-offers.js +105 -0
- package/dist/hooks/use-catalog-search.d.ts +109 -0
- package/dist/hooks/use-catalog-search.d.ts.map +1 -0
- package/dist/hooks/use-catalog-search.js +52 -0
- package/dist/i18n/en.d.ts +397 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +396 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages.d.ts +335 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +816 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro.d.ts +397 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +396 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/schemas-catalog-offers.d.ts +290 -0
- package/dist/schemas-catalog-offers.d.ts.map +1 -0
- package/dist/schemas-catalog-offers.js +155 -0
- package/dist/schemas.d.ts +143 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +76 -0
- package/dist/ui.d.ts +19 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +18 -0
- package/package.json +150 -0
- package/src/styles.css +11 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { type AdminExtension } from "@voyant-travel/admin";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { CatalogDetailSurface } from "../catalog-surfaces.js";
|
|
4
|
+
/**
|
|
5
|
+
* Semantic destinations the catalog admin surfaces navigate to (packaged-admin
|
|
6
|
+
* RFC §4.7). The catalog pages link into routes they do not own — the booking
|
|
7
|
+
* journey, the supplier page, the product editor — so instead of importing a
|
|
8
|
+
* host route tree they resolve these keys through
|
|
9
|
+
* `useAdminHref`/`useAdminNavigate` from `@voyant-travel/admin`. Hosts register one
|
|
10
|
+
* resolver per key (`satisfies AdminDestinationResolvers`).
|
|
11
|
+
*/
|
|
12
|
+
declare module "@voyant-travel/admin" {
|
|
13
|
+
interface AdminDestinations {
|
|
14
|
+
/**
|
|
15
|
+
* The unified booking journey wizard for an offer-carrying entity.
|
|
16
|
+
* Optional fields pre-pin the journey: a departure (by id for owned
|
|
17
|
+
* inventory, by date for sourced), an option/cabin, an accommodation rate
|
|
18
|
+
* (room type + rate plan + board), and name/image for the side-panel
|
|
19
|
+
* preview. Pass only the fields the selection actually carries — key
|
|
20
|
+
* presence is meaningful to the journey's search params.
|
|
21
|
+
*/
|
|
22
|
+
"bookingJourney.start": {
|
|
23
|
+
/** Entity module owning the bookable entity (e.g. `"products"`, `"cruises"`). */
|
|
24
|
+
entityModule: string;
|
|
25
|
+
entityId: string;
|
|
26
|
+
/** Offer source kind (e.g. `"owned"`, `"voyant-connect"`). */
|
|
27
|
+
sourceKind: string;
|
|
28
|
+
sourceConnectionId?: string;
|
|
29
|
+
sourceRef?: string;
|
|
30
|
+
departureId?: string;
|
|
31
|
+
/** ISO date (YYYY-MM-DD). */
|
|
32
|
+
departureDate?: string;
|
|
33
|
+
optionId?: string;
|
|
34
|
+
roomTypeId?: string;
|
|
35
|
+
ratePlanId?: string;
|
|
36
|
+
board?: string;
|
|
37
|
+
entityName?: string;
|
|
38
|
+
entityImageUrl?: string;
|
|
39
|
+
};
|
|
40
|
+
/** A catalog surface's browse page (e.g. Packages, Cruises). */
|
|
41
|
+
"catalog.browse": {
|
|
42
|
+
surface: CatalogDetailSurface;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A catalog surface's dedicated detail page. `adults`/`nights` carry the
|
|
46
|
+
* package search context so live offers match what was searched.
|
|
47
|
+
*/
|
|
48
|
+
"catalog.detail": {
|
|
49
|
+
surface: CatalogDetailSurface;
|
|
50
|
+
id: string;
|
|
51
|
+
adults?: number;
|
|
52
|
+
nights?: number;
|
|
53
|
+
};
|
|
54
|
+
/** The owned-product editor/detail page. */
|
|
55
|
+
"product.detail": {
|
|
56
|
+
productId: string;
|
|
57
|
+
};
|
|
58
|
+
/** A supplier's detail page. */
|
|
59
|
+
"supplier.detail": {
|
|
60
|
+
supplierId: string;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export { type CatalogSearchParams, catalogSearchSchema } from "../catalog-search-params.js";
|
|
65
|
+
export { type CatalogDetailSurface, type CatalogVerticalPageId, catalogDetailSurfaces, catalogSurfaceVertical, catalogVerticalPageIds, } from "../catalog-surfaces.js";
|
|
66
|
+
export type { CatalogPageProps } from "../components/catalog-page.js";
|
|
67
|
+
export type { CatalogVerticalDetailBreadcrumb, CatalogVerticalDetailPageProps, } from "../components/catalog-vertical-detail-page.js";
|
|
68
|
+
export type { CruiseDetailPageProps } from "../components/cruise-detail-page.js";
|
|
69
|
+
export type { DynamicCatalogPageProps } from "../components/dynamic-catalog-page.js";
|
|
70
|
+
export type { ProductBookSelection, ProductDetailPageProps, } from "../components/product-detail-page.js";
|
|
71
|
+
export type { ScheduledCatalogPageProps, ScheduledScope, } from "../components/scheduled-catalog-page.js";
|
|
72
|
+
export type { CatalogVerticalHostProps } from "./catalog-vertical-host.js";
|
|
73
|
+
export type { CruiseDetailHostProps } from "./cruise-detail-host.js";
|
|
74
|
+
export type { DynamicCatalogHostProps } from "./dynamic-catalog-host.js";
|
|
75
|
+
export type { ProductDetailHostProps } from "./product-detail-host.js";
|
|
76
|
+
export type { ScheduledCatalogHostProps } from "./scheduled-catalog-host.js";
|
|
77
|
+
export type { VerticalDetailHostProps } from "./vertical-detail-host.js";
|
|
78
|
+
/**
|
|
79
|
+
* Search context carried onto the product detail page so live offers match
|
|
80
|
+
* what the operator searched (occupancy + length of stay) and the right
|
|
81
|
+
* locale loads. Package-owned so the detail page and its hosts validate the
|
|
82
|
+
* same contract.
|
|
83
|
+
*/
|
|
84
|
+
export declare const productDetailSearchSchema: z.ZodObject<{
|
|
85
|
+
adults: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
86
|
+
nights: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
87
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
export type ProductDetailSearchParams = z.infer<typeof productDetailSearchSchema>;
|
|
90
|
+
export interface CreateCatalogAdminExtensionOptions {
|
|
91
|
+
/** Mount path of the catalog surfaces inside the admin workspace. Default `/catalog`. */
|
|
92
|
+
basePath?: string;
|
|
93
|
+
/** Localized surface labels. Defaults are the English operator nav labels. */
|
|
94
|
+
labels?: {
|
|
95
|
+
products?: string;
|
|
96
|
+
excursions?: string;
|
|
97
|
+
tours?: string;
|
|
98
|
+
cruises?: string;
|
|
99
|
+
accommodations?: string;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The catalog admin contribution (packaged-admin RFC Phase 2,
|
|
104
|
+
* `@voyant-travel/<domain>-ui/admin` convention).
|
|
105
|
+
*
|
|
106
|
+
* NAVIGATION: deliberately none. The Catalog nav group (with its five surface
|
|
107
|
+
* sub-items) is part of the BASE operator navigation — see
|
|
108
|
+
* `createOperatorAdminNavigation` in `@voyant-travel/admin` — so contributing nav
|
|
109
|
+
* entries here would duplicate them. If the base nav ever drops the catalog
|
|
110
|
+
* group, this extension is where the entries move.
|
|
111
|
+
*
|
|
112
|
+
* ROUTES: contributions carry the FULL route implementation (packaged-admin
|
|
113
|
+
* RFC §4.8 endgame) — the package-owned search contracts
|
|
114
|
+
* (`catalogSearchSchema` from `@voyant-travel/catalog-react` for the browse
|
|
115
|
+
* surfaces, {@link productDetailSearchSchema} for the package detail page)
|
|
116
|
+
* plus a lazy `page` module loader per route. Hosts assemble a code-based
|
|
117
|
+
* route tree straight from these contributions (no per-route host files);
|
|
118
|
+
* the host binder hands each page {@link AdminRoutePageProps}
|
|
119
|
+
* (params/search/updateSearch/title), which the page modules under
|
|
120
|
+
* `./pages/*` bind onto the `*Host` components exported from this entrypoint
|
|
121
|
+
* ({@link CatalogVerticalHost}, {@link DynamicCatalogHost},
|
|
122
|
+
* {@link ScheduledCatalogHost}, {@link ProductDetailHost},
|
|
123
|
+
* {@link CruiseDetailHost}, {@link VerticalDetailHost}). The hosts own the
|
|
124
|
+
* data wiring (catalog provider context, markets/suppliers/products hooks)
|
|
125
|
+
* and resolve every cross-route link through the semantic destinations
|
|
126
|
+
* declared above — no app RPC client, no host route tree.
|
|
127
|
+
*
|
|
128
|
+
* Every `page:` loader dynamically imports its SPECIFIC page module — never
|
|
129
|
+
* this barrel — so each page stays code-split in its own chunk instead of
|
|
130
|
+
* landing in the workspace-chrome chunk that evaluates this factory.
|
|
131
|
+
*/
|
|
132
|
+
export declare function createCatalogAdminExtension(options?: CreateCatalogAdminExtensionOptions): AdminExtension;
|
|
133
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { defineAdminExtension } from "@voyant-travel/admin";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
// Lean static: the browse search contract lives in its own schema-only
|
|
4
|
+
// module — importing it through `../index.js` would pin the whole catalog
|
|
5
|
+
// data/components barrel into the workspace-chrome chunk that evaluates
|
|
6
|
+
// this factory.
|
|
7
|
+
import { catalogSearchSchema } from "../catalog-search-params.js";
|
|
8
|
+
export { catalogSearchSchema } from "../catalog-search-params.js";
|
|
9
|
+
// Lean taxonomy + search contracts consumed by host route files / host
|
|
10
|
+
// wrappers and the generated admin route module.
|
|
11
|
+
//
|
|
12
|
+
// Endgame rule (packaged-admin RFC §4.8): this barrel re-exports NO page
|
|
13
|
+
// or host component values — it is evaluated with the workspace chrome, so
|
|
14
|
+
// a static page/host re-export would pin the heavy catalog pages into the
|
|
15
|
+
// entry chunk. Pages and hosts import from their specific modules
|
|
16
|
+
// (`@voyant-travel/catalog-react/components/*`, `./pages/*` wrappers); only
|
|
17
|
+
// their TYPES re-export here.
|
|
18
|
+
export { catalogDetailSurfaces, catalogSurfaceVertical, catalogVerticalPageIds, } from "../catalog-surfaces.js";
|
|
19
|
+
/**
|
|
20
|
+
* Search context carried onto the product detail page so live offers match
|
|
21
|
+
* what the operator searched (occupancy + length of stay) and the right
|
|
22
|
+
* locale loads. Package-owned so the detail page and its hosts validate the
|
|
23
|
+
* same contract.
|
|
24
|
+
*/
|
|
25
|
+
export const productDetailSearchSchema = z.object({
|
|
26
|
+
adults: z.coerce.number().int().min(1).optional(),
|
|
27
|
+
nights: z.coerce.number().int().min(1).optional(),
|
|
28
|
+
locale: z.string().optional(),
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* The catalog admin contribution (packaged-admin RFC Phase 2,
|
|
32
|
+
* `@voyant-travel/<domain>-ui/admin` convention).
|
|
33
|
+
*
|
|
34
|
+
* NAVIGATION: deliberately none. The Catalog nav group (with its five surface
|
|
35
|
+
* sub-items) is part of the BASE operator navigation — see
|
|
36
|
+
* `createOperatorAdminNavigation` in `@voyant-travel/admin` — so contributing nav
|
|
37
|
+
* entries here would duplicate them. If the base nav ever drops the catalog
|
|
38
|
+
* group, this extension is where the entries move.
|
|
39
|
+
*
|
|
40
|
+
* ROUTES: contributions carry the FULL route implementation (packaged-admin
|
|
41
|
+
* RFC §4.8 endgame) — the package-owned search contracts
|
|
42
|
+
* (`catalogSearchSchema` from `@voyant-travel/catalog-react` for the browse
|
|
43
|
+
* surfaces, {@link productDetailSearchSchema} for the package detail page)
|
|
44
|
+
* plus a lazy `page` module loader per route. Hosts assemble a code-based
|
|
45
|
+
* route tree straight from these contributions (no per-route host files);
|
|
46
|
+
* the host binder hands each page {@link AdminRoutePageProps}
|
|
47
|
+
* (params/search/updateSearch/title), which the page modules under
|
|
48
|
+
* `./pages/*` bind onto the `*Host` components exported from this entrypoint
|
|
49
|
+
* ({@link CatalogVerticalHost}, {@link DynamicCatalogHost},
|
|
50
|
+
* {@link ScheduledCatalogHost}, {@link ProductDetailHost},
|
|
51
|
+
* {@link CruiseDetailHost}, {@link VerticalDetailHost}). The hosts own the
|
|
52
|
+
* data wiring (catalog provider context, markets/suppliers/products hooks)
|
|
53
|
+
* and resolve every cross-route link through the semantic destinations
|
|
54
|
+
* declared above — no app RPC client, no host route tree.
|
|
55
|
+
*
|
|
56
|
+
* Every `page:` loader dynamically imports its SPECIFIC page module — never
|
|
57
|
+
* this barrel — so each page stays code-split in its own chunk instead of
|
|
58
|
+
* landing in the workspace-chrome chunk that evaluates this factory.
|
|
59
|
+
*/
|
|
60
|
+
export function createCatalogAdminExtension(options = {}) {
|
|
61
|
+
const { basePath = "/catalog", labels = {} } = options;
|
|
62
|
+
const { products = "Packages", excursions = "Excursions", tours = "Tours", cruises = "Cruises", accommodations = "Accommodations", } = labels;
|
|
63
|
+
const browseSearch = (search) => catalogSearchSchema.parse(search);
|
|
64
|
+
const productDetailSearch = (search) => productDetailSearchSchema.parse(search);
|
|
65
|
+
return defineAdminExtension({
|
|
66
|
+
id: "catalog",
|
|
67
|
+
routes: [
|
|
68
|
+
{
|
|
69
|
+
// Index redirect (formerly the host's `catalog/index.tsx` file
|
|
70
|
+
// route): `/catalog` lands on the products surface.
|
|
71
|
+
id: "catalog-index",
|
|
72
|
+
path: basePath,
|
|
73
|
+
title: products,
|
|
74
|
+
redirectTo: `${basePath}/products`,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "catalog-products-index",
|
|
78
|
+
path: `${basePath}/products`,
|
|
79
|
+
title: products,
|
|
80
|
+
validateSearch: browseSearch,
|
|
81
|
+
page: () => import("./pages/catalog-products-index-page.js"),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "catalog-products-detail",
|
|
85
|
+
path: `${basePath}/products/$productId`,
|
|
86
|
+
title: products,
|
|
87
|
+
validateSearch: productDetailSearch,
|
|
88
|
+
page: () => import("./pages/catalog-products-detail-page.js"),
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "catalog-excursions-index",
|
|
92
|
+
path: `${basePath}/excursions`,
|
|
93
|
+
title: excursions,
|
|
94
|
+
validateSearch: browseSearch,
|
|
95
|
+
page: () => import("./pages/catalog-excursions-index-page.js"),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
id: "catalog-excursions-detail",
|
|
99
|
+
path: `${basePath}/excursions/$id`,
|
|
100
|
+
title: excursions,
|
|
101
|
+
page: () => import("./pages/catalog-excursions-detail-page.js"),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "catalog-tours-index",
|
|
105
|
+
path: `${basePath}/tours`,
|
|
106
|
+
title: tours,
|
|
107
|
+
validateSearch: browseSearch,
|
|
108
|
+
page: () => import("./pages/catalog-tours-index-page.js"),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "catalog-tours-detail",
|
|
112
|
+
path: `${basePath}/tours/$id`,
|
|
113
|
+
title: tours,
|
|
114
|
+
page: () => import("./pages/catalog-tours-detail-page.js"),
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "catalog-cruises-index",
|
|
118
|
+
path: `${basePath}/cruises`,
|
|
119
|
+
title: cruises,
|
|
120
|
+
validateSearch: browseSearch,
|
|
121
|
+
page: () => import("./pages/catalog-cruises-index-page.js"),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "catalog-cruises-detail",
|
|
125
|
+
path: `${basePath}/cruises/$id`,
|
|
126
|
+
title: cruises,
|
|
127
|
+
page: () => import("./pages/catalog-cruises-detail-page.js"),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "catalog-accommodations-index",
|
|
131
|
+
path: `${basePath}/accommodations`,
|
|
132
|
+
title: accommodations,
|
|
133
|
+
validateSearch: browseSearch,
|
|
134
|
+
page: () => import("./pages/catalog-accommodations-index-page.js"),
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "catalog-accommodations-detail",
|
|
138
|
+
path: `${basePath}/accommodations/$id`,
|
|
139
|
+
title: accommodations,
|
|
140
|
+
page: () => import("./pages/catalog-accommodations-detail-page.js"),
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
});
|
|
144
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open a resolved destination href in a new tab (keeps the search/list page
|
|
3
|
+
* in place). No-op during SSR and for unresolvable destinations (`"#"` is the
|
|
4
|
+
* `useAdminHref` fallback — opening it would just clone the current page).
|
|
5
|
+
*/
|
|
6
|
+
export declare function openHrefInNewTab(href: string): void;
|
|
7
|
+
//# sourceMappingURL=open-in-new-tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-new-tab.d.ts","sourceRoot":"","sources":["../../src/admin/open-in-new-tab.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAGnD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open a resolved destination href in a new tab (keeps the search/list page
|
|
3
|
+
* in place). No-op during SSR and for unresolvable destinations (`"#"` is the
|
|
4
|
+
* `useAdminHref` fallback — opening it would just clone the current page).
|
|
5
|
+
*/
|
|
6
|
+
export function openHrefInNewTab(href) {
|
|
7
|
+
if (typeof window === "undefined" || href === "#")
|
|
8
|
+
return;
|
|
9
|
+
window.open(href, "_blank", "noopener,noreferrer");
|
|
10
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/** Packaged route page for the accommodation detail surface (`$id` param). */
|
|
3
|
+
export default function CatalogAccommodationsDetailPage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=catalog-accommodations-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-accommodations-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-accommodations-detail-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D,8EAA8E;AAC9E,MAAM,CAAC,OAAO,UAAU,+BAA+B,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAEtF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { VerticalDetailHost } from "../vertical-detail-host.js";
|
|
4
|
+
/** Packaged route page for the accommodation detail surface (`$id` param). */
|
|
5
|
+
export default function CatalogAccommodationsDetailPage({ params }) {
|
|
6
|
+
return _jsx(VerticalDetailHost, { surface: "accommodations", id: params.id ?? "" });
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged route page for the accommodations browse surface. `title` is the
|
|
4
|
+
* contribution's localized label (factory `labels`); `search` was validated
|
|
5
|
+
* by the contribution's `validateSearch` (catalogSearchSchema).
|
|
6
|
+
*/
|
|
7
|
+
export default function CatalogAccommodationsIndexPage({ search, updateSearch, title, }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=catalog-accommodations-index-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-accommodations-index-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-accommodations-index-page.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAgB,MAAM,sBAAsB,CAAA;AAM7E;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,EACrD,MAAM,EACN,YAAY,EACZ,KAAK,GACN,EAAE,mBAAmB,2CAsBrB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useAdminHref } from "@voyant-travel/admin";
|
|
4
|
+
import { CatalogVerticalHost } from "../catalog-vertical-host.js";
|
|
5
|
+
import { openHrefInNewTab } from "../open-in-new-tab.js";
|
|
6
|
+
/**
|
|
7
|
+
* Packaged route page for the accommodations browse surface. `title` is the
|
|
8
|
+
* contribution's localized label (factory `labels`); `search` was validated
|
|
9
|
+
* by the contribution's `validateSearch` (catalogSearchSchema).
|
|
10
|
+
*/
|
|
11
|
+
export default function CatalogAccommodationsIndexPage({ search, updateSearch, title, }) {
|
|
12
|
+
const resolveHref = useAdminHref();
|
|
13
|
+
// Browse-first surface — a consistent header over the embedded grid, with
|
|
14
|
+
// results opening the dedicated accommodation detail page (the
|
|
15
|
+
// `catalog.detail` destination) in a new tab.
|
|
16
|
+
return (_jsxs("div", { className: "mx-auto w-full max-w-screen-2xl px-6 py-6 lg:px-8", children: [_jsx("div", { className: "mb-4", children: _jsx("h1", { className: "font-semibold text-2xl", children: title }) }), _jsx(CatalogVerticalHost, { vertical: "accommodations", search: search, onSearchChange: (updater, replace = true) => updateSearch(updater, { replace }), embedded: true, onOpenDetail: (hit) => openHrefInNewTab(resolveHref("catalog.detail", { surface: "accommodations", id: hit.id })) })] }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/** Packaged route page for the source-driven cruise detail surface (`$id` param). */
|
|
3
|
+
export default function CatalogCruisesDetailPage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=catalog-cruises-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-cruises-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-cruises-detail-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D,qFAAqF;AACrF,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAE/E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CruiseDetailHost } from "../cruise-detail-host.js";
|
|
4
|
+
/** Packaged route page for the source-driven cruise detail surface (`$id` param). */
|
|
5
|
+
export default function CatalogCruisesDetailPage({ params }) {
|
|
6
|
+
return _jsx(CruiseDetailHost, { id: params.id ?? "" });
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged route page for the cruises browse surface. `title` is the
|
|
4
|
+
* contribution's localized label (factory `labels`); `search` was validated
|
|
5
|
+
* by the contribution's `validateSearch` (catalogSearchSchema).
|
|
6
|
+
*/
|
|
7
|
+
export default function CatalogCruisesIndexPage({ search, updateSearch, title, }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=catalog-cruises-index-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-cruises-index-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-cruises-index-page.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAgB,MAAM,sBAAsB,CAAA;AAM7E;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,MAAM,EACN,YAAY,EACZ,KAAK,GACN,EAAE,mBAAmB,2CAwBrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useAdminHref } from "@voyant-travel/admin";
|
|
4
|
+
import { CatalogVerticalHost } from "../catalog-vertical-host.js";
|
|
5
|
+
import { openHrefInNewTab } from "../open-in-new-tab.js";
|
|
6
|
+
/**
|
|
7
|
+
* Packaged route page for the cruises browse surface. `title` is the
|
|
8
|
+
* contribution's localized label (factory `labels`); `search` was validated
|
|
9
|
+
* by the contribution's `validateSearch` (catalogSearchSchema).
|
|
10
|
+
*/
|
|
11
|
+
export default function CatalogCruisesIndexPage({ search, updateSearch, title, }) {
|
|
12
|
+
const resolveHref = useAdminHref();
|
|
13
|
+
// Browse-first surface — a consistent header over the embedded grid, with
|
|
14
|
+
// results opening the dedicated, source-driven cruise detail (the
|
|
15
|
+
// `catalog.detail` destination) in a new tab. (Connect's cruise sailings
|
|
16
|
+
// carry no from-price and don't join cleanly for a live availability
|
|
17
|
+
// calendar, so cruises browse the synced catalog index.)
|
|
18
|
+
return (_jsxs("div", { className: "mx-auto w-full max-w-screen-2xl px-6 py-6 lg:px-8", children: [_jsx("div", { className: "mb-4", children: _jsx("h1", { className: "font-semibold text-2xl", children: title }) }), _jsx(CatalogVerticalHost, { vertical: "cruises", search: search, onSearchChange: (updater, replace = true) => updateSearch(updater, { replace }), embedded: true, onOpenDetail: (hit) => openHrefInNewTab(resolveHref("catalog.detail", { surface: "cruises", id: hit.id })) })] }));
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/** Packaged route page for the excursion detail surface (`$id` param). */
|
|
3
|
+
export default function CatalogExcursionsDetailPage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=catalog-excursions-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-excursions-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-excursions-detail-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D,0EAA0E;AAC1E,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAElF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { VerticalDetailHost } from "../vertical-detail-host.js";
|
|
4
|
+
/** Packaged route page for the excursion detail surface (`$id` param). */
|
|
5
|
+
export default function CatalogExcursionsDetailPage({ params }) {
|
|
6
|
+
return _jsx(VerticalDetailHost, { surface: "excursions", id: params.id ?? "" });
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged route page for the scheduled catalog browse surface scoped to
|
|
4
|
+
* excursions. The contribution's `validateSearch` (catalogSearchSchema)
|
|
5
|
+
* already validated `search`, so the cast onto the host contract is sound.
|
|
6
|
+
*/
|
|
7
|
+
export default function CatalogExcursionsIndexPage({ search, updateSearch }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=catalog-excursions-index-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-excursions-index-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-excursions-index-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK/D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,mBAAmB,2CAS/F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ScheduledCatalogHost } from "../scheduled-catalog-host.js";
|
|
4
|
+
/**
|
|
5
|
+
* Packaged route page for the scheduled catalog browse surface scoped to
|
|
6
|
+
* excursions. The contribution's `validateSearch` (catalogSearchSchema)
|
|
7
|
+
* already validated `search`, so the cast onto the host contract is sound.
|
|
8
|
+
*/
|
|
9
|
+
export default function CatalogExcursionsIndexPage({ search, updateSearch }) {
|
|
10
|
+
// Excursions = single-day scheduled trips (durationDays ≤ 1).
|
|
11
|
+
return (_jsx(ScheduledCatalogHost, { scope: "excursions", search: search, onSearchChange: (updater, replace = true) => updateSearch(updater, { replace }) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged route page for the product (package) detail surface. The
|
|
4
|
+
* contribution's `validateSearch` (productDetailSearchSchema) already
|
|
5
|
+
* validated `search`, so the cast onto the package search contract is sound.
|
|
6
|
+
*/
|
|
7
|
+
export default function CatalogProductsDetailPage({ params, search }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=catalog-products-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-products-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-products-detail-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK/D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAWxF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ProductDetailHost } from "../product-detail-host.js";
|
|
4
|
+
/**
|
|
5
|
+
* Packaged route page for the product (package) detail surface. The
|
|
6
|
+
* contribution's `validateSearch` (productDetailSearchSchema) already
|
|
7
|
+
* validated `search`, so the cast onto the package search contract is sound.
|
|
8
|
+
*/
|
|
9
|
+
export default function CatalogProductsDetailPage({ params, search }) {
|
|
10
|
+
const { adults, nights, locale } = search;
|
|
11
|
+
return (_jsx(ProductDetailHost, { productId: params.productId ?? "", adults: adults, nights: nights, locale: locale }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged route page for the dynamic catalog browse surface (Packages).
|
|
4
|
+
* The contribution's `validateSearch` (catalogSearchSchema) already validated
|
|
5
|
+
* `search`, so the cast onto the host's search contract is sound.
|
|
6
|
+
*/
|
|
7
|
+
export default function CatalogProductsIndexPage({ search, updateSearch }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=catalog-products-index-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-products-index-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-products-index-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK/D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,mBAAmB,2CAQ7F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { DynamicCatalogHost } from "../dynamic-catalog-host.js";
|
|
4
|
+
/**
|
|
5
|
+
* Packaged route page for the dynamic catalog browse surface (Packages).
|
|
6
|
+
* The contribution's `validateSearch` (catalogSearchSchema) already validated
|
|
7
|
+
* `search`, so the cast onto the host's search contract is sound.
|
|
8
|
+
*/
|
|
9
|
+
export default function CatalogProductsIndexPage({ search, updateSearch }) {
|
|
10
|
+
// Products are the `dynamic` supply mechanic → search-first surface.
|
|
11
|
+
return (_jsx(DynamicCatalogHost, { search: search, onSearchChange: (updater, replace = true) => updateSearch(updater, { replace }) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/** Packaged route page for the tour detail surface (`$id` param). */
|
|
3
|
+
export default function CatalogToursDetailPage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=catalog-tours-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-tours-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-tours-detail-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D,qEAAqE;AACrE,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAE7E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { VerticalDetailHost } from "../vertical-detail-host.js";
|
|
4
|
+
/** Packaged route page for the tour detail surface (`$id` param). */
|
|
5
|
+
export default function CatalogToursDetailPage({ params }) {
|
|
6
|
+
return _jsx(VerticalDetailHost, { surface: "tours", id: params.id ?? "" });
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged route page for the scheduled catalog browse surface scoped to
|
|
4
|
+
* tours. The contribution's `validateSearch` (catalogSearchSchema) already
|
|
5
|
+
* validated `search`, so the cast onto the host contract is sound.
|
|
6
|
+
*/
|
|
7
|
+
export default function CatalogToursIndexPage({ search, updateSearch }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=catalog-tours-index-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-tours-index-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/catalog-tours-index-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAK/D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,mBAAmB,2CAS1F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ScheduledCatalogHost } from "../scheduled-catalog-host.js";
|
|
4
|
+
/**
|
|
5
|
+
* Packaged route page for the scheduled catalog browse surface scoped to
|
|
6
|
+
* tours. The contribution's `validateSearch` (catalogSearchSchema) already
|
|
7
|
+
* validated `search`, so the cast onto the host contract is sound.
|
|
8
|
+
*/
|
|
9
|
+
export default function CatalogToursIndexPage({ search, updateSearch }) {
|
|
10
|
+
// Tours / circuits = multi-day scheduled trips (durationDays ≥ 2).
|
|
11
|
+
return (_jsx(ScheduledCatalogHost, { scope: "tours", search: search, onSearchChange: (updater, replace = true) => updateSearch(updater, { replace }) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ProductDetailHostProps {
|
|
2
|
+
productId: string;
|
|
3
|
+
adults?: number;
|
|
4
|
+
nights?: number;
|
|
5
|
+
locale?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Packaged admin host for `ProductDetailPage` — injects the localized
|
|
9
|
+
* "Packages" label, navigation to the booking journey (pinned to the resolved
|
|
10
|
+
* Connect source), and breadcrumbs.
|
|
11
|
+
*
|
|
12
|
+
* Proof-of-contract for semantic destinations (packaged-admin RFC §4.7): no
|
|
13
|
+
* host route tree is imported — the `catalog.browse` / `bookingJourney.start`
|
|
14
|
+
* keys declared in `./index.tsx` resolve through the resolvers the workspace
|
|
15
|
+
* shell registered.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ProductDetailHost({ productId, adults, nights, locale }: ProductDetailHostProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=product-detail-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-detail-host.d.ts","sourceRoot":"","sources":["../../src/admin/product-detail-host.tsx"],"names":[],"mappings":"AAYA,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;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,sBAAsB,2CAqC9F"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useAdminBreadcrumbs, useAdminHref, useAdminNavigate, useOperatorAdminMessages, } from "@voyant-travel/admin";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { ProductDetailPage } from "../components/product-detail-page.js";
|
|
6
|
+
/**
|
|
7
|
+
* Packaged admin host for `ProductDetailPage` — injects the localized
|
|
8
|
+
* "Packages" label, navigation to the booking journey (pinned to the resolved
|
|
9
|
+
* Connect source), and breadcrumbs.
|
|
10
|
+
*
|
|
11
|
+
* Proof-of-contract for semantic destinations (packaged-admin RFC §4.7): no
|
|
12
|
+
* host route tree is imported — the `catalog.browse` / `bookingJourney.start`
|
|
13
|
+
* keys declared in `./index.tsx` resolve through the resolvers the workspace
|
|
14
|
+
* shell registered.
|
|
15
|
+
*/
|
|
16
|
+
export function ProductDetailHost({ productId, adults, nights, locale }) {
|
|
17
|
+
const resolveHref = useAdminHref();
|
|
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
|
+
// Connect-sourced product → the unified journey. The picked offer's date
|
|
27
|
+
// + rate pin (room + rate plan) drive the quote so the adapter re-resolves
|
|
28
|
+
// the exact offer; name/image preview the side panel.
|
|
29
|
+
onBook: (id, _source, selection) => navigateTo("bookingJourney.start", {
|
|
30
|
+
entityModule: "products",
|
|
31
|
+
entityId: id,
|
|
32
|
+
sourceKind: "voyant-connect",
|
|
33
|
+
...(selection?.checkIn ? { departureDate: selection.checkIn.slice(0, 10) } : {}),
|
|
34
|
+
...(selection?.roomTypeId ? { roomTypeId: selection.roomTypeId } : {}),
|
|
35
|
+
...(selection?.ratePlanId ? { ratePlanId: selection.ratePlanId } : {}),
|
|
36
|
+
...(selection?.board ? { board: selection.board } : {}),
|
|
37
|
+
...(selection?.name ? { entityName: selection.name } : {}),
|
|
38
|
+
...(selection?.heroImageUrl ? { entityImageUrl: selection.heroImageUrl } : {}),
|
|
39
|
+
}) }));
|
|
40
|
+
}
|