@voyant-travel/cruises-react 0.118.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 +70 -0
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +59 -0
- package/dist/components/cruise-catalog-card.d.ts +13 -0
- package/dist/components/cruise-catalog-card.d.ts.map +1 -0
- package/dist/components/cruise-catalog-card.js +58 -0
- package/dist/components/enrichment-program-list.d.ts +13 -0
- package/dist/components/enrichment-program-list.d.ts.map +1 -0
- package/dist/components/enrichment-program-list.js +45 -0
- package/dist/components/external-badge.d.ts +14 -0
- package/dist/components/external-badge.d.ts.map +1 -0
- package/dist/components/external-badge.js +17 -0
- package/dist/components/pricing-grid.d.ts +21 -0
- package/dist/components/pricing-grid.d.ts.map +1 -0
- package/dist/components/pricing-grid.js +81 -0
- package/dist/components/quote-display.d.ts +14 -0
- package/dist/components/quote-display.d.ts.map +1 -0
- package/dist/components/quote-display.js +61 -0
- package/dist/hooks/index.d.ts +15 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +14 -0
- package/dist/hooks/use-cruise-booking.d.ts +205 -0
- package/dist/hooks/use-cruise-booking.d.ts.map +1 -0
- package/dist/hooks/use-cruise-booking.js +56 -0
- package/dist/hooks/use-cruise-mutation.d.ts +144 -0
- package/dist/hooks/use-cruise-mutation.d.ts.map +1 -0
- package/dist/hooks/use-cruise-mutation.js +58 -0
- package/dist/hooks/use-cruise.d.ts +38 -0
- package/dist/hooks/use-cruise.d.ts.map +1 -0
- package/dist/hooks/use-cruise.js +16 -0
- package/dist/hooks/use-cruises.d.ts +61 -0
- package/dist/hooks/use-cruises.d.ts.map +1 -0
- package/dist/hooks/use-cruises.js +16 -0
- package/dist/hooks/use-effective-itinerary.d.ts +27 -0
- package/dist/hooks/use-effective-itinerary.d.ts.map +1 -0
- package/dist/hooks/use-effective-itinerary.js +16 -0
- package/dist/hooks/use-enrichment.d.ts +72 -0
- package/dist/hooks/use-enrichment.d.ts.map +1 -0
- package/dist/hooks/use-enrichment.js +64 -0
- package/dist/hooks/use-external-actions.d.ts +43 -0
- package/dist/hooks/use-external-actions.d.ts.map +1 -0
- package/dist/hooks/use-external-actions.js +45 -0
- package/dist/hooks/use-pricing.d.ts +65 -0
- package/dist/hooks/use-pricing.d.ts.map +1 -0
- package/dist/hooks/use-pricing.js +28 -0
- package/dist/hooks/use-sailing-mutation.d.ts +147 -0
- package/dist/hooks/use-sailing-mutation.d.ts.map +1 -0
- package/dist/hooks/use-sailing-mutation.js +55 -0
- package/dist/hooks/use-sailings.d.ts +49 -0
- package/dist/hooks/use-sailings.d.ts.map +1 -0
- package/dist/hooks/use-sailings.js +20 -0
- package/dist/hooks/use-search-index.d.ts +43 -0
- package/dist/hooks/use-search-index.d.ts.map +1 -0
- package/dist/hooks/use-search-index.js +51 -0
- package/dist/hooks/use-ship-mutation.d.ts +186 -0
- package/dist/hooks/use-ship-mutation.d.ts.map +1 -0
- package/dist/hooks/use-ship-mutation.js +92 -0
- package/dist/hooks/use-ships.d.ts +101 -0
- package/dist/hooks/use-ships.d.ts.map +1 -0
- package/dist/hooks/use-ships.js +43 -0
- package/dist/hooks/use-storefront.d.ts +230 -0
- package/dist/hooks/use-storefront.d.ts.map +1 -0
- package/dist/hooks/use-storefront.js +62 -0
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +79 -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 +62 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +26 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro.d.ts +3 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +79 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +82 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +39 -0
- package/dist/query-options.d.ts +1272 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +136 -0
- package/dist/schemas.d.ts +1061 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +339 -0
- package/dist/ui.d.ts +6 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +5 -0
- package/package.json +121 -0
- package/src/styles.css +11 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type StorefrontListFilters } from "../query-keys.js";
|
|
3
|
+
export interface UseStorefrontCruisesOptions extends StorefrontListFilters {
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Storefront catalog browse — paginated, filterable, reads from
|
|
8
|
+
* cruise_search_index on the server. Mixes local and external entries
|
|
9
|
+
* with provenance markers so the UI can render an "External" badge.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useStorefrontCruises(options?: UseStorefrontCruisesOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
12
|
+
data: {
|
|
13
|
+
id: string;
|
|
14
|
+
source: "local" | "external";
|
|
15
|
+
sourceProvider: string | null;
|
|
16
|
+
sourceRef: Record<string, unknown> | null;
|
|
17
|
+
localCruiseId: string | null;
|
|
18
|
+
slug: string;
|
|
19
|
+
name: string;
|
|
20
|
+
cruiseType: "ocean" | "river" | "expedition" | "coastal";
|
|
21
|
+
lineName: string;
|
|
22
|
+
shipName: string;
|
|
23
|
+
nights: number;
|
|
24
|
+
embarkPortName: string | null;
|
|
25
|
+
disembarkPortName: string | null;
|
|
26
|
+
regions: string[] | null;
|
|
27
|
+
themes: string[] | null;
|
|
28
|
+
earliestDeparture: string | null;
|
|
29
|
+
latestDeparture: string | null;
|
|
30
|
+
departureCount: number | null;
|
|
31
|
+
lowestPriceCents: number | null;
|
|
32
|
+
lowestPriceCurrency: string | null;
|
|
33
|
+
salesStatus: string | null;
|
|
34
|
+
heroImageUrl: string | null;
|
|
35
|
+
refreshedAt: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
}[];
|
|
39
|
+
total: number;
|
|
40
|
+
limit: number;
|
|
41
|
+
offset: number;
|
|
42
|
+
}, Error>;
|
|
43
|
+
declare const storefrontCruiseDetailSchema: z.ZodObject<{
|
|
44
|
+
data: z.ZodObject<{
|
|
45
|
+
source: z.ZodEnum<{
|
|
46
|
+
local: "local";
|
|
47
|
+
external: "external";
|
|
48
|
+
}>;
|
|
49
|
+
sourceProvider: z.ZodNullable<z.ZodString>;
|
|
50
|
+
sourceRef: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
51
|
+
summary: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
source: z.ZodEnum<{
|
|
54
|
+
local: "local";
|
|
55
|
+
external: "external";
|
|
56
|
+
}>;
|
|
57
|
+
sourceProvider: z.ZodNullable<z.ZodString>;
|
|
58
|
+
sourceRef: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
59
|
+
localCruiseId: z.ZodNullable<z.ZodString>;
|
|
60
|
+
slug: z.ZodString;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
cruiseType: z.ZodEnum<{
|
|
63
|
+
ocean: "ocean";
|
|
64
|
+
river: "river";
|
|
65
|
+
expedition: "expedition";
|
|
66
|
+
coastal: "coastal";
|
|
67
|
+
}>;
|
|
68
|
+
lineName: z.ZodString;
|
|
69
|
+
shipName: z.ZodString;
|
|
70
|
+
nights: z.ZodNumber;
|
|
71
|
+
embarkPortName: z.ZodNullable<z.ZodString>;
|
|
72
|
+
disembarkPortName: z.ZodNullable<z.ZodString>;
|
|
73
|
+
regions: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
74
|
+
themes: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
75
|
+
earliestDeparture: z.ZodNullable<z.ZodString>;
|
|
76
|
+
latestDeparture: z.ZodNullable<z.ZodString>;
|
|
77
|
+
departureCount: z.ZodNullable<z.ZodNumber>;
|
|
78
|
+
lowestPriceCents: z.ZodNullable<z.ZodNumber>;
|
|
79
|
+
lowestPriceCurrency: z.ZodNullable<z.ZodString>;
|
|
80
|
+
salesStatus: z.ZodNullable<z.ZodString>;
|
|
81
|
+
heroImageUrl: z.ZodNullable<z.ZodString>;
|
|
82
|
+
refreshedAt: z.ZodString;
|
|
83
|
+
createdAt: z.ZodString;
|
|
84
|
+
updatedAt: z.ZodString;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
cruise: z.ZodUnknown;
|
|
87
|
+
sailings: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type StorefrontCruiseDetail = z.infer<typeof storefrontCruiseDetailSchema>["data"];
|
|
91
|
+
export interface UseStorefrontCruiseOptions {
|
|
92
|
+
enabled?: boolean;
|
|
93
|
+
}
|
|
94
|
+
export declare function useStorefrontCruise(slug: string | null | undefined, options?: UseStorefrontCruiseOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
95
|
+
source: "local" | "external";
|
|
96
|
+
sourceProvider: string | null;
|
|
97
|
+
sourceRef: Record<string, unknown> | null;
|
|
98
|
+
summary: {
|
|
99
|
+
id: string;
|
|
100
|
+
source: "local" | "external";
|
|
101
|
+
sourceProvider: string | null;
|
|
102
|
+
sourceRef: Record<string, unknown> | null;
|
|
103
|
+
localCruiseId: string | null;
|
|
104
|
+
slug: string;
|
|
105
|
+
name: string;
|
|
106
|
+
cruiseType: "ocean" | "river" | "expedition" | "coastal";
|
|
107
|
+
lineName: string;
|
|
108
|
+
shipName: string;
|
|
109
|
+
nights: number;
|
|
110
|
+
embarkPortName: string | null;
|
|
111
|
+
disembarkPortName: string | null;
|
|
112
|
+
regions: string[] | null;
|
|
113
|
+
themes: string[] | null;
|
|
114
|
+
earliestDeparture: string | null;
|
|
115
|
+
latestDeparture: string | null;
|
|
116
|
+
departureCount: number | null;
|
|
117
|
+
lowestPriceCents: number | null;
|
|
118
|
+
lowestPriceCurrency: string | null;
|
|
119
|
+
salesStatus: string | null;
|
|
120
|
+
heroImageUrl: string | null;
|
|
121
|
+
refreshedAt: string;
|
|
122
|
+
createdAt: string;
|
|
123
|
+
updatedAt: string;
|
|
124
|
+
};
|
|
125
|
+
cruise: unknown;
|
|
126
|
+
sailings?: unknown[] | undefined;
|
|
127
|
+
}, Error>;
|
|
128
|
+
declare const storefrontSailingSchema: z.ZodObject<{
|
|
129
|
+
data: z.ZodObject<{
|
|
130
|
+
source: z.ZodUnion<readonly [z.ZodLiteral<"local">, z.ZodLiteral<"external">]>;
|
|
131
|
+
sourceProvider: z.ZodOptional<z.ZodString>;
|
|
132
|
+
sailing: z.ZodUnknown;
|
|
133
|
+
pricing: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
sailingId: z.ZodString;
|
|
136
|
+
cabinCategoryId: z.ZodString;
|
|
137
|
+
occupancy: z.ZodNumber;
|
|
138
|
+
fareCode: z.ZodNullable<z.ZodString>;
|
|
139
|
+
fareCodeName: z.ZodNullable<z.ZodString>;
|
|
140
|
+
currency: z.ZodString;
|
|
141
|
+
pricePerPerson: z.ZodString;
|
|
142
|
+
secondGuestPricePerPerson: z.ZodNullable<z.ZodString>;
|
|
143
|
+
singleSupplementPercent: z.ZodNullable<z.ZodString>;
|
|
144
|
+
availability: z.ZodEnum<{
|
|
145
|
+
on_request: "on_request";
|
|
146
|
+
wait_list: "wait_list";
|
|
147
|
+
sold_out: "sold_out";
|
|
148
|
+
available: "available";
|
|
149
|
+
limited: "limited";
|
|
150
|
+
}>;
|
|
151
|
+
availabilityCount: z.ZodNullable<z.ZodNumber>;
|
|
152
|
+
priceCatalogId: z.ZodNullable<z.ZodString>;
|
|
153
|
+
priceScheduleId: z.ZodNullable<z.ZodString>;
|
|
154
|
+
bookingDeadline: z.ZodNullable<z.ZodString>;
|
|
155
|
+
requiresRequest: z.ZodBoolean;
|
|
156
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
157
|
+
externalRefs: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
158
|
+
lastSyncedAt: z.ZodNullable<z.ZodString>;
|
|
159
|
+
createdAt: z.ZodString;
|
|
160
|
+
updatedAt: z.ZodString;
|
|
161
|
+
}, z.core.$strip>>>;
|
|
162
|
+
itinerary: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
163
|
+
dayNumber: z.ZodNumber;
|
|
164
|
+
title: z.ZodNullable<z.ZodString>;
|
|
165
|
+
description: z.ZodNullable<z.ZodString>;
|
|
166
|
+
portFacilityId: z.ZodNullable<z.ZodString>;
|
|
167
|
+
arrivalTime: z.ZodNullable<z.ZodString>;
|
|
168
|
+
departureTime: z.ZodNullable<z.ZodString>;
|
|
169
|
+
isOvernight: z.ZodBoolean;
|
|
170
|
+
isSeaDay: z.ZodBoolean;
|
|
171
|
+
isExpeditionLanding: z.ZodBoolean;
|
|
172
|
+
isSkipped: z.ZodBoolean;
|
|
173
|
+
meals: z.ZodOptional<z.ZodObject<{
|
|
174
|
+
breakfast: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
lunch: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
dinner: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
hasOverride: z.ZodBoolean;
|
|
179
|
+
}, z.core.$strip>>>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export type StorefrontSailingDetail = z.infer<typeof storefrontSailingSchema>["data"];
|
|
183
|
+
export declare function useStorefrontSailing(key: string | null | undefined, options?: UseStorefrontCruiseOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
184
|
+
source: "local" | "external";
|
|
185
|
+
sailing: unknown;
|
|
186
|
+
sourceProvider?: string | undefined;
|
|
187
|
+
pricing?: {
|
|
188
|
+
id: string;
|
|
189
|
+
sailingId: string;
|
|
190
|
+
cabinCategoryId: string;
|
|
191
|
+
occupancy: number;
|
|
192
|
+
fareCode: string | null;
|
|
193
|
+
fareCodeName: string | null;
|
|
194
|
+
currency: string;
|
|
195
|
+
pricePerPerson: string;
|
|
196
|
+
secondGuestPricePerPerson: string | null;
|
|
197
|
+
singleSupplementPercent: string | null;
|
|
198
|
+
availability: "on_request" | "wait_list" | "sold_out" | "available" | "limited";
|
|
199
|
+
availabilityCount: number | null;
|
|
200
|
+
priceCatalogId: string | null;
|
|
201
|
+
priceScheduleId: string | null;
|
|
202
|
+
bookingDeadline: string | null;
|
|
203
|
+
requiresRequest: boolean;
|
|
204
|
+
notes: string | null;
|
|
205
|
+
externalRefs: Record<string, string> | null;
|
|
206
|
+
lastSyncedAt: string | null;
|
|
207
|
+
createdAt: string;
|
|
208
|
+
updatedAt: string;
|
|
209
|
+
}[] | undefined;
|
|
210
|
+
itinerary?: {
|
|
211
|
+
dayNumber: number;
|
|
212
|
+
title: string | null;
|
|
213
|
+
description: string | null;
|
|
214
|
+
portFacilityId: string | null;
|
|
215
|
+
arrivalTime: string | null;
|
|
216
|
+
departureTime: string | null;
|
|
217
|
+
isOvernight: boolean;
|
|
218
|
+
isSeaDay: boolean;
|
|
219
|
+
isExpeditionLanding: boolean;
|
|
220
|
+
isSkipped: boolean;
|
|
221
|
+
hasOverride: boolean;
|
|
222
|
+
meals?: {
|
|
223
|
+
breakfast?: boolean | undefined;
|
|
224
|
+
lunch?: boolean | undefined;
|
|
225
|
+
dinner?: boolean | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
}[] | undefined;
|
|
228
|
+
}, Error>;
|
|
229
|
+
export {};
|
|
230
|
+
//# sourceMappingURL=use-storefront.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAU/E,MAAM,WAAW,2BAA4B,SAAQ,qBAAqB;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,2BAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAO7E;AAID,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASjC,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAA;AAEzF,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,OAAO,GAAE,0BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgBzC;AAGD,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ5B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAA;AAErF,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,OAAO,GAAE,0BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAgBzC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useQuery } from "@tanstack/react-query";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantCruisesContext } from "../provider.js";
|
|
5
|
+
import { cruisesQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { getStorefrontCruisesQueryOptions } from "../query-options.js";
|
|
7
|
+
import { cruiseSourceSchema, effectiveItineraryDaySchema, priceRecordSchema, searchIndexEntrySchema, singleEnvelope, } from "../schemas.js";
|
|
8
|
+
/**
|
|
9
|
+
* Storefront catalog browse — paginated, filterable, reads from
|
|
10
|
+
* cruise_search_index on the server. Mixes local and external entries
|
|
11
|
+
* with provenance markers so the UI can render an "External" badge.
|
|
12
|
+
*/
|
|
13
|
+
export function useStorefrontCruises(options = {}) {
|
|
14
|
+
const { baseUrl, fetcher } = useVoyantCruisesContext();
|
|
15
|
+
const { enabled = true, ...filters } = options;
|
|
16
|
+
return useQuery({
|
|
17
|
+
...getStorefrontCruisesQueryOptions({ baseUrl, fetcher }, filters),
|
|
18
|
+
enabled,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
// Cruise detail — wraps the rich storefront detail payload that includes
|
|
22
|
+
// the index summary plus the source-resolved cruise + sailings.
|
|
23
|
+
const storefrontCruiseDetailSchema = singleEnvelope(z.object({
|
|
24
|
+
source: cruiseSourceSchema,
|
|
25
|
+
sourceProvider: z.string().nullable(),
|
|
26
|
+
sourceRef: z.record(z.string(), z.unknown()).nullable(),
|
|
27
|
+
summary: searchIndexEntrySchema,
|
|
28
|
+
cruise: z.unknown(),
|
|
29
|
+
sailings: z.array(z.unknown()).optional(),
|
|
30
|
+
}));
|
|
31
|
+
export function useStorefrontCruise(slug, options = {}) {
|
|
32
|
+
const { baseUrl, fetcher } = useVoyantCruisesContext();
|
|
33
|
+
const { enabled = true } = options;
|
|
34
|
+
return useQuery({
|
|
35
|
+
queryKey: cruisesQueryKeys.storefrontCruise(slug ?? ""),
|
|
36
|
+
queryFn: async () => {
|
|
37
|
+
const result = await fetchWithValidation(`/v1/public/cruises/${encodeURIComponent(slug ?? "")}`, storefrontCruiseDetailSchema, { baseUrl, fetcher });
|
|
38
|
+
return result.data;
|
|
39
|
+
},
|
|
40
|
+
enabled: enabled && !!slug,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// Sailing detail — accepts both local TypeIDs and `<provider>:<ref>` keys.
|
|
44
|
+
const storefrontSailingSchema = singleEnvelope(z.object({
|
|
45
|
+
source: z.union([z.literal("local"), z.literal("external")]),
|
|
46
|
+
sourceProvider: z.string().optional(),
|
|
47
|
+
sailing: z.unknown(),
|
|
48
|
+
pricing: z.array(priceRecordSchema).optional(),
|
|
49
|
+
itinerary: z.array(effectiveItineraryDaySchema).optional(),
|
|
50
|
+
}));
|
|
51
|
+
export function useStorefrontSailing(key, options = {}) {
|
|
52
|
+
const { baseUrl, fetcher } = useVoyantCruisesContext();
|
|
53
|
+
const { enabled = true } = options;
|
|
54
|
+
return useQuery({
|
|
55
|
+
queryKey: cruisesQueryKeys.storefrontSailing(key ?? ""),
|
|
56
|
+
queryFn: async () => {
|
|
57
|
+
const result = await fetchWithValidation(`/v1/public/cruises/sailings/${encodeURIComponent(key ?? "")}`, storefrontSailingSchema, { baseUrl, fetcher });
|
|
58
|
+
return result.data;
|
|
59
|
+
},
|
|
60
|
+
enabled: enabled && !!key,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEtD,eAAO,MAAM,WAAW,EAAE,iBA8EzB,CAAA"}
|
package/dist/i18n/en.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const cruisesUiEn = {
|
|
2
|
+
common: {
|
|
3
|
+
fallbackCurrencyAmount: "{currency} {amount}",
|
|
4
|
+
occupancyTableLabels: {
|
|
5
|
+
single: "Single",
|
|
6
|
+
double: "Double",
|
|
7
|
+
triple: "Triple",
|
|
8
|
+
quad: "Quad",
|
|
9
|
+
fallback: "{count}-occupancy",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
catalogCard: {
|
|
13
|
+
untitled: "Untitled sailing",
|
|
14
|
+
priceFrom: "from {amount}",
|
|
15
|
+
nightsSingular: "{count} night",
|
|
16
|
+
nightsPlural: "{count} nights",
|
|
17
|
+
},
|
|
18
|
+
enrichmentProgramList: {
|
|
19
|
+
loading: "Loading enrichment programs…",
|
|
20
|
+
empty: "No enrichment programs published for this cruise.",
|
|
21
|
+
avatarFallback: "?",
|
|
22
|
+
kindLabels: {
|
|
23
|
+
naturalist: "Naturalist",
|
|
24
|
+
historian: "Historian",
|
|
25
|
+
photographer: "Photographer",
|
|
26
|
+
lecturer: "Lecturer",
|
|
27
|
+
expert: "Expert",
|
|
28
|
+
other: "Specialist",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
externalCruiseBadge: {
|
|
32
|
+
title: "Sourced via {sourceProvider}",
|
|
33
|
+
label: "External · {sourceProvider}",
|
|
34
|
+
},
|
|
35
|
+
pricingGrid: {
|
|
36
|
+
empty: "No pricing published for this sailing.",
|
|
37
|
+
cabinCategory: "Cabin category",
|
|
38
|
+
perPerson: "per person",
|
|
39
|
+
availabilityLabels: {
|
|
40
|
+
available: "Available",
|
|
41
|
+
limited: "Limited",
|
|
42
|
+
on_request: "On request",
|
|
43
|
+
wait_list: "Wait list",
|
|
44
|
+
sold_out: "Sold out",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
quoteDisplay: {
|
|
48
|
+
heading: "Your quote",
|
|
49
|
+
guestLabelSingular: "guest",
|
|
50
|
+
guestLabelPlural: "guests",
|
|
51
|
+
occupancyCabin: "{count}-occupancy cabin",
|
|
52
|
+
guestSummary: "for {guestCount} {guestLabel} ({occupancyLabel})",
|
|
53
|
+
baseLine: "Base · {price} pp × {guestCount}",
|
|
54
|
+
sections: {
|
|
55
|
+
additions: "Additions",
|
|
56
|
+
credits: "Credits",
|
|
57
|
+
included: "Included",
|
|
58
|
+
},
|
|
59
|
+
componentKindLabels: {
|
|
60
|
+
gratuity: "Gratuity",
|
|
61
|
+
onboard_credit: "Onboard credit",
|
|
62
|
+
port_charge: "Port charges",
|
|
63
|
+
tax: "Tax",
|
|
64
|
+
ncf: "Non-comm fees",
|
|
65
|
+
airfare: "Airfare",
|
|
66
|
+
transfer: "Transfer",
|
|
67
|
+
insurance: "Insurance",
|
|
68
|
+
},
|
|
69
|
+
componentScope: {
|
|
70
|
+
perPerson: "per person",
|
|
71
|
+
perCabin: "per cabin",
|
|
72
|
+
},
|
|
73
|
+
includedAmount: "Included",
|
|
74
|
+
totals: {
|
|
75
|
+
perPerson: "Per person",
|
|
76
|
+
totalForCabin: "Total for cabin",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { cruisesUiEn } from "./en.js";
|
|
2
|
+
export type { CruisePriceAvailability, CruiseQuoteComponentKind, CruisesUiMessages, EnrichmentProgramKind, } from "./messages.js";
|
|
3
|
+
export { type CruisesUiMessageOverrides, CruisesUiMessagesProvider, cruisesUiMessageDefinitions, getCruisesUiI18n, resolveCruisesUiMessages, useCruisesUiI18n, useCruisesUiI18nOrDefault, useCruisesUiMessages, useCruisesUiMessagesOrDefault, } from "./provider.js";
|
|
4
|
+
export { cruisesUiRo } from "./ro.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,yBAAyB,EAC9B,yBAAyB,EACzB,2BAA2B,EAC3B,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { cruisesUiEn } from "./en.js";
|
|
2
|
+
export { CruisesUiMessagesProvider, cruisesUiMessageDefinitions, getCruisesUiI18n, resolveCruisesUiMessages, useCruisesUiI18n, useCruisesUiI18nOrDefault, useCruisesUiMessages, useCruisesUiMessagesOrDefault, } from "./provider.js";
|
|
3
|
+
export { cruisesUiRo } from "./ro.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { EnrichmentProgramRecord, PriceRecord, Quote } from "../index.js";
|
|
2
|
+
export type EnrichmentProgramKind = EnrichmentProgramRecord["kind"];
|
|
3
|
+
export type CruisePriceAvailability = PriceRecord["availability"];
|
|
4
|
+
export type CruiseQuoteComponentKind = Quote["components"][number]["kind"];
|
|
5
|
+
export type CruisesUiMessages = {
|
|
6
|
+
common: {
|
|
7
|
+
fallbackCurrencyAmount: string;
|
|
8
|
+
occupancyTableLabels: {
|
|
9
|
+
single: string;
|
|
10
|
+
double: string;
|
|
11
|
+
triple: string;
|
|
12
|
+
quad: string;
|
|
13
|
+
fallback: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
catalogCard: {
|
|
17
|
+
untitled: string;
|
|
18
|
+
priceFrom: string;
|
|
19
|
+
nightsSingular: string;
|
|
20
|
+
nightsPlural: string;
|
|
21
|
+
};
|
|
22
|
+
enrichmentProgramList: {
|
|
23
|
+
loading: string;
|
|
24
|
+
empty: string;
|
|
25
|
+
avatarFallback: string;
|
|
26
|
+
kindLabels: Record<EnrichmentProgramKind, string>;
|
|
27
|
+
};
|
|
28
|
+
externalCruiseBadge: {
|
|
29
|
+
title: string;
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
|
32
|
+
pricingGrid: {
|
|
33
|
+
empty: string;
|
|
34
|
+
cabinCategory: string;
|
|
35
|
+
perPerson: string;
|
|
36
|
+
availabilityLabels: Record<CruisePriceAvailability, string>;
|
|
37
|
+
};
|
|
38
|
+
quoteDisplay: {
|
|
39
|
+
heading: string;
|
|
40
|
+
guestLabelSingular: string;
|
|
41
|
+
guestLabelPlural: string;
|
|
42
|
+
occupancyCabin: string;
|
|
43
|
+
guestSummary: string;
|
|
44
|
+
baseLine: string;
|
|
45
|
+
sections: {
|
|
46
|
+
additions: string;
|
|
47
|
+
credits: string;
|
|
48
|
+
included: string;
|
|
49
|
+
};
|
|
50
|
+
componentKindLabels: Record<CruiseQuoteComponentKind, string>;
|
|
51
|
+
componentScope: {
|
|
52
|
+
perPerson: string;
|
|
53
|
+
perCabin: string;
|
|
54
|
+
};
|
|
55
|
+
includedAmount: string;
|
|
56
|
+
totals: {
|
|
57
|
+
perPerson: string;
|
|
58
|
+
totalForCabin: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAE9E,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAA;AACnE,MAAM,MAAM,uBAAuB,GAAG,WAAW,CAAC,cAAc,CAAC,CAAA;AACjE,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE;QACN,sBAAsB,EAAE,MAAM,CAAA;QAC9B,oBAAoB,EAAE;YACpB,MAAM,EAAE,MAAM,CAAA;YACd,MAAM,EAAE,MAAM,CAAA;YACd,MAAM,EAAE,MAAM,CAAA;YACd,IAAI,EAAE,MAAM,CAAA;YACZ,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;KACF,CAAA;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;QAChB,SAAS,EAAE,MAAM,CAAA;QACjB,cAAc,EAAE,MAAM,CAAA;QACtB,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,qBAAqB,EAAE;QACrB,OAAO,EAAE,MAAM,CAAA;QACf,KAAK,EAAE,MAAM,CAAA;QACb,cAAc,EAAE,MAAM,CAAA;QACtB,UAAU,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAA;KAClD,CAAA;IACD,mBAAmB,EAAE;QACnB,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,CAAA;QACb,aAAa,EAAE,MAAM,CAAA;QACrB,SAAS,EAAE,MAAM,CAAA;QACjB,kBAAkB,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAA;KAC5D,CAAA;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,kBAAkB,EAAE,MAAM,CAAA;QAC1B,gBAAgB,EAAE,MAAM,CAAA;QACxB,cAAc,EAAE,MAAM,CAAA;QACtB,YAAY,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE;YACR,SAAS,EAAE,MAAM,CAAA;YACjB,OAAO,EAAE,MAAM,CAAA;YACf,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;QACD,mBAAmB,EAAE,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAA;QAC7D,cAAc,EAAE;YACd,SAAS,EAAE,MAAM,CAAA;YACjB,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;QACD,cAAc,EAAE,MAAM,CAAA;QACtB,MAAM,EAAE;YACN,SAAS,EAAE,MAAM,CAAA;YACjB,aAAa,EAAE,MAAM,CAAA;SACtB,CAAA;KACF,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type LocaleMessageOverrides, type PackageI18nValue } from "@voyant-travel/i18n";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { CruisesUiMessages } from "./messages.js";
|
|
4
|
+
export declare const cruisesUiMessageDefinitions: {
|
|
5
|
+
en: CruisesUiMessages;
|
|
6
|
+
ro: CruisesUiMessages;
|
|
7
|
+
};
|
|
8
|
+
export type CruisesUiMessageOverrides = LocaleMessageOverrides<CruisesUiMessages>;
|
|
9
|
+
export declare function resolveCruisesUiMessages({ locale, overrides, }: {
|
|
10
|
+
locale: string | null | undefined;
|
|
11
|
+
overrides?: CruisesUiMessageOverrides | null;
|
|
12
|
+
}): CruisesUiMessages;
|
|
13
|
+
export declare function getCruisesUiI18n({ locale, overrides, }: {
|
|
14
|
+
locale?: string | null | undefined;
|
|
15
|
+
overrides?: CruisesUiMessageOverrides | null;
|
|
16
|
+
}): PackageI18nValue<CruisesUiMessages>;
|
|
17
|
+
export declare function CruisesUiMessagesProvider({ children, locale, overrides, }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
locale: string | null | undefined;
|
|
20
|
+
overrides?: CruisesUiMessageOverrides | null;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const useCruisesUiI18n: () => PackageI18nValue<CruisesUiMessages>;
|
|
23
|
+
export declare const useCruisesUiMessages: () => CruisesUiMessages;
|
|
24
|
+
export declare function useCruisesUiI18nOrDefault(): PackageI18nValue<CruisesUiMessages>;
|
|
25
|
+
export declare function useCruisesUiMessagesOrDefault(): CruisesUiMessages;
|
|
26
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/i18n/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAKtD,eAAO,MAAM,2BAA2B;;;CAGe,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG,sBAAsB,CAAC,iBAAiB,CAAC,CAAA;AASjF,wBAAgB,wBAAwB,CAAC,EACvC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,qBAOA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAClC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,GAAG,gBAAgB,CAAC,iBAAiB,CAAC,CAStC;AAED,wBAAgB,yBAAyB,CAAC,EACxC,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAA;CAC7C,2CAWA;AAED,eAAO,MAAM,gBAAgB,2CAA2B,CAAA;AACxD,eAAO,MAAM,oBAAoB,yBAA+B,CAAA;AAEhE,wBAAgB,yBAAyB,wCAExC;AAED,wBAAgB,6BAA6B,sBAE5C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createLocaleFormatters, createPackageMessagesContext, resolvePackageMessages, } from "@voyant-travel/i18n";
|
|
4
|
+
import { cruisesUiEn } from "./en.js";
|
|
5
|
+
import { cruisesUiRo } from "./ro.js";
|
|
6
|
+
const fallbackLocale = "en";
|
|
7
|
+
export const cruisesUiMessageDefinitions = {
|
|
8
|
+
en: cruisesUiEn,
|
|
9
|
+
ro: cruisesUiRo,
|
|
10
|
+
};
|
|
11
|
+
const cruisesUiContext = createPackageMessagesContext("CruisesUiMessages");
|
|
12
|
+
const defaultCruisesUiI18n = {
|
|
13
|
+
messages: cruisesUiEn,
|
|
14
|
+
...createLocaleFormatters(fallbackLocale),
|
|
15
|
+
};
|
|
16
|
+
export function resolveCruisesUiMessages({ locale, overrides, }) {
|
|
17
|
+
return resolvePackageMessages({
|
|
18
|
+
definitions: cruisesUiMessageDefinitions,
|
|
19
|
+
fallbackLocale,
|
|
20
|
+
locale,
|
|
21
|
+
overrides,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export function getCruisesUiI18n({ locale, overrides, }) {
|
|
25
|
+
const resolvedLocale = locale ?? fallbackLocale;
|
|
26
|
+
return {
|
|
27
|
+
messages: resolveCruisesUiMessages({
|
|
28
|
+
locale: resolvedLocale,
|
|
29
|
+
overrides,
|
|
30
|
+
}),
|
|
31
|
+
...createLocaleFormatters(resolvedLocale),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function CruisesUiMessagesProvider({ children, locale, overrides, }) {
|
|
35
|
+
return (_jsx(cruisesUiContext.ResolvedMessagesProvider, { definitions: cruisesUiMessageDefinitions, fallbackLocale: fallbackLocale, locale: locale, overrides: overrides, children: children }));
|
|
36
|
+
}
|
|
37
|
+
export const useCruisesUiI18n = cruisesUiContext.useI18n;
|
|
38
|
+
export const useCruisesUiMessages = cruisesUiContext.useMessages;
|
|
39
|
+
export function useCruisesUiI18nOrDefault() {
|
|
40
|
+
return cruisesUiContext.useOptionalI18n() ?? defaultCruisesUiI18n;
|
|
41
|
+
}
|
|
42
|
+
export function useCruisesUiMessagesOrDefault() {
|
|
43
|
+
return useCruisesUiI18nOrDefault().messages;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAEtD,eAAO,MAAM,WAAW,EAAE,iBA8EzB,CAAA"}
|
package/dist/i18n/ro.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const cruisesUiRo = {
|
|
2
|
+
common: {
|
|
3
|
+
fallbackCurrencyAmount: "{currency} {amount}",
|
|
4
|
+
occupancyTableLabels: {
|
|
5
|
+
single: "Single",
|
|
6
|
+
double: "Dubla",
|
|
7
|
+
triple: "Tripla",
|
|
8
|
+
quad: "Cvadrupla",
|
|
9
|
+
fallback: "{count} locuri",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
catalogCard: {
|
|
13
|
+
untitled: "Croaziera fara nume",
|
|
14
|
+
priceFrom: "de la {amount}",
|
|
15
|
+
nightsSingular: "{count} noapte",
|
|
16
|
+
nightsPlural: "{count} nopti",
|
|
17
|
+
},
|
|
18
|
+
enrichmentProgramList: {
|
|
19
|
+
loading: "Se incarca programele de imbogatire…",
|
|
20
|
+
empty: "Nu exista programe de imbogatire publicate pentru aceasta croaziera.",
|
|
21
|
+
avatarFallback: "?",
|
|
22
|
+
kindLabels: {
|
|
23
|
+
naturalist: "Naturalist",
|
|
24
|
+
historian: "Istoric",
|
|
25
|
+
photographer: "Fotograf",
|
|
26
|
+
lecturer: "Lector",
|
|
27
|
+
expert: "Expert",
|
|
28
|
+
other: "Specialist",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
externalCruiseBadge: {
|
|
32
|
+
title: "Preluat prin {sourceProvider}",
|
|
33
|
+
label: "Extern · {sourceProvider}",
|
|
34
|
+
},
|
|
35
|
+
pricingGrid: {
|
|
36
|
+
empty: "Nu exista tarife publicate pentru aceasta plecare.",
|
|
37
|
+
cabinCategory: "Categoria cabinei",
|
|
38
|
+
perPerson: "de persoana",
|
|
39
|
+
availabilityLabels: {
|
|
40
|
+
available: "Disponibil",
|
|
41
|
+
limited: "Limitat",
|
|
42
|
+
on_request: "La cerere",
|
|
43
|
+
wait_list: "Lista de asteptare",
|
|
44
|
+
sold_out: "Epuizat",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
quoteDisplay: {
|
|
48
|
+
heading: "Oferta ta",
|
|
49
|
+
guestLabelSingular: "pasager",
|
|
50
|
+
guestLabelPlural: "pasageri",
|
|
51
|
+
occupancyCabin: "cabina pentru {count} persoane",
|
|
52
|
+
guestSummary: "pentru {guestCount} {guestLabel} ({occupancyLabel})",
|
|
53
|
+
baseLine: "Baza · {price} pp × {guestCount}",
|
|
54
|
+
sections: {
|
|
55
|
+
additions: "Costuri suplimentare",
|
|
56
|
+
credits: "Credite",
|
|
57
|
+
included: "Inclus",
|
|
58
|
+
},
|
|
59
|
+
componentKindLabels: {
|
|
60
|
+
gratuity: "Bacsis",
|
|
61
|
+
onboard_credit: "Credit la bord",
|
|
62
|
+
port_charge: "Taxe portuare",
|
|
63
|
+
tax: "Taxa",
|
|
64
|
+
ncf: "Taxe necomisionabile",
|
|
65
|
+
airfare: "Bilet de avion",
|
|
66
|
+
transfer: "Transfer",
|
|
67
|
+
insurance: "Asigurare",
|
|
68
|
+
},
|
|
69
|
+
componentScope: {
|
|
70
|
+
perPerson: "de persoana",
|
|
71
|
+
perCabin: "pe cabina",
|
|
72
|
+
},
|
|
73
|
+
includedAmount: "Inclus",
|
|
74
|
+
totals: {
|
|
75
|
+
perPerson: "Per persoana",
|
|
76
|
+
totalForCabin: "Total pentru cabina",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { defaultFetcher, type FetchWithValidationOptions, fetchWithValidation, VoyantApiError, type VoyantFetcher, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { useVoyantCruisesContext, type VoyantCruisesContextValue, VoyantCruisesProvider, type VoyantCruisesProviderProps, } from "./provider.js";
|
|
4
|
+
export { type CruisesListFilters, cruisesQueryKeys, type PricesListFilters, type SailingsListFilters, type ShipsListFilters, type StorefrontListFilters, } from "./query-keys.js";
|
|
5
|
+
export { getCategoryCabinsQueryOptions, getCruiseQueryOptions, getCruisesQueryOptions, getEffectiveItineraryQueryOptions, getEnrichmentProgramsQueryOptions, getPricesQueryOptions, getSailingQueryOptions, getSailingsQueryOptions, getShipCategoriesQueryOptions, getShipDecksQueryOptions, getShipQueryOptions, getShipsQueryOptions, getStorefrontCruisesQueryOptions, } from "./query-options.js";
|
|
6
|
+
export * from "./schemas.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,0BAA0B,EAC/B,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,uBAAuB,EACvB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,iCAAiC,EACjC,iCAAiC,EACjC,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,gCAAgC,GACjC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { defaultFetcher, fetchWithValidation, VoyantApiError, } from "./client.js";
|
|
2
|
+
export * from "./hooks/index.js";
|
|
3
|
+
export { useVoyantCruisesContext, VoyantCruisesProvider, } from "./provider.js";
|
|
4
|
+
export { cruisesQueryKeys, } from "./query-keys.js";
|
|
5
|
+
export { getCategoryCabinsQueryOptions, getCruiseQueryOptions, getCruisesQueryOptions, getEffectiveItineraryQueryOptions, getEnrichmentProgramsQueryOptions, getPricesQueryOptions, getSailingQueryOptions, getSailingsQueryOptions, getShipCategoriesQueryOptions, getShipDecksQueryOptions, getShipQueryOptions, getShipsQueryOptions, getStorefrontCruisesQueryOptions, } from "./query-options.js";
|
|
6
|
+
export * from "./schemas.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { useVoyantReactContext as useVoyantCruisesContext, type VoyantReactContextValue as VoyantCruisesContextValue, VoyantReactProvider as VoyantCruisesProvider, type VoyantReactProviderProps as VoyantCruisesProviderProps, } from "@voyant-travel/react";
|
|
2
|
+
//# sourceMappingURL=provider.d.ts.map
|