@voyant-travel/bookings-react 0.141.2 → 0.142.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-panel.d.ts","sourceRoot":"","sources":["../../../src/journey/components/side-panel.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAiB,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AACnF,OAAO,KAAK,EAAwB,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEpF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,SAAS,EACT,aAAa,EACb,aAAa,EACb,WAAW,EACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,SAAS,EACT,aAAa,GACd,EAAE,cAAc,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;kDAC8C;IAC9C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAChC,GAAG,KAAK,CAAC,YAAY,CA2FrB;AAoFD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAC3C,QAAQ,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,GAC1D,MAAM,
|
|
1
|
+
{"version":3,"file":"side-panel.d.ts","sourceRoot":"","sources":["../../../src/journey/components/side-panel.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAiB,8BAA8B,EAAE,MAAM,qBAAqB,CAAA;AACnF,OAAO,KAAK,EAAwB,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEpF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,SAAS,EACT,aAAa,EACb,aAAa,EACb,WAAW,EACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,SAAS,EACT,aAAa,GACd,EAAE,cAAc,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;kDAC8C;IAC9C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAChC,GAAG,KAAK,CAAC,YAAY,CA2FrB;AAoFD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAC3C,QAAQ,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,GAC1D,MAAM,CAmER"}
|
|
@@ -63,7 +63,7 @@ export function stepHeadline(step, draft, messages) {
|
|
|
63
63
|
case "departure": {
|
|
64
64
|
const range = draft.configure?.dateRange;
|
|
65
65
|
if (range?.checkIn && range?.checkOut)
|
|
66
|
-
return `${range.checkIn} → ${range.checkOut}`;
|
|
66
|
+
return `${formatConfigureDate(range.checkIn)} → ${formatConfigureDate(range.checkOut)}`;
|
|
67
67
|
// Never surface the raw slot id — show the departure date.
|
|
68
68
|
return draft.configure?.departureDate
|
|
69
69
|
? formatConfigureDate(draft.configure.departureDate)
|
|
@@ -149,7 +149,7 @@ function DepartureDetails({ draft, }) {
|
|
|
149
149
|
const messages = useBookingsUiMessagesOrDefault();
|
|
150
150
|
const cfg = draft.configure ?? {};
|
|
151
151
|
const range = cfg.dateRange;
|
|
152
|
-
return (_jsxs("dl", { className: "space-y-1 text-xs", children: [cfg.departureDate ? (_jsx(Row, { label: messages.bookingJourney.sidePanel.departure, value: formatConfigureDate(cfg.departureDate) })) : null, range?.checkIn ? (_jsx(Row, { label: messages.bookingJourney.sidePanel.checkIn, value: range.checkIn })) : null, range?.checkOut ? (_jsx(Row, { label: messages.bookingJourney.sidePanel.checkOut, value: range.checkOut })) : null] }));
|
|
152
|
+
return (_jsxs("dl", { className: "space-y-1 text-xs", children: [cfg.departureDate ? (_jsx(Row, { label: messages.bookingJourney.sidePanel.departure, value: formatConfigureDate(cfg.departureDate) })) : null, range?.checkIn ? (_jsx(Row, { label: messages.bookingJourney.sidePanel.checkIn, value: formatConfigureDate(range.checkIn) })) : null, range?.checkOut ? (_jsx(Row, { label: messages.bookingJourney.sidePanel.checkOut, value: formatConfigureDate(range.checkOut) })) : null] }));
|
|
153
153
|
}
|
|
154
154
|
function OptionsDetails({ draft, }) {
|
|
155
155
|
const messages = useBookingsUiMessagesOrDefault();
|
|
@@ -239,9 +239,13 @@ function formatConfigureDate(iso) {
|
|
|
239
239
|
const date = new Date(iso);
|
|
240
240
|
if (Number.isNaN(date.getTime()))
|
|
241
241
|
return iso;
|
|
242
|
+
// Date-only strings parse as UTC midnight; render them in UTC so the
|
|
243
|
+
// calendar date is not shifted for viewers in timezones west of UTC.
|
|
244
|
+
const timeZone = /^\d{4}-\d{2}-\d{2}$/.test(iso) ? "UTC" : undefined;
|
|
242
245
|
return new Intl.DateTimeFormat(undefined, {
|
|
243
246
|
year: "numeric",
|
|
244
247
|
month: "short",
|
|
245
248
|
day: "numeric",
|
|
249
|
+
timeZone,
|
|
246
250
|
}).format(date);
|
|
247
251
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/bookings-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.142.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -146,17 +146,17 @@
|
|
|
146
146
|
"react-hook-form": "^7.80.0",
|
|
147
147
|
"zod": "^4.0.0",
|
|
148
148
|
"@voyant-travel/admin": "^0.116.0",
|
|
149
|
-
"@voyant-travel/bookings": "^0.
|
|
150
|
-
"@voyant-travel/
|
|
151
|
-
"@voyant-travel/
|
|
152
|
-
"@voyant-travel/
|
|
153
|
-
"@voyant-travel/
|
|
154
|
-
"@voyant-travel/
|
|
155
|
-
"@voyant-travel/
|
|
149
|
+
"@voyant-travel/bookings": "^0.142.0",
|
|
150
|
+
"@voyant-travel/catalog-react": "^0.140.0",
|
|
151
|
+
"@voyant-travel/distribution-react": "^0.132.0",
|
|
152
|
+
"@voyant-travel/relationships-react": "^0.142.0",
|
|
153
|
+
"@voyant-travel/finance-react": "^0.142.0",
|
|
154
|
+
"@voyant-travel/identity-react": "^0.142.0",
|
|
155
|
+
"@voyant-travel/legal-react": "^0.142.0",
|
|
156
|
+
"@voyant-travel/commerce-react": "^0.24.0",
|
|
157
|
+
"@voyant-travel/inventory-react": "^0.24.0",
|
|
156
158
|
"@voyant-travel/ui": "^0.108.10",
|
|
157
|
-
"@voyant-travel/
|
|
158
|
-
"@voyant-travel/inventory-react": "^0.23.1",
|
|
159
|
-
"@voyant-travel/operations-react": "^0.22.0"
|
|
159
|
+
"@voyant-travel/operations-react": "^0.23.0"
|
|
160
160
|
},
|
|
161
161
|
"peerDependenciesMeta": {
|
|
162
162
|
"@tanstack/react-table": {
|
|
@@ -204,10 +204,10 @@
|
|
|
204
204
|
},
|
|
205
205
|
"dependencies": {
|
|
206
206
|
"sonner": "^2.0.7",
|
|
207
|
+
"@voyant-travel/catalog-contracts": "^0.108.2",
|
|
207
208
|
"@voyant-travel/i18n": "^0.110.0",
|
|
208
|
-
"@voyant-travel/types": "^0.107.0",
|
|
209
209
|
"@voyant-travel/react": "^0.104.1",
|
|
210
|
-
"@voyant-travel/
|
|
210
|
+
"@voyant-travel/types": "^0.107.0"
|
|
211
211
|
},
|
|
212
212
|
"devDependencies": {
|
|
213
213
|
"@tanstack/react-query": "^5.101.2",
|
|
@@ -223,19 +223,19 @@
|
|
|
223
223
|
"vitest": "^4.1.9",
|
|
224
224
|
"zod": "^4.4.3",
|
|
225
225
|
"@voyant-travel/admin": "^0.116.0",
|
|
226
|
-
"@voyant-travel/
|
|
227
|
-
"@voyant-travel/
|
|
228
|
-
"@voyant-travel/
|
|
229
|
-
"@voyant-travel/
|
|
230
|
-
"@voyant-travel/
|
|
231
|
-
"@voyant-travel/
|
|
232
|
-
"@voyant-travel/
|
|
233
|
-
"@voyant-travel/
|
|
226
|
+
"@voyant-travel/bookings": "^0.142.0",
|
|
227
|
+
"@voyant-travel/catalog-react": "^0.140.0",
|
|
228
|
+
"@voyant-travel/distribution-react": "^0.132.0",
|
|
229
|
+
"@voyant-travel/relationships-react": "^0.142.0",
|
|
230
|
+
"@voyant-travel/finance-react": "^0.142.0",
|
|
231
|
+
"@voyant-travel/identity-react": "^0.142.0",
|
|
232
|
+
"@voyant-travel/legal-react": "^0.142.0",
|
|
233
|
+
"@voyant-travel/commerce-react": "^0.24.0",
|
|
234
|
+
"@voyant-travel/inventory-react": "^0.24.0",
|
|
234
235
|
"@voyant-travel/react": "^0.104.1",
|
|
235
236
|
"@voyant-travel/ui": "^0.108.10",
|
|
236
237
|
"@voyant-travel/voyant-typescript-config": "^0.1.0",
|
|
237
|
-
"@voyant-travel/
|
|
238
|
-
"@voyant-travel/operations-react": "^0.22.0"
|
|
238
|
+
"@voyant-travel/operations-react": "^0.23.0"
|
|
239
239
|
},
|
|
240
240
|
"files": [
|
|
241
241
|
"dist",
|