Merged in chore/next15 (pull request #1999)
chore (SW-834): Upgrade to Next 15 * wip: apply codemod and upgrade swc plugin * wip: design-system to react 19, fix issues from async (search)params * wip: fix remaining issues from codemod serverClient is now async because context use headers() getLang is now async because it uses headers() * Minor cleanup * Inline react-material-symbols package Package is seemingly not maintained any more and doesn't support React 19. This copies the package source into `design-system`, makes the necessary changes for 19 and export it for others to use. * Fix missing awaits * Disable modal exit animations Enabling modal exit animations via isExiting prop is causing modals to be rendered in "hidden" state and never unmount. Seems to be an issue with react-aria-components, see https://github.com/adobe/react-spectrum/issues/7563. Can probably be fixed by rewriting to a solution similar to https://react-spectrum.adobe.com/react-aria/examples/framer-modal-sheet.html * Remove unstable cache implementation and use in memory cache locally * Fix ref type in SelectFilter * Use cloneElement to add key prop to element Approved-by: Linus Flood
This commit is contained in:
@@ -28,12 +28,16 @@ export type BookingWidgetType = VariantProps<
|
||||
|
||||
export interface BookingWidgetProps {
|
||||
type?: BookingWidgetType
|
||||
bookingWidgetSearchParams: SearchParams<BookingWidgetSearchData>["searchParams"]
|
||||
bookingWidgetSearchParams: Awaited<
|
||||
SearchParams<BookingWidgetSearchData>["searchParams"]
|
||||
>
|
||||
}
|
||||
|
||||
export interface BookingWidgetClientProps {
|
||||
type?: BookingWidgetType
|
||||
bookingWidgetSearchParams: SearchParams<BookingWidgetSearchData>["searchParams"]
|
||||
bookingWidgetSearchParams: Awaited<
|
||||
SearchParams<BookingWidgetSearchData>["searchParams"]
|
||||
>
|
||||
pageSettingsBookingCodePromise: Promise<string> | null
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface InteractiveMapProps {
|
||||
pointsOfInterest?: PointOfInterest[]
|
||||
markerInfo?: MarkerInfo
|
||||
mapId: string
|
||||
closeButton: ReactElement
|
||||
closeButton: ReactElement<any>
|
||||
fitBounds?: boolean
|
||||
onTilesLoaded?: () => void
|
||||
onActivePoiChange?: (poi: PointOfInterest["name"] | null) => void
|
||||
|
||||
@@ -5,6 +5,7 @@ import type { Amenities } from "@/types/hotel"
|
||||
import type { ProductTypeCheque } from "@/types/trpc/routers/hotel/availability"
|
||||
import type { HotelResponse } from "@/components/HotelReservation/SelectHotel/helpers"
|
||||
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
|
||||
import type { SelectHotelParams } from "@/utils/url"
|
||||
import type { CategorizedFilters } from "./hotelFilters"
|
||||
import type {
|
||||
AlternativeHotelsSearchParams,
|
||||
@@ -75,6 +76,8 @@ export interface HotelCardDialogListingProps {
|
||||
}
|
||||
|
||||
export type SelectHotelMapContainerProps = {
|
||||
searchParams: SelectHotelSearchParams | AlternativeHotelsSearchParams
|
||||
booking: SelectHotelParams<
|
||||
SelectHotelSearchParams | AlternativeHotelsSearchParams
|
||||
>
|
||||
isAlternativeHotels?: boolean
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import type { Hotel } from "@/types/hotel"
|
||||
import type { Lang } from "@/constants/languages"
|
||||
import type { SelectHotelParams } from "@/utils/url"
|
||||
import type { SidePeekEnum } from "../sidePeek"
|
||||
import type {
|
||||
AlternativeHotelsSearchParams,
|
||||
SelectHotelSearchParams,
|
||||
} from "./selectHotelSearchParams"
|
||||
import type { AlternativeHotelsSearchParams } from "./selectHotelSearchParams"
|
||||
|
||||
export enum AvailabilityEnum {
|
||||
Available = "Available",
|
||||
@@ -23,9 +21,7 @@ export interface ContactProps {
|
||||
}
|
||||
|
||||
export interface SelectHotelProps {
|
||||
params: {
|
||||
lang: Lang
|
||||
}
|
||||
searchParams: SelectHotelSearchParams | AlternativeHotelsSearchParams
|
||||
booking: SelectHotelParams<AlternativeHotelsSearchParams>
|
||||
lang: Lang
|
||||
isAlternativeHotels?: boolean
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ import type { MembershipLevel } from "@/constants/membershipLevels"
|
||||
import type { LoyaltyLevel } from "@/server/routers/contentstack/loyaltyLevel/output"
|
||||
import type { CMSReward } from "../trpc/routers/contentstack/reward"
|
||||
|
||||
import type { JSX } from "react";
|
||||
|
||||
export type OverviewTableClientProps = {
|
||||
activeMembership: MembershipLevel | null
|
||||
levels: ComparisonLevel[]
|
||||
|
||||
@@ -2,11 +2,11 @@ import type { Lang } from "@/constants/languages"
|
||||
import type { PageContentTypeEnum } from "./requests/contentType"
|
||||
|
||||
export type SearchParams<S = {}> = {
|
||||
searchParams: S & { [key: string]: string }
|
||||
searchParams: Promise<S & { [key: string]: string }>
|
||||
}
|
||||
|
||||
export type Params<P = {}> = {
|
||||
params: P
|
||||
params: Promise<P>
|
||||
}
|
||||
|
||||
export type LangParams = {
|
||||
|
||||
@@ -10,6 +10,8 @@ import type {
|
||||
} from "./attrs"
|
||||
import type { RenderOptions } from "./option"
|
||||
|
||||
import type { JSX } from "react";
|
||||
|
||||
export interface RTEDefaultNode {
|
||||
attrs: Attributes
|
||||
children: RTENode[]
|
||||
|
||||
@@ -9,6 +9,8 @@ import type {
|
||||
import type { RTETypeEnum } from "./enums"
|
||||
import type { RenderOptions } from "./option"
|
||||
|
||||
import type { JSX } from "react";
|
||||
|
||||
export interface RTEDefaultNode {
|
||||
attrs: Attributes
|
||||
children: RTENode[]
|
||||
|
||||
Reference in New Issue
Block a user