From 490013be627f7ce1d9f0ffa3ced26e1443b7c277 Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Wed, 24 Sep 2025 07:48:24 +0000 Subject: [PATCH] Merged in chore/sw-3474-remove-unused-booking-flow-exports (pull request #2858) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit chore: (SW-3474): Remove unused exports from booking-flow * Remove unused exports from booking-flow Approved-by: Joakim Jäderberg --- .../hotelreservation/[...paths]/loading.tsx | 2 +- .../(standard)/alternative-hotels/loading.tsx | 4 ++-- .../(standard)/select-hotel/loading.tsx | 4 ++-- .../(standard)/select-rate/loading.tsx | 4 ++-- .../hotelreservation/[...paths]/loading.tsx | 2 +- .../lib/components/BookingWidget/index.tsx | 2 ++ .../booking-flow/lib/pages/AlternativeHotelsPage.tsx | 2 ++ packages/booking-flow/lib/pages/SelectHotelPage.tsx | 2 ++ packages/booking-flow/lib/pages/SelectRatePage.tsx | 2 ++ packages/booking-flow/package.json | 12 ------------ 10 files changed, 16 insertions(+), 20 deletions(-) diff --git a/apps/partner-sas/app/[lang]/@bookingwidget/hotelreservation/[...paths]/loading.tsx b/apps/partner-sas/app/[lang]/@bookingwidget/hotelreservation/[...paths]/loading.tsx index 59cbf2505..e06bc80f5 100644 --- a/apps/partner-sas/app/[lang]/@bookingwidget/hotelreservation/[...paths]/loading.tsx +++ b/apps/partner-sas/app/[lang]/@bookingwidget/hotelreservation/[...paths]/loading.tsx @@ -1,4 +1,4 @@ -import { BookingWidgetSkeleton } from "@scandic-hotels/booking-flow/BookingWidget/Skeleton" +import { BookingWidgetSkeleton } from "@scandic-hotels/booking-flow/BookingWidget" // This file is crucial for displaying a loading // state immediately in the booking flow. diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/alternative-hotels/loading.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/alternative-hotels/loading.tsx index db72f1b3a..c206db1d3 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/alternative-hotels/loading.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/alternative-hotels/loading.tsx @@ -1,5 +1,5 @@ -import { SelectHotelSkeleton } from "@scandic-hotels/booking-flow/components/SelectHotel" +import { AlternativeHotelsPageSkeleton } from "@scandic-hotels/booking-flow/pages/AlternativeHotelsPage" export default function AlternativeHotelsLoading() { - return + return } diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/loading.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/loading.tsx index e06c13975..779245067 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/loading.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/loading.tsx @@ -1,5 +1,5 @@ -import { SelectHotelSkeleton } from "@scandic-hotels/booking-flow/components/SelectHotel" +import { SelectHotelPageSkeleton } from "@scandic-hotels/booking-flow/pages/SelectHotelPage" export default function SelectHotelLoading() { - return + return } diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-rate/loading.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-rate/loading.tsx index 212163f82..0912de80a 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-rate/loading.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-rate/loading.tsx @@ -1,5 +1,5 @@ -import { SelectRateSkeleton } from "@scandic-hotels/booking-flow/components/SelectRate" +import { SelectRatePageSkeleton } from "@scandic-hotels/booking-flow/pages/SelectRatePage" export default function LoadingSelectRate() { - return + return } diff --git a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/loading.tsx b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/loading.tsx index 59cbf2505..e06bc80f5 100644 --- a/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/loading.tsx +++ b/apps/scandic-web/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/loading.tsx @@ -1,4 +1,4 @@ -import { BookingWidgetSkeleton } from "@scandic-hotels/booking-flow/BookingWidget/Skeleton" +import { BookingWidgetSkeleton } from "@scandic-hotels/booking-flow/BookingWidget" // This file is crucial for displaying a loading // state immediately in the booking flow. diff --git a/packages/booking-flow/lib/components/BookingWidget/index.tsx b/packages/booking-flow/lib/components/BookingWidget/index.tsx index 818b42c0c..cdf2961f4 100644 --- a/packages/booking-flow/lib/components/BookingWidget/index.tsx +++ b/packages/booking-flow/lib/components/BookingWidget/index.tsx @@ -14,6 +14,8 @@ import type { VariantProps } from "class-variance-authority" import type { BookingSearchType } from "../../misc/searchType" import type { bookingWidgetVariants } from "./BookingWidgetForm/variants" +export { BookingWidgetSkeleton } from "./Skeleton" + export type GuestsRoom = { adults: number childrenInRoom: Child[] diff --git a/packages/booking-flow/lib/pages/AlternativeHotelsPage.tsx b/packages/booking-flow/lib/pages/AlternativeHotelsPage.tsx index 813092cba..aaf0acd0a 100644 --- a/packages/booking-flow/lib/pages/AlternativeHotelsPage.tsx +++ b/packages/booking-flow/lib/pages/AlternativeHotelsPage.tsx @@ -18,6 +18,8 @@ import type { Lang } from "@scandic-hotels/common/constants/language" import type { NextSearchParams } from "../types" +export { SelectHotelSkeleton as AlternativeHotelsPageSkeleton } from "../components/SelectHotel" + export async function AlternativeHotelsPage({ lang, searchParams, diff --git a/packages/booking-flow/lib/pages/SelectHotelPage.tsx b/packages/booking-flow/lib/pages/SelectHotelPage.tsx index c6b69d036..d203dff8f 100644 --- a/packages/booking-flow/lib/pages/SelectHotelPage.tsx +++ b/packages/booking-flow/lib/pages/SelectHotelPage.tsx @@ -17,6 +17,8 @@ import type { Lang } from "@scandic-hotels/common/constants/language" import type { NextSearchParams } from "../types" +export { SelectHotelSkeleton as SelectHotelPageSkeleton } from "../components/SelectHotel" + export async function SelectHotelPage({ lang, searchParams, diff --git a/packages/booking-flow/lib/pages/SelectRatePage.tsx b/packages/booking-flow/lib/pages/SelectRatePage.tsx index 0c5213406..6cb9a7a54 100644 --- a/packages/booking-flow/lib/pages/SelectRatePage.tsx +++ b/packages/booking-flow/lib/pages/SelectRatePage.tsx @@ -15,6 +15,8 @@ import type { Lang } from "@scandic-hotels/common/constants/language" import type { NextSearchParams } from "../types" +export { SelectRateSkeleton as SelectRatePageSkeleton } from "../components/SelectRate" + const rateTypeRegex = { ARB: /(^B[a-z]{3}\d{6}$)/, VOUCHER: /(^VO[0-9a-z]*$)/, diff --git a/packages/booking-flow/package.json b/packages/booking-flow/package.json index 572525faa..4bec39e97 100644 --- a/packages/booking-flow/package.json +++ b/packages/booking-flow/package.json @@ -16,39 +16,27 @@ "./BookingWidget": "./lib/components/BookingWidget/index.tsx", "./BookingWidget/BookingWidgetForm/FormContent/Search": "./lib/components/BookingWidget/BookingWidgetForm/FormContent/Search/index.tsx", "./BookingWidget/FloatingBookingWidget": "./lib/components/BookingWidget/FloatingBookingWidget/index.tsx", - "./BookingWidget/Skeleton": "./lib/components/BookingWidget/Skeleton.tsx", "./components/AdditionalAmenities": "./lib/components/AdditionalAmenities/index.tsx", "./components/AddToCalendar": "./lib/components/AddToCalendar/index.tsx", "./components/BookingConfirmation/Header/Actions/helpers": "./lib/components/BookingConfirmation/Header/Actions/helpers.ts", "./components/EnterDetails/enterDetailsErrors": "./lib/components/EnterDetails/enterDetailsErrors.ts", - "./components/EnterDetails/Payment/helpers": "./lib/components/EnterDetails/Payment/helpers.ts", - "./components/EnterDetails/Payment/PaymentCallback/HandleErrorCallback": "./lib/components/EnterDetails/Payment/PaymentCallback/HandleErrorCallback.tsx", - "./components/EnterDetails/Payment/PaymentCallback/HandleSuccessCallback": "./lib/components/EnterDetails/Payment/PaymentCallback/HandleSuccessCallback.tsx", "./components/EnterDetails/Payment/PaymentCallback/helpers": "./lib/components/EnterDetails/Payment/PaymentCallback/helpers.ts", "./components/EnterDetails/StorageCleaner": "./lib/components/EnterDetails/StorageCleaner.tsx", "./components/PriceDetailsModal": "./lib/components/PriceDetailsModal/index.tsx", - "./components/SelectHotel": "./lib/components/SelectHotel/index.tsx", - "./components/SelectRate": "./lib/components/SelectRate/index.tsx", "./components/SidePeekAccordions/BreakfastAccordionItem": "./lib/components/SidePeekAccordions/BreakfastAccordionItem.tsx", "./components/SidePeekAccordions/CheckInCheckOutAccordionItem": "./lib/components/SidePeekAccordions/CheckInCheckOutAccordionItem.tsx", "./components/SidePeekAccordions/ParkingAccordionItem": "./lib/components/SidePeekAccordions/ParkingAccordionItem.tsx", "./global.d.ts": "./global.d.ts", "./hooks/useHandleBookingStatus": "./lib/hooks/useHandleBookingStatus.ts", - "./hooks/useSearchHistory": "./lib/hooks/useSearchHistory.ts", "./pages/*": "./lib/pages/*.tsx", - "./searchType": "./lib/misc/searchType.ts", "./stores/enter-details/types": "./lib/stores/enter-details/types.ts", "./stores/hotels-map": "./lib/stores/hotels-map.ts", "./stores/booking-confirmation": "./lib/stores/booking-confirmation/index.ts", "./types/components/findMyBooking/additionalInfoCookieValue": "./lib/types/components/findMyBooking/additionalInfoCookieValue.ts", - "./types/components/selectRate/selectRate": "./lib/types/components/selectRate/selectRate.ts", - "./types/stores/booking-confirmation": "./lib/types/stores/booking-confirmation.ts", - "./types/stores/rates": "./lib/types/stores/rates.ts", "./utils/getRoomFeatureDescription": "./lib/utils/getRoomFeatureDescription.ts", "./utils/isSameBooking": "./lib/utils/isSameBooking.ts", "./utils/nuqs": "./lib/utils/nuqs.ts", "./utils/SelectRate": "./lib/utils/SelectRate/index.tsx", - "./utils/specialRoomType": "./lib/utils/specialRoomType.ts", "./utils/url": "./lib/utils/url.ts" }, "dependencies": {