Merge branch 'develop' into feature/tracking
This commit is contained in:
@@ -18,3 +18,7 @@ export interface LoyaltyLevelsProps extends PartialDynamicContent {
|
||||
export interface OverviewTableProps extends PartialDynamicContent {
|
||||
firstItem: boolean
|
||||
}
|
||||
|
||||
export interface SignupFormWrapperProps extends PartialDynamicContent {}
|
||||
|
||||
export interface SignUpVerificationProps extends PartialDynamicContent {}
|
||||
|
||||
10
types/components/blocks/shortcuts.ts
Normal file
10
types/components/blocks/shortcuts.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { Shortcut } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export interface ShortcutsListProps extends Shortcut {
|
||||
firstItem?: boolean
|
||||
}
|
||||
|
||||
export type ShortcutsListItemsProps = {
|
||||
className?: string
|
||||
shortcutsListItems: ShortcutsListProps["shortcuts"]
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import { z } from "zod"
|
||||
|
||||
import { detailsSchema } from "@/components/HotelReservation/EnterDetails/Details/schema"
|
||||
|
||||
import { User } from "@/types/user"
|
||||
import type { SafeUser } from "@/types/user"
|
||||
|
||||
export interface DetailsSchema extends z.output<typeof detailsSchema> {}
|
||||
|
||||
export interface DetailsProps {
|
||||
user: User | null
|
||||
user: SafeUser
|
||||
}
|
||||
|
||||
6
types/components/enterDetails/step.ts
Normal file
6
types/components/enterDetails/step.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum StepEnum {
|
||||
selectBed = "select-bed",
|
||||
breakfast = "breakfast",
|
||||
details = "details",
|
||||
payment = "payment",
|
||||
}
|
||||
3
types/components/form/newPassword.ts
Normal file
3
types/components/form/newPassword.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { passwordValidators } from "@/utils/passwordValidator"
|
||||
|
||||
export type PasswordValidatorKey = keyof typeof passwordValidators
|
||||
5
types/components/form/registerForm.ts
Normal file
5
types/components/form/registerForm.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type RegisterFormProps = {
|
||||
link?: { href: string; text: string }
|
||||
subtitle?: string
|
||||
title: string
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import type { RoomData } from "@/types/hotel"
|
||||
|
||||
export interface RoomCardProps {
|
||||
id: string
|
||||
images: RoomData["attributes"]["content"]["images"]
|
||||
images: RoomData["images"]
|
||||
title: string
|
||||
subtitle: string
|
||||
badgeTextTransKey: string | null
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
export enum HotelHashValues { // Should these be translated?
|
||||
overview = "#overview",
|
||||
rooms = "#rooms-section",
|
||||
restaurant = "#restaurant-and-bar",
|
||||
meetings = "#meetings-and-conferences",
|
||||
wellness = "#wellness-and-exercise",
|
||||
activities = "#activities",
|
||||
faq = "#faq",
|
||||
export enum HotelHashValues {
|
||||
overview = "overview",
|
||||
rooms = "rooms-section",
|
||||
restaurant = "restaurant-and-bar",
|
||||
meetings = "meetings-and-conferences",
|
||||
wellness = "wellness-and-exercise",
|
||||
activities = "activities",
|
||||
faq = "faq",
|
||||
}
|
||||
|
||||
export type TabNavigationProps = {
|
||||
restaurantTitle: string
|
||||
hasActivities: boolean
|
||||
hasFAQ: boolean
|
||||
}
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
import { Product, RateDefinition } from "@/server/routers/hotels/output"
|
||||
import { z } from "zod"
|
||||
|
||||
import { Product, productTypePriceSchema } from "@/server/routers/hotels/output"
|
||||
|
||||
type ProductPrice = z.output<typeof productTypePriceSchema>
|
||||
|
||||
export type FlexibilityOptionProps = {
|
||||
product: Product | undefined
|
||||
name: string
|
||||
value: string
|
||||
paymentTerm: string
|
||||
priceInformation?: Array<string>
|
||||
}
|
||||
|
||||
export interface PriceListProps {
|
||||
publicPrice?: ProductPrice | Record<string, never>
|
||||
memberPrice?: ProductPrice | Record<string, never>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import type { PopoverProps } from "react-aria-components"
|
||||
|
||||
export interface PricePopoverProps extends Omit<PopoverProps, "children"> {
|
||||
children: React.ReactNode
|
||||
}
|
||||
@@ -3,7 +3,10 @@ import {
|
||||
RoomConfiguration,
|
||||
} from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomData } from "@/types/hotel"
|
||||
|
||||
export type RoomCardProps = {
|
||||
roomConfiguration: RoomConfiguration
|
||||
rateDefinitions: RateDefinition[]
|
||||
roomCategories: RoomData[]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomData } from "@/types/hotel"
|
||||
|
||||
export interface RoomSelectionProps {
|
||||
roomConfigurations: RoomsAvailability
|
||||
roomCategories: RoomData[]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { StepEnum } from "../../enterDetails/step"
|
||||
|
||||
export interface SectionAccordionProps {
|
||||
header: string
|
||||
isOpen: boolean
|
||||
isCompleted: boolean
|
||||
label: string
|
||||
path: string
|
||||
step: StepEnum
|
||||
}
|
||||
|
||||
@@ -32,8 +32,11 @@ export enum IconName {
|
||||
DoorOpen = "DoorOpen",
|
||||
ElectricBike = "ElectricBike",
|
||||
Email = "Email",
|
||||
EyeHide = "EyeHide",
|
||||
EyeShow = "EyeShow",
|
||||
Facebook = "Facebook",
|
||||
Fitness = "Fitness",
|
||||
Gallery = "Gallery",
|
||||
Gift = "Gift",
|
||||
Globe = "Globe",
|
||||
House = "House",
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import type { Shortcut } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export interface ShortcutsProps extends Shortcut {
|
||||
firstItem?: boolean
|
||||
}
|
||||
@@ -2,11 +2,12 @@ import { VariantProps } from "class-variance-authority"
|
||||
|
||||
import { teaserCardVariants } from "@/components/TempDesignSystem/TeaserCard/variants"
|
||||
|
||||
import { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
import type { TeaserCard } from "../trpc/routers/contentstack/blocks"
|
||||
|
||||
interface SidePeekButton {
|
||||
title: string
|
||||
call_to_action_text: string
|
||||
}
|
||||
|
||||
export interface TeaserCardProps
|
||||
@@ -16,6 +17,12 @@ export interface TeaserCardProps
|
||||
primaryButton?: CardProps["primaryButton"]
|
||||
secondaryButton?: CardProps["secondaryButton"]
|
||||
sidePeekButton?: SidePeekButton
|
||||
sidePeekContent?: TeaserCard["sidepeek_content"]
|
||||
image?: ImageVaultAsset
|
||||
className?: string
|
||||
}
|
||||
|
||||
export interface TeaserCardSidepeekProps {
|
||||
button: SidePeekButton
|
||||
sidePeekContent: NonNullable<TeaserCard["sidepeek_content"]>
|
||||
}
|
||||
|
||||
@@ -91,11 +91,6 @@ export type TrackingSDKData = TrackingSDKPageData & {
|
||||
pathName: string
|
||||
}
|
||||
|
||||
export type TrackingPosition =
|
||||
| "top menu"
|
||||
| "hamburger menu"
|
||||
| "join scandic friends sidebar"
|
||||
|
||||
// Old tracking setup types:
|
||||
// TODO: Remove this when we delete "current site"
|
||||
export type TrackingProps = {
|
||||
@@ -126,3 +121,9 @@ export type SiteSectionObject = {
|
||||
sitesection5: string
|
||||
sitesection6: string
|
||||
}
|
||||
|
||||
export type TrackingPosition =
|
||||
| "top menu"
|
||||
| "hamburger menu"
|
||||
| "join scandic friends sidebar"
|
||||
| "sign up verification"
|
||||
|
||||
@@ -5,3 +5,9 @@ export namespace CardsGridEnum {
|
||||
TeaserCard = "TeaserCard",
|
||||
}
|
||||
}
|
||||
|
||||
export enum CardsGridLayoutEnum {
|
||||
TWO_COLUMNS = "twoColumnGrid",
|
||||
THREE_COLUMNS = "threeColumnGrid",
|
||||
TWO_PLUS_ONE = "twoPlusOne", // Not sure if this is used?
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ export namespace DynamicContentEnum {
|
||||
overview_table = "overview_table",
|
||||
points_overview = "points_overview",
|
||||
previous_stays = "previous_stays",
|
||||
sign_up_form = "sign_up_form",
|
||||
sign_up_verification = "sign_up_verification",
|
||||
soonest_stays = "soonest_stays",
|
||||
upcoming_stays = "upcoming_stays",
|
||||
}
|
||||
@@ -29,6 +31,8 @@ export namespace DynamicContentEnum {
|
||||
components.overview_table,
|
||||
components.points_overview,
|
||||
components.previous_stays,
|
||||
components.sign_up_form,
|
||||
components.sign_up_verification,
|
||||
components.soonest_stays,
|
||||
components.upcoming_stays,
|
||||
]
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
getHotelDataSchema,
|
||||
parkingSchema,
|
||||
pointOfInterestSchema,
|
||||
roomSchema,
|
||||
} from "@/server/routers/hotels/output"
|
||||
import { roomSchema } from "@/server/routers/hotels/schemas/room"
|
||||
|
||||
export type HotelData = z.infer<typeof getHotelDataSchema>
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { cardsGridSchema } from "@/server/routers/contentstack/schemas/blocks/cardsGrid"
|
||||
import {
|
||||
cardsGridSchema,
|
||||
teaserCardBlockSchema,
|
||||
} from "@/server/routers/contentstack/schemas/blocks/cardsGrid"
|
||||
import { contentSchema } from "@/server/routers/contentstack/schemas/blocks/content"
|
||||
import { dynamicContentSchema } from "@/server/routers/contentstack/schemas/blocks/dynamicContent"
|
||||
import { shortcutsSchema } from "@/server/routers/contentstack/schemas/blocks/shortcuts"
|
||||
@@ -8,6 +11,7 @@ import { tableSchema } from "@/server/routers/contentstack/schemas/blocks/table"
|
||||
import { textColsSchema } from "@/server/routers/contentstack/schemas/blocks/textCols"
|
||||
import { uspGridSchema } from "@/server/routers/contentstack/schemas/blocks/uspGrid"
|
||||
|
||||
export interface TeaserCard extends z.output<typeof teaserCardBlockSchema> {}
|
||||
export interface CardsGrid extends z.output<typeof cardsGridSchema> {}
|
||||
export interface Content extends z.output<typeof contentSchema> {}
|
||||
export interface DynamicContent extends z.output<typeof dynamicContentSchema> {}
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { creditCardSchema, getUserSchema, membershipSchema } from "@/server/routers/user/output"
|
||||
import {
|
||||
creditCardSchema,
|
||||
getUserSchema,
|
||||
membershipSchema,
|
||||
} from "@/server/routers/user/output"
|
||||
|
||||
import type { RouterOutput } from "@/lib/trpc/client"
|
||||
|
||||
/**
|
||||
* All extended field needs to be added by API team to response or
|
||||
* we have to get the values from elsewhere
|
||||
*/
|
||||
export interface User extends z.output<typeof getUserSchema> { }
|
||||
export interface User extends z.output<typeof getUserSchema> {}
|
||||
|
||||
export type SafeUser = RouterOutput["user"]["getSafely"]
|
||||
|
||||
export type CreditCard = z.output<typeof creditCardSchema>
|
||||
|
||||
export interface Membership extends z.output<typeof membershipSchema> { }
|
||||
export interface Membership extends z.output<typeof membershipSchema> {}
|
||||
|
||||
export type Memberships = Membership[]
|
||||
|
||||
Reference in New Issue
Block a user